@cobaltcore-dev/aurora 0.7.0 → 0.8.0

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 (101) hide show
  1. package/README.md +101 -7
  2. package/dist/client/AuroraApp.d.ts +38 -0
  3. package/dist/client/{ContentHeader-kx1Th5Sq.mjs → ContentHeader-DqsGNvtD.mjs} +17 -17
  4. package/dist/client/{ContentHeader-kx1Th5Sq.mjs.map → ContentHeader-DqsGNvtD.mjs.map} +1 -1
  5. package/dist/client/{DeleteFlavorModal-C3cb7YiJ.mjs → DeleteFlavorModal-C3m7bQJu.mjs} +163 -163
  6. package/dist/client/{DeleteFlavorModal-C3cb7YiJ.mjs.map → DeleteFlavorModal-C3m7bQJu.mjs.map} +1 -1
  7. package/dist/client/{EditSecurityGroupModal-CpP54WIK.mjs → EditSecurityGroupModal-DKusxfta.mjs} +18 -18
  8. package/dist/client/{EditSecurityGroupModal-CpP54WIK.mjs.map → EditSecurityGroupModal-DKusxfta.mjs.map} +1 -1
  9. package/dist/client/{FiltersInput-DxcyR6Bp.mjs → FiltersInput-GzR4D0q6.mjs} +21 -21
  10. package/dist/client/{FiltersInput-DxcyR6Bp.mjs.map → FiltersInput-GzR4D0q6.mjs.map} +1 -1
  11. package/dist/client/{FloatingIpActionModals-BP8RWHbu.mjs → FloatingIpActionModals-CRvROJ3H.mjs} +51 -51
  12. package/dist/client/{FloatingIpActionModals-BP8RWHbu.mjs.map → FloatingIpActionModals-CRvROJ3H.mjs.map} +1 -1
  13. package/dist/client/{ImageToastNotifications-TZ3EfQg-.mjs → ImageToastNotifications-BuDXpTkl.mjs} +344 -344
  14. package/dist/client/{ImageToastNotifications-TZ3EfQg-.mjs.map → ImageToastNotifications-BuDXpTkl.mjs.map} +1 -1
  15. package/dist/client/{RouteError-QSV7qOoJ.mjs → RouteError-DVAiT0mT.mjs} +2 -2
  16. package/dist/client/{RouteError-QSV7qOoJ.mjs.map → RouteError-DVAiT0mT.mjs.map} +1 -1
  17. package/dist/client/{SortInput-CYv2_Pur.mjs → SortInput-VK7IYqQv.mjs} +6 -6
  18. package/dist/client/{SortInput-CYv2_Pur.mjs.map → SortInput-VK7IYqQv.mjs.map} +1 -1
  19. package/dist/client/{_flavorId-C2x43-6S.mjs → _flavorId-B9Vqkraj.mjs} +8 -8
  20. package/dist/client/{_flavorId-C2x43-6S.mjs.map → _flavorId-B9Vqkraj.mjs.map} +1 -1
  21. package/dist/client/{_flavorId-CR8ZUI-P.mjs → _flavorId-CFpNGz52.mjs} +62 -62
  22. package/dist/client/{_flavorId-CR8ZUI-P.mjs.map → _flavorId-CFpNGz52.mjs.map} +1 -1
  23. package/dist/client/{_floatingIpId-BCk41_Lb.mjs → _floatingIpId-B5GMSLeQ.mjs} +2 -2
  24. package/dist/client/{_floatingIpId-BCk41_Lb.mjs.map → _floatingIpId-B5GMSLeQ.mjs.map} +1 -1
  25. package/dist/client/{_floatingIpId-BGrOAmPT.mjs → _floatingIpId-C2-BeRmF.mjs} +27 -27
  26. package/dist/client/{_floatingIpId-BGrOAmPT.mjs.map → _floatingIpId-C2-BeRmF.mjs.map} +1 -1
  27. package/dist/client/_imageId-9NZytfNs.mjs +534 -0
  28. package/dist/client/{_imageId-CvfD832b.mjs.map → _imageId-9NZytfNs.mjs.map} +1 -1
  29. package/dist/client/_pcaId-BwTvJJgh.mjs +479 -0
  30. package/dist/client/_pcaId-BwTvJJgh.mjs.map +1 -0
  31. package/dist/client/{_pcaId-DOHycvCf.mjs → _pcaId-DUHQd0rB.mjs} +2 -2
  32. package/dist/client/{_pcaId-DOHycvCf.mjs.map → _pcaId-DUHQd0rB.mjs.map} +1 -1
  33. package/dist/client/{_projectId-DOgwFiqD.mjs → _projectId-B_2sZKk-.mjs} +2 -2
  34. package/dist/client/{_projectId-DOgwFiqD.mjs.map → _projectId-B_2sZKk-.mjs.map} +1 -1
  35. package/dist/client/{_projectId-MxcHrXW4.mjs → _projectId-CLgClx24.mjs} +3 -3
  36. package/dist/client/{_projectId-MxcHrXW4.mjs.map → _projectId-CLgClx24.mjs.map} +1 -1
  37. package/dist/client/_projectId-cW9aQ4Ag.mjs +271 -0
  38. package/dist/client/_projectId-cW9aQ4Ag.mjs.map +1 -0
  39. package/dist/client/{_securityGroupId-KKw4RPdH.mjs → _securityGroupId-DYxmXUOP.mjs} +319 -319
  40. package/dist/client/{_securityGroupId-KKw4RPdH.mjs.map → _securityGroupId-DYxmXUOP.mjs.map} +1 -1
  41. package/dist/client/{_securityGroupId-CJJanWiY.mjs → _securityGroupId-fhK1CuZh.mjs} +2 -2
  42. package/dist/client/{_securityGroupId-CJJanWiY.mjs.map → _securityGroupId-fhK1CuZh.mjs.map} +1 -1
  43. package/dist/client/{_storageType-DYjo-6ej.mjs → _storageType-2_fau4B5.mjs} +698 -698
  44. package/dist/client/{_storageType-DYjo-6ej.mjs.map → _storageType-2_fau4B5.mjs.map} +1 -1
  45. package/dist/client/{_storageType-4wSxI__0.mjs → _storageType-dRTFMKG3.mjs} +2 -2
  46. package/dist/client/{_storageType-4wSxI__0.mjs.map → _storageType-dRTFMKG3.mjs.map} +1 -1
  47. package/dist/client/{about-Bo9vxGHy.mjs → about-Nsxkyh9U.mjs} +2 -2
  48. package/dist/client/{about-Bo9vxGHy.mjs.map → about-Nsxkyh9U.mjs.map} +1 -1
  49. package/dist/client/{build-DeJcDjPi.mjs → build-BdRRmNf5.mjs} +3290 -3274
  50. package/dist/client/{build-DeJcDjPi.mjs.map → build-BdRRmNf5.mjs.map} +1 -1
  51. package/dist/client/{constants-BmcGYeR-.mjs → constants-J5nm9hbP.mjs} +15 -15
  52. package/dist/client/{constants-BmcGYeR-.mjs.map → constants-J5nm9hbP.mjs.map} +1 -1
  53. package/dist/client/{flavors-BxFVqgnb.mjs → flavors-_P7R-CeT.mjs} +2 -2
  54. package/dist/client/{flavors-BxFVqgnb.mjs.map → flavors-_P7R-CeT.mjs.map} +1 -1
  55. package/dist/client/{flavors-CfdgjsZY.mjs → flavors-m1qDHzeS.mjs} +238 -221
  56. package/dist/client/flavors-m1qDHzeS.mjs.map +1 -0
  57. package/dist/client/{floatingips-ByRb82wS.mjs → floatingips-Dq4DXQYb.mjs} +90 -90
  58. package/dist/client/{floatingips-ByRb82wS.mjs.map → floatingips-Dq4DXQYb.mjs.map} +1 -1
  59. package/dist/client/{images-CenluYV8.mjs → images-CpM-T_jM.mjs} +2 -2
  60. package/dist/client/{images-CenluYV8.mjs.map → images-CpM-T_jM.mjs.map} +1 -1
  61. package/dist/client/images-DHmVgQAh2.mjs +1890 -0
  62. package/dist/client/images-DHmVgQAh2.mjs.map +1 -0
  63. package/dist/client/{images-C_dX7nY6.mjs → images-Dbjo4yKn.mjs} +2 -2
  64. package/dist/client/{images-C_dX7nY6.mjs.map → images-Dbjo4yKn.mjs.map} +1 -1
  65. package/dist/client/index.d.ts +1 -1
  66. package/dist/client/index.js +382 -351
  67. package/dist/client/index.js.map +1 -1
  68. package/dist/client/{objects-gxSjvbvF.mjs → objects-DKWp9RtR.mjs} +2 -2
  69. package/dist/client/{objects-gxSjvbvF.mjs.map → objects-DKWp9RtR.mjs.map} +1 -1
  70. package/dist/client/{objects-BJM6YeuF.mjs → objects-DaCuy_CB.mjs} +1156 -1156
  71. package/dist/client/{objects-BJM6YeuF.mjs.map → objects-DaCuy_CB.mjs.map} +1 -1
  72. package/dist/client/{pca-Bl8NmoVZ.mjs → pca-C8zWTSSt.mjs} +2 -2
  73. package/dist/client/{pca-Bl8NmoVZ.mjs.map → pca-C8zWTSSt.mjs.map} +1 -1
  74. package/dist/client/pca-CK5-j7Kk.mjs +202 -0
  75. package/dist/client/pca-CK5-j7Kk.mjs.map +1 -0
  76. package/dist/client/{projects-pe2_dCnV.mjs → projects-CHYn7L5e.mjs} +2 -2
  77. package/dist/client/{projects-pe2_dCnV.mjs.map → projects-CHYn7L5e.mjs.map} +1 -1
  78. package/dist/client/{projects-D2iewAzu.mjs → projects-CeLhtLvf.mjs} +2 -2
  79. package/dist/client/{projects-D2iewAzu.mjs.map → projects-CeLhtLvf.mjs.map} +1 -1
  80. package/dist/client/{projects-CgclWI16.mjs → projects-ClViaUuv.mjs} +11 -11
  81. package/dist/client/{projects-CgclWI16.mjs.map → projects-ClViaUuv.mjs.map} +1 -1
  82. package/dist/client/{_projectId-BDSWnMGj.mjs → routeInfo-DlDJZnpg.mjs} +34 -8
  83. package/dist/client/routeInfo-DlDJZnpg.mjs.map +1 -0
  84. package/dist/client/{securitygroups-DahZkVYQ.mjs → securitygroups-CNFLu9zS.mjs} +112 -112
  85. package/dist/client/{securitygroups-DahZkVYQ.mjs.map → securitygroups-CNFLu9zS.mjs.map} +1 -1
  86. package/dist/client/{useListWithFiltering-DaYcu5AB.mjs → useListWithFiltering-v2A0-SZb.mjs} +9 -9
  87. package/dist/client/{useListWithFiltering-DaYcu5AB.mjs.map → useListWithFiltering-v2A0-SZb.mjs.map} +1 -1
  88. package/dist/server/index.d.ts +6 -1
  89. package/dist/server/index.js +37 -12
  90. package/package.json +4 -4
  91. package/dist/client/_imageId-CvfD832b.mjs +0 -534
  92. package/dist/client/_pcaId-BxBt5DXi.mjs +0 -459
  93. package/dist/client/_pcaId-BxBt5DXi.mjs.map +0 -1
  94. package/dist/client/_projectId-BDSWnMGj.mjs.map +0 -1
  95. package/dist/client/_projectId-DS4nR59B.mjs +0 -299
  96. package/dist/client/_projectId-DS4nR59B.mjs.map +0 -1
  97. package/dist/client/flavors-CfdgjsZY.mjs.map +0 -1
  98. package/dist/client/images-CKqIXUq52.mjs +0 -1873
  99. package/dist/client/images-CKqIXUq52.mjs.map +0 -1
  100. package/dist/client/pca-RSiWpJs9.mjs +0 -182
  101. package/dist/client/pca-RSiWpJs9.mjs.map +0 -1
