@cobaltcore-dev/aurora 0.23.0 → 1.0.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 (181) hide show
  1. package/dist/client/App.d.ts +1 -1
  2. package/dist/client/{AuthProvider-CQ6Yppoh.mjs → AuthProvider-5TyZKZkx.mjs} +3 -3
  3. package/dist/client/AuthProvider-5TyZKZkx.mjs.map +1 -0
  4. package/dist/client/{ContentHeader-9KZdhOoA.mjs → ContentHeader-D64NtKvo.mjs} +26 -25
  5. package/dist/client/ContentHeader-D64NtKvo.mjs.map +1 -0
  6. package/dist/client/DeleteFlavorModal-C2K43ABZ.mjs +732 -0
  7. package/dist/client/DeleteFlavorModal-C2K43ABZ.mjs.map +1 -0
  8. package/dist/client/DeletePcaModal-D9v8E0Ki.mjs +92 -0
  9. package/dist/client/DeletePcaModal-D9v8E0Ki.mjs.map +1 -0
  10. package/dist/client/DetailsInfo-h7rPJ4Jf.mjs +61 -0
  11. package/dist/client/DetailsInfo-h7rPJ4Jf.mjs.map +1 -0
  12. package/dist/client/FiltersInput-Bw8TFfwb.mjs +82 -0
  13. package/dist/client/FiltersInput-Bw8TFfwb.mjs.map +1 -0
  14. package/dist/client/{FloatingIpActionModals-BcceUHcg.mjs → FloatingIpActionModals-BfEDfYg9.mjs} +66 -66
  15. package/dist/client/{FloatingIpActionModals-BcceUHcg.mjs.map → FloatingIpActionModals-BfEDfYg9.mjs.map} +1 -1
  16. package/dist/client/ImageToastNotifications-C0Tluzq-.mjs +1125 -0
  17. package/dist/client/ImageToastNotifications-C0Tluzq-.mjs.map +1 -0
  18. package/dist/client/{RouteError-Rm08PcxN.mjs → RouteError-B-NPGIv7.mjs} +2 -2
  19. package/dist/client/{RouteError-Rm08PcxN.mjs.map → RouteError-B-NPGIv7.mjs.map} +1 -1
  20. package/dist/client/Slot-CWb612-_.mjs.map +1 -1
  21. package/dist/client/{SortInput-D_q_jDfe.mjs → SortInput-DysAXpB3.mjs} +6 -6
  22. package/dist/client/{SortInput-D_q_jDfe.mjs.map → SortInput-DysAXpB3.mjs.map} +1 -1
  23. package/dist/client/{StatusError-2ZU1gFpu.mjs → StatusError-DX-GvLjq.mjs} +8 -8
  24. package/dist/client/{StatusError-2ZU1gFpu.mjs.map → StatusError-DX-GvLjq.mjs.map} +1 -1
  25. package/dist/client/TwoColumnDescriptionList-B3xunXmz.mjs +22 -0
  26. package/dist/client/TwoColumnDescriptionList-B3xunXmz.mjs.map +1 -0
  27. package/dist/client/{_auth-D5_QNUos.mjs → _auth-R5H2yKFf.mjs} +2 -2
  28. package/dist/client/_auth-R5H2yKFf.mjs.map +1 -0
  29. package/dist/client/_flavorId-Dit5mM8I.mjs +210 -0
  30. package/dist/client/_flavorId-Dit5mM8I.mjs.map +1 -0
  31. package/dist/client/{_flavorId-CFmkmg2Y.mjs → _flavorId-Zj7LNL-R.mjs} +4 -4
  32. package/dist/client/{_flavorId-CFmkmg2Y.mjs.map → _flavorId-Zj7LNL-R.mjs.map} +1 -1
  33. package/dist/client/_floatingIpId-B0MCoqE3.mjs +215 -0
  34. package/dist/client/_floatingIpId-B0MCoqE3.mjs.map +1 -0
  35. package/dist/client/{_floatingIpId-Dzh6_JCI.mjs → _floatingIpId-DCQQpNO-.mjs} +4 -4
  36. package/dist/client/{_floatingIpId-Dzh6_JCI.mjs.map → _floatingIpId-DCQQpNO-.mjs.map} +1 -1
  37. package/dist/client/_imageId-CZYzBAVx.mjs +558 -0
  38. package/dist/client/_imageId-CZYzBAVx.mjs.map +1 -0
  39. package/dist/client/_pcaId-CHRRsWmO.mjs +605 -0
  40. package/dist/client/_pcaId-CHRRsWmO.mjs.map +1 -0
  41. package/dist/client/{_projectId-DNZsNxJw.mjs → _projectId-B8wWSxPu.mjs} +9 -9
  42. package/dist/client/_projectId-B8wWSxPu.mjs.map +1 -0
  43. package/dist/client/{_projectId-BuBIFdgG.mjs → _projectId-C5DUYIjt.mjs} +117 -117
  44. package/dist/client/{_projectId-BuBIFdgG.mjs.map → _projectId-C5DUYIjt.mjs.map} +1 -1
  45. package/dist/client/{_projectId-CAQkJHZ4.mjs → _projectId-D2pFfYIs.mjs} +3 -3
  46. package/dist/client/{_projectId-CAQkJHZ4.mjs.map → _projectId-D2pFfYIs.mjs.map} +1 -1
  47. package/dist/client/{_projectId-D-b7paXE.mjs → _projectId-DhSWowQo.mjs} +4 -4
  48. package/dist/client/{_projectId-D-b7paXE.mjs.map → _projectId-DhSWowQo.mjs.map} +1 -1
  49. package/dist/client/{_securityGroupId-DFdNKa2l.mjs → _securityGroupId-DZ4D4WwB.mjs} +635 -617
  50. package/dist/client/_securityGroupId-DZ4D4WwB.mjs.map +1 -0
  51. package/dist/client/{_securityGroupId-DRkY3Gt6.mjs → _securityGroupId-Mj8NJT2-.mjs} +4 -4
  52. package/dist/client/{_securityGroupId-DRkY3Gt6.mjs.map → _securityGroupId-Mj8NJT2-.mjs.map} +1 -1
  53. package/dist/client/_storageType-C-9bNkmZ.mjs +2211 -0
  54. package/dist/client/_storageType-C-9bNkmZ.mjs.map +1 -0
  55. package/dist/client/_storageType-zeSZe--V.mjs.map +1 -1
  56. package/dist/client/{about-C8tTrQaW.mjs → about-WLyShNgE.mjs} +8 -8
  57. package/dist/client/about-WLyShNgE.mjs.map +1 -0
  58. package/dist/client/assets/objectDownload.worker-BXFQIIU_.js.map +1 -0
  59. package/dist/client/assets/objectDownload.worker-ECvFtmOF.js.map +1 -0
  60. package/dist/client/{aurora-jyvXcI4T.mjs → aurora-IMO9HhqJ.mjs} +2 -2
  61. package/dist/client/aurora-IMO9HhqJ.mjs.map +1 -0
  62. package/dist/client/{build-CRLQyqu2.mjs → build-DnD-T35u.mjs} +8180 -8212
  63. package/dist/client/build-DnD-T35u.mjs.map +1 -0
  64. package/dist/client/components/Auth/LoginForm.d.ts +1 -1
  65. package/dist/client/components/Auth/SessionExpirationTimer.d.ts +1 -1
  66. package/dist/client/components/ContentHeader/ContentHeader.d.ts +1 -1
  67. package/dist/client/components/Error/RouteError.d.ts +1 -1
  68. package/dist/client/components/Error/StatusError.d.ts +1 -1
  69. package/dist/client/components/JsonEditor.d.ts +1 -1
  70. package/dist/client/components/ListToolbar/FiltersInput.d.ts +3 -1
  71. package/dist/client/components/ListToolbar/SelectedFilters.d.ts +1 -1
  72. package/dist/client/components/ListToolbar/index.d.ts +1 -1
  73. package/dist/client/components/ProjectView/ProjectInfoBox.d.ts +1 -1
  74. package/dist/client/components/Slot.d.ts +1 -1
  75. package/dist/client/components/TwoColumnDescriptionList.d.ts +11 -0
  76. package/dist/client/components/navigation/LanguageSelect.d.ts +1 -1
  77. package/dist/client/components/navigation/MainNavigation.d.ts +1 -1
  78. package/dist/client/components/navigation/UserMenu.d.ts +1 -1
  79. package/dist/client/{flavors-Dy-2mRGv.mjs → flavors-Cp0LEGOH.mjs} +2 -2
  80. package/dist/client/{flavors-Dy-2mRGv.mjs.map → flavors-Cp0LEGOH.mjs.map} +1 -1
  81. package/dist/client/{flavors-BfTXqmoD.mjs → flavors-CwMbDRHm2.mjs} +203 -201
  82. package/dist/client/flavors-CwMbDRHm2.mjs.map +1 -0
  83. package/dist/client/flavors-DWMZ6TuJ.mjs.map +1 -1
  84. package/dist/client/floatingips-ICwo-rV_.mjs +591 -0
  85. package/dist/client/floatingips-ICwo-rV_.mjs.map +1 -0
  86. package/dist/client/formatBytes-CZv_XyCY.mjs.map +1 -1
  87. package/dist/client/helpers-1PpYf-fC.mjs.map +1 -1
  88. package/dist/client/hooks/useAvailableViewportHeight.d.ts +33 -0
  89. package/dist/client/hooks/useVirtualizedTableBody.d.ts +37 -0
  90. package/dist/client/{hooks-Bw3sHHOg.mjs → hooks-CrriowRk.mjs} +2 -2
  91. package/dist/client/{hooks-Bw3sHHOg.mjs.map → hooks-CrriowRk.mjs.map} +1 -1
  92. package/dist/client/images-DOGZmr3D.mjs +1937 -0
  93. package/dist/client/images-DOGZmr3D.mjs.map +1 -0
  94. package/dist/client/{images-DPKUXryV.mjs → images-DWiM_72I.mjs} +2 -2
  95. package/dist/client/{images-DPKUXryV.mjs.map → images-DWiM_72I.mjs.map} +1 -1
  96. package/dist/client/images-NBf2bV43.mjs.map +1 -1
  97. package/dist/client/index.js +601 -445
  98. package/dist/client/index.js.map +1 -1
  99. package/dist/client/{md-CyCflQee.mjs → md-DNzcRhmz.mjs} +6 -60
  100. package/dist/client/{md-CyCflQee.mjs.map → md-DNzcRhmz.mjs.map} +1 -1
  101. package/dist/client/network-DuZm76BZ.mjs.map +1 -1
  102. package/dist/client/objects-D2MKUCxc.mjs +56 -0
  103. package/dist/client/objects-D2MKUCxc.mjs.map +1 -0
  104. package/dist/client/objects-DI1-tnKr.mjs +56 -0
  105. package/dist/client/objects-DI1-tnKr.mjs.map +1 -0
  106. package/dist/client/objects-DeK2WD5K.mjs +10078 -0
  107. package/dist/client/objects-DeK2WD5K.mjs.map +1 -0
  108. package/dist/client/pca-BokFv4Gz.mjs +239 -0
  109. package/dist/client/pca-BokFv4Gz.mjs.map +1 -0
  110. package/dist/client/{pca-D0kKxHp4.mjs → pca-D5jHAl0b.mjs} +4 -3
  111. package/dist/client/{pca-D0kKxHp4.mjs.map → pca-D5jHAl0b.mjs.map} +1 -1
  112. package/dist/client/projects-yiK0HGSA.mjs.map +1 -1
  113. package/dist/client/routeInfo-CdTRlSxv.mjs.map +1 -1
  114. package/dist/client/{routes-CtfnI-aY.mjs → routes-B05u5bk4.mjs} +2 -2
  115. package/dist/client/{routes-CtfnI-aY.mjs.map → routes-B05u5bk4.mjs.map} +1 -1
  116. package/dist/client/{routes-BOf-GDMM.mjs → routes-DOJr5onJ.mjs} +31 -28
  117. package/dist/client/routes-DOJr5onJ.mjs.map +1 -0
  118. package/dist/client/{securitygroups-DRhFle2O.mjs → securitygroups-Be2Qgmew.mjs} +201 -195
  119. package/dist/client/securitygroups-Be2Qgmew.mjs.map +1 -0
  120. package/dist/client/{securitygroups-B8aLyFK7.mjs → securitygroups-_7SYN2jN.mjs} +2 -2
  121. package/dist/client/{securitygroups-B8aLyFK7.mjs.map → securitygroups-_7SYN2jN.mjs.map} +1 -1
  122. package/dist/client/store/AuthProvider.d.ts +1 -1
  123. package/dist/client/{trpcClient-Di56hpVv.mjs → trpcClient-D7gpR7YG.mjs} +2 -2
  124. package/dist/client/{trpcClient-Di56hpVv.mjs.map → trpcClient-D7gpR7YG.mjs.map} +1 -1
  125. package/dist/client/trpcClient.d.ts +125 -11
  126. package/dist/client/useModal-DCs1OJh7.mjs.map +1 -1
  127. package/dist/client/{useSecurityGroupPermissions-BPS1ibWq.mjs → useSecurityGroupPermissions-qPwm4mFt.mjs} +15 -15
  128. package/dist/client/{useSecurityGroupPermissions-BPS1ibWq.mjs.map → useSecurityGroupPermissions-qPwm4mFt.mjs.map} +1 -1
  129. package/dist/server/index.d.ts +125 -11
  130. package/dist/server/index.js +4142 -2845
  131. package/package.json +8 -8
  132. package/dist/client/AuthProvider-CQ6Yppoh.mjs.map +0 -1
  133. package/dist/client/BucketToastNotifications-BhPi4WWw.mjs +0 -613
  134. package/dist/client/BucketToastNotifications-BhPi4WWw.mjs.map +0 -1
  135. package/dist/client/ContentHeader-9KZdhOoA.mjs.map +0 -1
  136. package/dist/client/DeleteFlavorModal-Be2qZo4w.mjs +0 -713
  137. package/dist/client/DeleteFlavorModal-Be2qZo4w.mjs.map +0 -1
  138. package/dist/client/DeletePcaModal-CIFsGWyj.mjs +0 -80
  139. package/dist/client/DeletePcaModal-CIFsGWyj.mjs.map +0 -1
  140. package/dist/client/DetailsInfo-CHVD7d-W.mjs +0 -52
  141. package/dist/client/DetailsInfo-CHVD7d-W.mjs.map +0 -1
  142. package/dist/client/FiltersInput-DqT08Ib-.mjs +0 -81
  143. package/dist/client/FiltersInput-DqT08Ib-.mjs.map +0 -1
  144. package/dist/client/ImageToastNotifications-BGyX2J6j.mjs +0 -1219
  145. package/dist/client/ImageToastNotifications-BGyX2J6j.mjs.map +0 -1
  146. package/dist/client/_auth-D5_QNUos.mjs.map +0 -1
  147. package/dist/client/_flavorId-BsmqS9hP.mjs +0 -194
  148. package/dist/client/_flavorId-BsmqS9hP.mjs.map +0 -1
  149. package/dist/client/_floatingIpId-Bb9ZEJ6b.mjs +0 -228
  150. package/dist/client/_floatingIpId-Bb9ZEJ6b.mjs.map +0 -1
  151. package/dist/client/_imageId-C3As7sHE.mjs +0 -534
  152. package/dist/client/_imageId-C3As7sHE.mjs.map +0 -1
  153. package/dist/client/_pcaId-n0q0aDb6.mjs +0 -545
  154. package/dist/client/_pcaId-n0q0aDb6.mjs.map +0 -1
  155. package/dist/client/_projectId-DNZsNxJw.mjs.map +0 -1
  156. package/dist/client/_securityGroupId-DFdNKa2l.mjs.map +0 -1
  157. package/dist/client/_storageType-BKfQcpgp.mjs +0 -81
  158. package/dist/client/_storageType-BKfQcpgp.mjs.map +0 -1
  159. package/dist/client/_storageType-sMj9NEJz.mjs +0 -2870
  160. package/dist/client/_storageType-sMj9NEJz.mjs.map +0 -1
  161. package/dist/client/about-C8tTrQaW.mjs.map +0 -1
  162. package/dist/client/assets/objectDownload.worker-BAc5Au4B.js.map +0 -1
  163. package/dist/client/aurora-jyvXcI4T.mjs.map +0 -1
  164. package/dist/client/build-CRLQyqu2.mjs.map +0 -1
  165. package/dist/client/flavors-BfTXqmoD.mjs.map +0 -1
  166. package/dist/client/floatingips-zhNK6Xxn.mjs +0 -562
  167. package/dist/client/floatingips-zhNK6Xxn.mjs.map +0 -1
  168. package/dist/client/images-DhZnqUG_.mjs +0 -1890
  169. package/dist/client/images-DhZnqUG_.mjs.map +0 -1
  170. package/dist/client/objects-BG1saVLZ.mjs +0 -6648
  171. package/dist/client/objects-BG1saVLZ.mjs.map +0 -1
  172. package/dist/client/objects-Dahys529.mjs +0 -103
  173. package/dist/client/objects-Dahys529.mjs.map +0 -1
  174. package/dist/client/objects-o2Cj_ndZ.mjs +0 -8
  175. package/dist/client/objects-o2Cj_ndZ.mjs.map +0 -1
  176. package/dist/client/pca-B60iWWfG.mjs +0 -251
  177. package/dist/client/pca-B60iWWfG.mjs.map +0 -1
  178. package/dist/client/routes-BOf-GDMM.mjs.map +0 -1
  179. package/dist/client/securitygroups-DRhFle2O.mjs.map +0 -1
  180. package/dist/client/useListWithFiltering-aPTUNRaW.mjs +0 -32
  181. package/dist/client/useListWithFiltering-aPTUNRaW.mjs.map +0 -1
