@cobaltcore-dev/aurora 0.23.0 → 0.23.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.
@@ -2,13 +2,65 @@ import { B as e, K as t, U as n, g as r, lt as i, r as a, tt as o, ut as s, y as
2
2
  import { a as l } from "./trpcClient-Di56hpVv.mjs";
3
3
  import { t as u } from "./useProjectId-DBc5lpoU.mjs";
4
4
  import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
5
- import { useEffect as m, useRef as h, useState as g } from "react";
6
- import { useRouteContext as _ } from "@tanstack/react-router";
7
- import { Trans as v, useLingui as y } from "@lingui/react";
5
+ import { useCallback as m, useEffect as h, useLayoutEffect as g, useRef as _, useState as v } from "react";
6
+ import { useRouteContext as y } from "@tanstack/react-router";
7
+ import { Trans as b, useLingui as x } from "@lingui/react";
8
+ import { useVirtualizer as S } from "@tanstack/react-virtual";
9
+ //#region src/client/hooks/useAvailableViewportHeight.ts
10
+ var C = 52, w = 200;
11
+ function T(e = C) {
12
+ let t = _(null), [n, r] = v(null), [i, a] = v(void 0), o = m((e) => {
13
+ t.current = e, r(e);
14
+ }, []);
15
+ return g(() => {
16
+ if (!n) return;
17
+ let t = 0, r = () => {
18
+ let t = n.getBoundingClientRect().top + window.scrollY, r = Math.floor(window.innerHeight - t - e), i = Math.max(w, r);
19
+ a((e) => e !== void 0 && Math.abs(e - i) < 1 ? e : i);
20
+ }, i = () => {
21
+ t === 0 && (t = requestAnimationFrame(() => {
22
+ t = 0, r();
23
+ }));
24
+ };
25
+ r();
26
+ let o = typeof ResizeObserver > "u" ? null : new ResizeObserver(i);
27
+ if (o) {
28
+ o.observe(document.body);
29
+ for (let e = n.parentElement; e && e !== document.body; e = e.parentElement) o.observe(e);
30
+ }
31
+ return window.addEventListener("resize", i), () => {
32
+ t !== 0 && cancelAnimationFrame(t), o?.disconnect(), window.removeEventListener("resize", i);
33
+ };
34
+ }, [n, e]), {
35
+ ref: o,
36
+ elementRef: t,
37
+ height: i
38
+ };
39
+ }
40
+ //#endregion
41
+ //#region src/client/hooks/useVirtualizedTableBody.ts
42
+ var E = 48, D = 10;
43
+ function O({ count: e, rowHeight: t = E, overscan: n = D, bottomGap: r }) {
44
+ let { ref: i, elementRef: a, height: o } = T(r), s = S({
45
+ count: e,
46
+ getScrollElement: () => a.current,
47
+ estimateSize: () => t,
48
+ overscan: n
49
+ }), c = o !== void 0;
50
+ return {
51
+ ref: i,
52
+ elementRef: a,
53
+ height: o,
54
+ virtualItems: c ? s.getVirtualItems() : [],
55
+ totalSize: c ? s.getTotalSize() : 0,
56
+ measureElement: s.measureElement
57
+ };
58
+ }
59
+ //#endregion
8
60
  //#region src/client/hooks/useModalTracking.ts
9
- var b = ({ isOpen: e, actionPrefix: t }) => {
10
- let { onTrackEvent: n } = _({ strict: !1 }), r = h(!1), i = h(!1);
11
- return m(() => {
61
+ var k = ({ isOpen: e, actionPrefix: t }) => {
62
+ let { onTrackEvent: n } = y({ strict: !1 }), r = _(!1), i = _(!1);
63
+ return h(() => {
12
64
  e && !r.current && (n?.({
13
65
  source: "modal",
14
66
  action: `${t}.open`
@@ -31,85 +83,85 @@ var b = ({ isOpen: e, actionPrefix: t }) => {
31
83
  i.current = !1, r.current = !1;
32
84
  }
33
85
  };
34
- }, x = ({ isOpen: n, bucketName: r, onClose: i, onSuccess: s, onError: c }) => {
35
- let { i18n: h, _: g } = y(), _ = u(), x = l.useUtils(), { trackClose: S, markSubmitted: C, resetTracking: w } = b({
86
+ }, A = ({ isOpen: n, bucketName: r, onClose: i, onSuccess: s, onError: c }) => {
87
+ let { i18n: m, _: g } = x(), _ = u(), v = l.useUtils(), { trackClose: y, markSubmitted: S, resetTracking: C } = k({
36
88
  isOpen: n,
37
89
  actionPrefix: "storage.ceph.bucket.policy.delete"
38
- }), { data: T, isLoading: E, error: D } = l.storage.ceph.bucketPolicy.get.useQuery({
90
+ }), { data: w, isLoading: T, error: E } = l.storage.ceph.bucketPolicy.get.useQuery({
39
91
  project_id: _,
40
92
  bucketName: r
41
93
  }, {
42
94
  enabled: n && !!_,
43
95
  retry: !1
44
- }), O = l.storage.ceph.bucketPolicy.delete.useMutation({
96
+ }), D = l.storage.ceph.bucketPolicy.delete.useMutation({
45
97
  onSuccess: () => {
46
- x.storage.ceph.bucketPolicy.get.invalidate(), s?.(r), k();
98
+ v.storage.ceph.bucketPolicy.get.invalidate(), s?.(r), O();
47
99
  },
48
100
  onError: (e) => {
49
101
  c?.(r, e.message);
50
102
  }
51
103
  });
52
- m(() => {
53
- n || (O.reset(), w());
104
+ h(() => {
105
+ n || (D.reset(), C());
54
106
  }, [n, r]);
55
- let k = () => {
56
- O.reset(), w(), i();
107
+ let O = () => {
108
+ D.reset(), C(), i();
57
109
  }, A = () => {
58
- C(), O.mutate({
110
+ S(), D.mutate({
59
111
  project_id: _,
60
112
  bucketName: r
61
113
  });
62
114
  };
63
115
  if (!n) return null;
64
- let j = !!T?.policy, M = O.isPending;
116
+ let j = !!w?.policy, M = D.isPending;
65
117
  return /*#__PURE__*/ f(a, {
66
- title: h._({ id: "On9AgT" }),
118
+ title: m._({ id: "On9AgT" }),
67
119
  open: n,
68
120
  onCancel: () => {
69
- S(), k();
121
+ y(), O();
70
122
  },
71
- confirmButtonLabel: h._({ id: "VMoZmg" }),
123
+ confirmButtonLabel: m._({ id: "VMoZmg" }),
72
124
  confirmButtonVariant: "primary-danger",
73
125
  onConfirm: A,
74
- cancelButtonLabel: h._({ id: "dEgA5A" }),
126
+ cancelButtonLabel: m._({ id: "dEgA5A" }),
75
127
  size: "small",
76
- disableConfirmButton: M || E || !j || !!D,
128
+ disableConfirmButton: M || T || !j || !!E,
77
129
  children: /*#__PURE__*/ p(o, {
78
130
  direction: "vertical",
79
131
  gap: "4",
80
132
  children: [
81
- E && /*#__PURE__*/ f("div", {
133
+ T && /*#__PURE__*/ f("div", {
82
134
  className: "flex items-center justify-center py-4",
83
135
  children: /*#__PURE__*/ f(t, {
84
136
  variant: "primary",
85
137
  size: "large"
86
138
  })
87
139
  }),
88
- D && /*#__PURE__*/ f(e, {
140
+ E && /*#__PURE__*/ f(e, {
89
141
  variant: "error",
90
- title: h._({ id: "XicAqm" }),
91
- children: D.message
142
+ title: m._({ id: "XicAqm" }),
143
+ children: E.message
92
144
  }),
93
- !E && !D && !j && /*#__PURE__*/ f(e, {
145
+ !T && !E && !j && /*#__PURE__*/ f(e, {
94
146
  variant: "warning",
95
- title: h._({ id: "GZjazt" }),
96
- children: /*#__PURE__*/ f(v, { id: "/HejCc" })
147
+ title: m._({ id: "GZjazt" }),
148
+ children: /*#__PURE__*/ f(b, { id: "/HejCc" })
97
149
  }),
98
- !E && !D && j && /*#__PURE__*/ p(d, { children: [/*#__PURE__*/ f("p", {
150
+ !T && !E && j && /*#__PURE__*/ p(d, { children: [/*#__PURE__*/ f("p", {
99
151
  className: "text-theme-default",
100
- children: /*#__PURE__*/ f(v, {
152
+ children: /*#__PURE__*/ f(b, {
101
153
  id: "QDUXIq",
102
154
  values: { bucketName: r },
103
155
  components: { 0: /*#__PURE__*/ f("strong", {}) }
104
156
  })
105
157
  }), /*#__PURE__*/ f("p", {
106
158
  className: "text-theme-default",
107
- children: /*#__PURE__*/ f(v, { id: "Rsh494" })
159
+ children: /*#__PURE__*/ f(b, { id: "Rsh494" })
108
160
  })] }),
109
- O.isError && /*#__PURE__*/ f(e, {
161
+ D.isError && /*#__PURE__*/ f(e, {
110
162
  variant: "error",
111
- title: h._({ id: "+Pe7SS" }),
112
- children: O.error?.message
163
+ title: m._({ id: "+Pe7SS" }),
164
+ children: D.error?.message
113
165
  })
114
166
  ]
115
167
  })
@@ -117,7 +169,7 @@ var b = ({ isOpen: e, actionPrefix: t }) => {
117
169
  };
118
170
  //#endregion
119
171
  //#region src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/hooks/bucketStateHelpers.ts
120
- function S(e, t, n) {
172
+ function j(e, t, n) {
121
173
  let r = e.filter((e) => e.isLatest && !e.isDeleteMarker), i = e.filter((e) => !e.isDeleteMarker), a = t && e.length > 0 && i.length === 0, o = t && e.some((e) => e.isDeleteMarker || !e.isLatest && !e.isDeleteMarker), s = t ? n > 0 ? n : r.length : n + i.length;
122
174
  return {
123
175
  currentVersions: r,
@@ -129,42 +181,42 @@ function S(e, t, n) {
129
181
  }
130
182
  //#endregion
131
183
  //#region src/client/routes/_auth/projects/$projectId/storage/-components/Ceph/Buckets/EmptyBucketModal.tsx
132
- var C = ({ isOpen: e, bucket: r, onClose: s, onSuccess: c, onError: d }) => {
133
- let { i18n: m, _: h } = y(), _ = u(), [x, C] = g(""), [w, T] = g(null), [E, D] = g(!1), { trackClose: O, markSubmitted: k, resetTracking: A } = b({
184
+ var M = ({ isOpen: e, bucket: r, onClose: s, onSuccess: c, onError: d }) => {
185
+ let { i18n: m, _: h } = x(), g = u(), [_, y] = v(""), [S, C] = v(null), [w, T] = v(!1), { trackClose: E, markSubmitted: D, resetTracking: O } = k({
134
186
  isOpen: e,
135
187
  actionPrefix: "storage.ceph.bucket.empty"
136
- }), j = l.useUtils(), { data: M, isLoading: N, error: P } = l.storage.ceph.versioning.getStatus.useQuery({
137
- project_id: _ ?? "",
188
+ }), A = l.useUtils(), { data: M, isLoading: N, error: P } = l.storage.ceph.versioning.getStatus.useQuery({
189
+ project_id: g ?? "",
138
190
  bucket: r?.name ?? ""
139
191
  }, {
140
- enabled: !!_ && !!r && e,
192
+ enabled: !!g && !!r && e,
141
193
  staleTime: 30 * 1e3
142
194
  }), { data: F, isLoading: I, error: L } = l.storage.ceph.objects.list.useQuery({
143
- project_id: _ ?? "",
195
+ project_id: g ?? "",
144
196
  containerName: r?.name ?? "",
145
197
  maxKeys: 100,
146
198
  delimiter: "",
147
199
  showVersions: !0
148
200
  }, {
149
- enabled: !!_ && !!r && e && M?.status !== "Unversioned",
201
+ enabled: !!g && !!r && e && M?.status !== "Unversioned",
150
202
  staleTime: 30 * 1e3
151
- }), R = M?.status === "Enabled" || M?.status === "Suspended", { isBucketEmpty: z, hasOnlyDeleteMarkers: B } = S(F?.versions ?? [], R, r?.count ?? 0), V = z && B, H = l.storage.ceph.objects.deleteAll.useMutation({ onSettled: () => {
152
- j.storage.ceph.containers.list.invalidate(), j.storage.ceph.objects.list.invalidate(), U();
203
+ }), R = M?.status === "Enabled" || M?.status === "Suspended", { isBucketEmpty: z, hasOnlyDeleteMarkers: B } = j(F?.versions ?? [], R, r?.count ?? 0), V = z && B, H = l.storage.ceph.objects.deleteAll.useMutation({ onSettled: () => {
204
+ A.storage.ceph.containers.list.invalidate(), A.storage.ceph.objects.list.invalidate(), U();
153
205
  } }), U = () => {
154
- C(""), T(null), D(!1), H.reset(), A(), s();
206
+ y(""), C(null), T(!1), H.reset(), O(), s();
155
207
  }, W = (e) => {
156
208
  let t = e.target.value;
157
- C(t), w && T(null);
209
+ y(t), S && C(null);
158
210
  }, G = () => {
159
211
  if (!r) return;
160
- if (x.trim() !== r.name) {
161
- T(m._({ id: "wxVsr5" }));
212
+ if (_.trim() !== r.name) {
213
+ C(m._({ id: "wxVsr5" }));
162
214
  return;
163
215
  }
164
- k();
165
- let e = r.name, t = V || E;
216
+ D();
217
+ let e = r.name, t = V || w;
166
218
  H.mutate({
167
- project_id: _,
219
+ project_id: g,
168
220
  containerName: e,
169
221
  includeVersionsAndDeleteMarkers: t
170
222
  }, {
@@ -184,34 +236,34 @@ var C = ({ isOpen: e, bucket: r, onClose: s, onSuccess: c, onError: d }) => {
184
236
  title: m._({ id: "1mFMeP" }),
185
237
  open: e,
186
238
  onCancel: () => {
187
- O(), U();
239
+ E(), U();
188
240
  },
189
241
  confirmButtonLabel: m._({ id: "1mFMeP" }),
190
242
  confirmButtonVariant: "primary-danger",
191
243
  onConfirm: G,
192
244
  cancelButtonLabel: m._({ id: "dEgA5A" }),
193
245
  size: "small",
194
- disableConfirmButton: H.isPending || x.trim() !== r.name || Y,
246
+ disableConfirmButton: H.isPending || _.trim() !== r.name || Y,
195
247
  children: /*#__PURE__*/ p(o, {
196
248
  direction: "vertical",
197
249
  gap: "6",
198
250
  children: [
199
251
  Y && /*#__PURE__*/ f("div", {
200
252
  className: "bg-theme-danger-10 text-theme-danger rounded p-4",
201
- children: /*#__PURE__*/ f(v, { id: "5p97CR" })
253
+ children: /*#__PURE__*/ f(b, { id: "5p97CR" })
202
254
  }),
203
255
  /*#__PURE__*/ f("p", {
204
256
  className: "text-theme-default m-0",
205
- children: /*#__PURE__*/ f(v, { id: "T3+VKR" })
257
+ children: /*#__PURE__*/ f(b, { id: "T3+VKR" })
206
258
  }),
207
259
  /*#__PURE__*/ f(n, {
208
260
  label: m._({ id: "dEHa3L" }),
209
261
  required: !0,
210
- value: x,
262
+ value: _,
211
263
  onChange: W,
212
264
  onKeyDown: K,
213
- invalid: !!w,
214
- errortext: w || void 0,
265
+ invalid: !!S,
266
+ errortext: S || void 0,
215
267
  disabled: H.isPending || Y,
216
268
  placeholder: r.name,
217
269
  autoFocus: !0
@@ -222,21 +274,21 @@ var C = ({ isOpen: e, bucket: r, onClose: s, onSuccess: c, onError: d }) => {
222
274
  title: m._({ id: "CfKRC1" }),
223
275
  open: e,
224
276
  onCancel: () => {
225
- O(), U();
277
+ E(), U();
226
278
  },
227
279
  confirmButtonLabel: m._({ id: "CfKRC1" }),
228
280
  confirmButtonVariant: "primary-danger",
229
281
  onConfirm: G,
230
282
  cancelButtonLabel: m._({ id: "dEgA5A" }),
231
283
  size: "small",
232
- disableConfirmButton: H.isPending || x.trim() !== r.name || Y,
284
+ disableConfirmButton: H.isPending || _.trim() !== r.name || Y,
233
285
  children: J ? /*#__PURE__*/ p(o, {
234
286
  direction: "horizontal",
235
287
  gap: "2",
236
288
  alignment: "center",
237
289
  children: [/*#__PURE__*/ f(t, {}), /*#__PURE__*/ f("span", {
238
290
  className: "text-juno-grey-light-1 text-sm",
239
- children: /*#__PURE__*/ f(v, { id: "rPuPb+" })
291
+ children: /*#__PURE__*/ f(b, { id: "rPuPb+" })
240
292
  })]
241
293
  }) : /*#__PURE__*/ p(o, {
242
294
  direction: "vertical",
@@ -244,32 +296,32 @@ var C = ({ isOpen: e, bucket: r, onClose: s, onSuccess: c, onError: d }) => {
244
296
  children: [
245
297
  Y && /*#__PURE__*/ f("div", {
246
298
  className: "bg-theme-danger-10 text-theme-danger rounded p-4",
247
- children: /*#__PURE__*/ f(v, { id: "5p97CR" })
299
+ children: /*#__PURE__*/ f(b, { id: "5p97CR" })
248
300
  }),
249
301
  /*#__PURE__*/ f("p", {
250
302
  className: "text-theme-default m-0",
251
- children: M && M.status !== "Unversioned" ? /*#__PURE__*/ f(v, {
303
+ children: M && M.status !== "Unversioned" ? /*#__PURE__*/ f(b, {
252
304
  id: "i9I/nL",
253
305
  values: { bucketName: q }
254
- }) : /*#__PURE__*/ f(v, {
306
+ }) : /*#__PURE__*/ f(b, {
255
307
  id: "KvQbFT",
256
308
  values: { bucketName: q }
257
309
  })
258
310
  }),
259
311
  M && M.status !== "Unversioned" && /*#__PURE__*/ f(i, {
260
- checked: E,
261
- onChange: (e) => D(e.target.checked),
312
+ checked: w,
313
+ onChange: (e) => T(e.target.checked),
262
314
  label: m._({ id: "mbmb/h" }),
263
315
  disabled: H.isPending || Y
264
316
  }),
265
317
  /*#__PURE__*/ f(n, {
266
318
  label: m._({ id: "dEHa3L" }),
267
319
  required: !0,
268
- value: x,
320
+ value: _,
269
321
  onChange: W,
270
322
  onKeyDown: K,
271
- invalid: !!w,
272
- errortext: w || void 0,
323
+ invalid: !!S,
324
+ errortext: S || void 0,
273
325
  disabled: H.isPending || Y,
274
326
  placeholder: r.name,
275
327
  autoFocus: !0
@@ -277,15 +329,15 @@ var C = ({ isOpen: e, bucket: r, onClose: s, onSuccess: c, onError: d }) => {
277
329
  ]
278
330
  })
279
331
  });
280
- }, w = ({ isOpen: e, bucket: i, onClose: h, onSuccess: _, onError: x }) => {
281
- let { i18n: C, _: w } = y(), T = u(), [E, D] = g(""), [O, k] = g(null), { trackClose: A, markSubmitted: j, resetTracking: M } = b({
332
+ }, N = ({ isOpen: e, bucket: i, onClose: m, onSuccess: g, onError: _ }) => {
333
+ let { i18n: y, _: S } = x(), C = u(), [w, T] = v(""), [E, D] = v(null), { trackClose: O, markSubmitted: A, resetTracking: M } = k({
282
334
  isOpen: e,
283
335
  actionPrefix: "storage.ceph.bucket.delete"
284
336
  }), N = l.useUtils(), { data: P, isLoading: F } = l.storage.ceph.versioning.getStatus.useQuery({
285
- project_id: T ?? "",
337
+ project_id: C ?? "",
286
338
  bucket: i?.name ?? ""
287
339
  }, { enabled: e && i !== null }), I = P?.status === "Enabled" || P?.status === "Suspended", { data: L, isLoading: R, error: z } = l.storage.ceph.objects.list.useQuery({
288
- project_id: T ?? "",
340
+ project_id: C ?? "",
289
341
  containerName: i?.name ?? "",
290
342
  maxKeys: 100,
291
343
  delimiter: "",
@@ -293,59 +345,59 @@ var C = ({ isOpen: e, bucket: r, onClose: s, onSuccess: c, onError: d }) => {
293
345
  }, { enabled: e && i !== null }), B = l.storage.ceph.containers.delete.useMutation({ onSettled: () => {
294
346
  N.storage.ceph.containers.list.invalidate();
295
347
  } });
296
- m(() => {
297
- e || (D(""), k(null), B.reset(), M());
348
+ h(() => {
349
+ e || (T(""), D(null), B.reset(), M());
298
350
  }, [e, i?.name]);
299
351
  let V = () => {
300
- D(""), k(null), B.reset(), M(), h();
352
+ T(""), D(null), B.reset(), M(), m();
301
353
  }, H = (e) => {
302
354
  let t = e.target.value;
303
- D(t), O && k(null);
355
+ T(t), E && D(null);
304
356
  }, U = () => {
305
357
  if (!i || z) return;
306
- if (E.trim() !== i.name) {
307
- k(C._({ id: "wxVsr5" }));
358
+ if (w.trim() !== i.name) {
359
+ D(y._({ id: "wxVsr5" }));
308
360
  return;
309
361
  }
310
- j();
362
+ A();
311
363
  let e = i.name;
312
364
  B.mutate({
313
- project_id: T,
365
+ project_id: C,
314
366
  bucketName: e
315
367
  }, {
316
368
  onSuccess: () => {
317
- V(), _?.(e);
369
+ V(), g?.(e);
318
370
  },
319
371
  onError: (t) => {
320
- V(), x?.(e, t.message);
372
+ V(), _?.(e, t.message);
321
373
  }
322
374
  });
323
375
  }, W = (e) => {
324
376
  e.key === "Enter" && U();
325
377
  };
326
378
  if (!e || !i) return null;
327
- let G = L?.objects?.length ?? 0, { effectiveCurrentObjectCount: K, hasOldVersionsOrDeleteMarkers: q } = S(L?.versions ?? [], I, G), J = K > 0, Y = q, X = J || Y, Z = z?.message, Q = R || F;
379
+ let G = L?.objects?.length ?? 0, { effectiveCurrentObjectCount: K, hasOldVersionsOrDeleteMarkers: q } = j(L?.versions ?? [], I, G), J = K > 0, Y = q, X = J || Y, Z = z?.message, Q = R || F;
328
380
  return /*#__PURE__*/ f(a, {
329
- title: C._({ id: "IwlPLb" }),
381
+ title: y._({ id: "IwlPLb" }),
330
382
  open: e,
331
383
  onCancel: () => {
332
- A(), V();
384
+ O(), V();
333
385
  },
334
- confirmButtonLabel: X ? void 0 : C._({ id: "IwlPLb" }),
386
+ confirmButtonLabel: X ? void 0 : y._({ id: "IwlPLb" }),
335
387
  confirmButtonVariant: X ? void 0 : "primary-danger",
336
388
  onConfirm: X ? void 0 : U,
337
- cancelButtonLabel: X ? void 0 : C._({ id: "dEgA5A" }),
389
+ cancelButtonLabel: X ? void 0 : y._({ id: "dEgA5A" }),
338
390
  modalFooter: X ? /*#__PURE__*/ f(r, {
339
391
  className: "flex justify-end",
340
392
  children: /*#__PURE__*/ f(s, { children: /*#__PURE__*/ f(c, {
341
393
  variant: "primary",
342
394
  onClick: V,
343
395
  "data-testid": "delete-has-objects-close-button",
344
- children: /*#__PURE__*/ f(v, { id: "yz7wBu" })
396
+ children: /*#__PURE__*/ f(b, { id: "yz7wBu" })
345
397
  }) })
346
398
  }) : void 0,
347
399
  size: "small",
348
- disableConfirmButton: B.isPending || Q || !!z || E.trim() !== i.name,
400
+ disableConfirmButton: B.isPending || Q || !!z || w.trim() !== i.name,
349
401
  children: /*#__PURE__*/ p(o, {
350
402
  direction: "vertical",
351
403
  gap: "6",
@@ -353,7 +405,7 @@ var C = ({ isOpen: e, bucket: r, onClose: s, onSuccess: c, onError: d }) => {
353
405
  className: "text-theme-error",
354
406
  role: "alert",
355
407
  "aria-live": "assertive",
356
- children: /*#__PURE__*/ f(v, {
408
+ children: /*#__PURE__*/ f(b, {
357
409
  id: "MJLqeY",
358
410
  values: { errorMessage: Z }
359
411
  })
@@ -363,53 +415,53 @@ var C = ({ isOpen: e, bucket: r, onClose: s, onSuccess: c, onError: d }) => {
363
415
  alignment: "center",
364
416
  children: [/*#__PURE__*/ f(t, {}), /*#__PURE__*/ f("span", {
365
417
  className: "text-juno-grey-light-1 text-sm",
366
- children: /*#__PURE__*/ f(v, { id: "rPuPb+" })
418
+ children: /*#__PURE__*/ f(b, { id: "rPuPb+" })
367
419
  })]
368
420
  }) : X ? /*#__PURE__*/ p("div", {
369
421
  className: "text-theme-default",
370
422
  children: [/*#__PURE__*/ f("p", {
371
423
  className: "mb-4",
372
- children: /*#__PURE__*/ f(v, { id: "8/m18Q" })
424
+ children: /*#__PURE__*/ f(b, { id: "8/m18Q" })
373
425
  }), /*#__PURE__*/ p("ul", {
374
426
  className: "list-disc space-y-1 pl-5",
375
- children: [J && /*#__PURE__*/ f("li", { children: /*#__PURE__*/ f(v, { id: "5Od/iS" }) }), Y && /*#__PURE__*/ f("li", { children: /*#__PURE__*/ f(v, { id: "vi0pmB" }) })]
427
+ children: [J && /*#__PURE__*/ f("li", { children: /*#__PURE__*/ f(b, { id: "5Od/iS" }) }), Y && /*#__PURE__*/ f("li", { children: /*#__PURE__*/ f(b, { id: "vi0pmB" }) })]
376
428
  })]
377
429
  }) : /*#__PURE__*/ p(d, { children: [/*#__PURE__*/ f("p", {
378
430
  className: "text-theme-default",
379
- children: /*#__PURE__*/ f(v, { id: "/pOQrn" })
431
+ children: /*#__PURE__*/ f(b, { id: "/pOQrn" })
380
432
  }), /*#__PURE__*/ f(n, {
381
- label: C._({ id: "dEHa3L" }),
433
+ label: y._({ id: "dEHa3L" }),
382
434
  required: !0,
383
- value: E,
435
+ value: w,
384
436
  onChange: H,
385
437
  onKeyDown: W,
386
- invalid: !!O,
387
- errortext: O || void 0,
438
+ invalid: !!E,
439
+ errortext: E || void 0,
388
440
  disabled: B.isPending,
389
441
  placeholder: i.name
390
442
  })] })]
391
443
  })
392
444
  });
393
- }, T = ({ isOpen: e, bucket: t, onClose: r, onSuccess: i, onError: s }) => {
394
- let { i18n: c, _: d } = y(), m = u(), [h, _] = g(""), [x, S] = g(null), { trackClose: C, markSubmitted: w, resetTracking: T } = b({
445
+ }, P = ({ isOpen: e, bucket: t, onClose: r, onSuccess: i, onError: s }) => {
446
+ let { i18n: c, _: d } = x(), m = u(), [h, g] = v(""), [_, y] = v(null), { trackClose: S, markSubmitted: C, resetTracking: w } = k({
395
447
  isOpen: e,
396
448
  actionPrefix: "storage.ceph.bucket.versions.delete"
397
- }), E = l.useUtils(), D = l.storage.ceph.objects.deleteAll.useMutation({ onSettled: () => {
398
- E.storage.ceph.containers.list.invalidate(), E.storage.ceph.objects.list.invalidate(), O();
399
- } }), O = () => {
400
- _(""), S(null), D.reset(), T(), r();
401
- }, k = (e) => {
449
+ }), T = l.useUtils(), E = l.storage.ceph.objects.deleteAll.useMutation({ onSettled: () => {
450
+ T.storage.ceph.containers.list.invalidate(), T.storage.ceph.objects.list.invalidate(), D();
451
+ } }), D = () => {
452
+ g(""), y(null), E.reset(), w(), r();
453
+ }, O = (e) => {
402
454
  let t = e.target.value;
403
- _(t), x && S(null);
455
+ g(t), _ && y(null);
404
456
  }, A = () => {
405
457
  if (!t) return;
406
458
  if (h.trim() !== t.name) {
407
- S(c._({ id: "wxVsr5" }));
459
+ y(c._({ id: "wxVsr5" }));
408
460
  return;
409
461
  }
410
- w();
462
+ C();
411
463
  let e = t.name;
412
- D.mutate({
464
+ E.mutate({
413
465
  project_id: m,
414
466
  containerName: e,
415
467
  includeVersionsAndDeleteMarkers: !0
@@ -426,99 +478,99 @@ var C = ({ isOpen: e, bucket: r, onClose: s, onSuccess: c, onError: d }) => {
426
478
  title: c._({ id: "1mFMeP" }),
427
479
  open: e,
428
480
  onCancel: () => {
429
- C(), O();
481
+ S(), D();
430
482
  },
431
483
  confirmButtonLabel: c._({ id: "1mFMeP" }),
432
484
  confirmButtonVariant: "primary-danger",
433
485
  onConfirm: A,
434
486
  cancelButtonLabel: c._({ id: "dEgA5A" }),
435
487
  size: "small",
436
- disableConfirmButton: D.isPending || h.trim() !== t.name,
488
+ disableConfirmButton: E.isPending || h.trim() !== t.name,
437
489
  children: /*#__PURE__*/ p(o, {
438
490
  direction: "vertical",
439
491
  gap: "6",
440
492
  children: [/*#__PURE__*/ f("p", {
441
493
  className: "text-theme-default m-0",
442
- children: /*#__PURE__*/ f(v, { id: "T3+VKR" })
494
+ children: /*#__PURE__*/ f(b, { id: "T3+VKR" })
443
495
  }), /*#__PURE__*/ f(n, {
444
496
  label: c._({ id: "dEHa3L" }),
445
497
  required: !0,
446
498
  value: h,
447
- onChange: k,
499
+ onChange: O,
448
500
  onKeyDown: (e) => {
449
501
  e.key === "Enter" && A();
450
502
  },
451
- invalid: !!x,
452
- errortext: x || void 0,
453
- disabled: D.isPending,
503
+ invalid: !!_,
504
+ errortext: _ || void 0,
505
+ disabled: E.isPending,
454
506
  placeholder: t.name,
455
507
  autoFocus: !0,
456
508
  className: "overflow-x-hidden [overflow-wrap:anywhere]"
457
509
  })]
458
510
  })
459
511
  });
460
- }, E = (e) => ({
461
- message: /*#__PURE__*/ f(v, { id: "M3bysB" }),
462
- description: /*#__PURE__*/ f(v, {
512
+ }, F = (e) => ({
513
+ message: /*#__PURE__*/ f(b, { id: "M3bysB" }),
514
+ description: /*#__PURE__*/ f(b, {
463
515
  id: "VKCkZH",
464
516
  values: { bucketName: e }
465
517
  })
466
- }), D = (e, t) => ({
467
- message: /*#__PURE__*/ f(v, { id: "UaP7Th" }),
468
- description: /*#__PURE__*/ f(v, {
518
+ }), I = (e, t) => ({
519
+ message: /*#__PURE__*/ f(b, { id: "UaP7Th" }),
520
+ description: /*#__PURE__*/ f(b, {
469
521
  id: "boefwq",
470
522
  values: {
471
523
  bucketName: e,
472
524
  errorMessage: t
473
525
  }
474
526
  })
475
- }), O = (e, t) => ({
476
- message: /*#__PURE__*/ f(v, { id: "b95YH9" }),
477
- description: t === 0 ? /*#__PURE__*/ f(v, {
527
+ }), L = (e, t) => ({
528
+ message: /*#__PURE__*/ f(b, { id: "b95YH9" }),
529
+ description: t === 0 ? /*#__PURE__*/ f(b, {
478
530
  id: "8erw15",
479
531
  values: { bucketName: e }
480
- }) : t === 1 ? /*#__PURE__*/ f(v, {
532
+ }) : t === 1 ? /*#__PURE__*/ f(b, {
481
533
  id: "QpbWpf",
482
534
  values: {
483
535
  bucketName: e,
484
536
  deletedCount: t
485
537
  }
486
- }) : /*#__PURE__*/ f(v, {
538
+ }) : /*#__PURE__*/ f(b, {
487
539
  id: "JPWqr2",
488
540
  values: {
489
541
  bucketName: e,
490
542
  deletedCount: t
491
543
  }
492
544
  })
493
- }), k = (e, t) => ({
494
- message: /*#__PURE__*/ f(v, { id: "66YUKF" }),
495
- description: /*#__PURE__*/ f(v, {
545
+ }), R = (e, t) => ({
546
+ message: /*#__PURE__*/ f(b, { id: "66YUKF" }),
547
+ description: /*#__PURE__*/ f(b, {
496
548
  id: "t7ewhH",
497
549
  values: {
498
550
  bucketName: e,
499
551
  errorMessage: t
500
552
  }
501
553
  })
502
- }), A = (e) => ({
503
- message: /*#__PURE__*/ f(v, { id: "bHUarC" }),
504
- description: /*#__PURE__*/ f(v, {
554
+ }), z = (e) => ({
555
+ message: /*#__PURE__*/ f(b, { id: "bHUarC" }),
556
+ description: /*#__PURE__*/ f(b, {
505
557
  id: "hQdfmR",
506
558
  values: { bucketName: e }
507
559
  })
508
- }), j = (e, t) => ({
509
- message: /*#__PURE__*/ f(v, { id: "1NFtQz" }),
510
- description: /*#__PURE__*/ f(v, {
560
+ }), B = (e, t) => ({
561
+ message: /*#__PURE__*/ f(b, { id: "1NFtQz" }),
562
+ description: /*#__PURE__*/ f(b, {
511
563
  id: "CongmL",
512
564
  values: {
513
565
  bucketName: e,
514
566
  errorMessage: t
515
567
  }
516
568
  })
517
- }), M = (e, t, n) => {
569
+ }), V = (e, t, n) => {
518
570
  let r = n.length > 0, i = e + n.length, a = n.length;
519
571
  return {
520
- message: r ? /*#__PURE__*/ f(v, { id: "6fuDFZ" }) : /*#__PURE__*/ f(v, { id: "BOoOLQ" }),
521
- description: r ? /*#__PURE__*/ f(v, {
572
+ message: r ? /*#__PURE__*/ f(b, { id: "6fuDFZ" }) : /*#__PURE__*/ f(b, { id: "BOoOLQ" }),
573
+ description: r ? /*#__PURE__*/ f(b, {
522
574
  id: "pD/2BQ",
523
575
  values: {
524
576
  emptiedCount: e,
@@ -526,7 +578,7 @@ var C = ({ isOpen: e, bucket: r, onClose: s, onSuccess: c, onError: d }) => {
526
578
  totalDeleted: t,
527
579
  errorsLength: a
528
580
  }
529
- }) : /*#__PURE__*/ f(v, {
581
+ }) : /*#__PURE__*/ f(b, {
530
582
  id: "YVLcyI",
531
583
  values: {
532
584
  emptiedCount: e,
@@ -534,72 +586,72 @@ var C = ({ isOpen: e, bucket: r, onClose: s, onSuccess: c, onError: d }) => {
534
586
  }
535
587
  })
536
588
  };
537
- }, N = (e) => ({
538
- message: /*#__PURE__*/ f(v, { id: "nU1mHK" }),
539
- description: /*#__PURE__*/ f(v, {
589
+ }, H = (e) => ({
590
+ message: /*#__PURE__*/ f(b, { id: "nU1mHK" }),
591
+ description: /*#__PURE__*/ f(b, {
540
592
  id: "z/5vyM",
541
593
  values: { bucketName: e }
542
594
  })
543
- }), P = (e, t) => ({
544
- message: /*#__PURE__*/ f(v, { id: "eslBIK" }),
545
- description: /*#__PURE__*/ f(v, {
595
+ }), U = (e, t) => ({
596
+ message: /*#__PURE__*/ f(b, { id: "eslBIK" }),
597
+ description: /*#__PURE__*/ f(b, {
546
598
  id: "jMaofI",
547
599
  values: {
548
600
  bucketName: e,
549
601
  errorMessage: t
550
602
  }
551
603
  })
552
- }), F = (e) => ({
553
- message: /*#__PURE__*/ f(v, { id: "Ni6RvO" }),
554
- description: /*#__PURE__*/ f(v, {
604
+ }), W = (e) => ({
605
+ message: /*#__PURE__*/ f(b, { id: "Ni6RvO" }),
606
+ description: /*#__PURE__*/ f(b, {
555
607
  id: "RHm1CB",
556
608
  values: { bucketName: e }
557
609
  })
558
- }), I = (e, t) => ({
559
- message: /*#__PURE__*/ f(v, { id: "5PhMH2" }),
560
- description: /*#__PURE__*/ f(v, {
610
+ }), G = (e, t) => ({
611
+ message: /*#__PURE__*/ f(b, { id: "5PhMH2" }),
612
+ description: /*#__PURE__*/ f(b, {
561
613
  id: "pQB7Sy",
562
614
  values: {
563
615
  bucketName: e,
564
616
  errorMessage: t
565
617
  }
566
618
  })
567
- }), L = (e) => ({
568
- message: /*#__PURE__*/ f(v, { id: "QAoi3Q" }),
569
- description: /*#__PURE__*/ f(v, {
619
+ }), K = (e) => ({
620
+ message: /*#__PURE__*/ f(b, { id: "QAoi3Q" }),
621
+ description: /*#__PURE__*/ f(b, {
570
622
  id: "LT2Vv7",
571
623
  values: { bucketName: e }
572
624
  })
573
- }), R = (e, t) => ({
574
- message: /*#__PURE__*/ f(v, { id: "cBfLPr" }),
575
- description: /*#__PURE__*/ f(v, {
625
+ }), q = (e, t) => ({
626
+ message: /*#__PURE__*/ f(b, { id: "cBfLPr" }),
627
+ description: /*#__PURE__*/ f(b, {
576
628
  id: "XjGaah",
577
629
  values: {
578
630
  bucketName: e,
579
631
  errorMessage: t
580
632
  }
581
633
  })
582
- }), z = (e, t) => ({
583
- message: /*#__PURE__*/ f(v, { id: "V6AQa5" }),
584
- description: t === 0 ? /*#__PURE__*/ f(v, {
634
+ }), J = (e, t) => ({
635
+ message: /*#__PURE__*/ f(b, { id: "V6AQa5" }),
636
+ description: t === 0 ? /*#__PURE__*/ f(b, {
585
637
  id: "EJqSbS",
586
638
  values: { bucketName: e }
587
- }) : t === 1 ? /*#__PURE__*/ f(v, {
639
+ }) : t === 1 ? /*#__PURE__*/ f(b, {
588
640
  id: "NwXhO7",
589
641
  values: {
590
642
  deletedCount: t,
591
643
  bucketName: e
592
644
  }
593
- }) : /*#__PURE__*/ f(v, {
645
+ }) : /*#__PURE__*/ f(b, {
594
646
  id: "nPI6Rk",
595
647
  values: {
596
648
  deletedCount: t,
597
649
  bucketName: e
598
650
  }
599
651
  })
600
- }), B = (e, t) => ({
601
- message: /*#__PURE__*/ f(v, { id: "W1ZvXE" }),
602
- description: /*#__PURE__*/ f(v, {
652
+ }), Y = (e, t) => ({
653
+ message: /*#__PURE__*/ f(b, { id: "W1ZvXE" }),
654
+ description: /*#__PURE__*/ f(b, {
603
655
  id: "pPr2iF",
604
656
  values: {
605
657
  bucketName: e,
@@ -608,6 +660,6 @@ var C = ({ isOpen: e, bucket: r, onClose: s, onSuccess: c, onError: d }) => {
608
660
  })
609
661
  });
610
662
  //#endregion
611
- export { w as _, O as a, x as b, L as c, N as d, I as f, T as g, z as h, A as i, M as l, B as m, E as n, k as o, F as p, j as r, R as s, D as t, P as u, C as v, b as x, S as y };
663
+ export { O as S, N as _, L as a, A as b, K as c, H as d, G as f, P as g, J as h, z as i, V as l, Y as m, F as n, R as o, W as p, B as r, q as s, I as t, U as u, M as v, k as x, j as y };
612
664
 
613
- //# sourceMappingURL=BucketToastNotifications-BhPi4WWw.mjs.map
665
+ //# sourceMappingURL=BucketToastNotifications-Dq4dudkM.mjs.map