@questpie/admin 3.0.4 → 3.0.6
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.
- package/README.md +99 -1
- package/dist/client/builder/types/field-types.d.mts +11 -0
- package/dist/client/components/blocks/block-editor-layout.mjs +2 -2
- package/dist/client/components/blocks/block-library-sidebar.mjs +89 -61
- package/dist/client/components/brand-logo.d.mts +25 -0
- package/dist/client/components/brand-logo.mjs +174 -0
- package/dist/client/components/media/media-grid.mjs +95 -78
- package/dist/client/components/primitives/select-multi.mjs +388 -368
- package/dist/client/components/primitives/select-single.mjs +344 -331
- package/dist/client/components/widgets/chart-widget.mjs +78 -62
- package/dist/client/components/widgets/progress-widget.mjs +39 -37
- package/dist/client/components/widgets/quick-actions-widget.mjs +111 -90
- package/dist/client/components/widgets/recent-items-widget.mjs +40 -38
- package/dist/client/components/widgets/table-widget.mjs +4 -3
- package/dist/client/components/widgets/timeline-widget.mjs +92 -74
- package/dist/client/components/widgets/value-widget.mjs +164 -144
- package/dist/client/create-admin-client.d.mts +7 -0
- package/dist/client/create-admin-client.mjs +25 -0
- package/dist/client/hooks/use-brand.d.mts +22 -0
- package/dist/client/hooks/use-brand.mjs +52 -0
- package/dist/client/hooks/use-server-actions.mjs +21 -16
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/preview-banner.d.mts +2 -2
- package/dist/client/preview/preview-banner.mjs +75 -46
- package/dist/client/runtime/index.mjs +1 -1
- package/dist/client/runtime/provider.d.mts +4 -0
- package/dist/client/runtime/provider.mjs +38 -8
- package/dist/client/styles/base.css +4 -0
- package/dist/client/types/admin-config.d.mts +24 -0
- package/dist/client/views/auth/auth-layout.d.mts +6 -1
- package/dist/client/views/auth/auth-layout.mjs +116 -102
- package/dist/client/views/collection/auto-form-fields.mjs +2 -0
- package/dist/client/views/collection/field-renderer.mjs +3 -2
- package/dist/client/views/collection/table-view.mjs +26 -26
- package/dist/client/views/globals/global-form-view.mjs +908 -863
- package/dist/client/views/layout/admin-layout.mjs +151 -131
- package/dist/client/views/layout/admin-router.mjs +297 -180
- package/dist/client/views/layout/admin-sidebar.mjs +178 -156
- package/dist/client/views/pages/accept-invite-page.mjs +122 -144
- package/dist/client/views/pages/forgot-password-page.mjs +22 -30
- package/dist/client/views/pages/invite-page.mjs +24 -33
- package/dist/client/views/pages/login-page.mjs +24 -32
- package/dist/client/views/pages/reset-password-page.mjs +77 -92
- package/dist/client/views/pages/setup-page.mjs +73 -65
- package/dist/client.d.mts +6 -2
- package/dist/client.mjs +5 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +5 -2
- package/dist/server/augmentation/dashboard.d.mts +23 -5
- package/dist/server/augmentation/form-layout.d.mts +10 -0
- package/dist/server/augmentation/index.d.mts +1 -1
- package/dist/server/augmentation.d.mts +1 -1
- package/dist/server/i18n/index.mjs +13 -7
- package/dist/server/i18n/messages/cs.mjs +391 -1
- package/dist/server/i18n/messages/de.mjs +389 -1
- package/dist/server/i18n/messages/en.mjs +102 -0
- package/dist/server/i18n/messages/es.mjs +389 -1
- package/dist/server/i18n/messages/fr.mjs +389 -1
- package/dist/server/i18n/messages/pl.mjs +393 -1
- package/dist/server/i18n/messages/pt.mjs +386 -1
- package/dist/server/i18n/messages/sk.mjs +133 -1
- package/dist/server/modules/admin/collections/account.d.mts +50 -50
- package/dist/server/modules/admin/collections/admin-locks.d.mts +53 -53
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
- package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
- package/dist/server/modules/admin/collections/assets.d.mts +20 -20
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +32 -32
- package/dist/server/modules/admin/collections/verification.d.mts +36 -36
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +19 -1
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +34 -28
- package/dist/server/modules/admin/routes/i18n-helpers.mjs +34 -0
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/preview.mjs +25 -17
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
- package/dist/server/modules/admin/routes/setup.mjs +10 -7
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +23 -23
- package/dist/server.d.mts +4 -4
- package/dist/shared/preview-utils.d.mts +34 -1
- package/dist/shared/preview-utils.mjs +79 -1
- package/dist/shared.d.mts +2 -2
- package/dist/shared.mjs +2 -2
- package/package.json +3 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useTranslation } from "../../i18n/hooks.mjs";
|
|
2
|
-
import { selectBasePath,
|
|
2
|
+
import { selectBasePath, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
|
|
3
3
|
import { Button } from "../../components/ui/button.mjs";
|
|
4
4
|
import { Skeleton } from "../../components/ui/skeleton.mjs";
|
|
5
5
|
import { useAuthClient } from "../../hooks/use-auth.mjs";
|
|
6
6
|
import { Alert, AlertDescription } from "../../components/ui/alert.mjs";
|
|
7
7
|
import { AcceptInviteForm } from "../auth/accept-invite-form.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { AuthLayout } from "../auth/auth-layout.mjs";
|
|
9
9
|
import { c } from "react/compiler-runtime";
|
|
10
10
|
import { Icon } from "@iconify/react";
|
|
11
11
|
import * as React from "react";
|
|
@@ -78,14 +78,13 @@ function AcceptInvitePageSkeleton() {
|
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
80
|
function AcceptInvitePage(t0) {
|
|
81
|
-
const $ = c(
|
|
81
|
+
const $ = c(73);
|
|
82
82
|
const { token, title, description, logo, redirectTo, loginPath, minPasswordLength: t1 } = t0;
|
|
83
83
|
const minPasswordLength = t1 === void 0 ? 8 : t1;
|
|
84
84
|
const { t } = useTranslation();
|
|
85
85
|
const authClient = useAuthClient();
|
|
86
86
|
const navigate = useAdminStore(selectNavigate);
|
|
87
87
|
const basePath = useAdminStore(selectBasePath);
|
|
88
|
-
const brandName = useAdminStore(selectBrandName);
|
|
89
88
|
let t2;
|
|
90
89
|
if ($[0] !== token) {
|
|
91
90
|
t2 = [
|
|
@@ -183,189 +182,168 @@ function AcceptInvitePage(t0) {
|
|
|
183
182
|
$[23] = t8$1;
|
|
184
183
|
} else t8$1 = $[23];
|
|
185
184
|
let t9$1;
|
|
186
|
-
if ($[24]
|
|
187
|
-
t9$1 =
|
|
188
|
-
$[24] =
|
|
189
|
-
|
|
190
|
-
$[26] = t9$1;
|
|
191
|
-
} else t9$1 = $[26];
|
|
185
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
186
|
+
t9$1 = /* @__PURE__ */ jsx(AcceptInvitePageSkeleton, {});
|
|
187
|
+
$[24] = t9$1;
|
|
188
|
+
} else t9$1 = $[24];
|
|
192
189
|
let t10$1;
|
|
193
|
-
if ($[27]
|
|
194
|
-
t10$1 = /* @__PURE__ */ jsx(
|
|
195
|
-
$[27] = t10$1;
|
|
196
|
-
} else t10$1 = $[27];
|
|
197
|
-
let t11$1;
|
|
198
|
-
if ($[28] !== t7$1 || $[29] !== t8$1 || $[30] !== t9$1) {
|
|
199
|
-
t11$1 = /* @__PURE__ */ jsx(AuthLayout, {
|
|
190
|
+
if ($[25] !== logo || $[26] !== t7$1 || $[27] !== t8$1) {
|
|
191
|
+
t10$1 = /* @__PURE__ */ jsx(AuthLayout, {
|
|
200
192
|
title: t7$1,
|
|
201
193
|
description: t8$1,
|
|
202
|
-
logo
|
|
203
|
-
children:
|
|
194
|
+
logo,
|
|
195
|
+
children: t9$1
|
|
204
196
|
});
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
} else
|
|
210
|
-
return
|
|
197
|
+
$[25] = logo;
|
|
198
|
+
$[26] = t7$1;
|
|
199
|
+
$[27] = t8$1;
|
|
200
|
+
$[28] = t10$1;
|
|
201
|
+
} else t10$1 = $[28];
|
|
202
|
+
return t10$1;
|
|
211
203
|
}
|
|
212
204
|
if (invitationError) {
|
|
213
205
|
let t7$1;
|
|
214
|
-
if ($[
|
|
206
|
+
if ($[29] !== t) {
|
|
215
207
|
t7$1 = t("auth.invalidInvitation");
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
} else t7$1 = $[
|
|
208
|
+
$[29] = t;
|
|
209
|
+
$[30] = t7$1;
|
|
210
|
+
} else t7$1 = $[30];
|
|
219
211
|
let t8$1;
|
|
220
|
-
if ($[
|
|
212
|
+
if ($[31] !== t) {
|
|
221
213
|
t8$1 = t("auth.invalidInvitationDescription");
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
} else t8$1 = $[
|
|
214
|
+
$[31] = t;
|
|
215
|
+
$[32] = t8$1;
|
|
216
|
+
} else t8$1 = $[32];
|
|
225
217
|
let t9$1;
|
|
226
|
-
if ($[
|
|
227
|
-
t9$1 =
|
|
228
|
-
$[
|
|
229
|
-
|
|
230
|
-
$[38] = t9$1;
|
|
231
|
-
} else t9$1 = $[38];
|
|
218
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
219
|
+
t9$1 = /* @__PURE__ */ jsx(Icon, { icon: "ph:warning-circle" });
|
|
220
|
+
$[33] = t9$1;
|
|
221
|
+
} else t9$1 = $[33];
|
|
232
222
|
let t10$1;
|
|
233
|
-
if ($[
|
|
234
|
-
t10$1 =
|
|
235
|
-
$[
|
|
236
|
-
|
|
223
|
+
if ($[34] !== invitationError?.message || $[35] !== t) {
|
|
224
|
+
t10$1 = invitationError?.message || t("auth.invalidOrExpiredInvitation");
|
|
225
|
+
$[34] = invitationError?.message;
|
|
226
|
+
$[35] = t;
|
|
227
|
+
$[36] = t10$1;
|
|
228
|
+
} else t10$1 = $[36];
|
|
237
229
|
let t11$1;
|
|
238
|
-
if ($[
|
|
239
|
-
t11$1 =
|
|
240
|
-
$[40] = invitationError?.message;
|
|
241
|
-
$[41] = t;
|
|
242
|
-
$[42] = t11$1;
|
|
243
|
-
} else t11$1 = $[42];
|
|
244
|
-
let t12$1;
|
|
245
|
-
if ($[43] !== t11$1) {
|
|
246
|
-
t12$1 = /* @__PURE__ */ jsxs(Alert, {
|
|
230
|
+
if ($[37] !== t10$1) {
|
|
231
|
+
t11$1 = /* @__PURE__ */ jsxs(Alert, {
|
|
247
232
|
variant: "destructive",
|
|
248
|
-
children: [
|
|
233
|
+
children: [t9$1, /* @__PURE__ */ jsx(AlertDescription, { children: t10$1 })]
|
|
249
234
|
});
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
} else
|
|
235
|
+
$[37] = t10$1;
|
|
236
|
+
$[38] = t11$1;
|
|
237
|
+
} else t11$1 = $[38];
|
|
238
|
+
let t12;
|
|
239
|
+
if ($[39] !== t) {
|
|
240
|
+
t12 = t("auth.invitationExpiredMessage");
|
|
241
|
+
$[39] = t;
|
|
242
|
+
$[40] = t12;
|
|
243
|
+
} else t12 = $[40];
|
|
253
244
|
let t13;
|
|
254
|
-
if ($[
|
|
255
|
-
t13 =
|
|
256
|
-
$[45] = t;
|
|
257
|
-
$[46] = t13;
|
|
258
|
-
} else t13 = $[46];
|
|
259
|
-
let t14;
|
|
260
|
-
if ($[47] !== t13) {
|
|
261
|
-
t14 = /* @__PURE__ */ jsx("p", {
|
|
245
|
+
if ($[41] !== t12) {
|
|
246
|
+
t13 = /* @__PURE__ */ jsx("p", {
|
|
262
247
|
className: "text-muted-foreground text-center text-sm",
|
|
263
|
-
children:
|
|
248
|
+
children: t12
|
|
264
249
|
});
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
} else
|
|
250
|
+
$[41] = t12;
|
|
251
|
+
$[42] = t13;
|
|
252
|
+
} else t13 = $[42];
|
|
253
|
+
let t14;
|
|
254
|
+
if ($[43] !== t) {
|
|
255
|
+
t14 = t("auth.goToLogin");
|
|
256
|
+
$[43] = t;
|
|
257
|
+
$[44] = t14;
|
|
258
|
+
} else t14 = $[44];
|
|
268
259
|
let t15;
|
|
269
|
-
if ($[
|
|
270
|
-
t15 =
|
|
271
|
-
$[49] = t;
|
|
272
|
-
$[50] = t15;
|
|
273
|
-
} else t15 = $[50];
|
|
274
|
-
let t16;
|
|
275
|
-
if ($[51] !== handleGoToLogin || $[52] !== t15) {
|
|
276
|
-
t16 = /* @__PURE__ */ jsx(Button, {
|
|
260
|
+
if ($[45] !== handleGoToLogin || $[46] !== t14) {
|
|
261
|
+
t15 = /* @__PURE__ */ jsx(Button, {
|
|
277
262
|
variant: "outline",
|
|
278
263
|
className: "w-full",
|
|
279
264
|
onClick: handleGoToLogin,
|
|
280
|
-
children:
|
|
265
|
+
children: t14
|
|
281
266
|
});
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
} else
|
|
286
|
-
let
|
|
287
|
-
if ($[
|
|
288
|
-
|
|
267
|
+
$[45] = handleGoToLogin;
|
|
268
|
+
$[46] = t14;
|
|
269
|
+
$[47] = t15;
|
|
270
|
+
} else t15 = $[47];
|
|
271
|
+
let t16;
|
|
272
|
+
if ($[48] !== t11$1 || $[49] !== t13 || $[50] !== t15) {
|
|
273
|
+
t16 = /* @__PURE__ */ jsxs("div", {
|
|
289
274
|
className: "space-y-4",
|
|
290
275
|
children: [
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
276
|
+
t11$1,
|
|
277
|
+
t13,
|
|
278
|
+
t15
|
|
294
279
|
]
|
|
295
280
|
});
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
} else
|
|
301
|
-
let
|
|
302
|
-
if ($[
|
|
303
|
-
|
|
281
|
+
$[48] = t11$1;
|
|
282
|
+
$[49] = t13;
|
|
283
|
+
$[50] = t15;
|
|
284
|
+
$[51] = t16;
|
|
285
|
+
} else t16 = $[51];
|
|
286
|
+
let t17;
|
|
287
|
+
if ($[52] !== logo || $[53] !== t16 || $[54] !== t7$1 || $[55] !== t8$1) {
|
|
288
|
+
t17 = /* @__PURE__ */ jsx(AuthLayout, {
|
|
304
289
|
title: t7$1,
|
|
305
290
|
description: t8$1,
|
|
306
|
-
logo
|
|
307
|
-
children:
|
|
291
|
+
logo,
|
|
292
|
+
children: t16
|
|
308
293
|
});
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
} else
|
|
315
|
-
return
|
|
294
|
+
$[52] = logo;
|
|
295
|
+
$[53] = t16;
|
|
296
|
+
$[54] = t7$1;
|
|
297
|
+
$[55] = t8$1;
|
|
298
|
+
$[56] = t17;
|
|
299
|
+
} else t17 = $[56];
|
|
300
|
+
return t17;
|
|
316
301
|
}
|
|
317
302
|
let t7;
|
|
318
|
-
if ($[
|
|
303
|
+
if ($[57] !== t || $[58] !== title) {
|
|
319
304
|
t7 = title ?? t("auth.completeRegistration");
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
} else t7 = $[
|
|
305
|
+
$[57] = t;
|
|
306
|
+
$[58] = title;
|
|
307
|
+
$[59] = t7;
|
|
308
|
+
} else t7 = $[59];
|
|
324
309
|
let t8;
|
|
325
|
-
if ($[
|
|
310
|
+
if ($[60] !== description || $[61] !== t) {
|
|
326
311
|
t8 = description ?? t("auth.createAccountDescription");
|
|
327
|
-
$[
|
|
328
|
-
$[
|
|
329
|
-
$[
|
|
330
|
-
} else t8 = $[
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
$[70] = logo;
|
|
336
|
-
$[71] = t9;
|
|
337
|
-
} else t9 = $[71];
|
|
338
|
-
const t10 = invitationData?.email ?? "";
|
|
339
|
-
let t11;
|
|
340
|
-
if ($[72] !== error || $[73] !== handleSubmit || $[74] !== minPasswordLength || $[75] !== t10) {
|
|
341
|
-
t11 = /* @__PURE__ */ jsx(AcceptInviteForm, {
|
|
312
|
+
$[60] = description;
|
|
313
|
+
$[61] = t;
|
|
314
|
+
$[62] = t8;
|
|
315
|
+
} else t8 = $[62];
|
|
316
|
+
const t9 = invitationData?.email ?? "";
|
|
317
|
+
let t10;
|
|
318
|
+
if ($[63] !== error || $[64] !== handleSubmit || $[65] !== minPasswordLength || $[66] !== t9) {
|
|
319
|
+
t10 = /* @__PURE__ */ jsx(AcceptInviteForm, {
|
|
342
320
|
onSubmit: handleSubmit,
|
|
343
|
-
email:
|
|
321
|
+
email: t9,
|
|
344
322
|
error,
|
|
345
323
|
minPasswordLength
|
|
346
324
|
});
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
} else
|
|
353
|
-
let
|
|
354
|
-
if ($[
|
|
355
|
-
|
|
325
|
+
$[63] = error;
|
|
326
|
+
$[64] = handleSubmit;
|
|
327
|
+
$[65] = minPasswordLength;
|
|
328
|
+
$[66] = t9;
|
|
329
|
+
$[67] = t10;
|
|
330
|
+
} else t10 = $[67];
|
|
331
|
+
let t11;
|
|
332
|
+
if ($[68] !== logo || $[69] !== t10 || $[70] !== t7 || $[71] !== t8) {
|
|
333
|
+
t11 = /* @__PURE__ */ jsx(AuthLayout, {
|
|
356
334
|
title: t7,
|
|
357
335
|
description: t8,
|
|
358
|
-
logo
|
|
336
|
+
logo,
|
|
359
337
|
className: "qa-accept-invite-page",
|
|
360
|
-
children:
|
|
338
|
+
children: t10
|
|
361
339
|
});
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
$[
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
} else
|
|
368
|
-
return
|
|
340
|
+
$[68] = logo;
|
|
341
|
+
$[69] = t10;
|
|
342
|
+
$[70] = t7;
|
|
343
|
+
$[71] = t8;
|
|
344
|
+
$[72] = t11;
|
|
345
|
+
} else t11 = $[72];
|
|
346
|
+
return t11;
|
|
369
347
|
}
|
|
370
348
|
|
|
371
349
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTranslation } from "../../i18n/hooks.mjs";
|
|
2
|
-
import { selectBasePath,
|
|
2
|
+
import { selectBasePath, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
|
|
3
3
|
import { useAuthClient } from "../../hooks/use-auth.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { AuthLayout } from "../auth/auth-layout.mjs";
|
|
5
5
|
import { ForgotPasswordForm } from "../auth/forgot-password-form.mjs";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import * as React from "react";
|
|
@@ -31,13 +31,12 @@ import { jsx } from "react/jsx-runtime";
|
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
33
|
function ForgotPasswordPage(t0) {
|
|
34
|
-
const $ = c(
|
|
34
|
+
const $ = c(24);
|
|
35
35
|
const { title, description, logo, loginPath, resetPasswordRedirectUrl } = t0;
|
|
36
36
|
const { t } = useTranslation();
|
|
37
37
|
const authClient = useAuthClient();
|
|
38
38
|
const navigate = useAdminStore(selectNavigate);
|
|
39
39
|
const basePath = useAdminStore(selectBasePath);
|
|
40
|
-
const brandName = useAdminStore(selectBrandName);
|
|
41
40
|
const [error, setError] = React.useState(null);
|
|
42
41
|
let t1;
|
|
43
42
|
if ($[0] !== authClient || $[1] !== basePath || $[2] !== resetPasswordRedirectUrl || $[3] !== t) {
|
|
@@ -95,40 +94,33 @@ function ForgotPasswordPage(t0) {
|
|
|
95
94
|
$[14] = t4;
|
|
96
95
|
} else t4 = $[14];
|
|
97
96
|
let t5;
|
|
98
|
-
if ($[15] !==
|
|
99
|
-
t5 =
|
|
100
|
-
$[15] = brandName;
|
|
101
|
-
$[16] = logo;
|
|
102
|
-
$[17] = t5;
|
|
103
|
-
} else t5 = $[17];
|
|
104
|
-
let t6;
|
|
105
|
-
if ($[18] !== error || $[19] !== handleBackToLoginClick || $[20] !== handleSubmit) {
|
|
106
|
-
t6 = /* @__PURE__ */ jsx(ForgotPasswordForm, {
|
|
97
|
+
if ($[15] !== error || $[16] !== handleBackToLoginClick || $[17] !== handleSubmit) {
|
|
98
|
+
t5 = /* @__PURE__ */ jsx(ForgotPasswordForm, {
|
|
107
99
|
onSubmit: handleSubmit,
|
|
108
100
|
onBackToLoginClick: handleBackToLoginClick,
|
|
109
101
|
error
|
|
110
102
|
});
|
|
111
|
-
$[
|
|
112
|
-
$[
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
115
|
-
} else
|
|
116
|
-
let
|
|
117
|
-
if ($[
|
|
118
|
-
|
|
103
|
+
$[15] = error;
|
|
104
|
+
$[16] = handleBackToLoginClick;
|
|
105
|
+
$[17] = handleSubmit;
|
|
106
|
+
$[18] = t5;
|
|
107
|
+
} else t5 = $[18];
|
|
108
|
+
let t6;
|
|
109
|
+
if ($[19] !== logo || $[20] !== t3 || $[21] !== t4 || $[22] !== t5) {
|
|
110
|
+
t6 = /* @__PURE__ */ jsx(AuthLayout, {
|
|
119
111
|
title: t3,
|
|
120
112
|
description: t4,
|
|
121
|
-
logo
|
|
113
|
+
logo,
|
|
122
114
|
className: "qa-forgot-password-page",
|
|
123
|
-
children:
|
|
115
|
+
children: t5
|
|
124
116
|
});
|
|
125
|
-
$[
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
} else
|
|
131
|
-
return
|
|
117
|
+
$[19] = logo;
|
|
118
|
+
$[20] = t3;
|
|
119
|
+
$[21] = t4;
|
|
120
|
+
$[22] = t5;
|
|
121
|
+
$[23] = t6;
|
|
122
|
+
} else t6 = $[23];
|
|
123
|
+
return t6;
|
|
132
124
|
}
|
|
133
125
|
|
|
134
126
|
//#endregion
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useTranslation } from "../../i18n/hooks.mjs";
|
|
2
|
-
import { selectBrandName, useAdminStore } from "../../runtime/provider.mjs";
|
|
3
2
|
import { useAuthClient } from "../../hooks/use-auth.mjs";
|
|
4
|
-
import {
|
|
3
|
+
import { AuthLayout } from "../auth/auth-layout.mjs";
|
|
5
4
|
import { InviteForm } from "../auth/invite-form.mjs";
|
|
6
5
|
import { c } from "react/compiler-runtime";
|
|
7
6
|
import * as React from "react";
|
|
@@ -31,13 +30,12 @@ import { jsx } from "react/jsx-runtime";
|
|
|
31
30
|
* ```
|
|
32
31
|
*/
|
|
33
32
|
function InvitePage(t0) {
|
|
34
|
-
const $ = c(
|
|
33
|
+
const $ = c(25);
|
|
35
34
|
const { title, description, logo, roles, defaultRole: t1, showMessage: t2, onSuccess } = t0;
|
|
36
35
|
const defaultRole = t1 === void 0 ? "user" : t1;
|
|
37
36
|
const showMessage = t2 === void 0 ? true : t2;
|
|
38
37
|
const { t } = useTranslation();
|
|
39
38
|
const authClient = useAuthClient();
|
|
40
|
-
const brandName = useAdminStore(selectBrandName);
|
|
41
39
|
let t3;
|
|
42
40
|
if ($[0] !== roles || $[1] !== t) {
|
|
43
41
|
t3 = roles ?? [{
|
|
@@ -98,15 +96,8 @@ function InvitePage(t0) {
|
|
|
98
96
|
$[12] = t6;
|
|
99
97
|
} else t6 = $[12];
|
|
100
98
|
let t7;
|
|
101
|
-
if ($[13] !==
|
|
102
|
-
t7 =
|
|
103
|
-
$[13] = brandName;
|
|
104
|
-
$[14] = logo;
|
|
105
|
-
$[15] = t7;
|
|
106
|
-
} else t7 = $[15];
|
|
107
|
-
let t8;
|
|
108
|
-
if ($[16] !== defaultRole || $[17] !== error || $[18] !== handleSubmit || $[19] !== resolvedRoles || $[20] !== showMessage || $[21] !== success) {
|
|
109
|
-
t8 = /* @__PURE__ */ jsx(InviteForm, {
|
|
99
|
+
if ($[13] !== defaultRole || $[14] !== error || $[15] !== handleSubmit || $[16] !== resolvedRoles || $[17] !== showMessage || $[18] !== success) {
|
|
100
|
+
t7 = /* @__PURE__ */ jsx(InviteForm, {
|
|
110
101
|
onSubmit: handleSubmit,
|
|
111
102
|
roles: resolvedRoles,
|
|
112
103
|
defaultRole,
|
|
@@ -114,30 +105,30 @@ function InvitePage(t0) {
|
|
|
114
105
|
error,
|
|
115
106
|
success
|
|
116
107
|
});
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
} else
|
|
125
|
-
let
|
|
126
|
-
if ($[
|
|
127
|
-
|
|
108
|
+
$[13] = defaultRole;
|
|
109
|
+
$[14] = error;
|
|
110
|
+
$[15] = handleSubmit;
|
|
111
|
+
$[16] = resolvedRoles;
|
|
112
|
+
$[17] = showMessage;
|
|
113
|
+
$[18] = success;
|
|
114
|
+
$[19] = t7;
|
|
115
|
+
} else t7 = $[19];
|
|
116
|
+
let t8;
|
|
117
|
+
if ($[20] !== logo || $[21] !== t5 || $[22] !== t6 || $[23] !== t7) {
|
|
118
|
+
t8 = /* @__PURE__ */ jsx(AuthLayout, {
|
|
128
119
|
title: t5,
|
|
129
120
|
description: t6,
|
|
130
|
-
logo
|
|
121
|
+
logo,
|
|
131
122
|
className: "qa-invite-page",
|
|
132
|
-
children:
|
|
123
|
+
children: t7
|
|
133
124
|
});
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
$[
|
|
139
|
-
} else
|
|
140
|
-
return
|
|
125
|
+
$[20] = logo;
|
|
126
|
+
$[21] = t5;
|
|
127
|
+
$[22] = t6;
|
|
128
|
+
$[23] = t7;
|
|
129
|
+
$[24] = t8;
|
|
130
|
+
} else t8 = $[24];
|
|
131
|
+
return t8;
|
|
141
132
|
}
|
|
142
133
|
|
|
143
134
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTranslation } from "../../i18n/hooks.mjs";
|
|
2
|
-
import { selectBasePath,
|
|
2
|
+
import { selectBasePath, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
|
|
3
3
|
import { useAuthClient } from "../../hooks/use-auth.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { AuthLayout } from "../auth/auth-layout.mjs";
|
|
5
5
|
import { LoginForm } from "../auth/login-form.mjs";
|
|
6
6
|
import { useSetupStatus } from "../../hooks/use-setup-status.mjs";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
@@ -30,7 +30,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
32
|
function LoginPage(t0) {
|
|
33
|
-
const $ = c(
|
|
33
|
+
const $ = c(37);
|
|
34
34
|
const { title, description, logo, redirectTo, forgotPasswordPath, signUpPath, showForgotPassword: t1, showSignUp: t2 } = t0;
|
|
35
35
|
const showForgotPassword = t1 === void 0 ? true : t1;
|
|
36
36
|
const showSignUp = t2 === void 0 ? false : t2;
|
|
@@ -38,7 +38,6 @@ function LoginPage(t0) {
|
|
|
38
38
|
const authClient = useAuthClient();
|
|
39
39
|
const navigate = useAdminStore(selectNavigate);
|
|
40
40
|
const basePath = useAdminStore(selectBasePath);
|
|
41
|
-
const brandName = useAdminStore(selectBrandName);
|
|
42
41
|
const [error, setError] = React.useState(null);
|
|
43
42
|
const { data: setupStatus, isLoading: isCheckingSetup } = useSetupStatus();
|
|
44
43
|
let t3;
|
|
@@ -130,15 +129,8 @@ function LoginPage(t0) {
|
|
|
130
129
|
$[24] = t9;
|
|
131
130
|
} else t9 = $[24];
|
|
132
131
|
let t10;
|
|
133
|
-
if ($[25] !==
|
|
134
|
-
t10 =
|
|
135
|
-
$[25] = brandName;
|
|
136
|
-
$[26] = logo;
|
|
137
|
-
$[27] = t10;
|
|
138
|
-
} else t10 = $[27];
|
|
139
|
-
let t11;
|
|
140
|
-
if ($[28] !== error || $[29] !== handleForgotPasswordClick || $[30] !== handleSignUpClick || $[31] !== handleSubmit || $[32] !== showForgotPassword || $[33] !== showSignUp) {
|
|
141
|
-
t11 = /* @__PURE__ */ jsx(LoginForm, {
|
|
132
|
+
if ($[25] !== error || $[26] !== handleForgotPasswordClick || $[27] !== handleSignUpClick || $[28] !== handleSubmit || $[29] !== showForgotPassword || $[30] !== showSignUp) {
|
|
133
|
+
t10 = /* @__PURE__ */ jsx(LoginForm, {
|
|
142
134
|
onSubmit: handleSubmit,
|
|
143
135
|
onForgotPasswordClick: handleForgotPasswordClick,
|
|
144
136
|
onSignUpClick: handleSignUpClick,
|
|
@@ -146,30 +138,30 @@ function LoginPage(t0) {
|
|
|
146
138
|
showSignUp,
|
|
147
139
|
error
|
|
148
140
|
});
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
} else
|
|
157
|
-
let
|
|
158
|
-
if ($[
|
|
159
|
-
|
|
141
|
+
$[25] = error;
|
|
142
|
+
$[26] = handleForgotPasswordClick;
|
|
143
|
+
$[27] = handleSignUpClick;
|
|
144
|
+
$[28] = handleSubmit;
|
|
145
|
+
$[29] = showForgotPassword;
|
|
146
|
+
$[30] = showSignUp;
|
|
147
|
+
$[31] = t10;
|
|
148
|
+
} else t10 = $[31];
|
|
149
|
+
let t11;
|
|
150
|
+
if ($[32] !== logo || $[33] !== t10 || $[34] !== t8 || $[35] !== t9) {
|
|
151
|
+
t11 = /* @__PURE__ */ jsx(AuthLayout, {
|
|
160
152
|
title: t8,
|
|
161
153
|
description: t9,
|
|
162
|
-
logo
|
|
154
|
+
logo,
|
|
163
155
|
className: "qa-login-page",
|
|
164
|
-
children:
|
|
156
|
+
children: t10
|
|
165
157
|
});
|
|
166
|
-
$[
|
|
158
|
+
$[32] = logo;
|
|
159
|
+
$[33] = t10;
|
|
160
|
+
$[34] = t8;
|
|
161
|
+
$[35] = t9;
|
|
167
162
|
$[36] = t11;
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
$[39] = t12;
|
|
171
|
-
} else t12 = $[39];
|
|
172
|
-
return t12;
|
|
163
|
+
} else t11 = $[36];
|
|
164
|
+
return t11;
|
|
173
165
|
}
|
|
174
166
|
|
|
175
167
|
//#endregion
|