@@ -1,562 +0,0 @@
1
- import { A as e, B as t, E as n, G as r, H as i, J as a, K as o, M as s, P as c, R as l, U as u, Y as d, at as f, dt as p, et as m, m as h, n as g, o as _, r as v, rt as y, tt as b, y as x } from "./build-CRLQyqu2.mjs";
2
- import { a as S } from "./trpcClient-Di56hpVv.mjs";
3
- import { t as C } from "./useProjectId-DBc5lpoU.mjs";
4
- import "./hooks-Bw3sHHOg.mjs";
5
- import { t as w } from "./useModal-DCs1OJh7.mjs";
6
- import { t as T } from "./SortInput-D_q_jDfe.mjs";
7
- import { n as E, t as D } from "./FiltersInput-DqT08Ib-.mjs";
8
- import { t as O } from "./FloatingIpActionModals-BcceUHcg.mjs";
9
- import { t as k } from "./useListWithFiltering-aPTUNRaW.mjs";
10
- import { m as A, r as j, s as M } from "./md-CyCflQee.mjs";
11
- import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
12
- import { useCallback as I, useEffect as L, useRef as R } from "react";
13
- import { useNavigate as z } from "@tanstack/react-router";
14
- import { Trans as B, useLingui as V } from "@lingui/react";
15
- import { z as H } from "zod";
16
- import { i18n as U } from "@lingui/core";
17
- import { useForm as W, useStore as G } from "@tanstack/react-form";
18
- //#region src/client/components/ListToolbar/index.tsx
19
- var K = ({ filterSettings: e, onFilter: t, sortSettings: n, onSort: r, searchTerm: i, onSearch: o, searchInputProps: c = {}, actions: l, tabs: u, totalCount: d, filteredCount: f, itemName: p = "items", lastUpdated: m }) => {
20
- let { i18n: h, _ } = V(), v = R(void 0);
21
- L(() => () => {
22
- v.current && clearTimeout(v.current);
23
- }, []);
24
- let y = (e) => e ? (typeof e == "string" ? new Date(e) : e).toLocaleString() : "", x = d !== void 0 && f !== void 0, S = I((n) => {
25
- !t || !e || t({
26
- ...e,
27
- selectedFilters: e.selectedFilters?.filter((e) => !(e.name === n.name && e.value === n.value))
28
- });
29
- }, [e, t]), C = (n) => {
30
- if (!t || !e || e.selectedFilters?.some((e) => e.name === n.name && e.value === n.value)) return;
31
- let r = e.filters.find((e) => n.name === e.filterName)?.supportsMultiValue ? [...e.selectedFilters || [], n] : [...(e.selectedFilters || []).filter((e) => e.name !== n.name), n];
32
- t({
33
- ...e,
34
- selectedFilters: r
35
- });
36
- }, w = I((e) => {
37
- let t = typeof e == "string" ? e : "";
38
- v.current && clearTimeout(v.current), o?.(t);
39
- }, [o]), O = I((e) => {
40
- let t = e.currentTarget.value;
41
- v.current && clearTimeout(v.current), v.current = window.setTimeout(() => o?.(t), 500);
42
- }, [o]), k = I(() => {
43
- v.current && clearTimeout(v.current), o?.("");
44
- }, [o]), A = e && t ? {
45
- filters: e.filters,
46
- onChange: C
47
- } : null, j = n && r ? {
48
- options: n.options,
49
- sortBy: n.sortBy,
50
- sortDirection: n.sortDirection || "asc",
51
- onSortByChange: (e) => r({
52
- ...n,
53
- sortBy: e,
54
- sortDirection: n.sortDirection || "asc"
55
- }),
56
- onSortDirectionChange: (e) => r({
57
- ...n,
58
- sortDirection: e
59
- })
60
- } : null, M = o ? {
61
- placeholder: h._({ id: "YIix5Y" }),
62
- "data-testid": "searchbar",
63
- value: i,
64
- onInput: O,
65
- onClear: k,
66
- onSearch: w,
67
- ...c
68
- } : null;
69
- return /*#__PURE__*/ F(N, { children: [u && /*#__PURE__*/ P("div", {
70
- className: "w-full",
71
- children: /*#__PURE__*/ P(s, {
72
- activeItem: u.activeItem,
73
- onActiveItemChange: u.onActiveItemChange,
74
- children: u.items.map((e) => /*#__PURE__*/ P(a, {
75
- label: e.label,
76
- value: e.value
77
- }, e.value))
78
- })
79
- }), /*#__PURE__*/ F(b, {
80
- alignment: "center",
81
- gap: "6",
82
- className: "bg-theme-background-lvl-1 flex w-full flex-col p-4",
83
- children: [
84
- l && /*#__PURE__*/ P(b, {
85
- direction: "horizontal",
86
- className: "w-full justify-end",
87
- children: l
88
- }),
89
- /*#__PURE__*/ F("div", {
90
- className: "flex w-full flex-col items-stretch gap-4 md:flex-row md:items-center",
91
- children: [
92
- A && /*#__PURE__*/ P("div", {
93
- className: "w-full md:w-auto md:min-w-37.5",
94
- children: /*#__PURE__*/ P(D, { ...A })
95
- }),
96
- j && /*#__PURE__*/ P("div", {
97
- className: "w-full md:w-auto md:min-w-45",
98
- children: /*#__PURE__*/ P(T, { ...j })
99
- }),
100
- M && /*#__PURE__*/ P("div", {
101
- className: "w-full md:ml-auto md:w-auto md:min-w-25",
102
- children: /*#__PURE__*/ P(g, { ...M })
103
- })
104
- ]
105
- }),
106
- e?.selectedFilters && e.selectedFilters.length > 0 && t && /*#__PURE__*/ P("div", {
107
- className: "w-full",
108
- children: /*#__PURE__*/ P(E, {
109
- selectedFilters: e.selectedFilters,
110
- onDelete: S,
111
- onClear: () => t({
112
- ...e,
113
- selectedFilters: []
114
- })
115
- })
116
- }),
117
- (x || m) && /*#__PURE__*/ P("div", {
118
- className: "text-theme-secondary flex w-full items-center justify-between text-sm",
119
- children: /*#__PURE__*/ F("div", {
120
- className: "flex items-center gap-2",
121
- children: [x && /*#__PURE__*/ P("span", { children: /*#__PURE__*/ P(B, {
122
- id: "Vg0k6h",
123
- values: {
124
- filteredCount: f,
125
- totalCount: d,
126
- itemName: p
127
- }
128
- }) }), m && /*#__PURE__*/ P("span", { children: /*#__PURE__*/ P(B, {
129
- id: "wlUDbB",
130
- values: { formattedDate: y(m) }
131
- }) })]
132
- })
133
- })
134
- ]
135
- })] });
136
- }, q = (e) => {
137
- let t = {};
138
- return e.selectedFilters?.length && e.selectedFilters.filter((e) => !e.inactive).forEach((e) => {
139
- if (e.value === "true" || e.value === "false") {
140
- t[e.name] = e.value === "true";
141
- return;
142
- }
143
- t[e.name] = e.value;
144
- }), t;
145
- }, J = {
146
- ACTIVE: {
147
- text: "Active",
148
- icon: /*#__PURE__*/ P(j, {
149
- size: 18,
150
- color: "white",
151
- fill: "#4FB81C"
152
- })
153
- },
154
- DOWN: {
155
- text: "Down",
156
- icon: /*#__PURE__*/ P(A, {
157
- size: 18,
158
- color: "white",
159
- fill: "#969696"
160
- })
161
- },
162
- ERROR: {
163
- text: "Error",
164
- icon: /*#__PURE__*/ P(M, {
165
- size: 18,
166
- color: "white",
167
- fill: "#C70000"
168
- })
169
- }
170
- }, Y = () => [
171
- U._({ id: "uAQUqI" }),
172
- U._({ id: "xNG/3n" }),
173
- U._({ id: "Nc7QKU" }),
174
- U._({ id: "7NC3vm" }),
175
- U._({ id: "Nu4oKW" }),
176
- ""
177
- ], X = ({ floatingIp: t }) => {
178
- let { i18n: i, _: a } = V(), o = z(), s = C(), c = () => {
179
- o({
180
- to: "/projects/$projectId/network/floatingips/$floatingIpId",
181
- params: {
182
- projectId: s,
183
- floatingIpId: t.id
184
- }
185
- });
186
- };
187
- return /*#__PURE__*/ F(n, {
188
- "data-testid": `floating-ip-row-${t.id}`,
189
- onClick: c,
190
- children: [
191
- /*#__PURE__*/ P(r, { children: /*#__PURE__*/ F("div", {
192
- className: "flex items-center gap-2",
193
- children: [J[t.status].icon, J[t.status].text]
194
- }) }),
195
- /*#__PURE__*/ P(r, { children: t.floating_ip_address }),
196
- /*#__PURE__*/ P(r, { children: t.fixed_ip_address || "—" }),
197
- /*#__PURE__*/ P(r, { children: t.floating_network_id }),
198
- /*#__PURE__*/ P(r, { children: t.description || "—" }),
199
- /*#__PURE__*/ P(r, {
200
- onClick: (e) => e.stopPropagation(),
201
- className: "items-end pr-0",
202
- children: /*#__PURE__*/ P(O, {
203
- floatingIp: t,
204
- children: ({ toggleEditModal: t, toggleAttachModal: n, toggleDetachModal: r, toggleReleaseModal: a }) => /*#__PURE__*/ P(y, { children: /*#__PURE__*/ F(e, { children: [
205
- /*#__PURE__*/ P(f, {
206
- label: i._({ id: "rdUucN" }),
207
- onClick: c
208
- }),
209
- /*#__PURE__*/ P(f, {
210
- label: i._({ id: "n22YIM" }),
211
- onClick: t
212
- }),
213
- /*#__PURE__*/ P(f, {
214
- label: i._({ id: "igVDFt" }),
215
- onClick: n
216
- }),
217
- /*#__PURE__*/ P(f, {
218
- label: i._({ id: "FOcBn3" }),
219
- onClick: r
220
- }),
221
- /*#__PURE__*/ P(f, {
222
- label: i._({ id: "H+a5j6" }),
223
- onClick: a
224
- })
225
- ] }) })
226
- })
227
- })
228
- ]
229
- }, t.id);
230
- }, Z = ({ floatingIps: e, isLoading: t, isError: i, error: a }) => {
231
- let { i18n: s, _: u } = V(), f = Y();
232
- return t ? /*#__PURE__*/ F(b, {
233
- className: "py-8",
234
- distribution: "center",
235
- alignment: "center",
236
- direction: "vertical",
237
- children: [/*#__PURE__*/ P(o, {
238
- variant: "primary",
239
- size: "large",
240
- className: "mb-2"
241
- }), /*#__PURE__*/ P(B, { id: "Z3FXyt" })]
242
- }) : i ? /*#__PURE__*/ P(b, {
243
- className: "py-8",
244
- distribution: "center",
245
- alignment: "center",
246
- direction: "vertical",
247
- children: a?.message ?? s._({ id: "+Nx1wc" })
248
- }) : e.length === 0 ? /*#__PURE__*/ P(c, {
249
- columns: f.length,
250
- className: "floating-ips",
251
- "data-testid": "no-floating-ips",
252
- children: /*#__PURE__*/ P(n, { children: /*#__PURE__*/ F(r, {
253
- colSpan: f.length,
254
- children: [/*#__PURE__*/ P(d, { children: /*#__PURE__*/ P(B, { id: "WCLyHI" }) }), /*#__PURE__*/ P("p", { children: /*#__PURE__*/ P(B, { id: "0eY8Mz" }) })]
255
- }) })
256
- }) : /*#__PURE__*/ F(c, {
257
- columns: f.length,
258
- children: [/*#__PURE__*/ P(n, { children: f.map((e) => /*#__PURE__*/ P(l, { children: e }, e)) }), e.map((e) => /*#__PURE__*/ P(X, { floatingIp: e }, e.id))]
259
- });
260
- }, Q = /^(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}$/, $ = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|(([0-9a-fA-F]{1,4}:){1,7}:)|(([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4})|(([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2})|(([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3})|(([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4})|(([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5})|([0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6}))|(:((:[0-9a-fA-F]{1,4}){1,7}|:))|(::([fF]{4}(:0{1,4})?:)?((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|(([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})))$/, ee = (e) => Q.test(e) || $.test(e), te = /^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/, ne = ({ open: e, onClose: n }) => {
261
- let { i18n: r, _: a } = V(), s = C(), c = S.useUtils(), { isPending: l, ...d } = S.network.floatingIp.create.useMutation({ onSettled: () => c.network.floatingIp.list.invalidate() }), { data: f = [], isLoading: g, error: y } = S.network.floatingIp.listExternalNetworks.useQuery({ project_id: s }), { data: b = [], isLoading: x, error: w } = S.network.floatingIp.listDnsDomains.useQuery({ project_id: s }), { data: T = [], isLoading: E, error: D } = S.network.floatingIp.listAvailablePorts.useQuery({ project_id: s }), O = W({
262
- defaultValues: {
263
- floating_network_id: "",
264
- dns_domain: "",
265
- dns_name: "",
266
- description: "",
267
- floating_ip_address: "",
268
- port_id: "",
269
- fixed_ip_address: ""
270
- },
271
- validators: { onSubmit: H.object({
272
- floating_network_id: H.string(),
273
- dns_domain: H.string(),
274
- dns_name: H.string().trim().max(63, r._({ id: "Zq6Y5u" })).refine((e) => e === "" || te.test(e), { message: r._({ id: "R6kcsL" }) }),
275
- description: H.string().trim().max(255, r._({ id: "lZvIXd" })),
276
- floating_ip_address: H.string().trim().refine((e) => e === "" || ee(e), { message: r._({ id: "AZyHwC" }) }),
277
- port_id: H.string(),
278
- fixed_ip_address: H.string()
279
- }) },
280
- onSubmit: async ({ value: e }) => {
281
- l || (await d.mutateAsync({
282
- project_id: s,
283
- tenant_id: s,
284
- floating_network_id: e.floating_network_id,
285
- ...e.dns_domain && { dns_domain: e.dns_domain },
286
- ...e.dns_name && { dns_name: e.dns_name },
287
- ...e.description && { description: e.description },
288
- ...e.floating_ip_address && { floating_ip_address: e.floating_ip_address },
289
- ...e.port_id && { port_id: e.port_id },
290
- ...e.fixed_ip_address && { fixed_ip_address: e.fixed_ip_address }
291
- }), k());
292
- }
293
- }), k = () => {
294
- l || (O.reset(), d.reset(), n());
295
- }, A = G(O.store, (e) => e.values.port_id), j = G(O.store, (e) => e.values.floating_network_id), M = T.find((e) => e.id === A)?.fixed_ips ?? [], N = (y?.message || w?.message || D?.message) ?? d.error?.message ?? null;
296
- return /*#__PURE__*/ F(v, {
297
- open: e,
298
- size: "large",
299
- title: r._({ id: "h99+4y" }),
300
- onCancel: k,
301
- cancelButtonLabel: r._({ id: "dEgA5A" }),
302
- confirmButtonLabel: r._({ id: "9X8lAk" }),
303
- onConfirm: O.handleSubmit,
304
- disableConfirmButton: l || !j,
305
- children: [
306
- N && /*#__PURE__*/ P(t, {
307
- dismissible: !1,
308
- variant: "error",
309
- className: "mb-4",
310
- children: N
311
- }),
312
- l && /*#__PURE__*/ F("div", {
313
- className: "mb-4 flex items-center justify-center gap-2",
314
- children: [/*#__PURE__*/ P(o, { variant: "primary" }), /*#__PURE__*/ P("span", {
315
- className: "text-theme-high text-sm",
316
- children: /*#__PURE__*/ P(B, { id: "HuA8iQ" })
317
- })]
318
- }),
319
- !l && /*#__PURE__*/ F(_, {
320
- className: "mb-0",
321
- id: "allocate-floating-ip-form",
322
- onSubmit: (e) => {
323
- e.preventDefault(), O.handleSubmit();
324
- },
325
- children: [
326
- /*#__PURE__*/ P(i, {
327
- className: "mb-4",
328
- children: /*#__PURE__*/ P(O.Field, {
329
- name: "floating_network_id",
330
- children: (e) => /*#__PURE__*/ P(p, {
331
- id: e.name,
332
- name: e.name,
333
- value: e.state.value,
334
- onChange: (t) => e.handleChange(typeof t == "string" ? t : ""),
335
- label: r._({ id: "kA2lMP" }),
336
- helptext: r._({ id: "BoIAP6" }),
337
- placeholder: r._({ id: "T6Gm5y" }),
338
- disabled: l || g,
339
- required: !0,
340
- loading: g,
341
- children: f.map(({ id: e, name: t }) => /*#__PURE__*/ P(h, {
342
- value: e,
343
- label: t ? `${t} (${e})` : e
344
- }, e))
345
- })
346
- })
347
- }),
348
- /*#__PURE__*/ P(i, {
349
- className: "mb-4",
350
- children: /*#__PURE__*/ P(O.Field, {
351
- name: "dns_domain",
352
- children: (e) => /*#__PURE__*/ P(p, {
353
- id: e.name,
354
- name: e.name,
355
- value: e.state.value,
356
- onChange: (t) => e.handleChange(typeof t == "string" ? t : ""),
357
- label: r._({ id: "WlpcJv" }),
358
- helptext: r._({ id: "1ojTVo" }),
359
- disabled: l || x,
360
- loading: x,
361
- children: b.map(({ id: e, name: t }) => /*#__PURE__*/ P(h, {
362
- value: t,
363
- label: t
364
- }, e))
365
- })
366
- })
367
- }),
368
- /*#__PURE__*/ P(i, {
369
- className: "mb-4",
370
- children: /*#__PURE__*/ P(O.Field, {
371
- name: "dns_name",
372
- children: (e) => /*#__PURE__*/ P(u, {
373
- id: e.name,
374
- name: e.name,
375
- value: e.state.value,
376
- onBlur: e.handleBlur,
377
- onChange: (t) => e.handleChange(t.target.value),
378
- label: r._({ id: "eGEHJE" }),
379
- placeholder: r._({ id: "SLEH7X" }),
380
- helptext: r._({ id: "Tx4Ym+" }),
381
- errortext: e.state.meta.errors.map((e) => e?.message).join(", "),
382
- disabled: l
383
- })
384
- })
385
- }),
386
- /*#__PURE__*/ P(i, {
387
- className: "mb-4",
388
- children: /*#__PURE__*/ P(O.Field, {
389
- name: "description",
390
- children: (e) => /*#__PURE__*/ P(m, {
391
- id: e.name,
392
- name: e.name,
393
- value: e.state.value,
394
- onBlur: e.handleBlur,
395
- onChange: (t) => e.handleChange(t.target.value),
396
- placeholder: r._({ id: "Nu4oKW" }),
397
- errortext: e.state.meta.errors.map((e) => e?.message).join(", "),
398
- disabled: l
399
- })
400
- })
401
- }),
402
- /*#__PURE__*/ P(i, {
403
- className: "mb-4",
404
- children: /*#__PURE__*/ P(O.Field, {
405
- name: "floating_ip_address",
406
- children: (e) => /*#__PURE__*/ P(u, {
407
- id: e.name,
408
- name: e.name,
409
- value: e.state.value,
410
- onBlur: e.handleBlur,
411
- onChange: (t) => e.handleChange(t.target.value),
412
- label: r._({ id: "xNG/3n" }),
413
- placeholder: r._({ id: "5/wyf8" }),
414
- helptext: r._({ id: "PAKSdy" }),
415
- errortext: e.state.meta.errors.map((e) => e?.message).join(", "),
416
- disabled: l
417
- })
418
- })
419
- }),
420
- /*#__PURE__*/ P(i, {
421
- className: "mb-4",
422
- children: /*#__PURE__*/ P(O.Field, {
423
- name: "port_id",
424
- children: (e) => /*#__PURE__*/ P(p, {
425
- id: e.name,
426
- name: e.name,
427
- value: e.state.value,
428
- onChange: (t) => {
429
- let n = typeof t == "string" ? t : "";
430
- e.handleChange(n);
431
- let r = T.find((e) => e.id === n)?.fixed_ips ?? [];
432
- O.setFieldValue("fixed_ip_address", r.length === 1 ? r[0].ip_address : "");
433
- },
434
- label: r._({ id: "eks7oA" }),
435
- placeholder: r._({ id: "UztfYZ" }),
436
- errortext: e.state.meta.errors.map((e) => e?.message).join(", "),
437
- disabled: l || E,
438
- loading: E,
439
- children: T.map((e) => /*#__PURE__*/ P(h, {
440
- value: e.id,
441
- label: e.name ? `${e.name} (${e.id})` : e.id
442
- }, e.id))
443
- })
444
- })
445
- }),
446
- /*#__PURE__*/ P(i, { children: /*#__PURE__*/ P(O.Field, {
447
- name: "fixed_ip_address",
448
- children: (e) => /*#__PURE__*/ P(p, {
449
- id: e.name,
450
- name: e.name,
451
- value: e.state.value,
452
- onBlur: e.handleBlur,
453
- onChange: (t) => e.handleChange(typeof t == "string" ? t : ""),
454
- label: r._({ id: "Nc7QKU" }),
455
- placeholder: r._({ id: "i41Xuw" }),
456
- helptext: r._({ id: "PtjzS+" }),
457
- errortext: e.state.meta.errors.map((e) => e?.message).join(", "),
458
- disabled: l || M.length === 0,
459
- children: M.map(({ ip_address: e }) => /*#__PURE__*/ P(h, {
460
- value: e,
461
- label: e
462
- }, e))
463
- })
464
- }) })
465
- ]
466
- })
467
- ]
468
- });
469
- }, re = "fixed_ip_address", ie = "asc", ae = () => {
470
- let { i18n: e, _: t } = V(), n = C(), [r, i] = w(!1), { searchTerm: a, handleSearchChange: o, sortSettings: s, handleSortChange: c, filterSettings: l, handleFilterChange: u } = k({
471
- defaultSortKey: re,
472
- defaultSortDir: ie,
473
- sortOptions: [
474
- {
475
- label: e._({ id: "Nc7QKU" }),
476
- value: "fixed_ip_address"
477
- },
478
- {
479
- label: e._({ id: "xNG/3n" }),
480
- value: "floating_ip_address"
481
- },
482
- {
483
- label: e._({ id: "2cJIlz" }),
484
- value: "floating_network_id"
485
- },
486
- {
487
- label: e._({ id: "S0kLOH" }),
488
- value: "id"
489
- },
490
- {
491
- label: e._({ id: "/bUiYk" }),
492
- value: "router_id"
493
- },
494
- {
495
- label: e._({ id: "uAQUqI" }),
496
- value: "status"
497
- },
498
- {
499
- label: e._({ id: "T9Mtpi" }),
500
- value: "tenant_id"
501
- },
502
- {
503
- label: e._({ id: "mSfwLL" }),
504
- value: "project_id"
505
- }
506
- ],
507
- filterSettings: { filters: [{
508
- displayName: e._({ id: "uAQUqI" }),
509
- filterName: "status",
510
- values: [
511
- "ACTIVE",
512
- "DOWN",
513
- "ERROR"
514
- ],
515
- supportsMultiValue: !1
516
- }] }
517
- }), { data: d = [], isLoading: f, isError: p, error: m } = S.network.floatingIp.list.useQuery({
518
- project_id: n,
519
- sort_key: s.sortBy,
520
- sort_dir: s.sortDirection,
521
- ...q(l),
522
- ...a ? { searchTerm: a } : {}
523
- });
524
- return /*#__PURE__*/ F("div", {
525
- className: "relative",
526
- children: [
527
- /*#__PURE__*/ P(K, {
528
- searchTerm: a,
529
- onSearch: o,
530
- sortSettings: s,
531
- onSort: c,
532
- filterSettings: l,
533
- onFilter: u,
534
- actions: /*#__PURE__*/ P(x, {
535
- variant: "primary",
536
- label: e._({ id: "h99+4y" }),
537
- onClick: i
538
- })
539
- }),
540
- /*#__PURE__*/ P(Z, {
541
- floatingIps: d,
542
- isLoading: f,
543
- isError: p,
544
- error: m
545
- }),
546
- r && /*#__PURE__*/ P(ne, {
547
- open: r,
548
- onClose: i
549
- })
550
- ]
551
- });
552
- };
553
- //#endregion
554
- //#region src/client/routes/_auth/projects/$projectId/network/floatingips/index.tsx?tsr-split=component
555
- function oe() {
556
- let { i18n: e, _: t } = V();
557
- return /*#__PURE__*/ F(N, { children: [/*#__PURE__*/ P(d, { children: e._({ id: "u77/s4" }) }), /*#__PURE__*/ P(ae, {})] });
558
- }
559
- //#endregion
560
- export { oe as component };
561
-
562
- //# sourceMappingURL=floatingips-zhNK6Xxn.mjs.map