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