@declarion/react 0.255.0 → 0.307.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.
@@ -21,28 +21,28 @@ import { FileDraftScope as x, useFileDraftScope as S } from "../../file-widgets/
21
21
  import { buildFilesPayload as C } from "../../file-widgets/payload.js";
22
22
  import { getFileFieldValue as w, renderSchemaField as T } from "../../file-widgets/host.js";
23
23
  import { singleFileFromValue as E } from "../../file-widgets/value.js";
24
- import { DynamicIcon as D } from "../../shared/DynamicIcon.js";
25
- import { toast as O } from "../../../lib/toast.js";
26
- import { useSchema as k } from "../../../hooks/useSchema.js";
27
- import { useBrandingChrome as A } from "../../../hooks/useBrandingChrome.js";
28
- import { useCurrentScreen as ee } from "../../../hooks/useCurrentScreen.js";
24
+ import { DynamicIcon as ee } from "../../shared/DynamicIcon.js";
25
+ import { toast as D } from "../../../lib/toast.js";
26
+ import { useSchema as O } from "../../../hooks/useSchema.js";
27
+ import { useBrandingChrome as k } from "../../../hooks/useBrandingChrome.js";
28
+ import { useCurrentScreen as A } from "../../../hooks/useCurrentScreen.js";
29
29
  import { useObject as te } from "../../../hooks/useObject.js";
30
30
  import { useResponsiveMode as j } from "../../../hooks/useResponsiveMode.js";
31
31
  import { AssociatedBlock as M } from "../../detail-layout/AssociatedBlock.js";
32
32
  import { ParamsBlock as N } from "../../params/ParamsBlock.js";
33
33
  import { ErrorLine as P } from "../../params/param-editors.js";
34
- import { useAllParams as F } from "../../../hooks/useParams.js";
35
- import { useText as I } from "../../../hooks/useText.js";
36
- import { failureTitle as L } from "../../../lib/failure.js";
37
- import { LANGUAGE_PARAMETER as R, pluralText as z } from "../../../lib/language.js";
38
- import { activeRoleLabel as B } from "../../../lib/role-label.js";
39
- import { Fragment as V, useId as H, useState as U } from "react";
40
- import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
34
+ import { useAllParams as F, useEffectiveParam as I } from "../../../hooks/useParams.js";
35
+ import { useText as L } from "../../../hooks/useText.js";
36
+ import { failureTitle as R } from "../../../lib/failure.js";
37
+ import { LANGUAGE_PARAMETER as z, pluralText as ne } from "../../../lib/language.js";
38
+ import { activeRoleLabel as re } from "../../../lib/role-label.js";
39
+ import { Fragment as B, useId as V, useState as H } from "react";
40
+ import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
41
41
  // src/components/pages/profile/Profile.impl.tsx
