@questpie/admin 3.5.0 → 3.5.1
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/dist/client/components/blocks/block-canvas.mjs +1 -1
- package/dist/client/components/blocks/block-editor-layout.mjs +2 -2
- package/dist/client/components/blocks/block-insert-button.mjs +3 -3
- package/dist/client/components/blocks/block-item-menu.mjs +9 -9
- package/dist/client/components/blocks/block-item.mjs +5 -5
- package/dist/client/components/blocks/block-library-sidebar.mjs +3 -3
- package/dist/client/components/fields/array-field.mjs +2 -2
- package/dist/client/components/fields/date-field.mjs +6 -5
- package/dist/client/components/fields/datetime-field.mjs +6 -1
- package/dist/client/components/fields/object-array-field.mjs +2 -2
- package/dist/client/components/fields/relation/displays/cards-display.mjs +1 -1
- package/dist/client/components/fields/relation/displays/grid-display.mjs +1 -1
- package/dist/client/components/fields/relation/displays/list-display.mjs +3 -3
- package/dist/client/components/fields/relation/displays/table-display.mjs +1 -1
- package/dist/client/components/fields/relation-picker.mjs +3 -3
- package/dist/client/components/fields/relation-select.mjs +2 -2
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +16 -16
- package/dist/client/components/history-sidebar.mjs +12 -4
- package/dist/client/components/layout/field-layout-renderer.mjs +8 -3
- package/dist/client/components/media/media-grid.mjs +2 -2
- package/dist/client/components/preview/live-preview-mode.mjs +4 -4
- package/dist/client/components/preview/preview-pane.mjs +4 -4
- package/dist/client/components/primitives/asset-preview.mjs +5 -5
- package/dist/client/components/primitives/dropzone.mjs +1 -1
- package/dist/client/components/ui/kbd.mjs +1 -1
- package/dist/client/components/ui/scroll-fade.mjs +4 -4
- package/dist/client/components/ui/sidebar.mjs +1 -1
- package/dist/client/components/ui/skeleton.mjs +1 -1
- package/dist/client/components/ui/table.mjs +1 -1
- package/dist/client/components/widgets/quick-actions-widget.mjs +6 -6
- package/dist/client/components/widgets/timeline-widget.mjs +3 -3
- package/dist/client/components/widgets/value-widget.mjs +1 -1
- package/dist/client/components/widgets/widget-skeletons.mjs +2 -2
- package/dist/client/hooks/typed-hooks.mjs +66 -21
- package/dist/client/hooks/use-collection.mjs +48 -7
- package/dist/client/i18n/date-locale.mjs +0 -14
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/diff.mjs +4 -1
- package/dist/client/preview/patch.mjs +1 -1
- package/dist/client/preview/paths.mjs +85 -0
- package/dist/client/preview/preview-banner.d.mts +2 -2
- package/dist/client/preview/preview-field.d.mts +4 -4
- package/dist/client/runtime/translations-provider.mjs +1 -1
- package/dist/client/scope/picker.d.mts +2 -2
- package/dist/client/scope/provider.d.mts +2 -2
- package/dist/client/styles/base.css +51 -1
- package/dist/client/views/collection/auto-form-fields.mjs +1 -1
- package/dist/client/views/collection/cells/primitive-cells.mjs +2 -2
- package/dist/client/views/collection/cells/upload-cells.mjs +2 -2
- package/dist/client/views/collection/form-view.mjs +45 -26
- package/dist/client/views/collection/table-view.mjs +33 -20
- package/dist/client/views/collection/view-skeletons.mjs +37 -38
- package/dist/client/views/common/global-search.mjs +3 -3
- package/dist/client/views/dashboard/widget-card.mjs +7 -7
- package/dist/client/views/layout/admin-router.mjs +84 -37
- package/dist/client/views/layout/admin-sidebar.mjs +22 -21
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/server/modules/admin/collections/verification.d.mts +23 -23
- 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/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/setup.d.mts +7 -7
- 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/package.json +3 -3
|
@@ -16,7 +16,7 @@ import { DashboardGrid } from "../dashboard/dashboard-grid.mjs";
|
|
|
16
16
|
import { Icon } from "@iconify/react";
|
|
17
17
|
import * as React from "react";
|
|
18
18
|
import { useQueryClient } from "@tanstack/react-query";
|
|
19
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
20
20
|
|
|
21
21
|
//#region src/client/views/layout/admin-router.tsx
|
|
22
22
|
/**
|
|
@@ -201,16 +201,30 @@ function UnknownViewState({ viewKind, viewId }) {
|
|
|
201
201
|
*/
|
|
202
202
|
function RouterSkeleton() {
|
|
203
203
|
return /* @__PURE__ */ jsxs("div", {
|
|
204
|
-
className: "qa-router-skeleton
|
|
204
|
+
className: "qa-router-skeleton min-w-0 space-y-4",
|
|
205
|
+
"aria-busy": "true",
|
|
205
206
|
children: [
|
|
206
|
-
/* @__PURE__ */ jsx(
|
|
207
|
-
|
|
207
|
+
/* @__PURE__ */ jsx("span", {
|
|
208
|
+
className: "sr-only",
|
|
209
|
+
children: "Loading admin view"
|
|
210
|
+
}),
|
|
211
|
+
/* @__PURE__ */ jsx(AdminViewHeader, {
|
|
212
|
+
title: /* @__PURE__ */ jsx(Skeleton, {
|
|
213
|
+
variant: "text",
|
|
214
|
+
className: "h-7 w-44 max-w-full"
|
|
215
|
+
}),
|
|
216
|
+
description: /* @__PURE__ */ jsx(Skeleton, {
|
|
217
|
+
variant: "text",
|
|
218
|
+
className: "h-4 w-64 max-w-full"
|
|
219
|
+
}),
|
|
220
|
+
actions: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Skeleton, { className: "size-8" }), /* @__PURE__ */ jsx(Skeleton, { className: "size-8" })] })
|
|
221
|
+
}),
|
|
208
222
|
/* @__PURE__ */ jsxs("div", {
|
|
209
|
-
className: "
|
|
223
|
+
className: "grid gap-3",
|
|
210
224
|
children: [
|
|
211
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-
|
|
212
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-
|
|
213
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-
|
|
225
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-24 w-full" }),
|
|
226
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-24 w-full" }),
|
|
227
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-24 w-full" })
|
|
214
228
|
]
|
|
215
229
|
})
|
|
216
230
|
]
|
|
@@ -363,7 +377,7 @@ function DefaultDashboard() {
|
|
|
363
377
|
children: /* @__PURE__ */ jsxs("div", { children: [
|
|
364
378
|
/* @__PURE__ */ jsxs("div", {
|
|
365
379
|
className: "mb-4 flex items-center gap-3",
|
|
366
|
-
children: [/* @__PURE__ */ jsx("div", { className: "bg-primary
|
|
380
|
+
children: [/* @__PURE__ */ jsx("div", { className: "bg-primary size-2 rounded-full" }), /* @__PURE__ */ jsx("h3", {
|
|
367
381
|
className: "text-muted-foreground font-chrome chrome-meta text-xs font-medium",
|
|
368
382
|
children: t("dashboard.systemStatus")
|
|
369
383
|
})]
|
|
@@ -386,7 +400,7 @@ function DefaultNotFound() {
|
|
|
386
400
|
return /* @__PURE__ */ jsxs("div", {
|
|
387
401
|
className: "qa-not-found container",
|
|
388
402
|
children: [/* @__PURE__ */ jsx("h1", {
|
|
389
|
-
className: "mb-4 text-2xl font-
|
|
403
|
+
className: "mb-4 text-2xl font-semibold",
|
|
390
404
|
children: t("error.pageNotFound")
|
|
391
405
|
}), /* @__PURE__ */ jsx("p", {
|
|
392
406
|
className: "text-muted-foreground",
|
|
@@ -402,10 +416,10 @@ function RestrictedAccess({ type, name, navigate, basePath }) {
|
|
|
402
416
|
className: "mx-auto max-w-lg p-8 text-center",
|
|
403
417
|
children: /* @__PURE__ */ jsxs("div", { children: [
|
|
404
418
|
/* @__PURE__ */ jsx("div", {
|
|
405
|
-
className: "bg-muted mx-auto mb-6 flex
|
|
419
|
+
className: "bg-muted mx-auto mb-6 flex size-16 items-center justify-center rounded-full",
|
|
406
420
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
407
421
|
icon: "ph:lock-simple",
|
|
408
|
-
className: "text-muted-foreground
|
|
422
|
+
className: "text-muted-foreground size-8"
|
|
409
423
|
})
|
|
410
424
|
}),
|
|
411
425
|
/* @__PURE__ */ jsx("h1", {
|
|
@@ -424,7 +438,7 @@ function RestrictedAccess({ type, name, navigate, basePath }) {
|
|
|
424
438
|
onClick: () => navigate(basePath),
|
|
425
439
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
426
440
|
icon: "ph:arrow-left",
|
|
427
|
-
className: "
|
|
441
|
+
className: "size-4"
|
|
428
442
|
}), t("error.backToDashboard")]
|
|
429
443
|
})
|
|
430
444
|
] })
|
|
@@ -434,26 +448,35 @@ function RestrictedAccess({ type, name, navigate, basePath }) {
|
|
|
434
448
|
function LazyPageRenderer({ config }) {
|
|
435
449
|
const { t } = useTranslation();
|
|
436
450
|
const component = config.component;
|
|
437
|
-
const [
|
|
438
|
-
|
|
439
|
-
|
|
451
|
+
const [pageState, setPageState] = React.useState(() => {
|
|
452
|
+
const Component = getCachedComponent(component) ?? null;
|
|
453
|
+
return {
|
|
454
|
+
source: component,
|
|
455
|
+
Component,
|
|
456
|
+
loading: Component == null,
|
|
457
|
+
error: null
|
|
458
|
+
};
|
|
459
|
+
});
|
|
440
460
|
React.useEffect(() => {
|
|
441
461
|
let mounted = true;
|
|
442
462
|
async function load() {
|
|
443
463
|
try {
|
|
444
464
|
const cachedComponent = getCachedComponent(component);
|
|
445
465
|
if (cachedComponent) {
|
|
446
|
-
if (mounted) {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
466
|
+
if (mounted) setPageState({
|
|
467
|
+
source: component,
|
|
468
|
+
Component: cachedComponent,
|
|
469
|
+
loading: false,
|
|
470
|
+
error: null
|
|
471
|
+
});
|
|
451
472
|
return;
|
|
452
473
|
}
|
|
453
|
-
if (mounted) {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
474
|
+
if (mounted) setPageState({
|
|
475
|
+
source: component,
|
|
476
|
+
Component: null,
|
|
477
|
+
loading: true,
|
|
478
|
+
error: null
|
|
479
|
+
});
|
|
457
480
|
if (typeof component === "function") {
|
|
458
481
|
const result = component();
|
|
459
482
|
let isThenable = false;
|
|
@@ -467,21 +490,44 @@ function LazyPageRenderer({ config }) {
|
|
|
467
490
|
if (mod.default) resolved = mod.default;
|
|
468
491
|
else resolved = mod;
|
|
469
492
|
cacheComponent(component, resolved);
|
|
470
|
-
|
|
493
|
+
setPageState({
|
|
494
|
+
source: component,
|
|
495
|
+
Component: resolved,
|
|
496
|
+
loading: false,
|
|
497
|
+
error: null
|
|
498
|
+
});
|
|
471
499
|
}
|
|
472
|
-
} else if (mounted)
|
|
500
|
+
} else if (mounted) setPageState({
|
|
501
|
+
source: component,
|
|
502
|
+
Component: component,
|
|
503
|
+
loading: false,
|
|
504
|
+
error: null
|
|
505
|
+
});
|
|
473
506
|
} else if (component) {
|
|
474
|
-
if (mounted)
|
|
475
|
-
|
|
476
|
-
|
|
507
|
+
if (mounted) setPageState({
|
|
508
|
+
source: component,
|
|
509
|
+
Component: component,
|
|
510
|
+
loading: false,
|
|
511
|
+
error: null
|
|
512
|
+
});
|
|
513
|
+
} else if (mounted) setPageState({
|
|
514
|
+
source: component,
|
|
515
|
+
Component: null,
|
|
516
|
+
loading: false,
|
|
517
|
+
error: null
|
|
518
|
+
});
|
|
477
519
|
} catch (err) {
|
|
478
520
|
if (mounted) {
|
|
479
521
|
let resolvedError;
|
|
480
522
|
if (err instanceof Error) resolvedError = err;
|
|
481
523
|
else resolvedError = new Error(t("error.failedToLoad"));
|
|
482
|
-
|
|
524
|
+
setPageState({
|
|
525
|
+
source: component,
|
|
526
|
+
Component: null,
|
|
527
|
+
loading: false,
|
|
528
|
+
error: resolvedError
|
|
529
|
+
});
|
|
483
530
|
}
|
|
484
|
-
if (mounted) setLoading(false);
|
|
485
531
|
}
|
|
486
532
|
}
|
|
487
533
|
load();
|
|
@@ -489,21 +535,22 @@ function LazyPageRenderer({ config }) {
|
|
|
489
535
|
mounted = false;
|
|
490
536
|
};
|
|
491
537
|
}, [component, t]);
|
|
492
|
-
if (loading) {
|
|
538
|
+
if (!(pageState.source === component) || pageState.loading) {
|
|
493
539
|
const path = config.path?.replace(/^\//, "") ?? "";
|
|
494
540
|
return AUTH_ROUTE_SEGMENTS.has(path) ? /* @__PURE__ */ jsx(AuthPageSkeleton, {}) : /* @__PURE__ */ jsx(RouterSkeleton, {});
|
|
495
541
|
}
|
|
496
|
-
if (error) return /* @__PURE__ */ jsxs("div", {
|
|
542
|
+
if (pageState.error) return /* @__PURE__ */ jsxs("div", {
|
|
497
543
|
className: "container",
|
|
498
544
|
children: [/* @__PURE__ */ jsx("h1", {
|
|
499
|
-
className: "text-destructive mb-4 text-2xl font-
|
|
545
|
+
className: "text-destructive mb-4 text-2xl font-semibold",
|
|
500
546
|
children: t("error.unexpectedError")
|
|
501
547
|
}), /* @__PURE__ */ jsx("p", {
|
|
502
548
|
className: "text-muted-foreground",
|
|
503
|
-
children: error.message
|
|
549
|
+
children: pageState.error.message
|
|
504
550
|
})]
|
|
505
551
|
});
|
|
506
|
-
|
|
552
|
+
const PageComponent = pageState.Component;
|
|
553
|
+
return PageComponent ? /* @__PURE__ */ jsx(PageComponent, {}) : /* @__PURE__ */ jsx(DefaultNotFound, {});
|
|
507
554
|
}
|
|
508
555
|
/**
|
|
509
556
|
* AdminRouter Component
|
|
@@ -5,7 +5,7 @@ import { useSafeContentLocales } from "../../runtime/content-locales-provider.mj
|
|
|
5
5
|
import { ComponentRenderer } from "../../components/component-renderer.mjs";
|
|
6
6
|
import { Button } from "../../components/ui/button.mjs";
|
|
7
7
|
import { getFlagUrl } from "../../utils/locale-to-flag.mjs";
|
|
8
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../../components/ui/dropdown-menu.mjs";
|
|
8
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../../components/ui/dropdown-menu.mjs";
|
|
9
9
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../components/ui/tooltip.mjs";
|
|
10
10
|
import { useAdminConfig } from "../../hooks/use-admin-config.mjs";
|
|
11
11
|
import { useLazyComponent } from "../../utils/use-lazy-component.mjs";
|
|
@@ -222,7 +222,7 @@ function isRouteActive(activeRoute, itemHref, basePath, exact = false) {
|
|
|
222
222
|
/**
|
|
223
223
|
* Menu button styles - QUESTPIE design: clean, technical look
|
|
224
224
|
*/
|
|
225
|
-
const menuButtonStyles = cn("item-surface font-chrome flex w-full items-center gap-2
|
|
225
|
+
const menuButtonStyles = cn("item-surface font-chrome flex w-full items-center gap-2 p-2 text-[13px] font-medium transition-[background-color,color,border-color,transform] duration-[var(--motion-duration-base)] ease-[var(--motion-ease-standard)] active:scale-[0.96] motion-reduce:transition-none motion-reduce:active:scale-100", "text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-foreground", "focus-visible:ring-sidebar-ring focus-visible:ring-1 focus-visible:outline-none", "group-data-[collapsible=icon]:size-8 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-2");
|
|
226
226
|
const menuButtonActiveStyles = cn("border-transparent bg-[var(--sidebar-active-background)] text-[var(--sidebar-active-foreground)]");
|
|
227
227
|
function NavItem({ item, isActive, LinkComponent, renderNavItem, useActiveProps, className, depth = 0 }) {
|
|
228
228
|
const { state, isMobile, setOpenMobile } = useSidebar();
|
|
@@ -423,7 +423,7 @@ function UserFooter({ theme = "system", setTheme, showThemeToggle }) {
|
|
|
423
423
|
const setContentLocale = useAdminStore(selectSetContentLocale);
|
|
424
424
|
const hasMultipleContentLocales = (contentLocales?.locales?.length ?? 0) > 1;
|
|
425
425
|
const shouldShowThemeToggle = !!setTheme && showThemeToggle !== false;
|
|
426
|
-
const themeOptions = [
|
|
426
|
+
const themeOptions = React.useMemo(() => [
|
|
427
427
|
{
|
|
428
428
|
value: "light",
|
|
429
429
|
label: t("ui.themeLight"),
|
|
@@ -439,7 +439,10 @@ function UserFooter({ theme = "system", setTheme, showThemeToggle }) {
|
|
|
439
439
|
label: t("ui.themeSystem"),
|
|
440
440
|
icon: "ph:monitor"
|
|
441
441
|
}
|
|
442
|
-
];
|
|
442
|
+
], [t]);
|
|
443
|
+
const handleThemeChange = React.useCallback((value) => {
|
|
444
|
+
setTheme?.(value);
|
|
445
|
+
}, [setTheme]);
|
|
443
446
|
const closeSidebarOnMobile = React.useCallback(() => {
|
|
444
447
|
if (isMobile) setOpenMobile(false);
|
|
445
448
|
}, [isMobile, setOpenMobile]);
|
|
@@ -527,23 +530,21 @@ function UserFooter({ theme = "system", setTheme, showThemeToggle }) {
|
|
|
527
530
|
className: "size-4"
|
|
528
531
|
}), t("auth.myAccount")]
|
|
529
532
|
}),
|
|
530
|
-
shouldShowThemeToggle && /* @__PURE__ */ jsxs(
|
|
531
|
-
|
|
532
|
-
children:
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
]
|
|
546
|
-
}, option.value)) })] }),
|
|
533
|
+
shouldShowThemeToggle && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
534
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
535
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: t("ui.toggleTheme") }),
|
|
536
|
+
/* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
|
|
537
|
+
value: theme,
|
|
538
|
+
onValueChange: handleThemeChange,
|
|
539
|
+
children: themeOptions.map((option) => /* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
|
|
540
|
+
value: option.value,
|
|
541
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
542
|
+
icon: option.icon,
|
|
543
|
+
className: "size-4"
|
|
544
|
+
}), /* @__PURE__ */ jsx("span", { children: option.label })]
|
|
545
|
+
}, option.value))
|
|
546
|
+
})
|
|
547
|
+
] }),
|
|
547
548
|
hasMultipleUiLocales && /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:globe" }), t("locale.uiLanguage")] }), /* @__PURE__ */ jsx(DropdownMenuSubContent, { children: uiLocaleOptions.map((locale) => /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
548
549
|
onClick: () => setUiLocale(locale.code),
|
|
549
550
|
children: [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/rich-text/rich-text-renderer.d.ts
|
|
4
4
|
/**
|
|
@@ -98,6 +98,6 @@ declare function RichTextRenderer({
|
|
|
98
98
|
content,
|
|
99
99
|
styles: customStyles,
|
|
100
100
|
className
|
|
101
|
-
}: RichTextRendererProps):
|
|
101
|
+
}: RichTextRendererProps): react_jsx_runtime17.JSX.Element | null;
|
|
102
102
|
//#endregion
|
|
103
103
|
export { RichTextRenderer, RichTextStyles, TipTapDoc, TipTapNode };
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import * as questpie_shared67 from "questpie/shared";
|
|
2
|
-
import * as
|
|
2
|
+
import * as questpie430 from "questpie";
|
|
3
3
|
import * as questpie_src_server_modules_core_fields_email_js9 from "questpie/src/server/modules/core/fields/email.js";
|
|
4
4
|
import * as questpie_src_server_modules_core_fields_json_js9 from "questpie/src/server/modules/core/fields/json.js";
|
|
5
5
|
import * as drizzle_orm_pg_core141 from "drizzle-orm/pg-core";
|
|
6
6
|
import * as drizzle_orm79 from "drizzle-orm";
|
|
7
7
|
|
|
8
8
|
//#region src/server/modules/admin/collections/verification.d.ts
|
|
9
|
-
declare const _default:
|
|
10
|
-
readonly text: typeof
|
|
11
|
-
readonly textarea: typeof
|
|
9
|
+
declare const _default: questpie430.CollectionBuilder<questpie_shared67.Override<questpie430.EmptyCollectionState<"verification", undefined, {
|
|
10
|
+
readonly text: typeof questpie430.text;
|
|
11
|
+
readonly textarea: typeof questpie430.textarea;
|
|
12
12
|
readonly email: typeof questpie_src_server_modules_core_fields_email_js9.email;
|
|
13
|
-
readonly url: typeof
|
|
14
|
-
readonly number: typeof
|
|
15
|
-
readonly boolean: typeof
|
|
16
|
-
readonly date: typeof
|
|
17
|
-
readonly datetime: typeof
|
|
18
|
-
readonly time: typeof
|
|
19
|
-
readonly select: typeof
|
|
20
|
-
readonly upload: typeof
|
|
21
|
-
readonly relation: typeof
|
|
22
|
-
readonly object: typeof
|
|
13
|
+
readonly url: typeof questpie430.url;
|
|
14
|
+
readonly number: typeof questpie430.number;
|
|
15
|
+
readonly boolean: typeof questpie430.boolean;
|
|
16
|
+
readonly date: typeof questpie430.date;
|
|
17
|
+
readonly datetime: typeof questpie430.datetime;
|
|
18
|
+
readonly time: typeof questpie430.time;
|
|
19
|
+
readonly select: typeof questpie430.select;
|
|
20
|
+
readonly upload: typeof questpie430.upload;
|
|
21
|
+
readonly relation: typeof questpie430.relation;
|
|
22
|
+
readonly object: typeof questpie430.object;
|
|
23
23
|
readonly json: typeof questpie_src_server_modules_core_fields_json_js9.json;
|
|
24
|
-
readonly from: typeof
|
|
24
|
+
readonly from: typeof questpie430.from;
|
|
25
25
|
}>, {
|
|
26
26
|
name: "verification";
|
|
27
27
|
fields: Record<string, any> & {
|
|
@@ -30,28 +30,28 @@ declare const _default: questpie428.CollectionBuilder<questpie_shared67.Override
|
|
|
30
30
|
readonly expiresAt: drizzle_orm79.NotNull<drizzle_orm_pg_core141.PgTimestampBuilder>;
|
|
31
31
|
};
|
|
32
32
|
virtuals: undefined;
|
|
33
|
-
relations: Record<string,
|
|
33
|
+
relations: Record<string, questpie430.RelationConfig>;
|
|
34
34
|
indexes: Record<string, any>;
|
|
35
35
|
title: "identifier";
|
|
36
|
-
options:
|
|
36
|
+
options: questpie430.CollectionOptions & {
|
|
37
37
|
timestamps: true;
|
|
38
38
|
};
|
|
39
39
|
hooks: Record<string, any>;
|
|
40
40
|
access: Record<string, any>;
|
|
41
41
|
searchable: undefined;
|
|
42
42
|
fieldDefinitions: {
|
|
43
|
-
readonly identifier:
|
|
43
|
+
readonly identifier: questpie430.FieldWithMethods<Omit<questpie430.TextFieldState, "notNull" | "column"> & {
|
|
44
44
|
notNull: true;
|
|
45
45
|
column: drizzle_orm79.NotNull<drizzle_orm_pg_core141.PgVarcharBuilder<[string, ...string[]]>>;
|
|
46
|
-
},
|
|
47
|
-
readonly value:
|
|
46
|
+
}, questpie430.TextFieldMethods>;
|
|
47
|
+
readonly value: questpie430.FieldWithMethods<Omit<questpie430.TextFieldState, "notNull" | "column"> & {
|
|
48
48
|
notNull: true;
|
|
49
49
|
column: drizzle_orm79.NotNull<drizzle_orm_pg_core141.PgVarcharBuilder<[string, ...string[]]>>;
|
|
50
|
-
},
|
|
51
|
-
readonly expiresAt:
|
|
50
|
+
}, questpie430.TextFieldMethods>;
|
|
51
|
+
readonly expiresAt: questpie430.FieldWithMethods<Omit<questpie430.DatetimeFieldState, "notNull" | "column"> & {
|
|
52
52
|
notNull: true;
|
|
53
53
|
column: drizzle_orm79.NotNull<drizzle_orm_pg_core141.PgTimestampBuilder>;
|
|
54
|
-
},
|
|
54
|
+
}, questpie430.DatetimeFieldMethods>;
|
|
55
55
|
};
|
|
56
56
|
upload: undefined;
|
|
57
57
|
output: {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as questpie428 from "questpie";
|
|
2
2
|
|
|
3
3
|
//#region src/server/modules/admin/routes/admin-config.d.ts
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ import * as questpie454 from "questpie";
|
|
|
7
7
|
* Registered via module routes and exposed through the fetch handler.
|
|
8
8
|
*/
|
|
9
9
|
declare const adminConfigFunctions: {
|
|
10
|
-
readonly getAdminConfig:
|
|
10
|
+
readonly getAdminConfig: questpie428.JsonRouteDefinition<Record<string, never> | undefined, any, questpie428.JsonRouteParams>;
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
13
13
|
export { adminConfigFunctions };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServerActionDefinition, ServerActionResult } from "../../../augmentation/actions.mjs";
|
|
2
2
|
import "../../../augmentation.mjs";
|
|
3
3
|
import { App } from "./route-helpers.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as questpie85 from "questpie";
|
|
5
5
|
|
|
6
6
|
//#region src/server/modules/admin/routes/execute-action.d.ts
|
|
7
7
|
|
|
@@ -56,37 +56,37 @@ declare function executeAction(app: App, request: ExecuteActionRequest, session?
|
|
|
56
56
|
* });
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
|
-
declare const executeActionFn:
|
|
59
|
+
declare const executeActionFn: questpie85.JsonRouteDefinition<{
|
|
60
60
|
collection: string;
|
|
61
61
|
actionId: string;
|
|
62
62
|
itemId?: string | undefined;
|
|
63
63
|
itemIds?: string[] | undefined;
|
|
64
64
|
data?: Record<string, unknown> | undefined;
|
|
65
65
|
locale?: string | undefined;
|
|
66
|
-
}, any,
|
|
66
|
+
}, any, questpie85.JsonRouteParams>;
|
|
67
67
|
/**
|
|
68
68
|
* Get actions configuration for a collection.
|
|
69
69
|
* Returns action definitions without handlers for client rendering.
|
|
70
70
|
*/
|
|
71
|
-
declare const getActionsConfigFn:
|
|
71
|
+
declare const getActionsConfigFn: questpie85.JsonRouteDefinition<{
|
|
72
72
|
collection: string;
|
|
73
|
-
}, any,
|
|
73
|
+
}, any, questpie85.JsonRouteParams>;
|
|
74
74
|
/**
|
|
75
75
|
* QUESTPIE functions for action execution.
|
|
76
76
|
* These are registered on the `adminModule`.
|
|
77
77
|
*/
|
|
78
78
|
declare const actionFunctions: {
|
|
79
|
-
executeAction:
|
|
79
|
+
executeAction: questpie85.JsonRouteDefinition<{
|
|
80
80
|
collection: string;
|
|
81
81
|
actionId: string;
|
|
82
82
|
itemId?: string | undefined;
|
|
83
83
|
itemIds?: string[] | undefined;
|
|
84
84
|
data?: Record<string, unknown> | undefined;
|
|
85
85
|
locale?: string | undefined;
|
|
86
|
-
}, any,
|
|
87
|
-
getActionsConfig:
|
|
86
|
+
}, any, questpie85.JsonRouteParams>;
|
|
87
|
+
getActionsConfig: questpie85.JsonRouteDefinition<{
|
|
88
88
|
collection: string;
|
|
89
|
-
}, any,
|
|
89
|
+
}, any, questpie85.JsonRouteParams>;
|
|
90
90
|
};
|
|
91
91
|
//#endregion
|
|
92
92
|
export { ExecuteActionRequest, ExecuteActionResponse, actionFunctions, executeAction, executeActionFn, getActionsConfig, getActionsConfigFn };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as questpie129 from "questpie";
|
|
2
2
|
|
|
3
3
|
//#region src/server/modules/admin/routes/preview.d.ts
|
|
4
4
|
|
|
@@ -25,13 +25,13 @@ interface PreviewTokenPayload {
|
|
|
25
25
|
* @returns Object with preview functions
|
|
26
26
|
*/
|
|
27
27
|
declare function createPreviewFunctions(secret?: PreviewSecretSource): {
|
|
28
|
-
mintPreviewToken:
|
|
28
|
+
mintPreviewToken: questpie129.JsonRouteDefinition<{
|
|
29
29
|
path: string;
|
|
30
30
|
ttlMs?: number | undefined;
|
|
31
|
-
}, any,
|
|
32
|
-
verifyPreviewToken:
|
|
31
|
+
}, any, questpie129.JsonRouteParams>;
|
|
32
|
+
verifyPreviewToken: questpie129.JsonRouteDefinition<{
|
|
33
33
|
token: string;
|
|
34
|
-
}, any,
|
|
34
|
+
}, any, questpie129.JsonRouteParams>;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
37
|
* Verify a preview token without RPC.
|
|
@@ -68,18 +68,18 @@ declare function createPreviewTokenVerifier(secret: string): (token: string) =>
|
|
|
68
68
|
* Used by the `adminModule` to register preview RPC functions.
|
|
69
69
|
*/
|
|
70
70
|
declare const previewFunctions: {
|
|
71
|
-
getPreviewUrl:
|
|
71
|
+
getPreviewUrl: questpie129.JsonRouteDefinition<{
|
|
72
72
|
collection: string;
|
|
73
73
|
record: Record<string, unknown>;
|
|
74
74
|
locale?: string | undefined;
|
|
75
|
-
}, any,
|
|
76
|
-
mintPreviewToken:
|
|
75
|
+
}, any, questpie129.JsonRouteParams>;
|
|
76
|
+
mintPreviewToken: questpie129.JsonRouteDefinition<{
|
|
77
77
|
path: string;
|
|
78
78
|
ttlMs?: number | undefined;
|
|
79
|
-
}, any,
|
|
80
|
-
verifyPreviewToken:
|
|
79
|
+
}, any, questpie129.JsonRouteParams>;
|
|
80
|
+
verifyPreviewToken: questpie129.JsonRouteDefinition<{
|
|
81
81
|
token: string;
|
|
82
|
-
}, any,
|
|
82
|
+
}, any, questpie129.JsonRouteParams>;
|
|
83
83
|
};
|
|
84
84
|
//#endregion
|
|
85
85
|
export { PreviewTokenPayload, createPreviewFunctions, createPreviewTokenVerifier, previewFunctions, verifyPreviewTokenDirect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as questpie121 from "questpie";
|
|
2
2
|
|
|
3
3
|
//#region src/server/modules/admin/routes/reactive.d.ts
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ import * as questpie91 from "questpie";
|
|
|
13
13
|
* Batch reactive endpoint.
|
|
14
14
|
* Executes multiple reactive handlers in a single request.
|
|
15
15
|
*/
|
|
16
|
-
declare const batchReactive:
|
|
16
|
+
declare const batchReactive: questpie121.JsonRouteDefinition<{
|
|
17
17
|
collection: string;
|
|
18
18
|
type: "collection" | "global";
|
|
19
19
|
requests: {
|
|
@@ -27,12 +27,12 @@ declare const batchReactive: questpie91.JsonRouteDefinition<{
|
|
|
27
27
|
}[];
|
|
28
28
|
formData?: Record<string, unknown> | undefined;
|
|
29
29
|
prevData?: Record<string, unknown> | null | undefined;
|
|
30
|
-
}, any,
|
|
30
|
+
}, any, questpie121.JsonRouteParams>;
|
|
31
31
|
/**
|
|
32
32
|
* Dynamic options endpoint.
|
|
33
33
|
* Fetches options for select/relation fields with search and pagination.
|
|
34
34
|
*/
|
|
35
|
-
declare const fieldOptions:
|
|
35
|
+
declare const fieldOptions: questpie121.JsonRouteDefinition<{
|
|
36
36
|
collection: string;
|
|
37
37
|
type: "collection" | "global";
|
|
38
38
|
field: string;
|
|
@@ -41,12 +41,12 @@ declare const fieldOptions: questpie91.JsonRouteDefinition<{
|
|
|
41
41
|
page: number;
|
|
42
42
|
limit: number;
|
|
43
43
|
siblingData?: Record<string, unknown> | null | undefined;
|
|
44
|
-
}, any,
|
|
44
|
+
}, any, questpie121.JsonRouteParams>;
|
|
45
45
|
/**
|
|
46
46
|
* Reactive functions bundle.
|
|
47
47
|
*/
|
|
48
48
|
declare const reactiveFunctions: {
|
|
49
|
-
readonly batchReactive:
|
|
49
|
+
readonly batchReactive: questpie121.JsonRouteDefinition<{
|
|
50
50
|
collection: string;
|
|
51
51
|
type: "collection" | "global";
|
|
52
52
|
requests: {
|
|
@@ -60,8 +60,8 @@ declare const reactiveFunctions: {
|
|
|
60
60
|
}[];
|
|
61
61
|
formData?: Record<string, unknown> | undefined;
|
|
62
62
|
prevData?: Record<string, unknown> | null | undefined;
|
|
63
|
-
}, any,
|
|
64
|
-
readonly fieldOptions:
|
|
63
|
+
}, any, questpie121.JsonRouteParams>;
|
|
64
|
+
readonly fieldOptions: questpie121.JsonRouteDefinition<{
|
|
65
65
|
collection: string;
|
|
66
66
|
type: "collection" | "global";
|
|
67
67
|
field: string;
|
|
@@ -70,7 +70,7 @@ declare const reactiveFunctions: {
|
|
|
70
70
|
page: number;
|
|
71
71
|
limit: number;
|
|
72
72
|
siblingData?: Record<string, unknown> | null | undefined;
|
|
73
|
-
}, any,
|
|
73
|
+
}, any, questpie121.JsonRouteParams>;
|
|
74
74
|
};
|
|
75
75
|
//#endregion
|
|
76
76
|
export { batchReactive, fieldOptions, reactiveFunctions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as questpie139 from "questpie";
|
|
2
2
|
|
|
3
3
|
//#region src/server/modules/admin/routes/setup.d.ts
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ import * as questpie99 from "questpie";
|
|
|
13
13
|
* }
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
|
-
declare const isSetupRequired:
|
|
16
|
+
declare const isSetupRequired: questpie139.JsonRouteDefinition<Record<string, never>, any, questpie139.JsonRouteParams>;
|
|
17
17
|
/**
|
|
18
18
|
* Create the first admin user in the system.
|
|
19
19
|
* This function only works when no admin users exist (setup mode).
|
|
@@ -36,21 +36,21 @@ declare const isSetupRequired: questpie99.JsonRouteDefinition<Record<string, nev
|
|
|
36
36
|
* }
|
|
37
37
|
* ```
|
|
38
38
|
*/
|
|
39
|
-
declare const createFirstAdmin:
|
|
39
|
+
declare const createFirstAdmin: questpie139.JsonRouteDefinition<{
|
|
40
40
|
email: string;
|
|
41
41
|
password: string;
|
|
42
42
|
name: string;
|
|
43
|
-
}, any,
|
|
43
|
+
}, any, questpie139.JsonRouteParams>;
|
|
44
44
|
/**
|
|
45
45
|
* Bundle of setup-related functions.
|
|
46
46
|
*/
|
|
47
47
|
declare const setupFunctions: {
|
|
48
|
-
readonly isSetupRequired:
|
|
49
|
-
readonly createFirstAdmin:
|
|
48
|
+
readonly isSetupRequired: questpie139.JsonRouteDefinition<Record<string, never>, any, questpie139.JsonRouteParams>;
|
|
49
|
+
readonly createFirstAdmin: questpie139.JsonRouteDefinition<{
|
|
50
50
|
email: string;
|
|
51
51
|
password: string;
|
|
52
52
|
name: string;
|
|
53
|
-
}, any,
|
|
53
|
+
}, any, questpie139.JsonRouteParams>;
|
|
54
54
|
};
|
|
55
55
|
//#endregion
|
|
56
56
|
export { createFirstAdmin, isSetupRequired, setupFunctions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as questpie147 from "questpie";
|
|
2
2
|
|
|
3
3
|
//#region src/server/modules/admin/routes/widget-data.d.ts
|
|
4
4
|
|
|
@@ -20,13 +20,13 @@ import * as questpie69 from "questpie";
|
|
|
20
20
|
* const data = await client.routes.fetchWidgetData({ widgetId: "my-widget" });
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
declare const fetchWidgetData:
|
|
23
|
+
declare const fetchWidgetData: questpie147.JsonRouteDefinition<{
|
|
24
24
|
widgetId: string;
|
|
25
|
-
}, any,
|
|
25
|
+
}, any, questpie147.JsonRouteParams>;
|
|
26
26
|
declare const widgetDataFunctions: {
|
|
27
|
-
readonly fetchWidgetData:
|
|
27
|
+
readonly fetchWidgetData: questpie147.JsonRouteDefinition<{
|
|
28
28
|
widgetId: string;
|
|
29
|
-
}, any,
|
|
29
|
+
}, any, questpie147.JsonRouteParams>;
|
|
30
30
|
};
|
|
31
31
|
//#endregion
|
|
32
32
|
export { fetchWidgetData, widgetDataFunctions };
|