@@ -1,146 +1,163 @@
1
- import { B as e, F as t, G as n, H as r, P as i, Q as a, R as o, U as s, a as c, at as l, ct as u, it as d, k as f, n as p, ot as m, q as h, r as g, s as _, tt as v, w as y, x as b } from "./build-DeJcDjPi.mjs";
1
+ import { D as e, E as t, G as n, H as r, J as i, L as a, N as o, Q as s, S as c, V as l, Y as u, _ as d, ct as f, et as p, it as m, k as h, m as g, ot as _, p as v, rt as y, x as b } from "./build-BdRRmNf5.mjs";
2
2
  import { t as x } from "./useErrorTranslation-Dc0eE8Zt.mjs";
3
- import { t as S } from "./flavors-BxFVqgnb.mjs";
4
- import { t as C } from "./ContentHeader-kx1Th5Sq.mjs";
5
- import { n as w, r as T, t as E } from "./DeleteFlavorModal-C3cb7YiJ.mjs";
6
- import { t as D } from "./SortInput-CYv2_Pur.mjs";
3
+ import { t as S } from "./flavors-_P7R-CeT.mjs";
4
+ import { t as C } from "./ContentHeader-DqsGNvtD.mjs";
5
+ import { n as w, r as T, t as E } from "./DeleteFlavorModal-C3m7bQJu.mjs";
6
+ import { t as D } from "./SortInput-VK7IYqQv.mjs";
7
7
  import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
8
8
  import { Suspense as j, startTransition as M, use as N, useCallback as P, useEffect as F, useRef as I, useState as L } from "react";