42
- var q = "avatar", J = "user_messenger_account";
43
- function ne() {
44
- let a = t(), c = v((e) => e.user), l = v((e) => e.activeTenant), u = v((e) => e.refreshMe), { data: b } = k(), S = ee(), C = A("custom"), w = I(), E = te(e, c?.id), j = E.data?.data, [M, N] = U(!1), [P, F] = U(!1), L = b?.entities[e], R = c?.display_name || c?.email || w("profile.user_fallback", "User"), V = (e) => w(c?.role_names?.[e]) || e, H = B(c, w), q = l?.env ? `${l.name} · ${l.env}` : l?.name ?? "—", J = (e) => L && T({
45
- entity: L,
42
+ var K = "avatar", q = "user_messenger_account", ie = "profile.blocks", ae = "profile.parameters";
43
+ function J() {
44
+ let a = t(), c = v((e) => e.user), l = v((e) => e.activeTenant), u = v((e) => e.refreshMe), { data: b } = O(), S = A(), C = k("custom"), w = L(), E = te(e, c?.id), j = E.data?.data, M = I(ie).value ?? void 0, N = (e) => !M || M.includes(e), P = I(ae).value ?? void 0, [F, R] = H(!1), [z, B] = H(!1), V = b?.entities[e], K = c?.display_name || c?.email || w("profile.user_fallback", "User"), q = (e) => w(c?.role_names?.[e]) || e, J = re(c, w), Z = l?.env ? `${l.name} · ${l.env}` : l?.name ?? "—", $ = (e) => V && T({
45
+ entity: V,
46
46
  entityCode: "profile",
47
47
  fieldName: e,
48
48
  record: {
@@ -52,33 +52,33 @@ function ne() {
52
52
  mode: "display",
53
53
  t: w
54
54
  });
55
- return /* @__PURE__ */ K(W, { children: [
56
- /* @__PURE__ */ K(d, {
57
- header: /* @__PURE__ */ G("div", {
55
+ return /* @__PURE__ */ G(U, { children: [
56
+ /* @__PURE__ */ G(d, {
57
+ header: /* @__PURE__ */ W("div", {
58
58
  "data-testid": "profile-hero",
59
- children: /* @__PURE__ */ G(f, {
60
- icon: L?.display.icon ? /* @__PURE__ */ G(D, {
61
- name: L.display.icon,
59
+ children: /* @__PURE__ */ W(f, {
60
+ icon: V?.display.icon ? /* @__PURE__ */ W(ee, {
61
+ name: V.display.icon,
62
62
  size: 16
63
63
  }) : void 0,
64
- title: R,
64
+ title: K,
65
65
  mode: "display",
66
66
  showTitle: C.isVisible("show_title"),
67
- highlights: /* @__PURE__ */ K("div", {
67
+ highlights: /* @__PURE__ */ G("div", {
68
68
  className: "flex flex-wrap gap-1",
69
69
  children: [
70
- /* @__PURE__ */ G(o, {
70
+ /* @__PURE__ */ W(o, {
71
71
  tone: "violet",
72
72
  size: "xs",
73
73
  dot: !0,
74
- children: H
74
+ children: J
75
75
  }),
76
- /* @__PURE__ */ G(o, {
76
+ /* @__PURE__ */ W(o, {
77
77
  tone: "slate",
78
78
  size: "xs",
79
- children: q
79
+ children: Z
80
80
  }),
81
- c?.is_active && /* @__PURE__ */ G(o, {
81
+ c?.is_active && /* @__PURE__ */ W(o, {
82
82
  tone: "emerald",
83
83
  size: "xs",
84
84
  dot: !0,
@@ -86,100 +86,103 @@ function ne() {
86
86
  })
87
87
  ]
88
88
  }),
89
- right: C.isVisible("show_actions") && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(n, {
90
- icon: /* @__PURE__ */ G(i.edit, { size: 13 }),
91
- onClick: () => F(!0),
89
+ right: C.isVisible("show_actions") && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(n, {
90
+ icon: /* @__PURE__ */ W(i.edit, { size: 13 }),
91
+ onClick: () => B(!0),
92
92
  children: w("profile.edit", "Edit profile")
93
- }), /* @__PURE__ */ G(n, {
94
- icon: /* @__PURE__ */ G(i.settings, { size: 13 }),
93
+ }), /* @__PURE__ */ W(n, {
94
+ icon: /* @__PURE__ */ W(i.settings, { size: 13 }),
95
95
  onClick: () => a("/preferences", { topLevel: !0 }),
96
96
  children: w("profile.preferences", "Preferences")
97
97
  })] })
98
98
  })
99
99
  }),
100
100
  children: [
101
- /* @__PURE__ */ G(s, {
101
+ /* @__PURE__ */ W(s, {
102
102
  title: w("profile.personal.title", "Personal info"),
103
- icon: /* @__PURE__ */ G(i.users, { size: 14 }),
104
- children: /* @__PURE__ */ G("div", {
103
+ icon: /* @__PURE__ */ W(i.users, { size: 14 }),
104
+ children: /* @__PURE__ */ W("div", {
105
105
  "data-testid": "profile-personal-info-grid",
106
- children: /* @__PURE__ */ K(m, { children: [
107
- c && L && j && /* @__PURE__ */ G(p, {
106
+ children: /* @__PURE__ */ G(m, { children: [
107
+ c && V && j && /* @__PURE__ */ W(p, {
108
108
  label: w("profile.avatar", "Avatar"),
109
- children: /* @__PURE__ */ G(x, { children: /* @__PURE__ */ G(re, {
109
+ children: /* @__PURE__ */ W(x, { children: /* @__PURE__ */ W(oe, {
110
110
  userId: c.id,
111
- entity: L,
111
+ entity: V,
112
112
  record: j,
113
113
  onCommitted: async () => {
114
114
  await E.refetch();
115
115
  }
116
116
  }, Y(j)) })
117
117
  }),
118
- /* @__PURE__ */ G(p, {
118
+ /* @__PURE__ */ W(p, {
119
119
  label: w("profile.display_name", "Display name"),
120
- children: J("display_name")
120
+ children: $("display_name")
121
121
  }),
122
- /* @__PURE__ */ G(p, {
122
+ /* @__PURE__ */ W(p, {
123
123
  label: w("profile.personal.email", "Email"),
124
124
  "data-testid": "profile-email",
125
- children: J("email")
125
+ children: $("email")
126
126
  }),
127
- /* @__PURE__ */ G(p, {
127
+ /* @__PURE__ */ W(p, {
128
128
  label: w("profile.personal.timezone", "Timezone"),
129
- children: ae()
129
+ children: ce()
130
130
  }),
131
- /* @__PURE__ */ G(Q, {})
131
+ /* @__PURE__ */ W(Q, {})
132
132
  ] })
133
133
  })
134
134
  }),
135
- /* @__PURE__ */ G(s, {
135
+ /* @__PURE__ */ W(s, {
136
136
  title: w("profile.security.title", "Security"),
137
- icon: /* @__PURE__ */ G(i.shield, { size: 14 }),
138
- children: /* @__PURE__ */ G(m, { children: /* @__PURE__ */ G(p, {
137
+ icon: /* @__PURE__ */ W(i.shield, { size: 14 }),
138
+ children: /* @__PURE__ */ W(m, { children: /* @__PURE__ */ W(p, {
139
139
  label: w("profile.security.password", "Password"),
140
140
  hint: w("profile.security.password_hint", "Update at any time"),
141
- children: /* @__PURE__ */ G(n, {
141
+ children: /* @__PURE__ */ W(n, {
142
142
  size: "xs",
143
- onClick: () => N(!0),
143
+ onClick: () => R(!0),
144
144
  children: w("profile.security.password_change", "Change")
145
145
  })
146
146
  }) })
147
147
  }),
148
- /* @__PURE__ */ G(s, {
148
+ N("access") && /* @__PURE__ */ W(s, {
149
149
  title: w("profile.access.title", "Access"),
150
- icon: /* @__PURE__ */ G(i.key, { size: 14 }),
151
- children: /* @__PURE__ */ K(m, { children: [
152
- /* @__PURE__ */ G(p, {
150
+ icon: /* @__PURE__ */ W(i.key, { size: 14 }),
151
+ children: /* @__PURE__ */ G(m, { children: [
152
+ /* @__PURE__ */ W(p, {
153
153
  label: w("profile.access.role", "Role"),
154
- children: /* @__PURE__ */ G(o, {
154
+ children: /* @__PURE__ */ W(o, {
155
155
  tone: "violet",
156
156
  size: "xs",
157
157
  dot: !0,
158
- children: H
158
+ children: J
159
159
  })
160
160
  }),
161
- /* @__PURE__ */ G(p, {
161
+ /* @__PURE__ */ W(p, {
162
162
  label: w("profile.access.groups", "Groups"),
163
- children: c?.roles && c.roles.length > 0 ? /* @__PURE__ */ G("div", {
163
+ children: c?.roles && c.roles.length > 0 ? /* @__PURE__ */ W("div", {
164
164
  className: "flex flex-wrap gap-1",
165
- children: c.roles.map((e) => /* @__PURE__ */ G(r, { children: V(e) }, e))
165
+ children: c.roles.map((e) => /* @__PURE__ */ W(r, { children: q(e) }, e))
166
166
  }) : g
167
167
  }),
168
- /* @__PURE__ */ G(p, {
168
+ /* @__PURE__ */ W(p, {
169
169
  label: w("profile.access.permissions", "Permissions"),
170
- children: c?.permissions?.includes("*") ? w("profile.access.permissions_all", "All") : z(w, "profile.access.permissions_from_roles", c?.permissions?.length ?? 0, {
170
+ children: c?.permissions?.includes("*") ? w("profile.access.permissions_all", "All") : ne(w, "profile.access.permissions_from_roles", c?.permissions?.length ?? 0, {
171
171
  one: "{count} from roles",
172
172
  other: "{count} from roles"
173
173
  })
174
174
  })
175
175
  ] })
176
176
  }),
177
- /* @__PURE__ */ G(oe, { userId: c?.id }),
178
- /* @__PURE__ */ G(se, { userId: c?.id }),
179
- c?.id && /* @__PURE__ */ G(X, { userId: c.id }),
180
- S?.screen && b && L && j && /* @__PURE__ */ G(h, {
177
+ N("api_keys") && /* @__PURE__ */ W(le, { userId: c?.id }),
178
+ N("messenger_accounts") && /* @__PURE__ */ W(ue, { userId: c?.id }),
179
+ c?.id && N("parameters") && /* @__PURE__ */ W(X, {
180
+ userId: c.id,
181
+ only: P
182
+ }),
183
+ S?.screen && b && V && j && /* @__PURE__ */ W(h, {
181
184
  screen: S.screen,
182
- entity: L,
185
+ entity: V,
183
186
  entityCode: "profile",
184
187
  record: j,
185
188
  recordId: c?.id,
@@ -187,32 +190,32 @@ function ne() {
187
190
  })
188
191
  ]
189
192
  }),
190
- /* @__PURE__ */ G(ie, {
191
- open: P,
193
+ /* @__PURE__ */ W(se, {
194
+ open: z,
192
195
  initialName: c?.display_name ?? "",
193
196
  userId: c?.id ?? "",
194
- onClose: () => F(!1),
197
+ onClose: () => B(!1),
195
198
  onSaved: async () => {
196
- await u(), F(!1);
199
+ await u(), B(!1);
197
200
  }
198
201
  }),
199
- /* @__PURE__ */ G(_, {
200
- open: M,
201
- onClose: () => N(!1),
202
+ /* @__PURE__ */ W(_, {
203
+ open: F,
204
+ onClose: () => R(!1),
202
205
  onSubmit: async ({ current: e, next: t }) => {
203
- await y(e, t), O.success(w("profile.password.changed", "Password changed. Sign in again to continue."));
206
+ await y(e, t), D.success(w("profile.password.changed", "Password changed. Sign in again to continue."));
204
207
  }
205
208
  })
206
209
  ] });
207
210
  }
208
211
  function Y(e) {
209
- return E(w(e, q))?.id ?? "";
212
+ return E(w(e, K))?.id ?? "";
210
213
  }
211
- function re({ userId: t, entity: n, record: r, onCommitted: i }) {
212
- let a = I(), o = I("errors"), s = S(), [c, l] = U(!1), [u, d] = U(0), f = async (c) => {
214
+ function oe({ userId: t, entity: n, record: r, onCommitted: i }) {
215
+ let a = L(), o = L("errors"), s = S(), [c, l] = H(!1), [u, d] = H(0), f = async (c) => {
213
216
  let u = C({
214
217
  entity: n,
215
- formData: { [q]: c },
218
+ formData: { [K]: c },
216
219
  record: r,
217
220
  isNew: !1
218
221
  });
@@ -220,19 +223,19 @@ function re({ userId: t, entity: n, record: r, onCommitted: i }) {
220
223
  l(!0);
221
224
  try {
222
225
  await b(e, { id: t }, { $files: u });
223
- let n = Y({ [q]: c });
224
- n && s.markCommitted(n), await i(), O.success(a("profile.avatar.updated", "Avatar updated."));
226
+ let n = Y({ [K]: c });
227
+ n && s.markCommitted(n), await i(), D.success(a("profile.avatar.updated", "Avatar updated."));
225
228
  } catch (e) {
226
- await s.flushAllDrafts(), d((e) => e + 1), O.error(L(o, e));
229
+ await s.flushAllDrafts(), d((e) => e + 1), D.error(R(o, e));
227
230
  } finally {
228
231
  l(!1);
229
232
  }
230
233
  }
231
234
  };
232
- return /* @__PURE__ */ G(V, { children: T({
235
+ return /* @__PURE__ */ W(B, { children: T({
233
236
  entity: n,
234
237
  entityCode: e,
235
- fieldName: q,
238
+ fieldName: K,
236
239
  record: r,
237
240
  mode: "edit",
238
241
  onChange: (e) => void f(e),
@@ -241,13 +244,13 @@ function re({ userId: t, entity: n, record: r, onCommitted: i }) {
241
244
  fieldId: "profile-avatar"
242
245
  }) }, u);
243
246
  }
244
- function ie({ open: t, initialName: r, userId: o, onClose: s, onSaved: d }) {
245
- let f = j().isPhone, p = I(), m = I("errors"), h = H(), [g, _] = U(r), [v, y] = U(!1), [x, S] = U(null);
247
+ function se({ open: t, initialName: r, userId: o, onClose: s, onSaved: d }) {
248
+ let f = j().isPhone, p = L(), m = L("errors"), h = V(), [g, _] = H(r), [v, y] = H(!1), [x, S] = H(null);
246
249
  if (!t) return null;
247
250
  let C = () => {
248
251
  _(r), S(null), s();
249
252
  };
250
- return /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
253
+ return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
251
254
  onClick: C,
252
255
  style: {
253
256
  position: "fixed",
@@ -256,7 +259,7 @@ function ie({ open: t, initialName: r, userId: o, onClose: s, onSaved: d }) {
256
259
  zIndex: 60,
257
260
  backdropFilter: "blur(2px)"
258
261
  }
259
- }), /* @__PURE__ */ K("div", {
262
+ }), /* @__PURE__ */ G("div", {
260
263
  "data-testid": "edit-profile-dialog",
261
264
  style: {
262
265
  position: "fixed",
@@ -273,7 +276,7 @@ function ie({ open: t, initialName: r, userId: o, onClose: s, onSaved: d }) {
273
276
  overflow: "hidden"
274
277
  },
275
278
  children: [
276
- /* @__PURE__ */ K("div", {
279
+ /* @__PURE__ */ G("div", {
277
280
  style: {
278
281
  padding: "14px 18px 0",
279
282
  display: "flex",
@@ -281,7 +284,7 @@ function ie({ open: t, initialName: r, userId: o, onClose: s, onSaved: d }) {
281
284
  gap: 10
282
285
  },
283
286
  children: [
284
- /* @__PURE__ */ G("span", {
287
+ /* @__PURE__ */ W("span", {
285
288
  style: {
286
289
  width: 28,
287
290
  height: 28,
@@ -292,18 +295,18 @@ function ie({ open: t, initialName: r, userId: o, onClose: s, onSaved: d }) {
292
295
  alignItems: "center",
293
296
  justifyContent: "center"
294
297
  },
295
- children: /* @__PURE__ */ G(i.edit, { size: 15 })
298
+ children: /* @__PURE__ */ W(i.edit, { size: 15 })
296
299
  }),
297
- /* @__PURE__ */ K("div", {
300
+ /* @__PURE__ */ G("div", {
298
301
  style: { flex: 1 },
299
- children: [/* @__PURE__ */ G("div", {
302
+ children: [/* @__PURE__ */ W("div", {
300
303
  style: {
301
304
  fontSize: 14,
302
305
  fontWeight: 600,
303
306
  color: "var(--text)"
304
307
  },
305
308
  children: p("profile.edit", "Edit profile")
306
- }), /* @__PURE__ */ G("div", {
309
+ }), /* @__PURE__ */ W("div", {
307
310
  style: {
308
311
  fontSize: 11.5,
309
312
  color: "var(--text-3)"
@@ -311,33 +314,33 @@ function ie({ open: t, initialName: r, userId: o, onClose: s, onSaved: d }) {
311
314
  children: p("profile.edit.subtitle", "Update your display name.")
312
315
  })]
313
316
  }),
314
- /* @__PURE__ */ G(a, {
315
- icon: /* @__PURE__ */ G(i.x, { size: 14 }),
317
+ /* @__PURE__ */ W(a, {
318
+ icon: /* @__PURE__ */ W(i.x, { size: 14 }),
316
319
  title: p("profile.edit.close", "Close"),
317
320
  onClick: C
318
321
  })
319
322
  ]
320
323
  }),
321
- /* @__PURE__ */ K("div", {
324
+ /* @__PURE__ */ G("div", {
322
325
  style: {
323
326
  padding: "12px 18px 16px",
324
327
  display: "flex",
325
328
  flexDirection: "column",
326
329
  gap: 12
327
330
  },
328
- children: [/* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G(c, {
331
+ children: [/* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(c, {
329
332
  required: !0,
330
333
  htmlFor: h,
331
334
  children: p("profile.display_name", "Display name")
332
- }), /* @__PURE__ */ G(l, {
335
+ }), /* @__PURE__ */ W(l, {
333
336
  id: h,
334
337
  value: g,
335
338
  onChange: _,
336
339
  placeholder: p("profile.edit.name_placeholder", "Your name"),
337
340
  autoFocus: !0
338
- })] }), x && /* @__PURE__ */ G(P, { text: x })]
341
+ })] }), x && /* @__PURE__ */ W(P, { text: x })]
339
342
  }),
340
- /* @__PURE__ */ K("div", {
343
+ /* @__PURE__ */ G("div", {
341
344
  style: {
342
345
  padding: "10px 16px",
343
346
  borderTop: "1px solid var(--divider)",
@@ -348,14 +351,14 @@ function ie({ open: t, initialName: r, userId: o, onClose: s, onSaved: d }) {
348
351
  flexWrap: f ? "wrap" : "nowrap"
349
352
  },
350
353
  children: [
351
- /* @__PURE__ */ G("div", { style: { flex: 1 } }),
352
- /* @__PURE__ */ G(n, {
354
+ /* @__PURE__ */ W("div", { style: { flex: 1 } }),
355
+ /* @__PURE__ */ W(n, {
353
356
  onClick: C,
354
357
  children: p("dialog.cancel", "Cancel")
355
358
  }),
356
- /* @__PURE__ */ G(n, {
359
+ /* @__PURE__ */ W(n, {
357
360
  kind: "primary",
358
- icon: G(v ? u : i.check, { size: 13 }),
361
+ icon: W(v ? u : i.check, { size: 13 }),
359
362
  onClick: async () => {
360
363
  if (!g.trim()) S(p("profile.edit.name_required", "Display name is required."));
361
364
  else {
@@ -363,7 +366,7 @@ function ie({ open: t, initialName: r, userId: o, onClose: s, onSaved: d }) {
363
366
  try {
364
367
  await b(e, { id: o }, { display_name: g.trim() }), await d();
365
368
  } catch (e) {
366
- S(L(m, e));
369
+ S(R(m, e));
367
370
  } finally {
368
371
  y(!1);
369
372
  }
@@ -377,51 +380,52 @@ function ie({ open: t, initialName: r, userId: o, onClose: s, onSaved: d }) {
377
380
  ]
378
381
  })] });
379
382
  }
380
- function ae() {
383
+ function ce() {
381
384
  try {
382
385
  return Intl.DateTimeFormat().resolvedOptions().timeZone || "—";
383
386
  } catch {
384
387
  return "—";
385
388
  }
386
389
  }
387
- function X({ userId: t }) {
388
- let { data: n } = k(), r = Z(n);
389
- return /* @__PURE__ */ G(N, {
390
+ function X({ userId: t, only: n }) {
391
+ let { data: r } = O(), i = Z(r);
392
+ return /* @__PURE__ */ W(N, {
390
393
  carrierEntityCode: e,
391
- carrierScope: r,
392
- rowId: t
394
+ carrierScope: i,
395
+ rowId: t,
396
+ only: n
393
397
  });
394
398
  }
395
399
  function Z(e) {
396
400
  return e?.entities.profile?.params_scope ?? "profile";
397
401
  }
398
402
  function Q() {
399
- let e = I(), { data: t } = k(), n = F().data?.params.find((e) => e.code === R);
403
+ let e = L(), { data: t } = O(), n = F().data?.params.find((e) => e.code === z);
400
404
  if (n?.scopes?.includes(Z(t))) return null;
401
405
  let r = typeof n?.value == "string" ? n.value : e.language, i = t?.languages?.find((e) => e.code === r);
402
- return /* @__PURE__ */ G(p, {
406
+ return /* @__PURE__ */ W(p, {
403
407
  label: e(n?.name),
404
- children: n ? i?.name[i.code] || e(i?.name) || r : /* @__PURE__ */ G(u, { size: 12 })
408
+ children: n ? i?.name[i.code] || e(i?.name) || r : /* @__PURE__ */ W(u, { size: 12 })
405
409
  });
406
410
  }
407
- function oe({ userId: e }) {
408
- return /* @__PURE__ */ G($, {
411
+ function le({ userId: e }) {
412
+ return /* @__PURE__ */ W($, {
409
413
  userId: e,
410
414
  associated: "api_key"
411
415
  });
412
416
  }
413
- function se({ userId: e }) {
414
- let { data: t } = k();
415
- return t?.entities[J] ? /* @__PURE__ */ G($, {
417
+ function ue({ userId: e }) {
418
+ let { data: t } = O();
419
+ return t?.entities[q] ? /* @__PURE__ */ W($, {
416
420
  userId: e,
417
- associated: J
421
+ associated: q
418
422
  }) : null;
419
423
  }
420
424
  function $({ userId: t, associated: n }) {
421
- let { data: r } = k();
425
+ let { data: r } = O();
422
426
  if (!t || !r) return null;
423
427
  let i = r.entities[e];
424
- return i ? /* @__PURE__ */ G(M, {
428
+ return i ? /* @__PURE__ */ W(M, {
425
429
  node: {
426
430
  associated: n,
427
431
  foreign_key: "user_id",
@@ -438,4 +442,4 @@ function $({ userId: t, associated: n }) {
438
442
  }
439
443
  }) : null;
440
444
  }
441
- export { ne as Profile, Q as ProfileLanguageRow, X as ProfileParamsBlock };
445
+ export { J as Profile, Q as ProfileLanguageRow, X as ProfileParamsBlock };