@cobaltcore-dev/aurora 1.1.0 → 1.3.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 (184) hide show
  1. package/README.md +59 -9
  2. package/dist/client/App.d.ts +2 -2
  3. package/dist/client/AuroraApp.d.ts +33 -13
  4. package/dist/client/{AuthProvider-BS5OVv8n.mjs → AuthProvider-CVSAwW9f.mjs} +22 -8
  5. package/dist/client/AuthProvider-CVSAwW9f.mjs.map +1 -0
  6. package/dist/client/{ContentHeader-BHMUzd9H.mjs → ContentHeader-CPJbgYWn.mjs} +18 -18
  7. package/dist/client/{ContentHeader-BHMUzd9H.mjs.map → ContentHeader-CPJbgYWn.mjs.map} +1 -1
  8. package/dist/client/DeleteFlavorModal-V44QCJBd.mjs +773 -0
  9. package/dist/client/DeleteFlavorModal-V44QCJBd.mjs.map +1 -0
  10. package/dist/client/DynamicBreadcrumbContext-CVcUQFou.mjs +26 -0
  11. package/dist/client/DynamicBreadcrumbContext-CVcUQFou.mjs.map +1 -0
  12. package/dist/client/{FiltersInput-B8CNBg1L.mjs → FiltersInput-CKI6zWnm.mjs} +18 -18
  13. package/dist/client/{FiltersInput-B8CNBg1L.mjs.map → FiltersInput-CKI6zWnm.mjs.map} +1 -1
  14. package/dist/client/FloatingIpActionModals-Ch8uozH9.mjs +466 -0
  15. package/dist/client/FloatingIpActionModals-Ch8uozH9.mjs.map +1 -0
  16. package/dist/client/ImageToastNotifications-m6c3tVPb.mjs +1152 -0
  17. package/dist/client/ImageToastNotifications-m6c3tVPb.mjs.map +1 -0
  18. package/dist/client/SortInput-4g7nSTHW.mjs +34 -0
  19. package/dist/client/SortInput-4g7nSTHW.mjs.map +1 -0
  20. package/dist/client/{TwoColumnDescriptionList-DiDx3PnH.mjs → TwoColumnDescriptionList-DKS42RKa.mjs} +10 -4
  21. package/dist/client/TwoColumnDescriptionList-DKS42RKa.mjs.map +1 -0
  22. package/dist/client/_-CAsCx-Ay.mjs +6 -0
  23. package/dist/client/_-CAsCx-Ay.mjs.map +1 -0
  24. package/dist/client/_auth-SrDjHL6j.mjs +12 -0
  25. package/dist/client/_auth-SrDjHL6j.mjs.map +1 -0
  26. package/dist/client/{_flavorId-BN_qessZ.mjs → _flavorId-Dg7MS0Af.mjs} +3 -9
  27. package/dist/client/_flavorId-Dg7MS0Af.mjs.map +1 -0
  28. package/dist/client/_flavorId-kHl-b8rI.mjs +232 -0
  29. package/dist/client/_flavorId-kHl-b8rI.mjs.map +1 -0
  30. package/dist/client/{_floatingIpId-CwDGHkWm.mjs → _floatingIpId-C9xfRWot.mjs} +3 -9
  31. package/dist/client/_floatingIpId-C9xfRWot.mjs.map +1 -0
  32. package/dist/client/_floatingIpId-DNn6ABCB.mjs +196 -0
  33. package/dist/client/_floatingIpId-DNn6ABCB.mjs.map +1 -0
  34. package/dist/client/_imageId-8JIbFmGB.mjs +39 -0
  35. package/dist/client/_imageId-8JIbFmGB.mjs.map +1 -0
  36. package/dist/client/{_imageId-BtJ7GmYB.mjs → _imageId-BBAlRioC.mjs} +217 -201
  37. package/dist/client/_imageId-BBAlRioC.mjs.map +1 -0
  38. package/dist/client/{_projectId-Byt3GQDW.mjs → _projectId-7Nl1MQTJ.mjs} +5 -5
  39. package/dist/client/_projectId-7Nl1MQTJ.mjs.map +1 -0
  40. package/dist/client/_projectId-B3wmSala.mjs +281 -0
  41. package/dist/client/_projectId-B3wmSala.mjs.map +1 -0
  42. package/dist/client/_projectId-DPzv0CCp.mjs +77 -0
  43. package/dist/client/_projectId-DPzv0CCp.mjs.map +1 -0
  44. package/dist/client/_projectId-DfeVJy0G.mjs +30 -0
  45. package/dist/client/_projectId-DfeVJy0G.mjs.map +1 -0
  46. package/dist/client/{_securityGroupId-BcbkRhsN.mjs → _securityGroupId-C6eHmrx_.mjs} +3 -9
  47. package/dist/client/_securityGroupId-C6eHmrx_.mjs.map +1 -0
  48. package/dist/client/_securityGroupId-DmplhDgt.mjs +1810 -0
  49. package/dist/client/_securityGroupId-DmplhDgt.mjs.map +1 -0
  50. package/dist/client/_serviceType-DS8DxsrP.mjs +20 -0
  51. package/dist/client/_serviceType-DS8DxsrP.mjs.map +1 -0
  52. package/dist/client/_serviceType-M8d9rOT6.mjs +6 -0
  53. package/dist/client/_serviceType-M8d9rOT6.mjs.map +1 -0
  54. package/dist/client/_storageType-BRWWJtow.mjs +14 -0
  55. package/dist/client/_storageType-BRWWJtow.mjs.map +1 -0
  56. package/dist/client/_storageType-C5gS9eut.mjs +845 -0
  57. package/dist/client/_storageType-C5gS9eut.mjs.map +1 -0
  58. package/dist/client/_storageType-CzZ4u9x_.mjs +12 -0
  59. package/dist/client/_storageType-CzZ4u9x_.mjs.map +1 -0
  60. package/dist/client/_storageType-zeSZe--V.mjs.map +1 -1
  61. package/dist/client/{about-_73VmpTB.mjs → about-BmQTyLWc.mjs} +2 -2
  62. package/dist/client/{about-_73VmpTB.mjs.map → about-BmQTyLWc.mjs.map} +1 -1
  63. package/dist/client/{aurora-EbwGRLLf.mjs → aurora-CIml-f2f.mjs} +2 -2
  64. package/dist/client/{aurora-EbwGRLLf.mjs.map → aurora-CIml-f2f.mjs.map} +1 -1
  65. package/dist/client/{build-C_4vRMCq.mjs → build-WuxXRAqf.mjs} +121 -24
  66. package/dist/client/{build-C_4vRMCq.mjs.map → build-WuxXRAqf.mjs.map} +1 -1
  67. package/dist/client/components/Breadcrumbs.d.ts +1 -0
  68. package/dist/client/components/ListToolbar/SortInput.d.ts +3 -0
  69. package/dist/client/context/BreadcrumbExtensionContext.d.ts +9 -0
  70. package/dist/client/context/DynamicBreadcrumbContext.d.ts +9 -0
  71. package/dist/client/{flavors-CiHCYrtZ.mjs → flavors-B1SDOPDu.mjs} +3 -5
  72. package/dist/client/flavors-B1SDOPDu.mjs.map +1 -0
  73. package/dist/client/flavors-D8_PzQUB.mjs +628 -0
  74. package/dist/client/flavors-D8_PzQUB.mjs.map +1 -0
  75. package/dist/client/flavors-DWMZ6TuJ.mjs.map +1 -1
  76. package/dist/client/floatingips-Cz9k80cc.mjs +8 -0
  77. package/dist/client/floatingips-Cz9k80cc.mjs.map +1 -0
  78. package/dist/client/floatingips-DrCvtXtT.mjs +551 -0
  79. package/dist/client/floatingips-DrCvtXtT.mjs.map +1 -0
  80. package/dist/client/hooks/useBreadcrumbs.d.ts +16 -0
  81. package/dist/client/hooks/usePushBreadcrumbs.d.ts +10 -0
  82. package/dist/client/hooks/useSetBreadcrumb.d.ts +11 -0
  83. package/dist/client/{hooks-LutR2Yg3.mjs → hooks-D0yKIumu.mjs} +2 -2
  84. package/dist/client/{hooks-LutR2Yg3.mjs.map → hooks-D0yKIumu.mjs.map} +1 -1
  85. package/dist/client/images-BGQv9kKT.mjs +1983 -0
  86. package/dist/client/images-BGQv9kKT.mjs.map +1 -0
  87. package/dist/client/{images-CS4kZQyu.mjs → images-CPmMa4SQ.mjs} +3 -5
  88. package/dist/client/images-CPmMa4SQ.mjs.map +1 -0
  89. package/dist/client/images-NBf2bV43.mjs.map +1 -1
  90. package/dist/client/index.d.ts +7 -3
  91. package/dist/client/index.js +549 -535
  92. package/dist/client/index.js.map +1 -1
  93. package/dist/client/objects-AERkhfiM.mjs +66 -0
  94. package/dist/client/objects-AERkhfiM.mjs.map +1 -0
  95. package/dist/client/{objects-C3azvW8m.mjs → objects-BR3eeSNH.mjs} +7087 -4211
  96. package/dist/client/objects-BR3eeSNH.mjs.map +1 -0
  97. package/dist/client/objects-DVccbrL1.mjs +66 -0
  98. package/dist/client/objects-DVccbrL1.mjs.map +1 -0
  99. package/dist/client/projects-yiK0HGSA.mjs.map +1 -1
  100. package/dist/client/routeInfo-DP3v74Wg.mjs +19 -0
  101. package/dist/client/routeInfo-DP3v74Wg.mjs.map +1 -0
  102. package/dist/client/router.d.ts +2 -2
  103. package/dist/client/{routes-CdDm-hhO.mjs → routes-CJj7SR_K.mjs} +2 -2
  104. package/dist/client/routes-CJj7SR_K.mjs.map +1 -0
  105. package/dist/client/routes-xofA3ksU.mjs +110 -0
  106. package/dist/client/routes-xofA3ksU.mjs.map +1 -0
  107. package/dist/client/securitygroups-BjhgLBHm.mjs +620 -0
  108. package/dist/client/securitygroups-BjhgLBHm.mjs.map +1 -0
  109. package/dist/client/securitygroups-CtKne8UQ.mjs +8 -0
  110. package/dist/client/securitygroups-CtKne8UQ.mjs.map +1 -0
  111. package/dist/client/{securitygroups-Byte-iSp.mjs → securitygroups-DEJQBcxm.mjs} +3 -5
  112. package/dist/client/securitygroups-DEJQBcxm.mjs.map +1 -0
  113. package/dist/client/trpcClient.d.ts +135 -3
  114. package/dist/client/useBreadcrumbs-ha3IlaxX.mjs +54 -0
  115. package/dist/client/useBreadcrumbs-ha3IlaxX.mjs.map +1 -0
  116. package/dist/client/useModalTracking-BcOKTYRN.mjs +33 -0
  117. package/dist/client/useModalTracking-BcOKTYRN.mjs.map +1 -0
  118. package/dist/client/{useSecurityGroupPermissions-C29mzb3b.mjs → useSecurityGroupPermissions-BOyLQLdC.mjs} +85 -19
  119. package/dist/client/useSecurityGroupPermissions-BOyLQLdC.mjs.map +1 -0
  120. package/dist/client/useSetBreadcrumb-tn7lBaQV.mjs +19 -0
  121. package/dist/client/useSetBreadcrumb-tn7lBaQV.mjs.map +1 -0
  122. package/dist/client/utils/formatSwiftDate.d.ts +30 -0
  123. package/dist/server/index.d.ts +136 -4
  124. package/dist/server/index.js +845 -260
  125. package/package.json +37 -36
  126. package/dist/client/AuthProvider-BS5OVv8n.mjs.map +0 -1
  127. package/dist/client/DeleteFlavorModal-BP83t9zX.mjs +0 -721
  128. package/dist/client/DeleteFlavorModal-BP83t9zX.mjs.map +0 -1
  129. package/dist/client/FloatingIpActionModals-BraiJWBi.mjs +0 -417
  130. package/dist/client/FloatingIpActionModals-BraiJWBi.mjs.map +0 -1
  131. package/dist/client/ImageToastNotifications-BXMHJaIH.mjs +0 -1131
  132. package/dist/client/ImageToastNotifications-BXMHJaIH.mjs.map +0 -1
  133. package/dist/client/RouteError-hAF8_jbe.mjs +0 -25
  134. package/dist/client/RouteError-hAF8_jbe.mjs.map +0 -1
  135. package/dist/client/SortInput-Cqs2poV3.mjs +0 -34
  136. package/dist/client/SortInput-Cqs2poV3.mjs.map +0 -1
  137. package/dist/client/StatusError-C5KodQOq.mjs +0 -39
  138. package/dist/client/StatusError-C5KodQOq.mjs.map +0 -1
  139. package/dist/client/TwoColumnDescriptionList-DiDx3PnH.mjs.map +0 -1
  140. package/dist/client/_auth-DJ9wHZaj.mjs +0 -11
  141. package/dist/client/_auth-DJ9wHZaj.mjs.map +0 -1
  142. package/dist/client/_flavorId-BN_qessZ.mjs.map +0 -1
  143. package/dist/client/_flavorId-CJjEB_Ao.mjs +0 -210
  144. package/dist/client/_flavorId-CJjEB_Ao.mjs.map +0 -1
  145. package/dist/client/_floatingIpId-CwDGHkWm.mjs.map +0 -1
  146. package/dist/client/_floatingIpId-foMIwbE4.mjs +0 -215
  147. package/dist/client/_floatingIpId-foMIwbE4.mjs.map +0 -1
  148. package/dist/client/_imageId-BtJ7GmYB.mjs.map +0 -1
  149. package/dist/client/_projectId-BmtCuzJu.mjs +0 -29
  150. package/dist/client/_projectId-BmtCuzJu.mjs.map +0 -1
  151. package/dist/client/_projectId-Byt3GQDW.mjs.map +0 -1
  152. package/dist/client/_projectId-NYk1IN_a.mjs +0 -291
  153. package/dist/client/_projectId-NYk1IN_a.mjs.map +0 -1
  154. package/dist/client/_projectId-QueiFczy.mjs +0 -46
  155. package/dist/client/_projectId-QueiFczy.mjs.map +0 -1
  156. package/dist/client/_securityGroupId-BcbkRhsN.mjs.map +0 -1
  157. package/dist/client/_securityGroupId-pPtJsCoe.mjs +0 -1797
  158. package/dist/client/_securityGroupId-pPtJsCoe.mjs.map +0 -1
  159. package/dist/client/_storageType-BmqrU06i.mjs +0 -2202
  160. package/dist/client/_storageType-BmqrU06i.mjs.map +0 -1
  161. package/dist/client/components/Error/StatusError.d.ts +0 -11
  162. package/dist/client/components/ProjectView/ProjectInfoBox.d.ts +0 -12
  163. package/dist/client/flavors-CiHCYrtZ.mjs.map +0 -1
  164. package/dist/client/flavors-DY-bDc8l.mjs +0 -650
  165. package/dist/client/flavors-DY-bDc8l.mjs.map +0 -1
  166. package/dist/client/floatingips-Ci4jHkaG.mjs +0 -591
  167. package/dist/client/floatingips-Ci4jHkaG.mjs.map +0 -1
  168. package/dist/client/images-91U7tr9Y2.mjs +0 -1976
  169. package/dist/client/images-91U7tr9Y2.mjs.map +0 -1
  170. package/dist/client/images-CS4kZQyu.mjs.map +0 -1
  171. package/dist/client/objects-C3azvW8m.mjs.map +0 -1
  172. package/dist/client/objects-CM265S6b.mjs +0 -56
  173. package/dist/client/objects-CM265S6b.mjs.map +0 -1
  174. package/dist/client/objects-EE9Cd1wI.mjs +0 -56
  175. package/dist/client/objects-EE9Cd1wI.mjs.map +0 -1
  176. package/dist/client/routeInfo-DXqB2HCf.mjs +0 -32
  177. package/dist/client/routeInfo-DXqB2HCf.mjs.map +0 -1
  178. package/dist/client/routes-CBd8CCuM.mjs +0 -115
  179. package/dist/client/routes-CBd8CCuM.mjs.map +0 -1
  180. package/dist/client/routes-CdDm-hhO.mjs.map +0 -1
  181. package/dist/client/securitygroups-Bd_uV4S9.mjs +0 -595
  182. package/dist/client/securitygroups-Bd_uV4S9.mjs.map +0 -1
  183. package/dist/client/securitygroups-Byte-iSp.mjs.map +0 -1
  184. package/dist/client/useSecurityGroupPermissions-C29mzb3b.mjs.map +0 -1