9
- import { useNavigate as R, useParams as z, useSearch as B } from "@tanstack/react-router";
10
- import { TRPCClientError as V } from "@trpc/client";
11
- import { Trans as H, useLingui as U } from "@lingui/react";
12
- import { ErrorBoundary as W } from "react-error-boundary";
9
+ import { useNavigate as R, useParams as ee, useSearch as z } from "@tanstack/react-router";
10
+ import { TRPCClientError as B } from "@trpc/client";
11
+ import { Trans as V, useLingui as H } from "@lingui/react";
12
+ import { ErrorBoundary as U } from "react-error-boundary";
13
13
  //#region src/client/routes/_auth/projects/$projectId/compute/-components/Flavors/-components/FlavorListContainer.tsx
14
- var G = ({ flavors: e, isLoading: r, client: s, project: c, onFlavorDeleted: l, canDeleteFlavor: u, canMangageAccess: p, canManageSpecs: m, canListSpecs: g, currentPage: _ = 1, totalPages: x = 1, onPageChange: S }) => {
15
- let { i18n: C, _: D } = U(), j = R(), [M, N] = L(!1), [P, F] = L(!1), [I, B] = L(!1), [V, W] = L(null), { projectId: G } = z({ from: "/_auth/projects/$projectId/compute/flavors/" }), K = (e) => {
14
+ var W = ({ flavors: i, isLoading: c, client: l, project: d, onFlavorDeleted: f, canDeleteFlavor: m, canMangageAccess: g, canManageSpecs: v, canListSpecs: y, currentPage: b = 1, totalPages: x = 1, onPageChange: S }) => {
15
+ let { i18n: C, _: D } = H(), j = R(), [M, N] = L(!1), [P, I] = L(!1), [z, B] = L(!1), [U, W] = L(null), [G, K] = L(b.toString());
16
+ F(() => {
17
+ K(b.toString());
18
+ }, [b]);
19
+ let { projectId: q } = ee({ from: "/_auth/projects/$projectId/compute/flavors/" }), J = (e) => {
16
20
  W(e), N(!0);
17
- }, q = (e) => {
18
- W(e), F(!0);
19
- }, J = (e) => {
21
+ }, Y = (e) => {
22
+ W(e), I(!0);
23
+ }, X = (e) => {
20
24
  W(e), B(!0);
21
- }, Y = () => {
25
+ }, Z = () => {
22
26
  N(!1), W(null);
27
+ }, Q = () => {
28
+ U && f && f(U.name || ""), Z();
29
+ }, $ = (e) => {
30
+ e >= 1 && e <= x && (S?.(e), K(e.toString()));
23
31
  };
24
- return r ? /*#__PURE__*/ k("div", {
32
+ return c ? /*#__PURE__*/ k("div", {
25
33
  "data-testid": "loading",
26
34
  children: /*#__PURE__*/ k("div", {
27
35
  "data-testid": "loading",
28
- children: /*#__PURE__*/ k(y, { children: /*#__PURE__*/ k(n, {
36
+ children: /*#__PURE__*/ k(o, { children: /*#__PURE__*/ k(n, {
29
37
  colSpan: 3,
30
- children: /*#__PURE__*/ A(a, {
38
+ children: /*#__PURE__*/ A(u, {
31
39
  distribution: "center",
32
40
  alignment: "center",
33
- children: [/*#__PURE__*/ k(o, { variant: "primary" }), /*#__PURE__*/ k(H, { id: "Z3FXyt" })]
41
+ children: [/*#__PURE__*/ k(r, { variant: "primary" }), /*#__PURE__*/ k(V, { id: "Z3FXyt" })]
34
42
  })
35
43
  }) })
36
44
  })
37
- }) : !e || e.length === 0 ? /*#__PURE__*/ k(f, {
45
+ }) : !i || i.length === 0 ? /*#__PURE__*/ k(p, {
38
46
  columns: 7,
39
47
  className: "flavors",
40
48
  "data-testid": "no-flavors",
41
- children: /*#__PURE__*/ k(y, { children: /*#__PURE__*/ A(n, {
49
+ children: /*#__PURE__*/ k(o, { children: /*#__PURE__*/ A(n, {
42
50
  colSpan: 7,
43
- children: [/*#__PURE__*/ k(h, { children: /*#__PURE__*/ k(H, { id: "PiyQJ/" }) }), /*#__PURE__*/ k("p", { children: /*#__PURE__*/ k(H, { id: "KSW/GC" }) })]
51
+ children: [/*#__PURE__*/ k(s, { children: /*#__PURE__*/ k(V, { id: "PiyQJ/" }) }), /*#__PURE__*/ k("p", { children: /*#__PURE__*/ k(V, { id: "KSW/GC" }) })]
44
52
  }) })
45
53
  }) : /*#__PURE__*/ A(O, { children: [
46
- /*#__PURE__*/ A(f, {
54
+ /*#__PURE__*/ A(p, {
47
55
  columns: 7,
48
56
  minContentColumns: [6],
49
57
  className: "flavors",
50
58
  "data-testid": "flavors-table",
51
- children: [/*#__PURE__*/ A(y, { children: [
52
- /*#__PURE__*/ k(t, { children: /*#__PURE__*/ k(H, { id: "6YtxFj" }) }),
53
- /*#__PURE__*/ k(t, { children: /*#__PURE__*/ k(H, { id: "k5nYwm" }) }),
54
- /*#__PURE__*/ k(t, { children: /*#__PURE__*/ k(H, { id: "K+e/0e" }) }),
55
- /*#__PURE__*/ k(t, { children: /*#__PURE__*/ k(H, { id: "n0ZttO" }) }),
56
- /*#__PURE__*/ k(t, { children: /*#__PURE__*/ k(H, { id: "p4nMut" }) }),
57
- /*#__PURE__*/ k(t, { children: /*#__PURE__*/ k(H, { id: "HyyJ83" }) }),
58
- /*#__PURE__*/ k(t, {})
59
- ] }), e.map((e) => /*#__PURE__*/ A(y, {
60
- "data-testid": `flavor-row-${e.id}`,
59
+ children: [/*#__PURE__*/ A(o, { children: [
60
+ /*#__PURE__*/ k(a, { children: /*#__PURE__*/ k(V, { id: "6YtxFj" }) }),
61
+ /*#__PURE__*/ k(a, { children: /*#__PURE__*/ k(V, { id: "k5nYwm" }) }),
62
+ /*#__PURE__*/ k(a, { children: /*#__PURE__*/ k(V, { id: "K+e/0e" }) }),
63
+ /*#__PURE__*/ k(a, { children: /*#__PURE__*/ k(V, { id: "n0ZttO" }) }),
64
+ /*#__PURE__*/ k(a, { children: /*#__PURE__*/ k(V, { id: "p4nMut" }) }),
65
+ /*#__PURE__*/ k(a, { children: /*#__PURE__*/ k(V, { id: "HyyJ83" }) }),
66
+ /*#__PURE__*/ k(a, {})
67
+ ] }), i.map((t) => /*#__PURE__*/ A(o, {
68
+ "data-testid": `flavor-row-${t.id}`,
61
69
  onClick: () => j({
62
70
  to: "/projects/$projectId/compute/flavors/$flavorId",
63
71
  params: {
64
- projectId: G,
65
- flavorId: e.id
72
+ projectId: q,
73
+ flavorId: t.id
66
74
  }
67
75
  }),
68
76
  children: [
69
- /*#__PURE__*/ k(n, { children: e.name || e.id }),
70
- /*#__PURE__*/ k(n, { children: e.vcpus || "–" }),
71
- /*#__PURE__*/ k(n, { children: e.ram || "–" }),
72
- /*#__PURE__*/ k(n, { children: e.disk || "–" }),
73
- /*#__PURE__*/ k(n, { children: e.swap || "–" }),
74
- /*#__PURE__*/ k(n, { children: e["os-flavor-access:is_public"] === !1 ? C._({ id: "zwBp5t" }) : C._({ id: "7d1a0d" }) }),
77
+ /*#__PURE__*/ k(n, { children: t.name || t.id }),
78
+ /*#__PURE__*/ k(n, { children: t.vcpus || "–" }),
79
+ /*#__PURE__*/ k(n, { children: t.ram || "–" }),
80
+ /*#__PURE__*/ k(n, { children: t.disk || "–" }),
81
+ /*#__PURE__*/ k(n, { children: t.swap || "–" }),
82
+ /*#__PURE__*/ k(n, { children: t["os-flavor-access:is_public"] === !1 ? C._({ id: "zwBp5t" }) : C._({ id: "7d1a0d" }) }),
75
83
  /*#__PURE__*/ k(n, {
76
84
  onClick: (e) => e.stopPropagation(),
77
- children: /*#__PURE__*/ k(i, { children: /*#__PURE__*/ A(v, { children: [
78
- /*#__PURE__*/ k(d, {
85
+ children: /*#__PURE__*/ k(e, { children: /*#__PURE__*/ A(_, { children: [
86
+ /*#__PURE__*/ k(h, {
79
87
  label: C._({ id: "URmyfc" }),
80
88
  onClick: () => j({
81
89
  to: "/projects/$projectId/compute/flavors/$flavorId",
82
90
  params: {
83
- projectId: G,
84
- flavorId: e.id
91
+ projectId: q,
92
+ flavorId: t.id
85
93
  }
86
94
  })
87
95
  }),
88
- (m || g) && /*#__PURE__*/ k(d, {
89
- label: m ? C._({ id: "SIfYq6" }) : C._({ id: "6GBt0m" }),
90
- onClick: () => q(e)
96
+ (v || y) && /*#__PURE__*/ k(h, {
97
+ label: v ? C._({ id: "SIfYq6" }) : C._({ id: "6GBt0m" }),
98
+ onClick: () => Y(t)
91
99
  }),
92
- p && /*#__PURE__*/ k(d, {
100
+ g && /*#__PURE__*/ k(h, {
93
101
  label: C._({ id: "cWbW6w" }),
94
- onClick: () => J(e),
95
- disabled: e["os-flavor-access:is_public"] !== !1
102
+ onClick: () => X(t),
103
+ disabled: t["os-flavor-access:is_public"] !== !1
96
104
  }),
97
- u && /*#__PURE__*/ k(d, {
105
+ m && /*#__PURE__*/ k(h, {
98
106
  label: C._({ id: "JT3I1g" }),
99
- onClick: () => K(e)
107
+ onClick: () => J(t)
100
108
  })
101
109
  ] }) })
102
110
  })
103
111
  ]
104
- }, e.id))]
112
+ }, t.id))]
105
113
  }),
106
114
  x > 1 && /*#__PURE__*/ k("div", {
107
115
  className: "flex justify-center py-4",
108
- children: /*#__PURE__*/ k(b, {
116
+ children: /*#__PURE__*/ k(t, {
109
117
  variant: "input",
110
- currentPage: _,
118
+ currentPage: b,
111
119
  pages: x,
112
- onPressPrevious: () => S?.(Math.max(_ - 1, 1)),
113
- onPressNext: () => S?.(Math.min(_ + 1, x)),
114
- onSelectChange: (e) => S?.(e)
120
+ onPressPrevious: () => $(Math.max(b - 1, 1)),
121
+ onPressNext: () => $(Math.min(b + 1, x)),
122
+ onSelectChange: (e) => {
123
+ $(e);
124
+ },
125
+ onInputChange: (e) => {
126
+ K(e === void 0 ? "" : String(e));
127
+ },
128
+ onKeyDown: (e) => {
129
+ if (e.key === "Enter" && G !== "") {
130
+ let e = parseInt(G, 10);
131
+ !isNaN(e) && e >= 1 && e <= x && $(e);
132
+ }
133
+ }
115
134
  })
116
135
  }),
117
136
  /*#__PURE__*/ k(E, {
118
- client: s,
137
+ client: l,
119
138
  isOpen: M,
120
- onClose: Y,
121
- project: c,
122
- flavor: V,
123
- onSuccess: () => {
124
- V && l && l(V.name || ""), Y();
125
- }
139
+ onClose: Z,
140
+ project: d,
141
+ flavor: U,
142
+ onSuccess: Q
126
143
  }),
127
144
  /*#__PURE__*/ k(T, {
128
- client: s,
145
+ client: l,
129
146
  isOpen: P,
130
- onClose: () => F(!1),
131
- project: c,
132
- flavor: V,
133
- canEdit: m
147
+ onClose: () => I(!1),
148
+ project: d,
149
+ flavor: U,
150
+ canEdit: v
134
151
  }),
135
152
  /*#__PURE__*/ k(w, {
136
- client: s,
137
- isOpen: I,
153
+ client: l,
154
+ isOpen: z,
138
155
  onClose: () => B(!1),
139
- project: c,
140
- flavor: V
156
+ project: d,
157
+ flavor: U
141
158
  })
142
159
  ] });
143
- }, K = (e, t, n) => {
160
+ }, G = (e, t, n) => {
144
161
  switch (e) {
145
162
  case "id":
146
163
  if (!t) return;
@@ -182,7 +199,7 @@ var G = ({ flavors: e, isLoading: r, client: s, project: c, onFlavorDeleted: l,
182
199
  case "os-flavor-access:is_public": return t == null || typeof t == "boolean" || typeof t == "string" && (t === "true" || t === "false") ? void 0 : n({ id: "MmtQVF" });
183
200
  default: return;
184
201
  }
185
- }, q = (e) => {
202
+ }, K = (e) => {
186
203
  let t = {
187
204
  name: String(e.name),
188
205
  vcpus: Number(e.vcpus),
@@ -190,26 +207,26 @@ var G = ({ flavors: e, isLoading: r, client: s, project: c, onFlavorDeleted: l,
190
207
  disk: Number(e.disk)
191
208
  }, n = (e) => e != null && e !== "" && String(e).trim() !== "", r = (e) => e != null && e !== "" && String(e).trim() !== "" && !isNaN(Number(e));
192
209
  return n(e.id) && (t.id = String(e.id).trim()), n(e.description) && (t.description = String(e.description).trim()), r(e.swap) && (t.swap = Number(e.swap)), r(e.rxtx_factor) && (t.rxtx_factor = Number(e.rxtx_factor)), r(e["OS-FLV-EXT-DATA:ephemeral"]) && (t["OS-FLV-EXT-DATA:ephemeral"] = Number(e["OS-FLV-EXT-DATA:ephemeral"])), e["os-flavor-access:is_public"] !== void 0 && (t["os-flavor-access:is_public"] = !!e["os-flavor-access:is_public"]), t;
193
- }, J = ({ client: t, isOpen: n, onClose: i, project: l, onSuccess: u }) => {
194
- let { i18n: d, _: f } = U(), { translateError: p } = x(), [h, v] = L({ "os-flavor-access:is_public": !0 }), [y, b] = L({}), [S, C] = L(!1), [w, T] = L(null), E = (e) => {
210
+ }, q = ({ client: e, isOpen: t, onClose: n, project: a, onSuccess: o }) => {
211
+ let { i18n: s, _: l } = H(), { translateError: d } = x(), [p, h] = L({ "os-flavor-access:is_public": !0 }), [_, y] = L({}), [S, C] = L(!1), [w, T] = L(null), E = (e) => {
195
212
  let { name: t, value: n, type: r, checked: i } = e.target;
196
- v((e) => ({
213
+ h((e) => ({
197
214
  ...e,
198
215
  [t]: r === "checkbox" ? i : n
199
216
  })), w && T(null);
200
217
  }, D = (e, t) => {
201
- v((n) => ({
218
+ h((n) => ({
202
219
  ...n,
203
220
  [e]: t
204
221
  })), w && T(null);
205
222
  }, O = (e) => {
206
- let { name: t, value: n } = e.target, r = K(t, n, f);
207
- b((e) => ({
223
+ let { name: t, value: n } = e.target, r = G(t, n, l);
224
+ y((e) => ({
208
225
  ...e,
209
226
  [t]: r
210
227
  }));
211
- }, j = async (e) => {
212
- e.preventDefault(), T(null);
228
+ }, j = async (t) => {
229
+ t.preventDefault(), T(null);
213
230
  let n = {};
214
231
  if ([
215
232
  "name",
@@ -217,7 +234,7 @@ var G = ({ flavors: e, isLoading: r, client: s, project: c, onFlavorDeleted: l,
217
234
  "ram",
218
235
  "disk"
219
236
  ].forEach((e) => {
220
- let t = K(e, h[e], f);
237
+ let t = G(e, p[e], l);
221
238
  t && (n[e] = t);
222
239
  }), [
223
240
  "id",
@@ -227,151 +244,151 @@ var G = ({ flavors: e, isLoading: r, client: s, project: c, onFlavorDeleted: l,
227
244
  "description",
228
245
  "os-flavor-access:is_public"
229
246
  ].forEach((e) => {
230
- let t = h[e];
247
+ let t = p[e];
231
248
  if (t !== void 0 && t !== "" && t !== null) {
232
- let r = K(e, t, f);
249
+ let r = G(e, t, l);
233
250
  r && (n[e] = r);
234
251
  }
235
252
  }), Object.keys(n).length > 0) {
236
- b(n), T(d._({ id: "CBFSfX" }));
253
+ y(n), T(s._({ id: "CBFSfX" }));
237
254
  return;
238
255
  }
239
256
  try {
240
257
  C(!0);
241
- let e = q(h);
242
- await t.compute.createFlavor.mutate({
243
- project_id: l,
244
- flavor: e
245
- }), u(e.name), M();
258
+ let t = K(p);
259
+ await e.compute.createFlavor.mutate({
260
+ project_id: a,
261
+ flavor: t
262
+ }), o(t.name), M();
246
263
  } catch (e) {
247
- T(e?.message ? p(e.message) : d._({ id: "OxDN2m" }));
264
+ T(e?.message ? d(e.message) : s._({ id: "OxDN2m" }));
248
265
  } finally {
249
266
  C(!1);
250
267
  }
251
268
  }, M = () => {
252
- v({ "os-flavor-access:is_public": !0 }), b({}), T(null), i();
269
+ h({ "os-flavor-access:is_public": !0 }), y({}), T(null), n();
253
270
  };
254
- return /*#__PURE__*/ A(g, {
271
+ return /*#__PURE__*/ A(f, {
255
272
  onCancel: M,
256
273
  size: "large",
257
- title: d._({ id: "Rlp5zj" }),
258
- open: n,
274
+ title: s._({ id: "Rlp5zj" }),
275
+ open: t,
259
276
  onConfirm: j,
260
- cancelButtonLabel: d._({ id: "dEgA5A" }),
261
- confirmButtonLabel: d._({ id: "wEfZld" }),
262
- children: [S && /*#__PURE__*/ k(a, {
277
+ cancelButtonLabel: s._({ id: "dEgA5A" }),
278
+ confirmButtonLabel: s._({ id: "wEfZld" }),
279
+ children: [S && /*#__PURE__*/ k(u, {
263
280
  distribution: "center",
264
281
  alignment: "center",
265
- children: /*#__PURE__*/ k(o, { variant: "primary" })
266
- }), !S && /*#__PURE__*/ A(c, { children: [w && /*#__PURE__*/ k(_, { children: /*#__PURE__*/ k(e, {
282
+ children: /*#__PURE__*/ k(r, { variant: "primary" })
283
+ }), !S && /*#__PURE__*/ A(b, { children: [w && /*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(i, {
267
284
  onDismiss: () => {
268
285
  T(null);
269
286
  },
270
287
  text: w,
271
288
  variant: "error"
272
- }) }), /*#__PURE__*/ A(r, { children: [
273
- /*#__PURE__*/ k(_, { children: /*#__PURE__*/ k(s, {
289
+ }) }), /*#__PURE__*/ A(v, { children: [
290
+ /*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
274
291
  id: "id",
275
292
  name: "id",
276
- label: d._({ id: "s2ubkU" }),
277
- value: h.id || "",
293
+ label: s._({ id: "s2ubkU" }),
294
+ value: p.id || "",
278
295
  onChange: E,
279
296
  onBlur: O,
280
- errortext: y.id
297
+ errortext: _.id
281
298
  }) }),
282
- /*#__PURE__*/ k(_, { children: /*#__PURE__*/ k(s, {
299
+ /*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
283
300
  id: "name",
284
301
  name: "name",
285
- label: d._({ id: "lWxDDh" }),
286
- value: h.name || "",
302
+ label: s._({ id: "lWxDDh" }),
303
+ value: p.name || "",
287
304
  onChange: E,
288
305
  onBlur: O,
289
- errortext: y.name,
306
+ errortext: _.name,
290
307
  required: !0
291
308
  }) }),
292
- /*#__PURE__*/ k(_, { children: /*#__PURE__*/ k(s, {
309
+ /*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
293
310
  id: "description",
294
311
  name: "description",
295
- label: d._({ id: "Nu4oKW" }),
296
- value: h.description || "",
312
+ label: s._({ id: "Nu4oKW" }),
313
+ value: p.description || "",
297
314
  onChange: E,
298
315
  onBlur: O,
299
- errortext: y.description
316
+ errortext: _.description
300
317
  }) }),
301
- /*#__PURE__*/ k(_, { children: /*#__PURE__*/ k(s, {
318
+ /*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
302
319
  id: "vcpus",
303
320
  name: "vcpus",
304
- label: d._({ id: "MZGbkp" }),
305
- value: String(h.vcpus || ""),
321
+ label: s._({ id: "MZGbkp" }),
322
+ value: String(p.vcpus || ""),
306
323
  onChange: (e) => D("vcpus", Number(e.target.value)),
307
324
  onBlur: O,
308
- errortext: y.vcpus,
325
+ errortext: _.vcpus,
309
326
  type: "number",
310
327
  required: !0
311
328
  }) }),
312
- /*#__PURE__*/ k(_, { children: /*#__PURE__*/ k(s, {
329
+ /*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
313
330
  id: "ram",
314
331
  name: "ram",
315
- label: d._({ id: "K+e/0e" }),
316
- value: String(h.ram || ""),
332
+ label: s._({ id: "K+e/0e" }),
333
+ value: String(p.ram || ""),
317
334
  onChange: (e) => D("ram", Number(e.target.value)),
318
335
  onBlur: O,
319
- errortext: y.ram,
336
+ errortext: _.ram,
320
337
  type: "number",
321
338
  required: !0
322
339
  }) }),
323
- /*#__PURE__*/ k(_, { children: /*#__PURE__*/ k(s, {
340
+ /*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
324
341
  id: "disk",
325
342
  name: "disk",
326
- label: d._({ id: "AxZkIr" }),
327
- value: String(h.disk || ""),
343
+ label: s._({ id: "AxZkIr" }),
344
+ value: String(p.disk || ""),
328
345
  onChange: (e) => D("disk", Number(e.target.value)),
329
346
  onBlur: O,
330
- errortext: y.disk,
347
+ errortext: _.disk,
331
348
  type: "number",
332
349
  required: !0
333
350
  }) }),
334
- /*#__PURE__*/ k(_, { children: /*#__PURE__*/ k(s, {
351
+ /*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
335
352
  id: "OS-FLV-EXT-DATA:ephemeral",
336
353
  name: "OS-FLV-EXT-DATA:ephemeral",
337
- label: d._({ id: "X2OnDx" }),
338
- value: String(h["OS-FLV-EXT-DATA:ephemeral"] || ""),
354
+ label: s._({ id: "X2OnDx" }),
355
+ value: String(p["OS-FLV-EXT-DATA:ephemeral"] || ""),
339
356
  onChange: (e) => D("OS-FLV-EXT-DATA:ephemeral", Number(e.target.value)),
340
357
  onBlur: O,
341
- errortext: y["OS-FLV-EXT-DATA:ephemeral"],
358
+ errortext: _["OS-FLV-EXT-DATA:ephemeral"],
342
359
  type: "number"
343
360
  }) }),
344
- /*#__PURE__*/ k(_, { children: /*#__PURE__*/ k(s, {
361
+ /*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
345
362
  id: "swap",
346
363
  name: "swap",
347
- label: d._({ id: "p4nMut" }),
348
- value: String(h.swap || ""),
364
+ label: s._({ id: "p4nMut" }),
365
+ value: String(p.swap || ""),
349
366
  onChange: (e) => D("swap", e.target.value ? Number(e.target.value) : void 0),
350
367
  onBlur: O,
351
- errortext: y.swap,
368
+ errortext: _.swap,
352
369
  type: "number"
353
370
  }) }),
354
- /*#__PURE__*/ k(_, { children: /*#__PURE__*/ k(s, {
371
+ /*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(g, {
355
372
  id: "rxtx_factor",
356
373
  name: "rxtx_factor",
357
- label: d._({ id: "u5HztT" }),
374
+ label: s._({ id: "u5HztT" }),
358
375
  defaultValue: 1,
359
- value: String(h.rxtx_factor || ""),
376
+ value: String(p.rxtx_factor || ""),
360
377
  onChange: (e) => D("rxtx_factor", Number(e.target.value)),
361
378
  onBlur: O,
362
- errortext: y.rxtx_factor,
379
+ errortext: _.rxtx_factor,
363
380
  type: "number"
364
381
  }) }),
365
- /*#__PURE__*/ k(_, { children: /*#__PURE__*/ k(m, {
382
+ /*#__PURE__*/ k(c, { children: /*#__PURE__*/ k(m, {
366
383
  name: "os-flavor-access:is_public",
367
- label: d._({ id: "vbajgL" }),
368
- helptext: d._({ id: "3nh/7E" }),
369
- checked: !!h["os-flavor-access:is_public"],
384
+ label: s._({ id: "vbajgL" }),
385
+ helptext: s._({ id: "3nh/7E" }),
386
+ checked: !!p["os-flavor-access:is_public"],
370
387
  onChange: E
371
388
  }) })
372
389
  ] })] })]
373
390
  });
374
- }, Y = 50, X = (e, t, n, r, i) => e.compute.getFlavorsByProjectId.query({
391
+ }, J = 50, Y = (e, t, n, r, i) => e.compute.getFlavorsByProjectId.query({
375
392
  project_id: t,
376
393
  sortBy: n,
377
394
  sortDirection: r,
@@ -380,13 +397,13 @@ var G = ({ flavors: e, isLoading: r, client: s, project: c, onFlavorDeleted: l,
380
397
  ...e,
381
398
  listError: void 0
382
399
  })).catch((e) => {
383
- if (e instanceof V && e.data?.code === "FORBIDDEN") return {
400
+ if (e instanceof B && e.data?.code === "FORBIDDEN") return {
384
401
  flavors: [],
385
402
  privateFlavorError: void 0,
386
403
  listError: e.message
387
404
  };
388
405
  throw e;
389
- }), Z = (e, t) => e.compute.canUser.query({
406
+ }), X = (e, t) => e.compute.canUser.query({
390
407
  project_id: t,
391
408
  permission: [
392
409
  "flavors:create",
@@ -403,124 +420,124 @@ var G = ({ flavors: e, isLoading: r, client: s, project: c, onFlavorDeleted: l,
403
420
  canManageSpecs: r || i,
404
421
  canListSpecs: a
405
422
  }));
406
- function Q({ flavorsPromise: t, permissionsPromise: n, client: r, project: i, onFlavorDeleted: o, onFlavorCreated: s, searchTerm: c, setSearchTerm: d, sortSettings: f, handleSortChange: m, createModalOpen: h, setCreateModalOpen: g, currentPage: _, onPageChange: v }) {
407
- let { i18n: y, _: b } = U(), { flavors: x, privateFlavorError: S, listError: C } = N(t), w = N(n), [T, E] = L(c), j = I(void 0);
423
+ function Z({ flavorsPromise: e, permissionsPromise: t, client: n, project: r, onFlavorDeleted: a, onFlavorCreated: o, searchTerm: s, setSearchTerm: c, sortSettings: f, handleSortChange: p, createModalOpen: m, setCreateModalOpen: h, currentPage: g, onPageChange: _ }) {
424
+ let { i18n: v, _: b } = H(), { flavors: x, privateFlavorError: S, listError: C } = N(e), w = N(t), [T, E] = L(s), j = I(void 0);
408
425
  if (F(() => () => clearTimeout(j.current), []), C) return /*#__PURE__*/ k("p", { children: C });
409
- let M = Math.max(1, Math.ceil(x.length / Y)), P = Math.min(_, M), R = x.slice((P - 1) * Y, P * Y);
426
+ let M = Math.max(1, Math.ceil(x.length / J)), P = Math.min(g, M), R = x.slice((P - 1) * J, P * J);
410
427
  return F(() => {
411
- _ > M && v(1);
428
+ g > M && _(1);
412
429
  }, [
413
430
  M,
414
- _,
415
- v
431
+ g,
432
+ _
416
433
  ]), /*#__PURE__*/ A(O, { children: [
417
- /*#__PURE__*/ k(J, {
418
- client: r,
419
- isOpen: h,
420
- project: i,
421
- onClose: () => g(!1),
422
- onSuccess: s
434
+ /*#__PURE__*/ k(q, {
435
+ client: n,
436
+ isOpen: m,
437
+ project: r,
438
+ onClose: () => h(!1),
439
+ onSuccess: o
423
440
  }),
424
- S && /*#__PURE__*/ k(e, {
441
+ S && /*#__PURE__*/ k(i, {
425
442
  className: "mb-4",
426
- text: y._({ id: "3oc18/" }),
443
+ text: v._({ id: "3oc18/" }),
427
444
  variant: "warning"
428
445
  }),
429
- /*#__PURE__*/ A(a, {
446
+ /*#__PURE__*/ A(u, {
430
447
  distribution: "end",
431
448
  alignment: "center",
432
449
  gap: "2",
433
450
  className: "pb-2",
434
- children: [/*#__PURE__*/ k(a, {
451
+ children: [/*#__PURE__*/ k(u, {
435
452
  gap: "0.5",
436
453
  children: /*#__PURE__*/ k(D, {
437
454
  options: f.options,
438
455
  sortBy: f.sortBy,
439
456
  sortDirection: f.sortDirection ?? "asc",
440
- onSortByChange: (e) => m({
457
+ onSortByChange: (e) => p({
441
458
  ...f,
442
459
  sortBy: e,
443
460
  sortDirection: f.sortDirection
444
461
  }),
445
- onSortDirectionChange: (e) => m({
462
+ onSortDirectionChange: (e) => p({
446
463
  ...f,
447
464
  sortDirection: e
448
465
  })
449
466
  })
450
- }), w.canCreate && /*#__PURE__*/ k(u, {
467
+ }), w.canCreate && /*#__PURE__*/ k(d, {
451
468
  variant: "primary",
452
- label: y._({ id: "Rlp5zj" }),
453
- onClick: () => g(!0)
469
+ label: v._({ id: "Rlp5zj" }),
470
+ onClick: () => h(!0)
454
471
  })]
455
472
  }),
456
- /*#__PURE__*/ k(l, { children: /*#__PURE__*/ k(a, {
473
+ /*#__PURE__*/ k(y, { children: /*#__PURE__*/ k(u, {
457
474
  distribution: "end",
458
475
  alignment: "center",
459
- children: /*#__PURE__*/ k(p, {
460
- placeholder: y._({ id: "U0sPCo" }),
476
+ children: /*#__PURE__*/ k(l, {
477
+ placeholder: v._({ id: "U0sPCo" }),
461
478
  "data-testid": "searchbar",
462
479
  value: T,
463
480
  onInput: (e) => {
464
481
  let t = e.currentTarget.value;
465
- E(t), clearTimeout(j.current), j.current = window.setTimeout(() => d(t), 500);
482
+ E(t), clearTimeout(j.current), j.current = window.setTimeout(() => c(t), 500);
466
483
  },
467
484
  onSearch: (e) => {
468
- clearTimeout(j.current), d(typeof e == "string" ? e : "");
485
+ clearTimeout(j.current), c(typeof e == "string" ? e : "");
469
486
  },
470
487
  onClear: () => {
471
- clearTimeout(j.current), E(""), d("");
488
+ clearTimeout(j.current), E(""), c("");
472
489
  }
473
490
  })
474
491
  }) }),
475
- /*#__PURE__*/ k(G, {
492
+ /*#__PURE__*/ k(W, {
476
493
  flavors: R,
477
494
  isLoading: !1,
478
- client: r,
479
- project: i,
480
- onFlavorDeleted: o,
495
+ client: n,
496
+ project: r,
497
+ onFlavorDeleted: a,
481
498
  canDeleteFlavor: w.canDelete,
482
499
  canMangageAccess: w.canManageAccess,
483
500
  canManageSpecs: w.canManageSpecs,
484
501
  canListSpecs: w.canListSpecs,
485
502
  currentPage: P,
486
503
  totalPages: M,
487
- onPageChange: v
504
+ onPageChange: _
488
505
  })
489
506
  ] });
490
507
  }
491
- var $ = ({ client: t, project: n }) => {
492
- let { i18n: r, _: i } = U(), s = R(), c = B({ strict: !1 }), [l, u] = L({
508
+ var Q = ({ client: e, project: t }) => {
509
+ let { i18n: n, _: a } = H(), o = R(), s = z({ strict: !1 }), [c, l] = L({
493
510
  options: [
494
511
  {
495
- label: r._({ id: "6YtxFj" }),
512
+ label: n._({ id: "6YtxFj" }),
496
513
  value: "name"
497
514
  },
498
515
  {
499
- label: r._({ id: "MZGbkp" }),
516
+ label: n._({ id: "MZGbkp" }),
500
517
  value: "vcpus"
501
518
  },
502
519
  {
503
- label: r._({ id: "RGhYAo" }),
520
+ label: n._({ id: "RGhYAo" }),
504
521
  value: "ram"
505
522
  },
506
523
  {
507
- label: r._({ id: "cJDQIO" }),
524
+ label: n._({ id: "cJDQIO" }),
508
525
  value: "disk"
509
526
  },
510
527
  {
511
- label: r._({ id: "vH2C/2" }),
528
+ label: n._({ id: "vH2C/2" }),
512
529
  value: "swap"
513
530
  }
514
531
  ],
515
- sortBy: c.sortBy || "name",
516
- sortDirection: c.sortDirection || "asc"
517
- }), [d, f] = L(c.search || ""), p = c.page ?? 1, [m, h] = L(), [g, _] = L(!1), [v, y] = L(() => X(t, n, l.sortBy, l.sortDirection, d)), [b] = L(() => Z(t, n)), x = () => {
532
+ sortBy: s.sortBy || "name",
533
+ sortDirection: s.sortDirection || "asc"
534
+ }), [d, f] = L(s.search || ""), p = s.page ?? 1, [m, h] = L(), [g, _] = L(!1), [v, y] = L(() => Y(e, t, c.sortBy, c.sortDirection, d)), [b] = L(() => X(e, t)), x = () => {
518
535
  M(() => {
519
- y(X(t, n, l.sortBy, l.sortDirection, d));
536
+ y(Y(e, t, c.sortBy, c.sortDirection, d));
520
537
  });
521
538
  }, S = (e) => {
522
539
  h({
523
- message: r._({
540
+ message: n._({
524
541
  id: "20Kpaw",
525
542
  values: { flavorName: e }
526
543
  }),
@@ -528,19 +545,19 @@ var $ = ({ client: t, project: n }) => {
528
545
  }), setTimeout(() => h(void 0), 5e3), x();
529
546
  }, C = (e) => {
530
547
  h({
531
- message: r._({
548
+ message: n._({
532
549
  id: "eChIh7",
533
550
  values: { flavorName: e }
534
551
  }),
535
552
  timestamp: Date.now()
536
553
  }), setTimeout(() => h(void 0), 5e3), x();
537
- }, w = (e) => {
554
+ }, w = (n) => {
538
555
  let r = {
539
- options: e.options,
540
- sortBy: e.sortBy?.toString() || "name",
541
- sortDirection: e.sortDirection || "asc"
556
+ options: n.options,
557
+ sortBy: n.sortBy?.toString() || "name",
558
+ sortDirection: n.sortDirection || "asc"
542
559
  };
543
- u(r), s({
560
+ l(r), o({
544
561
  search: (e) => ({
545
562
  ...e,
546
563
  sortBy: r.sortBy,
@@ -549,11 +566,11 @@ var $ = ({ client: t, project: n }) => {
549
566
  }),
550
567
  replace: !0
551
568
  }), M(() => {
552
- y(X(t, n, r.sortBy, r.sortDirection, d));
569
+ y(Y(e, t, r.sortBy, r.sortDirection, d));
553
570
  });
554
- }, T = (e) => {
555
- let r = typeof e == "string" ? e : "";
556
- f(r), s({
571
+ }, T = (n) => {
572
+ let r = typeof n == "string" ? n : "";
573
+ f(r), o({
557
574
  search: (e) => ({
558
575
  ...e,
559
576
  search: r || void 0,
@@ -561,49 +578,49 @@ var $ = ({ client: t, project: n }) => {
561
578
  }),
562
579
  replace: !0
563
580
  }), M(() => {
564
- y(X(t, n, l.sortBy, l.sortDirection, r));
581
+ y(Y(e, t, c.sortBy, c.sortDirection, r));
565
582
  });
566
583
  }, E = P((e) => {
567
- s({ search: (t) => ({
584
+ o({ search: (t) => ({
568
585
  ...t,
569
586
  page: e === 1 ? void 0 : e
570
587
  }) });
571
- }, [s]);
588
+ }, [o]);
572
589
  return /*#__PURE__*/ A("div", {
573
590
  className: "relative",
574
- children: [m && /*#__PURE__*/ k(e, {
591
+ children: [m && /*#__PURE__*/ k(i, {
575
592
  className: "absolute -top-14 right-0 left-0 z-50",
576
593
  text: m.message,
577
594
  variant: "info",
578
595
  onDismiss: () => h(void 0),
579
596
  dismissible: !0
580
- }), /*#__PURE__*/ k(W, {
581
- fallbackRender: ({ error: t }) => /*#__PURE__*/ k(e, {
597
+ }), /*#__PURE__*/ k(U, {
598
+ fallbackRender: ({ error: e }) => /*#__PURE__*/ k(i, {
582
599
  variant: "error",
583
- text: t instanceof Error ? t.message : r._({ id: "W5A0Ly" })
600
+ text: e instanceof Error ? e.message : n._({ id: "W5A0Ly" })
584
601
  }),
585
602
  children: /*#__PURE__*/ k(j, {
586
- fallback: /*#__PURE__*/ A(a, {
603
+ fallback: /*#__PURE__*/ A(u, {
587
604
  className: "fixed inset-0",
588
605
  distribution: "center",
589
606
  alignment: "center",
590
607
  direction: "vertical",
591
- children: [/*#__PURE__*/ k(o, {
608
+ children: [/*#__PURE__*/ k(r, {
592
609
  variant: "primary",
593
610
  size: "large",
594
611
  className: "mb-2"
595
- }), /*#__PURE__*/ k(H, { id: "EqSPkP" })]
612
+ }), /*#__PURE__*/ k(V, { id: "EqSPkP" })]
596
613
  }),
597
- children: /*#__PURE__*/ k(Q, {
614
+ children: /*#__PURE__*/ k(Z, {
598
615
  flavorsPromise: v,
599
616
  permissionsPromise: b,
600
- client: t,
601
- project: n,
617
+ client: e,
618
+ project: t,
602
619
  onFlavorDeleted: S,
603
620
  onFlavorCreated: C,
604
621
  searchTerm: d,
605
622
  setSearchTerm: T,
606
- sortSettings: l,
623
+ sortSettings: c,
607
624
  handleSortChange: w,
608
625
  createModalOpen: g,
609
626
  setCreateModalOpen: _,
@@ -616,17 +633,17 @@ var $ = ({ client: t, project: n }) => {
616
633
  };
617
634
  //#endregion
618
635
  //#region src/client/routes/_auth/projects/$projectId/compute/flavors/index.tsx?tsr-split=component
619
- function ee() {
620
- let { i18n: e, _: t } = U(), { projectId: n } = S.useParams(), { trpcClient: r } = S.useRouteContext();
636
+ function $() {
637
+ let { i18n: e, _: t } = H(), { projectId: n } = S.useParams(), { trpcClient: r } = S.useRouteContext();
621
638
  return /*#__PURE__*/ A(O, { children: [/*#__PURE__*/ k(C, {
622
639
  title: e._({ id: "neiJm0" }),
623
640
  projectId: n
624
- }), /*#__PURE__*/ k($, {
641
+ }), /*#__PURE__*/ k(Q, {
625
642
  project: n,
626
643
  client: r
627
644
  })] });
628
645
  }
629
646
  //#endregion
630
- export { ee as component };
647
+ export { $ as component };
631
648
 
632
- //# sourceMappingURL=flavors-CfdgjsZY.mjs.map
649
+ //# sourceMappingURL=flavors-m1qDHzeS.mjs.map