@@ -1,1131 +0,0 @@
1
- import { E as e, F as t, I as n, J as r, S as i, T as a, V as o, W as s, X as c, a as l, at as u, h as d, j as f, m as p, n as m, o as h, p as g, s as _, t as v, tt as y, ut as b } from "./build-C_4vRMCq.mjs";
2
- import { a as x } from "./trpcClient-D7gpR7YG.mjs";
3
- import { t as S } from "./useProjectId-DBc5lpoU.mjs";
4
- import { n as C } from "./formatBytes-CZv_XyCY.mjs";
5
- import "./hooks-LutR2Yg3.mjs";
6
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
7
- import D, { useEffect as O, useMemo as k, useState as A } from "react";
8
- import { Trans as j, useLingui as M } from "@lingui/react";
9
- //#region src/client/routes/_auth/projects/$projectId/compute/-components/Images/-components/SizeDisplay.tsx
10
- function N({ size: e }) {
11
- return e === void 0 ? /*#__PURE__*/ T("span", { children: "N/A" }) : /*#__PURE__*/ T("span", { children: C(e) });
12
- }
13
- //#endregion
14
- //#region src/client/routes/_auth/projects/$projectId/compute/-constants/filters.ts
15
- var P = {
16
- PENDING: "pending",
17
- ACCEPTED: "accepted",
18
- REJECTED: "rejected",
19
- ALL: "all"
20
- }, F = {
21
- QUEUED: "queued",
22
- SAVING: "saving",
23
- ACTIVE: "active",
24
- DEACTIVATED: "deactivated",
25
- KILLED: "killed",
26
- DELETED: "deleted",
27
- PENDING_DELETE: "pending_delete"
28
- }, I = {
29
- PUBLIC: "public",
30
- PRIVATE: "private",
31
- SHARED: "shared",
32
- COMMUNITY: "community",
33
- ALL: "all"
34
- }, L = {
35
- AMI: "ami",
36
- ARI: "ari",
37
- AKI: "aki",
38
- VHD: "vhd",
39
- VHDX: "vhdx",
40
- VMDK: "vmdk",
41
- RAW: "raw",
42
- QCOW2: "qcow2",
43
- VDI: "vdi",
44
- ISO: "iso",
45
- PLOOP: "ploop"
46
- }, R = {
47
- AMI: "ami",
48
- ARI: "ari",
49
- AKI: "aki",
50
- BARE: "bare",
51
- OVF: "ovf",
52
- OVA: "ova",
53
- DOCKER: "docker"
54
- }, z = ({ memberId: e, imageId: t, errors: n, isLoading: r, onMemberIdChange: i, onSave: o, onCancel: s }) => {
55
- let { i18n: c, _: u } = M();
56
- return /*#__PURE__*/ E(a, { children: [
57
- /*#__PURE__*/ T(v, {
58
- className: "break-all",
59
- children: t
60
- }),
61
- /*#__PURE__*/ T(v, {
62
- className: "pl-0",
63
- children: /*#__PURE__*/ T(p, {
64
- value: e,
65
- onChange: (e) => i(e.target.value),
66
- placeholder: c._({ id: "TpGxnq" }),
67
- errortext: n.memberId,
68
- required: !0
69
- })
70
- }),
71
- /*#__PURE__*/ T(v, {}),
72
- /*#__PURE__*/ T(v, { children: /*#__PURE__*/ E(f, { children: [/*#__PURE__*/ T(l, {
73
- icon: "check",
74
- onClick: o,
75
- variant: "primary",
76
- title: c._({ id: "3Qn0me" }),
77
- disabled: r
78
- }), /*#__PURE__*/ T(l, {
79
- icon: "cancel",
80
- onClick: s,
81
- title: c._({ id: "dEgA5A" }),
82
- disabled: r
83
- })] }) })
84
- ] });
85
- }, B = ({ member: e, isDeleting: t, onDelete: n, canDelete: r }) => {
86
- let { i18n: i, _: o } = M(), [u, d] = A(!1);
87
- O(() => {
88
- if (u) {
89
- let e = setTimeout(() => {
90
- d(!1);
91
- }, 3e3);
92
- return () => clearTimeout(e);
93
- }
94
- }, [u]);
95
- let f = () => {
96
- d(!1), n();
97
- };
98
- return /*#__PURE__*/ E(a, { children: [
99
- /*#__PURE__*/ T(v, {
100
- className: "break-all",
101
- children: e.image_id
102
- }),
103
- /*#__PURE__*/ T(v, {
104
- className: "break-all",
105
- children: e.member_id
106
- }),
107
- /*#__PURE__*/ T(v, {
108
- className: `break-all text-theme-${((e) => {
109
- switch (e) {
110
- case P.PENDING: return "warning";
111
- case P.ACCEPTED: return "success";
112
- case P.REJECTED: return "danger";
113
- default: return "default";
114
- }
115
- })(e.status)}`,
116
- children: ((e) => {
117
- switch (e) {
118
- case P.PENDING: return i._({ id: "UbRKMZ" });
119
- case P.ACCEPTED: return i._({ id: "bzMKg7" });
120
- case P.REJECTED: return i._({ id: "ekCRTP" });
121
- default: return e;
122
- }
123
- })(e.status)
124
- }),
125
- /*#__PURE__*/ T(v, { children: t ? /*#__PURE__*/ T(c, {
126
- distribution: "center",
127
- alignment: "center",
128
- children: /*#__PURE__*/ T(s, { variant: "primary" })
129
- }) : /*#__PURE__*/ T(c, {
130
- distribution: "end",
131
- alignment: "end",
132
- children: (() => {
133
- if (!r) return /*#__PURE__*/ T(w, {});
134
- if (u) return /*#__PURE__*/ T(l, {
135
- variant: "primary-danger",
136
- onClick: f,
137
- title: i._({ id: "n9jJG6" }),
138
- "aria-label": i._({ id: "n9jJG6" }),
139
- "data-testid": "confirm-removal",
140
- disabled: t,
141
- children: i._({ id: "t/YqKh" })
142
- });
143
- {
144
- let n = e.member_id;
145
- return /*#__PURE__*/ T(l, {
146
- icon: "deleteForever",
147
- onClick: () => d(!0),
148
- title: i._({
149
- id: "pebLmQ",
150
- values: { memberIdDisplay: n }
151
- }),
152
- "aria-label": i._({
153
- id: "pebLmQ",
154
- values: { memberIdDisplay: n }
155
- }),
156
- "data-testid": `remove-${n}`,
157
- disabled: t
158
- });
159
- }
160
- })()
161
- }) })
162
- ] });
163
- };
164
- //#endregion
165
- //#region src/client/routes/_auth/projects/$projectId/compute/-components/Images/-components/ImageMembersTable.tsx
166
- function V() {
167
- return /*#__PURE__*/ T(a, { children: /*#__PURE__*/ T(v, {
168
- colSpan: 4,
169
- children: /*#__PURE__*/ T(c, {
170
- distribution: "center",
171
- alignment: "center",
172
- children: /*#__PURE__*/ T(s, { variant: "primary" })
173
- })
174
- }) });
175
- }
176
- var H = ({ image: e, imageMembers: n, isMembersLoading: r, canAdd: o, canRemove: s, isAddingMember: u, setIsAddingMember: d, setMessage: f, projectId: p }) => {
177
- let { i18n: m, _: g } = M(), _ = x.useUtils(), [y, b] = A(""), [S, C] = A({}), [D, O] = A(/* @__PURE__ */ new Set()), k = x.compute.createImageMember.useMutation({ onSuccess: () => {
178
- _.compute.listImageMembers.invalidate({
179
- project_id: p,
180
- imageId: e.id
181
- });
182
- } }), j = x.compute.deleteImageMember.useMutation({ onSuccess: () => {
183
- _.compute.listImageMembers.invalidate({
184
- project_id: p,
185
- imageId: e.id
186
- });
187
- } }), N = e.visibility === "public", P = !n || n.length === 0, F = k.isPending || j.isPending, I = () => {
188
- let e = y.trim(), t = {};
189
- return e ? n?.some((t) => t.member_id === e) && (t.memberId = m._({ id: "jyqLKs" })) : t.memberId = m._({ id: "S5CUKP" }), C(t), Object.keys(t).length === 0;
190
- }, L = () => {
191
- b(""), C({});
192
- }, R = async () => {
193
- if (!I()) {
194
- f({
195
- text: m._({ id: "CBFSfX" }),
196
- type: "error"
197
- });
198
- return;
199
- }
200
- let t = y.trim();
201
- try {
202
- await k.mutateAsync({
203
- project_id: p,
204
- imageId: e.id,
205
- member: t
206
- }), f({
207
- text: m._({
208
- id: "Sgz1vJ",
209
- values: { trimmedMemberId: t }
210
- }),
211
- type: "info"
212
- }), L(), d(!1);
213
- } catch (e) {
214
- f({
215
- text: e?.message || m._({ id: "9doWrf" }),
216
- type: "error"
217
- });
218
- }
219
- }, H = async (t) => {
220
- O((e) => new Set(e).add(t));
221
- try {
222
- await j.mutateAsync({
223
- project_id: p,
224
- imageId: e.id,
225
- memberId: t
226
- }), f({
227
- text: m._({
228
- id: "4O2AH3",
229
- values: { memberIdToRemove: t }
230
- }),
231
- type: "info"
232
- });
233
- } catch (e) {
234
- f({
235
- text: e?.message || m._({ id: "n46oLW" }) || m._({
236
- id: "7T1fHv",
237
- values: { memberIdToRemove: t }
238
- }),
239
- type: "error"
240
- });
241
- } finally {
242
- O((e) => {
243
- let n = new Set(e);
244
- return n.delete(t), n;
245
- });
246
- }
247
- };
248
- return r ? /*#__PURE__*/ E(h, {
249
- columns: 4,
250
- children: [/*#__PURE__*/ E(a, { children: [
251
- /*#__PURE__*/ T(i, { children: m._({ id: "vrPCbw" }) }),
252
- /*#__PURE__*/ T(i, { children: m._({ id: "mSfwLL" }) }),
253
- /*#__PURE__*/ T(i, { children: m._({ id: "uAQUqI" }) }),
254
- /*#__PURE__*/ T(i, {})
255
- ] }), /*#__PURE__*/ T(V, {})]
256
- }) : N ? /*#__PURE__*/ T(t, {
257
- text: m._({ id: "6H/Lg1" }),
258
- variant: "info"
259
- }) : /*#__PURE__*/ E(w, { children: [o && /*#__PURE__*/ T(c, {
260
- direction: "horizontal",
261
- className: "bg-theme-background-lvl-1 justify-end p-2",
262
- children: /*#__PURE__*/ T(l, {
263
- label: m._({ id: "VCM3KS" }),
264
- "data-testid": "addMemberButton",
265
- onClick: () => d(!0),
266
- variant: "primary",
267
- disabled: u
268
- })
269
- }), /*#__PURE__*/ E(h, {
270
- columns: 4,
271
- children: [
272
- /*#__PURE__*/ E(a, { children: [
273
- /*#__PURE__*/ T(i, { children: m._({ id: "vrPCbw" }) }),
274
- /*#__PURE__*/ T(i, { children: m._({ id: "NRVSdy" }) }),
275
- /*#__PURE__*/ T(i, { children: m._({ id: "uAQUqI" }) }),
276
- /*#__PURE__*/ T(i, {})
277
- ] }),
278
- u && /*#__PURE__*/ T(z, {
279
- memberId: y,
280
- imageId: e.id,
281
- errors: S,
282
- isLoading: F,
283
- onMemberIdChange: (e) => {
284
- b(e), S.memberId && C((e) => ({
285
- ...e,
286
- memberId: void 0
287
- }));
288
- },
289
- onSave: R,
290
- onCancel: () => {
291
- L(), d(!1), f(null);
292
- }
293
- }),
294
- n?.map((e, t) => /*#__PURE__*/ T(B, {
295
- member: e,
296
- isDeleting: D.has(e.member_id),
297
- onDelete: () => H(e.member_id),
298
- canDelete: s
299
- }, `${e.member_id}-${t}`)),
300
- P && !u && /*#__PURE__*/ T(a, { children: /*#__PURE__*/ T(v, {
301
- colSpan: 4,
302
- className: "text-theme-default py-4 text-center",
303
- children: m._({ id: "H7u085" })
304
- }) })
305
- ]
306
- })] });
307
- }, U = ({ image: e, isOpen: t, isLoading: i = !1, onClose: a, onSave: f }) => {
308
- let { i18n: m, _: h } = M(), [_, v] = A({
309
- name: e.name || "",
310
- tags: e.tags || [],
311
- visibility: e.visibility || I.PRIVATE,
312
- protected: e.protected || !1,
313
- min_disk: e.min_disk || 0,
314
- min_ram: e.min_ram || 0
315
- }), [x, S] = A(""), [C, w] = A({}), D = (e, t) => {
316
- if (e.length !== t.length) return !1;
317
- let n = [...e].sort(), r = [...t].sort();
318
- return n.every((e, t) => e === r[t]);
319
- }, O = e.name === _.name && D(e.tags || [], _.tags) && e.visibility === _.visibility && e.protected === _.protected && e.min_disk === _.min_disk && e.min_ram === _.min_ram, k = (e) => {
320
- let { name: t, value: n, type: r, checked: i } = e.target;
321
- v((e) => ({
322
- ...e,
323
- [t]: r === "checkbox" ? i : n
324
- })), C[t] && w((e) => {
325
- let n = { ...e };
326
- return delete n[t], n;
327
- });
328
- }, N = (e, t) => {
329
- v((n) => ({
330
- ...n,
331
- [e]: t
332
- })), C[e] && w((t) => {
333
- let n = { ...t };
334
- return delete n[e], n;
335
- });
336
- }, P = (e, t) => {
337
- let n = t === "" ? 0 : parseInt(t, 10);
338
- isNaN(n) || (v((t) => ({
339
- ...t,
340
- [e]: n
341
- })), C[e] && w((t) => {
342
- let n = { ...t };
343
- return delete n[e], n;
344
- }));
345
- }, F = (e) => {
346
- S(e.target.value);
347
- }, L = () => {
348
- let e = x.trim();
349
- if (e !== "") {
350
- if (_.tags.includes(e)) {
351
- S("");
352
- return;
353
- }
354
- v((t) => ({
355
- ...t,
356
- tags: [...t.tags, e]
357
- })), S("");
358
- }
359
- }, R = (e) => {
360
- e.key === "Enter" && (e.preventDefault(), L());
361
- }, z = (e) => {
362
- v((t) => ({
363
- ...t,
364
- tags: t.tags.filter((t) => t !== e)
365
- }));
366
- }, B = () => {
367
- let e = {};
368
- return (!_.name || _.name.trim() === "") && (e.name = m._({ id: "wyIOMP" })), _.min_disk < 0 && (e.min_disk = m._({ id: "K3bUTE" })), _.min_ram < 0 && (e.min_ram = m._({ id: "PEGvy+" })), w(e), Object.keys(e).length === 0;
369
- };
370
- return /*#__PURE__*/ E(r, {
371
- open: t,
372
- onCancel: () => {
373
- w({}), a();
374
- },
375
- size: "large",
376
- title: m._({ id: "M5Epeo" }),
377
- onConfirm: (t) => {
378
- t.preventDefault(), B() && f({
379
- ...e.name === _.name.trim() ? {} : { name: _.name.trim() },
380
- ...D(e.tags || [], _.tags) ? {} : { tags: _.tags },
381
- ...e.visibility === _.visibility ? {} : { visibility: _.visibility },
382
- ...e.protected === _.protected ? {} : { protected: _.protected },
383
- ...e.min_disk === _.min_disk ? {} : { min_disk: _.min_disk },
384
- ...e.min_ram === _.min_ram ? {} : { min_ram: _.min_ram }
385
- });
386
- },
387
- confirmButtonLabel: m._({ id: "IUwGEM" }),
388
- cancelButtonLabel: m._({ id: "dEgA5A" }),
389
- disableConfirmButton: i || O,
390
- children: [i && /*#__PURE__*/ T(c, {
391
- distribution: "center",
392
- alignment: "center",
393
- children: /*#__PURE__*/ T(s, { variant: "primary" })
394
- }), !i && /*#__PURE__*/ E(b, { children: [/*#__PURE__*/ E(g, {
395
- className: "mb-6",
396
- children: [
397
- /*#__PURE__*/ T(d, {
398
- className: "mb-4",
399
- children: /*#__PURE__*/ T(p, {
400
- id: "name",
401
- name: "name",
402
- label: m._({ id: "ExLULX" }),
403
- value: _.name,
404
- onChange: k,
405
- required: !0,
406
- errortext: C.name
407
- })
408
- }),
409
- /*#__PURE__*/ T(d, {
410
- className: "my-6",
411
- children: /*#__PURE__*/ E("div", {
412
- className: "w-full",
413
- children: [/*#__PURE__*/ E(c, {
414
- gap: "2",
415
- direction: "horizontal",
416
- alignment: "start",
417
- children: [/*#__PURE__*/ T("div", {
418
- className: "flex-1",
419
- children: /*#__PURE__*/ T(p, {
420
- id: "tags",
421
- name: "tags",
422
- label: m._({ id: "OYHzN1" }),
423
- value: x,
424
- onChange: F,
425
- onKeyDown: R,
426
- helptext: m._({ id: "MOug+V" }),
427
- placeholder: m._({ id: "y+KBOY" })
428
- })
429
- }), /*#__PURE__*/ T(l, {
430
- variant: "primary",
431
- onClick: L,
432
- disabled: i || x.trim() === "",
433
- children: /*#__PURE__*/ T(j, { id: "m16xKo" })
434
- })]
435
- }), _.tags.length > 0 && /*#__PURE__*/ T(c, {
436
- gap: "2",
437
- wrap: !0,
438
- alignment: "center",
439
- className: "mt-3",
440
- children: _.tags.map((e) => /*#__PURE__*/ T(o, {
441
- closeable: !0,
442
- pillKey: "",
443
- pillValue: e,
444
- onClose: () => z(e)
445
- }, e))
446
- })]
447
- })
448
- }),
449
- /*#__PURE__*/ T(d, {
450
- className: "mb-4",
451
- children: /*#__PURE__*/ E(y, {
452
- id: "visibility",
453
- name: "visibility",
454
- label: m._({ id: "2q/Q7x" }),
455
- value: _.visibility,
456
- onChange: (e) => N("visibility", e),
457
- children: [
458
- /*#__PURE__*/ T(n, {
459
- value: I.PUBLIC,
460
- label: m._({ id: "7d1a0d" })
461
- }),
462
- /*#__PURE__*/ T(n, {
463
- value: I.PRIVATE,
464
- label: m._({ id: "zwBp5t" })
465
- }),
466
- /*#__PURE__*/ T(n, {
467
- value: I.SHARED,
468
- label: m._({ id: "0Gd0NU" })
469
- }),
470
- /*#__PURE__*/ T(n, {
471
- value: I.COMMUNITY,
472
- label: m._({ id: "chL5IG" })
473
- })
474
- ]
475
- })
476
- }),
477
- /*#__PURE__*/ T(d, { children: /*#__PURE__*/ T(u, {
478
- id: "protected",
479
- name: "protected",
480
- label: m._({ id: "644xgx" }),
481
- checked: _.protected,
482
- onChange: k,
483
- helptext: m._({ id: "lAsm87" })
484
- }) })
485
- ]
486
- }), /*#__PURE__*/ E(g, {
487
- className: "mb-6",
488
- children: [/*#__PURE__*/ T(d, {
489
- className: "mb-4",
490
- children: /*#__PURE__*/ T(p, {
491
- id: "min_disk",
492
- name: "min_disk",
493
- label: m._({ id: "tbwGSx" }),
494
- type: "number",
495
- value: String(_.min_disk),
496
- onChange: (e) => P("min_disk", e.target.value),
497
- helptext: m._({ id: "RFDYCD" }),
498
- errortext: C.min_disk
499
- })
500
- }), /*#__PURE__*/ T(d, { children: /*#__PURE__*/ T(p, {
501
- id: "min_ram",
502
- name: "min_ram",
503
- label: m._({ id: "UYSopm" }),
504
- type: "number",
505
- value: String(_.min_ram),
506
- onChange: (e) => P("min_ram", e.target.value),
507
- helptext: m._({ id: "WErCZy" }),
508
- errortext: C.min_ram
509
- }) })]
510
- })] })]
511
- });
512
- };
513
- //#endregion
514
- //#region src/client/routes/_auth/projects/$projectId/compute/-components/Images/-components/EditImageMetadataModal.tsx
515
- function ee(e) {
516
- return e == null ? "" : typeof e == "object" ? JSON.stringify(e) : String(e);
517
- }
518
- function W(e, t) {
519
- return Object.entries(e).filter(([e]) => !t.has(e.toLowerCase())).map(([e, t]) => {
520
- let n = ee(t);
521
- return {
522
- key: e,
523
- value: n,
524
- isNew: !1,
525
- isEditing: !1,
526
- originalKey: e,
527
- originalValue: n
528
- };
529
- });
530
- }
531
- function G({ isLoading: t, onClose: n, onSave: i, initialMetadata: a, excludedProperties: o }) {
532
- let { i18n: u, _: d } = M(), [f, h] = A(a), [g, v] = A({}), [y, b] = A(!1), [x, S] = A(""), [C, k] = A(""), [j, N] = A(null);
533
- O(() => {
534
- if (j !== null) {
535
- let e = setTimeout(() => N(null), 3e3);
536
- return () => clearTimeout(e);
537
- }
538
- }, [j]);
539
- let P = f.every((e) => !e.isNew && e.key === e.originalKey && e.value === e.originalValue) && a.length === f.length, F = (e, t, n) => {
540
- let r = e?.trim().toLowerCase();
541
- return r ? o.has(r) ? u._({ id: "n3eQzA" }) : f.some((e, i) => e.key.trim().toLowerCase() === r && i !== n && e.originalKey !== t) ? u._({ id: "i6/ygf" }) : null : u._({ id: "QV1ZPO" });
542
- }, I = () => {
543
- let e = F(x, void 0, f.length);
544
- if (e) {
545
- v({ newKey: e });
546
- return;
547
- }
548
- if (!C.trim()) {
549
- v({ newValue: u._({ id: "hXUWyd" }) });
550
- return;
551
- }
552
- h([...f, {
553
- key: x.trim(),
554
- value: C.trim(),
555
- isNew: !0,
556
- isEditing: !1
557
- }]), S(""), k(""), b(!1), v({});
558
- }, L = () => {
559
- S(""), k(""), b(!1), v({});
560
- }, R = (e) => {
561
- N(null), h(f.map((t, n) => n === e ? {
562
- ...t,
563
- isEditing: !0
564
- } : {
565
- ...t,
566
- isEditing: !1
567
- })), b(!1);
568
- }, z = (e) => {
569
- let t = f[e], n = F(t.key, t.originalKey, e);
570
- if (n) {
571
- v({ [`edit-${e}`]: n });
572
- return;
573
- }
574
- if (!t.value.trim()) {
575
- v({ [`edit-${e}`]: u._({ id: "hXUWyd" }) });
576
- return;
577
- }
578
- h(f.map((t, n) => n === e ? {
579
- ...t,
580
- isEditing: !1,
581
- key: t.key.trim(),
582
- value: t.value.trim()
583
- } : t)), v({});
584
- }, B = (e) => {
585
- h(f.map((t, n) => n === e ? {
586
- ...t,
587
- isEditing: !1,
588
- key: t.originalKey ?? t.key,
589
- value: t.originalValue ?? t.value
590
- } : t)), v({});
591
- }, V = (e) => {
592
- h(f.filter((t, n) => n !== e)), N(null), v({});
593
- }, H = (e, t) => {
594
- h(f.map((n, r) => r === e ? {
595
- ...n,
596
- key: t
597
- } : n)), g[`edit-${e}`] && v((t) => {
598
- let n = { ...t };
599
- return delete n[`edit-${e}`], n;
600
- });
601
- }, U = (e, t) => {
602
- h(f.map((n, r) => r === e ? {
603
- ...n,
604
- value: t
605
- } : n)), g[`edit-${e}`] && v((t) => {
606
- let n = { ...t };
607
- return delete n[`edit-${e}`], n;
608
- });
609
- };
610
- return /*#__PURE__*/ T(r, {
611
- open: !0,
612
- onCancel: () => {
613
- h(a), b(!1), S(""), k(""), v({}), n();
614
- },
615
- size: "large",
616
- title: u._({ id: "yTtJTy" }),
617
- onConfirm: async () => {
618
- let e = {}, t = Object.fromEntries(a.filter((e) => !f.map((e) => e.originalKey).includes(e.originalKey) || !f.map((e) => e.key).includes(e.key)).map((e) => [e.key, null]));
619
- f.filter((e) => e.isNew || e.value !== e.originalValue || e.key !== e.originalKey).forEach((t) => {
620
- e[t.key] = t.value;
621
- }), await i({
622
- ...e,
623
- ...t
624
- }) && n();
625
- },
626
- confirmButtonLabel: u._({ id: "IUwGEM" }),
627
- cancelButtonLabel: u._({ id: "dEgA5A" }),
628
- disableConfirmButton: t || y || f.some((e) => e.isEditing) || P,
629
- children: t ? /*#__PURE__*/ T(c, {
630
- distribution: "center",
631
- alignment: "center",
632
- children: /*#__PURE__*/ T(s, { variant: "primary" })
633
- }) : /*#__PURE__*/ E("div", { children: [/*#__PURE__*/ T(c, {
634
- direction: "horizontal",
635
- className: "jn:bg-theme-background-lvl-1 mb-4 justify-end p-2",
636
- children: /*#__PURE__*/ T(l, {
637
- label: u._({ id: "sWBLli" }),
638
- onClick: () => b(!0),
639
- variant: "primary",
640
- disabled: y || f.some((e) => e.isEditing),
641
- icon: "addCircle"
642
- })
643
- }), f.length === 0 && !y ? /*#__PURE__*/ T("p", {
644
- className: "jn:text-theme-light py-8 text-center",
645
- children: u._({ id: "t1POAD" })
646
- }) : /*#__PURE__*/ E(_, {
647
- className: "mb-6",
648
- children: [
649
- /*#__PURE__*/ T(m, { children: u._({ id: "T8N6oi" }) }),
650
- /*#__PURE__*/ T(e, { children: u._({ id: "wMHvYH" }) }),
651
- /*#__PURE__*/ T(w, { children: y && /*#__PURE__*/ E(w, { children: [/*#__PURE__*/ T(m, { children: /*#__PURE__*/ T(p, {
652
- value: x,
653
- onChange: (e) => {
654
- S(e.target.value), g.newKey && v((e) => {
655
- let t = { ...e };
656
- return delete t.newKey, t;
657
- });
658
- },
659
- placeholder: u._({ id: "x9AdZ8" }),
660
- errortext: g.newKey,
661
- autoFocus: !0
662
- }) }), /*#__PURE__*/ T(e, { children: /*#__PURE__*/ E(c, {
663
- direction: "horizontal",
664
- gap: "2",
665
- alignment: "center",
666
- className: "justify-between",
667
- children: [/*#__PURE__*/ T(p, {
668
- value: C,
669
- onChange: (e) => {
670
- k(e.target.value), g.newValue && v((e) => {
671
- let t = { ...e };
672
- return delete t.newValue, t;
673
- });
674
- },
675
- placeholder: u._({ id: "wMHvYH" }),
676
- errortext: g.newValue
677
- }), /*#__PURE__*/ E(c, {
678
- direction: "horizontal",
679
- gap: "2",
680
- children: [/*#__PURE__*/ T(l, {
681
- size: "small",
682
- variant: "primary",
683
- onClick: I,
684
- icon: "check",
685
- title: u._({ id: "tfDRzk" })
686
- }), /*#__PURE__*/ T(l, {
687
- size: "small",
688
- variant: "subdued",
689
- onClick: L,
690
- icon: "close",
691
- title: u._({ id: "bzSI52" })
692
- })]
693
- })]
694
- }) })] }) }),
695
- /*#__PURE__*/ T(w, { children: f.map((t, n) => /*#__PURE__*/ E(D.Fragment, { children: [/*#__PURE__*/ T(m, { children: t.isEditing ? /*#__PURE__*/ T(p, {
696
- value: t.key,
697
- onChange: (e) => H(n, e.target.value),
698
- errortext: g[`edit-${n}`]
699
- }) : /*#__PURE__*/ T("span", {
700
- className: "jn:text-theme-high block max-w-xs truncate",
701
- title: t.key,
702
- children: t.key
703
- }) }), /*#__PURE__*/ T(e, {
704
- className: "flex items-center justify-between gap-2",
705
- children: t.isEditing ? /*#__PURE__*/ E(w, { children: [/*#__PURE__*/ T(p, {
706
- value: t.value,
707
- onChange: (e) => U(n, e.target.value)
708
- }), /*#__PURE__*/ E(c, {
709
- direction: "horizontal",
710
- gap: "2",
711
- children: [/*#__PURE__*/ T(l, {
712
- size: "small",
713
- variant: "primary",
714
- onClick: () => z(n),
715
- icon: "check",
716
- title: u._({ id: "tfDRzk" })
717
- }), /*#__PURE__*/ T(l, {
718
- size: "small",
719
- variant: "subdued",
720
- onClick: () => B(n),
721
- icon: "close",
722
- title: u._({ id: "bzSI52" })
723
- })]
724
- })] }) : /*#__PURE__*/ E(w, { children: [/*#__PURE__*/ T("span", {
725
- className: "jn:text-theme-default block max-w-md truncate",
726
- title: t.value,
727
- children: t.value
728
- }), /*#__PURE__*/ E(c, {
729
- direction: "horizontal",
730
- gap: "2",
731
- children: [j !== n && /*#__PURE__*/ T(l, {
732
- size: "small",
733
- variant: "subdued",
734
- onClick: () => R(n),
735
- icon: "edit",
736
- "data-testid": `edit-${t.key}`,
737
- title: u._({ id: "ePK91l" }),
738
- disabled: y || f.some((e) => e.isEditing)
739
- }), j === n ? /*#__PURE__*/ T(l, {
740
- size: "small",
741
- variant: "primary-danger",
742
- onClick: () => V(n),
743
- "data-testid": `confirm-delete-${t.key}`,
744
- title: u._({ id: "cnGeoo" }),
745
- disabled: y || f.some((e) => e.isEditing),
746
- children: u._({ id: "cnGeoo" })
747
- }) : /*#__PURE__*/ T(l, {
748
- size: "small",
749
- onClick: () => N(n),
750
- icon: "deleteForever",
751
- "data-testid": `delete-${t.key}`,
752
- title: u._({ id: "cnGeoo" }),
753
- disabled: y || f.some((e) => e.isEditing)
754
- })]
755
- })] })
756
- })] }, `${t.originalKey}-${n}`)) })
757
- ]
758
- })] })
759
- });
760
- }
761
- var K = ({ image: e, isOpen: t, isLoading: n = !1, onClose: i, onSave: a }) => {
762
- let { i18n: o, _: l } = M(), u = S(), { data: d, isLoading: f, isError: p } = x.compute.getImageMetadataExcludedProperties.useQuery({ project_id: u }, { enabled: t }), m = k(() => new Set((d ?? []).map((e) => e.toLowerCase())), [d]), h = k(() => W(e, m), [
763
- e.id,
764
- e.updated_at,
765
- m
766
- ]);
767
- return t ? f ? /*#__PURE__*/ T(r, {
768
- open: !0,
769
- onCancel: i,
770
- size: "large",
771
- title: o._({ id: "yTtJTy" }),
772
- children: /*#__PURE__*/ T(c, {
773
- distribution: "center",
774
- alignment: "center",
775
- children: /*#__PURE__*/ T(s, { variant: "primary" })
776
- })
777
- }) : p ? /*#__PURE__*/ T(r, {
778
- open: !0,
779
- onCancel: i,
780
- size: "large",
781
- title: o._({ id: "yTtJTy" }),
782
- children: /*#__PURE__*/ T(c, {
783
- distribution: "center",
784
- alignment: "center",
785
- children: /*#__PURE__*/ T("span", { children: o._({ id: "PYQUjU" }) })
786
- })
787
- }) : /*#__PURE__*/ T(G, {
788
- isLoading: n,
789
- onClose: i,
790
- onSave: a,
791
- initialMetadata: h,
792
- excludedProperties: m
793
- }, `${e.id}-${e.updated_at}-${m.size}`) : null;
794
- }, q = ({ image: t, isOpen: n, isLoading: i, isDisabled: a, onClose: o, onDelete: s }) => {
795
- if (!t) return null;
796
- let { i18n: l, _: u } = M(), [d, f] = A("");
797
- O(() => {
798
- n || f("");
799
- }, [n]);
800
- let h = () => {
801
- f(""), o();
802
- }, g = () => {
803
- s(t), h();
804
- }, v = d === "delete", y = i ? l._({ id: "EF2EU9" }) : l._({ id: "KWa0gi" });
805
- return /*#__PURE__*/ T(r, {
806
- open: n,
807
- onCancel: h,
808
- size: "large",
809
- title: l._({ id: "KWa0gi" }),
810
- confirmButtonLabel: y,
811
- confirmButtonVariant: "primary-danger",
812
- onConfirm: g,
813
- cancelButtonLabel: l._({ id: "dEgA5A" }),
814
- disableConfirmButton: !v || i || a,
815
- disableCancelButton: i,
816
- disableCloseButton: i,
817
- children: /*#__PURE__*/ E(c, {
818
- direction: "vertical",
819
- gap: "4",
820
- children: [
821
- /*#__PURE__*/ T("p", {
822
- className: "text-theme-default",
823
- children: /*#__PURE__*/ T(j, { id: "2zceEg" })
824
- }),
825
- t && /*#__PURE__*/ E(_, { children: [
826
- /*#__PURE__*/ T(m, { children: l._({ id: "6YtxFj" }) }),
827
- /*#__PURE__*/ T(e, { children: t.name || l._({ id: "MEIAzV" }) }),
828
- /*#__PURE__*/ T(m, { children: l._({ id: "dFb5Nt" }) }),
829
- /*#__PURE__*/ T(e, { children: t.id }),
830
- /*#__PURE__*/ T(m, { children: l._({ id: "uAQUqI" }) }),
831
- /*#__PURE__*/ T(e, { children: t.status }),
832
- /*#__PURE__*/ T(m, { children: l._({ id: "2q/Q7x" }) }),
833
- /*#__PURE__*/ T(e, { children: t.visibility }),
834
- /*#__PURE__*/ T(m, { children: l._({ id: "Cj2Gtd" }) }),
835
- /*#__PURE__*/ T(e, { children: /*#__PURE__*/ T(N, { size: t.size }) }),
836
- /*#__PURE__*/ T(m, { children: l._({ id: "NopYGU" }) }),
837
- /*#__PURE__*/ T(e, { children: t.disk_format || l._({ id: "fj5byd" }) }),
838
- /*#__PURE__*/ T(m, { children: l._({ id: "d+F6q9" }) }),
839
- /*#__PURE__*/ T(e, { children: t.created_at ? new Date(t.created_at).toLocaleDateString() : l._({ id: "fj5byd" }) })
840
- ] }),
841
- /*#__PURE__*/ T("div", { children: /*#__PURE__*/ T(p, {
842
- label: l._({ id: "QytzQr" }),
843
- value: d,
844
- onChange: (e) => f(e.target.value),
845
- placeholder: "delete",
846
- autoFocus: !0
847
- }) })
848
- ]
849
- })
850
- });
851
- }, J = ({ image: n, isOpen: i, isLoading: a, onClose: o, onActivate: l }) => {
852
- if (!n) return null;
853
- let { i18n: u, _: d } = M();
854
- return /*#__PURE__*/ E(r, {
855
- onCancel: o,
856
- size: "small",
857
- title: u._({ id: "RSFkXF" }),
858
- open: i,
859
- onConfirm: (e) => {
860
- e.preventDefault(), l(n);
861
- },
862
- confirmButtonLabel: u._({ id: "FQBaXG" }),
863
- cancelButtonLabel: u._({ id: "dEgA5A" }),
864
- disableConfirmButton: a,
865
- children: [a && /*#__PURE__*/ T(c, {
866
- distribution: "center",
867
- alignment: "center",
868
- children: /*#__PURE__*/ T(s, { variant: "primary" })
869
- }), !a && /*#__PURE__*/ E("div", { children: [/*#__PURE__*/ T(t, {
870
- text: u._({ id: "+NwLgN" }),
871
- variant: "info",
872
- className: "mb-4"
873
- }), /*#__PURE__*/ E(_, { children: [
874
- /*#__PURE__*/ T(m, { children: u._({ id: "6YtxFj" }) }),
875
- /*#__PURE__*/ T(e, { children: n.name || u._({ id: "MEIAzV" }) }),
876
- /*#__PURE__*/ T(m, { children: u._({ id: "dFb5Nt" }) }),
877
- /*#__PURE__*/ T(e, { children: n.id }),
878
- /*#__PURE__*/ T(m, { children: u._({ id: "uAQUqI" }) }),
879
- /*#__PURE__*/ T(e, { children: n.status }),
880
- /*#__PURE__*/ T(m, { children: u._({ id: "2q/Q7x" }) }),
881
- /*#__PURE__*/ T(e, { children: n.visibility }),
882
- /*#__PURE__*/ T(m, { children: u._({ id: "Cj2Gtd" }) }),
883
- /*#__PURE__*/ T(e, { children: /*#__PURE__*/ T(N, { size: n.size }) }),
884
- /*#__PURE__*/ T(m, { children: u._({ id: "NopYGU" }) }),
885
- /*#__PURE__*/ T(e, { children: n.disk_format || u._({ id: "fj5byd" }) }),
886
- /*#__PURE__*/ T(m, { children: u._({ id: "d+F6q9" }) }),
887
- /*#__PURE__*/ T(e, { children: (() => {
888
- let e = new Date(n.created_at ?? "");
889
- return isNaN(e.getTime()) ? u._({ id: "fj5byd" }) : e.toLocaleDateString();
890
- })() })
891
- ] })] })]
892
- });
893
- }, Y = ({ image: n, isOpen: i, isLoading: a, onClose: o, onDeactivate: l }) => {
894
- if (!n) return null;
895
- let { i18n: u, _: d } = M();
896
- return /*#__PURE__*/ T(r, {
897
- onCancel: o,
898
- size: "small",
899
- title: u._({ id: "hQr1Cr" }),
900
- open: i,
901
- onConfirm: (e) => {
902
- e.preventDefault(), l(n);
903
- },
904
- confirmButtonLabel: u._({ id: "5y3O+A" }),
905
- cancelButtonLabel: u._({ id: "dEgA5A" }),
906
- disableConfirmButton: a,
907
- children: a ? /*#__PURE__*/ T(c, {
908
- distribution: "center",
909
- alignment: "center",
910
- children: /*#__PURE__*/ T(s, { variant: "primary" })
911
- }) : /*#__PURE__*/ E(w, { children: [/*#__PURE__*/ T(t, {
912
- text: u._({ id: "8TSI9h" }),
913
- variant: "danger",
914
- className: "mb-4"
915
- }), /*#__PURE__*/ E(_, { children: [
916
- /*#__PURE__*/ T(m, { children: u._({ id: "6YtxFj" }) }),
917
- /*#__PURE__*/ T(e, { children: n.name || u._({ id: "MEIAzV" }) }),
918
- /*#__PURE__*/ T(m, { children: u._({ id: "dFb5Nt" }) }),
919
- /*#__PURE__*/ T(e, { children: n.id }),
920
- /*#__PURE__*/ T(m, { children: u._({ id: "uAQUqI" }) }),
921
- /*#__PURE__*/ T(e, { children: n.status }),
922
- /*#__PURE__*/ T(m, { children: u._({ id: "2q/Q7x" }) }),
923
- /*#__PURE__*/ T(e, { children: n.visibility }),
924
- /*#__PURE__*/ T(m, { children: u._({ id: "Cj2Gtd" }) }),
925
- /*#__PURE__*/ T(e, { children: /*#__PURE__*/ T(N, { size: n.size }) }),
926
- /*#__PURE__*/ T(m, { children: u._({ id: "NopYGU" }) }),
927
- /*#__PURE__*/ T(e, { children: n.disk_format || u._({ id: "fj5byd" }) }),
928
- /*#__PURE__*/ T(m, { children: u._({ id: "d+F6q9" }) }),
929
- /*#__PURE__*/ T(e, { children: (() => {
930
- let e = new Date(n.created_at ?? "");
931
- return isNaN(e.getTime()) ? u._({ id: "fj5byd" }) : e.toLocaleDateString();
932
- })() })
933
- ] })] })
934
- });
935
- }, X = (e) => ({
936
- message: /*#__PURE__*/ T(j, { id: "bM1O3m" }),
937
- description: /*#__PURE__*/ T(j, {
938
- id: "hHL/wm",
939
- values: { imageName: e }
940
- })
941
- }), Z = (e, t) => ({
942
- message: /*#__PURE__*/ T(j, { id: "9iz2XW" }),
943
- description: /*#__PURE__*/ T(j, {
944
- id: "wODCcl",
945
- values: {
946
- imageName: e,
947
- errorMessage: t
948
- }
949
- })
950
- }), Q = (e) => ({
951
- message: /*#__PURE__*/ T(j, { id: "bM1O3m" }),
952
- description: /*#__PURE__*/ T(j, {
953
- id: "8AriEH",
954
- values: { imageName: e }
955
- })
956
- }), te = (e, t) => ({
957
- message: /*#__PURE__*/ T(j, { id: "lWTy+Y" }),
958
- description: /*#__PURE__*/ T(j, {
959
- id: "lYC3YX",
960
- values: {
961
- imageName: e,
962
- errorMessage: t
963
- }
964
- })
965
- }), ne = (e, t) => ({
966
- message: /*#__PURE__*/ T(j, { id: "AGXLLY" }),
967
- description: /*#__PURE__*/ T(j, {
968
- id: "Vf3tzc",
969
- values: {
970
- fileName: e,
971
- errorMessage: t
972
- }
973
- })
974
- }), re = (e) => ({
975
- message: /*#__PURE__*/ T(j, { id: "bM1O3m" }),
976
- description: /*#__PURE__*/ T(j, {
977
- id: "S1iTXO",
978
- values: { imageName: e }
979
- })
980
- }), ie = (e, t) => ({
981
- message: /*#__PURE__*/ T(j, { id: "o/VDOG" }),
982
- description: /*#__PURE__*/ T(j, {
983
- id: "lIlLtp",
984
- values: {
985
- imageId: e,
986
- errorMessage: t
987
- }
988
- })
989
- }), ae = (e) => ({
990
- message: /*#__PURE__*/ T(j, { id: "bM1O3m" }),
991
- description: /*#__PURE__*/ T(j, {
992
- id: "cj17eo",
993
- values: { imageName: e }
994
- })
995
- }), oe = (e) => ({
996
- message: /*#__PURE__*/ T(j, { id: "bM1O3m" }),
997
- description: /*#__PURE__*/ T(j, {
998
- id: "ZcWMT1",
999
- values: { imageName: e }
1000
- })
1001
- }), se = (e, t) => ({
1002
- message: /*#__PURE__*/ T(j, { id: "tiflqy" }),
1003
- description: /*#__PURE__*/ T(j, {
1004
- id: "G/045D",
1005
- values: {
1006
- imageId: e,
1007
- errorMessage: t
1008
- }
1009
- })
1010
- }), ce = (e, t) => ({
1011
- message: /*#__PURE__*/ T(j, { id: "BYH/2L" }),
1012
- description: /*#__PURE__*/ T(j, {
1013
- id: "KYFkcz",
1014
- values: {
1015
- imageId: e,
1016
- errorMessage: t
1017
- }
1018
- })
1019
- }), le = (e, t) => ({
1020
- message: /*#__PURE__*/ T(j, { id: "CFMxC8" }),
1021
- description: /*#__PURE__*/ T(j, {
1022
- id: "T7mgdd",
1023
- values: {
1024
- successCount: e,
1025
- totalCount: t
1026
- }
1027
- })
1028
- }), ue = (e, t) => ({
1029
- message: /*#__PURE__*/ T(j, { id: "fIvd7X" }),
1030
- description: /*#__PURE__*/ T(j, {
1031
- id: "xNZKYy",
1032
- values: {
1033
- failedCount: e,
1034
- totalCount: t
1035
- }
1036
- })
1037
- }), de = (e, t) => ({
1038
- message: /*#__PURE__*/ T(j, { id: "Z5r9vC" }),
1039
- description: /*#__PURE__*/ T(j, {
1040
- id: "plnnns",
1041
- values: {
1042
- successCount: e,
1043
- failedCount: t
1044
- }
1045
- })
1046
- }), fe = (e, t) => ({
1047
- message: /*#__PURE__*/ T(j, { id: "ryf/ee" }),
1048
- description: /*#__PURE__*/ T(j, {
1049
- id: "J9QcnV",
1050
- values: {
1051
- successCount: e,
1052
- totalCount: t
1053
- }
1054
- })
1055
- }), pe = (e, t) => ({
1056
- message: /*#__PURE__*/ T(j, { id: "9njIiV" }),
1057
- description: /*#__PURE__*/ T(j, {
1058
- id: "R6u5CR",
1059
- values: {
1060
- failedCount: e,
1061
- totalCount: t
1062
- }
1063
- })
1064
- }), me = (e, t) => ({
1065
- message: /*#__PURE__*/ T(j, { id: "YZmsaT" }),
1066
- description: /*#__PURE__*/ T(j, {
1067
- id: "GbKqnI",
1068
- values: {
1069
- successCount: e,
1070
- failedCount: t
1071
- }
1072
- })
1073
- }), $ = (e, t) => ({
1074
- message: /*#__PURE__*/ T(j, { id: "h8h6oz" }),
1075
- description: /*#__PURE__*/ T(j, {
1076
- id: "ZAy0zp",
1077
- values: {
1078
- successCount: e,
1079
- totalCount: t
1080
- }
1081
- })
1082
- }), he = (e, t) => ({
1083
- message: /*#__PURE__*/ T(j, { id: "fJpv9x" }),
1084
- description: /*#__PURE__*/ T(j, {
1085
- id: "quU9wK",
1086
- values: {
1087
- failedCount: e,
1088
- totalCount: t
1089
- }
1090
- })
1091
- }), ge = (e, t) => ({
1092
- message: /*#__PURE__*/ T(j, { id: "JfWCsP" }),
1093
- description: /*#__PURE__*/ T(j, {
1094
- id: "8t1+HU",
1095
- values: {
1096
- successCount: e,
1097
- failedCount: t
1098
- }
1099
- })
1100
- }), _e = (e) => ({
1101
- message: /*#__PURE__*/ T(j, { id: "V66Jih" }),
1102
- description: /*#__PURE__*/ T(j, {
1103
- id: "Vmojta",
1104
- values: { newStatus: e }
1105
- })
1106
- }), ve = (e) => ({
1107
- message: /*#__PURE__*/ T(j, { id: "V66Jih" }),
1108
- description: e || /*#__PURE__*/ T(j, { id: "QYiqYb" })
1109
- }), ye = (e, t) => ({
1110
- message: /*#__PURE__*/ T(j, { id: "OSlLnz" }),
1111
- description: /*#__PURE__*/ T(j, {
1112
- id: "CA8ZeT",
1113
- values: {
1114
- imageName: e,
1115
- visibility: t
1116
- }
1117
- })
1118
- }), be = (e, t) => ({
1119
- message: /*#__PURE__*/ T(j, { id: "aqagJH" }),
1120
- description: /*#__PURE__*/ T(j, {
1121
- id: "FEfQAu",
1122
- values: {
1123
- imageName: e,
1124
- errorMessage: t
1125
- }
1126
- })
1127
- });
1128
- //#endregion
1129
- export { H as A, be as C, q as D, J as E, P as F, N as I, L as M, F as N, K as O, I as P, X as S, Y as T, ce as _, ge as a, ne as b, de as c, _e as d, ae as f, oe as g, Q as h, he as i, R as j, U as k, le as l, te as m, me as n, $ as o, se as p, fe as r, ue as s, pe as t, ve as u, ie as v, ye as w, Z as x, re as y };
1130
-
1131
- //# sourceMappingURL=ImageToastNotifications-BXMHJaIH.mjs.map