@questpie/admin 3.5.3 → 3.5.4
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 +8 -0
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/builder/index.d.mts +1 -1
- package/dist/client/builder/types/collection-types.d.mts +80 -5
- package/dist/client/builder/types/common.d.mts +5 -0
- package/dist/client/builder/types/field-types.d.mts +41 -1
- package/dist/client/builder/view/view.d.mts +3 -2
- package/dist/client/components/admin-link.d.mts +2 -2
- package/dist/client/components/fields/boolean-field.mjs +2 -1
- package/dist/client/components/fields/date-field.mjs +2 -1
- package/dist/client/components/fields/datetime-field.mjs +2 -1
- package/dist/client/components/fields/email-field.mjs +2 -1
- package/dist/client/components/fields/field-utils.d.mts +11 -0
- package/dist/client/components/fields/field-utils.mjs +3 -1
- package/dist/client/components/fields/field-wrapper.mjs +3 -3
- package/dist/client/components/fields/number-field.mjs +2 -1
- package/dist/client/components/fields/object-field.mjs +2 -1
- package/dist/client/components/fields/relation/displays/types.mjs +3 -3
- package/dist/client/components/fields/rich-text-editor/extensions.mjs +2 -1
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +6 -2
- package/dist/client/components/fields/rich-text-editor/image-upload.mjs +2 -1
- package/dist/client/components/fields/rich-text-editor/index.d.mts +3 -2
- package/dist/client/components/fields/rich-text-editor/index.mjs +4 -3
- package/dist/client/components/fields/select-field.mjs +2 -1
- package/dist/client/components/fields/text-field.mjs +2 -1
- package/dist/client/components/fields/textarea-field.mjs +2 -1
- package/dist/client/components/fields/time-field.mjs +2 -1
- package/dist/client/components/layout/field-layout-renderer.mjs +4 -4
- package/dist/client/components/media/media-grid.mjs +2 -1
- package/dist/client/components/primitives/asset-preview.mjs +4 -2
- package/dist/client/components/primitives/dropzone.d.mts +100 -0
- package/dist/client/components/primitives/field-select-control.mjs +2 -1
- package/dist/client/components/ui/button.d.mts +23 -0
- package/dist/client/components/ui/button.mjs +2 -2
- package/dist/client/components/ui/dropdown-menu.d.mts +49 -0
- package/dist/client/components/ui/dropdown-menu.mjs +22 -1
- package/dist/client/components/ui/popover.mjs +1 -1
- package/dist/client/components/ui/search-input.d.mts +56 -0
- package/dist/client/components/ui/select.mjs +2 -2
- package/dist/client/components/ui/sheet.d.mts +40 -0
- package/dist/client/components/ui/table.d.mts +49 -0
- package/dist/client/components/ui/table.mjs +15 -1
- package/dist/client/components/ui/tooltip.d.mts +21 -0
- package/dist/client/contexts/focus-context.d.mts +2 -2
- package/dist/client/hooks/use-admin-config.mjs +20 -1
- package/dist/client/hooks/use-autosave.mjs +91 -0
- package/dist/client/hooks/use-collection.mjs +65 -23
- package/dist/client/hooks/use-upload.d.mts +40 -0
- package/dist/client/hooks/use-upload.mjs +4 -2
- package/dist/client/i18n/hooks.d.mts +20 -0
- package/dist/client/lib/utils.d.mts +6 -0
- 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-field.d.mts +4 -4
- package/dist/client/runtime/provider.mjs +22 -3
- package/dist/client/scope/picker.d.mts +2 -2
- package/dist/client/scope/provider.d.mts +2 -2
- package/dist/client/styles/base.css +22 -18
- package/dist/client/utils/asset-url.mjs +27 -0
- package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
- package/dist/client/views/auth/auth-layout.d.mts +3 -3
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.d.mts +2 -2
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- package/dist/client/views/collection/auto-form-fields.mjs +4 -4
- package/dist/client/views/collection/cells/shared/asset-thumbnail.d.mts +7 -0
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +3 -2
- package/dist/client/views/collection/cells/shared/cell-helpers.mjs +3 -2
- package/dist/client/views/collection/cells/upload-cells.mjs +2 -1
- package/dist/client/views/collection/document-view.d.mts +30 -0
- package/dist/client/views/collection/document-view.mjs +377 -0
- package/dist/client/views/collection/field-context.mjs +3 -2
- package/dist/client/views/collection/field-renderer.mjs +2 -2
- package/dist/client/views/collection/form-view.mjs +14 -80
- package/dist/client/views/collection/list-view.mjs +19 -15
- package/dist/client/views/collection/table-view.mjs +1 -1
- package/dist/client/views/layout/admin-layout-provider.mjs +4 -3
- package/dist/client/views/layout/admin-layout.mjs +107 -20
- package/dist/client/views/layout/admin-router.mjs +19 -3
- package/dist/client/views/layout/admin-sidebar.mjs +50 -6
- package/dist/client/views/layout/admin-view-layout.d.mts +36 -0
- package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
- package/dist/client/views/pages/dashboard-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
- package/dist/client/views/pages/invite-page.d.mts +2 -2
- package/dist/client/views/pages/login-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/setup-page.d.mts +2 -2
- package/dist/client.d.mts +17 -2
- package/dist/client.mjs +16 -1
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/factories.d.mts +4 -2
- package/dist/factories.mjs +2 -2
- package/dist/index.d.mts +17 -3
- package/dist/index.mjs +16 -1
- package/dist/server/adapters/index.d.mts +2 -0
- package/dist/server/adapters/nextjs.d.mts +1 -0
- package/dist/server/augmentation/actions.d.mts +5 -0
- package/dist/server/augmentation/form-layout.d.mts +5 -0
- package/dist/server/augmentation/views.d.mts +4 -1
- package/dist/server/auth-helpers.d.mts +1 -0
- package/dist/server/fields/blocks.mjs +4 -1
- package/dist/server/fields/reactive-runtime.mjs +3 -0
- package/dist/server/modules/admin/.generated/module.d.mts +1 -1
- package/dist/server/modules/admin/auth-helpers.mjs +7 -1
- package/dist/server/modules/admin/block/introspection.mjs +28 -4
- package/dist/server/modules/admin/block/prefetch.d.mts +11 -0
- package/dist/server/modules/admin/block/prefetch.mjs +108 -27
- package/dist/server/modules/admin/client/.generated/module.d.mts +68 -67
- package/dist/server/modules/admin/client/.generated/module.mjs +2 -0
- package/dist/server/modules/admin/client/views/collection-document.d.mts +6 -0
- package/dist/server/modules/admin/client/views/collection-document.mjs +10 -0
- package/dist/server/modules/admin/collections/account.d.mts +53 -53
- package/dist/server/modules/admin/collections/admin-locks.d.mts +57 -57
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +22 -22
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +50 -50
- package/dist/server/modules/admin/collections/apikey.d.mts +79 -71
- package/dist/server/modules/admin/collections/assets.d.mts +42 -42
- package/dist/server/modules/admin/collections/session.d.mts +45 -45
- package/dist/server/modules/admin/collections/user.d.mts +66 -66
- package/dist/server/modules/admin/collections/verification.d.mts +39 -39
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +34 -4
- package/dist/server/modules/admin/factories.mjs +4 -34
- package/dist/server/modules/admin/index.d.mts +1 -1
- package/dist/server/modules/admin/routes/admin-config.d.mts +4 -2
- package/dist/server/modules/admin/routes/admin-config.mjs +18 -2
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +10 -4
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/locales.mjs +1 -1
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/preview.mjs +6 -5
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/reactive.mjs +2 -2
- package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
- package/dist/server/modules/admin/routes/setup.d.mts +7 -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/routes/widget-data.mjs +1 -1
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +41 -41
- package/dist/server/modules/audit/.generated/module.d.mts +6 -6
- package/dist/server/modules/audit/collections/audit-log.d.mts +78 -78
- package/dist/server/modules/audit/jobs/audit-cleanup.d.mts +2 -2
- package/dist/server/plugin.mjs +8 -3
- package/dist/server/proxy-factories.d.mts +8 -1
- package/dist/server/proxy-factories.mjs +33 -1
- package/dist/server.d.mts +2 -0
- package/package.json +4 -4
|
@@ -29,12 +29,12 @@ import { AdminViewHeader, AdminViewLayout } from "../layout/admin-view-layout.mj
|
|
|
29
29
|
import { TableViewSkeleton } from "./view-skeletons.mjs";
|
|
30
30
|
import { useUploadCollection } from "../../hooks/use-upload-collection.mjs";
|
|
31
31
|
import { useDebouncedValue, useSearch } from "../../hooks/use-search.mjs";
|
|
32
|
+
import { SearchInput } from "../../components/ui/search-input.mjs";
|
|
32
33
|
import { autoExpandFields, hasFieldsToExpand } from "../../utils/auto-expand-fields.mjs";
|
|
33
34
|
import { computeDefaultColumns, getAllAvailableFields } from "./columns/column-defaults.mjs";
|
|
34
35
|
import { buildColumns } from "./columns/build-columns.mjs";
|
|
35
36
|
import { HeaderActions } from "../../components/actions/header-actions.mjs";
|
|
36
37
|
import { FilterBuilderSheet } from "../../components/filter-builder/filter-builder-sheet.mjs";
|
|
37
|
-
import { SearchInput } from "../../components/ui/search-input.mjs";
|
|
38
38
|
import { useActions } from "../../hooks/use-action.mjs";
|
|
39
39
|
import { useRealtimeHighlight } from "../../hooks/use-realtime-highlight.mjs";
|
|
40
40
|
import { useDeleteSavedView, useSaveView, useSavedViews } from "../../hooks/use-saved-views.mjs";
|
|
@@ -693,7 +693,7 @@ function ListViewInner({ collection, config, viewConfig, navigate, basePath = "/
|
|
|
693
693
|
}, [fieldByName]);
|
|
694
694
|
const renderMetaField = React.useCallback((field, value) => {
|
|
695
695
|
if (value === null || value === void 0 || value === "") return /* @__PURE__ */ jsx("span", {
|
|
696
|
-
className: "text-
|
|
696
|
+
className: "text-foreground-subtle",
|
|
697
697
|
children: "-"
|
|
698
698
|
});
|
|
699
699
|
const fieldDef = fieldByName.get(field);
|
|
@@ -768,7 +768,7 @@ function ListViewInner({ collection, config, viewConfig, navigate, basePath = "/
|
|
|
768
768
|
showFilters && /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsxs(Button, {
|
|
769
769
|
variant: "outline",
|
|
770
770
|
size: "icon-sm",
|
|
771
|
-
className:
|
|
771
|
+
className: "relative",
|
|
772
772
|
onClick: () => setIsSheetOpen(true),
|
|
773
773
|
"aria-label": t("viewOptions.title"),
|
|
774
774
|
children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:sliders-horizontal" }), hasViewOptionsState && /* @__PURE__ */ jsx("span", { className: "bg-foreground absolute top-1 right-1 size-1.5 rounded-full" })]
|
|
@@ -791,16 +791,17 @@ function ListViewInner({ collection, config, viewConfig, navigate, basePath = "/
|
|
|
791
791
|
] })
|
|
792
792
|
}),
|
|
793
793
|
children: /* @__PURE__ */ jsxs("div", {
|
|
794
|
-
className: "space-y-
|
|
794
|
+
className: "space-y-4",
|
|
795
795
|
children: [
|
|
796
796
|
showSearch && isSearchPanelOpen && /* @__PURE__ */ jsx("div", {
|
|
797
|
-
className: "
|
|
797
|
+
className: "max-w-xl",
|
|
798
798
|
children: /* @__PURE__ */ jsx(SearchInput, {
|
|
799
799
|
value: searchTerm,
|
|
800
800
|
onChange: (event) => setSearchTerm(event.target.value),
|
|
801
801
|
onClear: () => setSearchTerm(""),
|
|
802
802
|
placeholder: t("collectionSearch.placeholder"),
|
|
803
|
-
isLoading: isSearchActive
|
|
803
|
+
isLoading: isSearchActive,
|
|
804
|
+
containerClassName: "h-10"
|
|
804
805
|
})
|
|
805
806
|
}),
|
|
806
807
|
/* @__PURE__ */ jsx(QuickFilterBar, {
|
|
@@ -848,10 +849,10 @@ function ListViewInner({ collection, config, viewConfig, navigate, basePath = "/
|
|
|
848
849
|
const isGroupMismatch = groupContext != null && getValueAtPath(item, groupContext.field) !== groupContext.value;
|
|
849
850
|
return /* @__PURE__ */ jsxs("div", {
|
|
850
851
|
"data-state": isSelected ? "selected" : void 0,
|
|
851
|
-
className: cn("group/list-row hover:bg-
|
|
852
|
+
className: cn("group/list-row hover:bg-accent data-[state=selected]:bg-muted relative flex min-w-0 cursor-pointer items-center gap-2 rounded-md px-4 text-sm transition-colors", density === "compact" ? "min-h-9 py-1" : "min-h-11 py-2", isHighlighted(item.id) && "animate-realtime-pulse", isGroupMismatch && "opacity-45"),
|
|
852
853
|
children: [
|
|
853
854
|
outlineRow.depth > 0 && /* @__PURE__ */ jsx("span", {
|
|
854
|
-
className: "bg-border
|
|
855
|
+
className: "bg-border-subtle absolute top-0 bottom-0 w-px",
|
|
855
856
|
style: { left: `${52 + (outlineRow.depth - 1) * 18}px` },
|
|
856
857
|
"aria-hidden": "true"
|
|
857
858
|
}),
|
|
@@ -870,7 +871,7 @@ function ListViewInner({ collection, config, viewConfig, navigate, basePath = "/
|
|
|
870
871
|
}),
|
|
871
872
|
outlineRow.expandable ? /* @__PURE__ */ jsx("button", {
|
|
872
873
|
type: "button",
|
|
873
|
-
className: "text-muted-foreground hover:bg-
|
|
874
|
+
className: "text-muted-foreground hover:bg-surface-high hover:text-foreground focus-visible:ring-ring/40 -ml-1 flex size-7 shrink-0 items-center justify-center rounded-[var(--control-radius-inner)] transition-[background-color,color,box-shadow] focus-visible:ring-2 focus-visible:outline-none",
|
|
874
875
|
onClick: (event) => {
|
|
875
876
|
event.stopPropagation();
|
|
876
877
|
toggleOutlineKey(outlineRow.key);
|
|
@@ -916,11 +917,14 @@ function ListViewInner({ collection, config, viewConfig, navigate, basePath = "/
|
|
|
916
917
|
}, field);
|
|
917
918
|
}),
|
|
918
919
|
locked && /* @__PURE__ */ jsxs("span", {
|
|
919
|
-
className: "text-
|
|
920
|
+
className: "text-muted-foreground bg-muted inline-flex shrink-0 items-center gap-1 rounded-full px-1.5 py-0.5 text-xs",
|
|
920
921
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
921
922
|
icon: "ph:lock-key",
|
|
922
923
|
className: "size-3"
|
|
923
|
-
}),
|
|
924
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
925
|
+
className: "max-w-20 truncate",
|
|
926
|
+
children: lockUser?.name ?? t("collection.locked")
|
|
927
|
+
})]
|
|
924
928
|
})
|
|
925
929
|
]
|
|
926
930
|
}), subtitleValue !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
@@ -972,7 +976,7 @@ function ListViewInner({ collection, config, viewConfig, navigate, basePath = "/
|
|
|
972
976
|
className: "flex flex-col",
|
|
973
977
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
974
978
|
type: "button",
|
|
975
|
-
className: "bg-
|
|
979
|
+
className: "hover:bg-surface-mid focus-visible:ring-ring/40 flex min-h-8 items-center gap-2 rounded-md px-3 py-1 text-left transition-colors focus-visible:ring-2 focus-visible:outline-none",
|
|
976
980
|
onClick: () => toggleOutlineKey(groupToggleKey),
|
|
977
981
|
"aria-expanded": !isGroupCollapsed,
|
|
978
982
|
children: [
|
|
@@ -1013,7 +1017,7 @@ function ListViewInner({ collection, config, viewConfig, navigate, basePath = "/
|
|
|
1013
1017
|
});
|
|
1014
1018
|
}), totalDocs > loadedCount && /* @__PURE__ */ jsxs("button", {
|
|
1015
1019
|
type: "button",
|
|
1016
|
-
className: "text-muted-foreground hover:text-foreground hover:bg-
|
|
1020
|
+
className: "text-muted-foreground hover:text-foreground hover:bg-surface-mid focus-visible:ring-ring/40 flex w-full items-center justify-center gap-2 rounded-md py-2 text-xs transition-colors focus-visible:ring-2 focus-visible:outline-none",
|
|
1017
1021
|
onClick: () => loadMoreInGroup(groupKey),
|
|
1018
1022
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
1019
1023
|
icon: "ph:caret-down",
|
|
@@ -1192,7 +1196,7 @@ function OutlineHeaderRow({ row, showCounts, onToggle }) {
|
|
|
1192
1196
|
const groupIcon = row.kind === "group" && "icon" in row ? resolveIconElement(row.icon) : null;
|
|
1193
1197
|
return /* @__PURE__ */ jsxs("button", {
|
|
1194
1198
|
type: "button",
|
|
1195
|
-
className: "hover:bg-
|
|
1199
|
+
className: "hover:bg-surface-mid focus-visible:ring-ring/40 flex min-h-8 w-full items-center gap-2 rounded-md px-3 py-1 text-left transition-[background-color,color,box-shadow] focus-visible:ring-2 focus-visible:outline-none",
|
|
1196
1200
|
onClick: () => onToggle(row.key),
|
|
1197
1201
|
"aria-expanded": !row.collapsed,
|
|
1198
1202
|
children: [
|
|
@@ -1214,7 +1218,7 @@ function OutlineHeaderRow({ row, showCounts, onToggle }) {
|
|
|
1214
1218
|
children: row.label
|
|
1215
1219
|
}),
|
|
1216
1220
|
showCounts && /* @__PURE__ */ jsx("span", {
|
|
1217
|
-
className: "text-muted-foreground/
|
|
1221
|
+
className: "text-muted-foreground/60 ml-1 text-xs tabular-nums",
|
|
1218
1222
|
children: row.count
|
|
1219
1223
|
})
|
|
1220
1224
|
]
|
|
@@ -35,12 +35,12 @@ import { useUpload } from "../../hooks/use-upload.mjs";
|
|
|
35
35
|
import { AssetPreview } from "../../components/primitives/asset-preview.mjs";
|
|
36
36
|
import { Dropzone } from "../../components/primitives/dropzone.mjs";
|
|
37
37
|
import { useDebouncedValue, useSearch } from "../../hooks/use-search.mjs";
|
|
38
|
+
import { SearchInput } from "../../components/ui/search-input.mjs";
|
|
38
39
|
import { autoExpandFields, hasFieldsToExpand } from "../../utils/auto-expand-fields.mjs";
|
|
39
40
|
import { computeDefaultColumns, getAllAvailableFields } from "./columns/column-defaults.mjs";
|
|
40
41
|
import { buildColumns } from "./columns/build-columns.mjs";
|
|
41
42
|
import { HeaderActions } from "../../components/actions/header-actions.mjs";
|
|
42
43
|
import { FilterBuilderSheet } from "../../components/filter-builder/filter-builder-sheet.mjs";
|
|
43
|
-
import { SearchInput } from "../../components/ui/search-input.mjs";
|
|
44
44
|
import { useActions } from "../../hooks/use-action.mjs";
|
|
45
45
|
import { useRealtimeHighlight } from "../../hooks/use-realtime-highlight.mjs";
|
|
46
46
|
import { useDeleteSavedView, useSaveView, useSavedViews } from "../../hooks/use-saved-views.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Admin } from "../../builder/admin.mjs";
|
|
2
2
|
import { getAdminLocalesQueryOptions, getAdminTranslationsQueryOptions, getUiLocaleFromCookie } from "../../runtime/translations-provider.mjs";
|
|
3
3
|
import { AdminProvider } from "../../runtime/provider.mjs";
|
|
4
|
-
import { getAdminConfigQueryOptions } from "../../hooks/use-admin-config.mjs";
|
|
4
|
+
import { getAdminConfigQueryOptions, getPublicAdminConfigQueryOptions } from "../../hooks/use-admin-config.mjs";
|
|
5
5
|
import { AdminThemeAppliedContext, useManagedAdminTheme } from "./admin-theme.mjs";
|
|
6
6
|
import { AdminLayout } from "./admin-layout.mjs";
|
|
7
7
|
import { AuthGuard } from "../../components/auth/auth-guard.mjs";
|
|
@@ -164,8 +164,10 @@ function isPublicPath(currentPath, basePath, publicPaths) {
|
|
|
164
164
|
function AdminLayoutProvider({ admin: adminInput, client, authClient, queryClient, LinkComponent, activeRoute, basePath = "/admin", header, footer, sidebarProps, theme, setTheme, showThemeToggle, toasterProps, className, enableAuthGuard, publicPaths = DEFAULT_PUBLIC_PATHS, requiredRole = "admin", authLoadingFallback, authUnauthorizedFallback, useServerTranslations, translationsFallback, initialUiLocale, children }) {
|
|
165
165
|
const qc = queryClient ? configureAdminQueryClient(queryClient) : getDefaultQueryClient();
|
|
166
166
|
const { theme: managedTheme, setTheme: setManagedTheme } = useManagedAdminTheme(theme, setTheme);
|
|
167
|
+
const isCurrentPathPublic = isPublicPath(activeRoute ?? (typeof window !== "undefined" ? window.location.pathname : void 0), basePath, publicPaths);
|
|
167
168
|
if (client?.routes) {
|
|
168
|
-
qc.prefetchQuery(
|
|
169
|
+
if (isCurrentPathPublic) qc.prefetchQuery(getPublicAdminConfigQueryOptions(client));
|
|
170
|
+
else qc.prefetchQuery(getAdminConfigQueryOptions(client));
|
|
169
171
|
if (useServerTranslations) {
|
|
170
172
|
const locale = initialUiLocale ?? getUiLocaleFromCookie() ?? "en";
|
|
171
173
|
qc.prefetchQuery(getAdminLocalesQueryOptions(client));
|
|
@@ -174,7 +176,6 @@ function AdminLayoutProvider({ admin: adminInput, client, authClient, queryClien
|
|
|
174
176
|
}
|
|
175
177
|
const admin = Admin.normalize(adminInput);
|
|
176
178
|
const shouldUseAuthGuard = enableAuthGuard ?? authClient != null;
|
|
177
|
-
const isCurrentPathPublic = isPublicPath(activeRoute ?? (typeof window !== "undefined" ? window.location.pathname : void 0), basePath, publicPaths);
|
|
178
179
|
let innerContent;
|
|
179
180
|
if (isCurrentPathPublic) innerContent = children;
|
|
180
181
|
else {
|
|
@@ -9,6 +9,7 @@ import { Toaster } from "../../components/ui/sonner.mjs";
|
|
|
9
9
|
import { GlobalSearch } from "../common/global-search.mjs";
|
|
10
10
|
import { AdminSidebar } from "./admin-sidebar.mjs";
|
|
11
11
|
import { AdminThemeAppliedContext, useManagedAdminTheme } from "./admin-theme.mjs";
|
|
12
|
+
import { Icon } from "@iconify/react";
|
|
12
13
|
import * as React from "react";
|
|
13
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
15
|
|
|
@@ -52,32 +53,118 @@ function shouldRenderShellRail(config, activeRoute, basePath) {
|
|
|
52
53
|
if (!(!routes.include?.length || routes.include.some((rule) => routeMatchesRule(activeRoute, rule, basePath, match)))) return false;
|
|
53
54
|
return !routes.exclude?.some((rule) => routeMatchesRule(activeRoute, rule, basePath, match));
|
|
54
55
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
const RAIL_WIDTH_KEY = "qa-admin-secondary-rail-width";
|
|
57
|
+
const RAIL_COLLAPSED_KEY = "qa-admin-secondary-rail-collapsed";
|
|
58
|
+
/**
|
|
59
|
+
* Client-side width + collapsed state for the secondary rail, persisted to
|
|
60
|
+
* localStorage. The server config provides the DEFAULT width and the min/max
|
|
61
|
+
* bounds; the user can resize within those bounds and collapse the rail, and the
|
|
62
|
+
* choice survives reloads.
|
|
63
|
+
*/
|
|
64
|
+
function useRailState(defaultWidth, minWidth, maxWidth) {
|
|
65
|
+
const clamp = React.useCallback((w) => Math.min(maxWidth, Math.max(minWidth, Math.round(w))), [minWidth, maxWidth]);
|
|
66
|
+
const [width, setWidthState] = React.useState(() => {
|
|
67
|
+
if (typeof window === "undefined") return defaultWidth;
|
|
68
|
+
const saved = Number(window.localStorage.getItem(RAIL_WIDTH_KEY));
|
|
69
|
+
return Number.isFinite(saved) && saved > 0 ? clamp(saved) : defaultWidth;
|
|
70
|
+
});
|
|
71
|
+
const [collapsed, setCollapsedState] = React.useState(() => typeof window !== "undefined" && window.localStorage.getItem(RAIL_COLLAPSED_KEY) === "1");
|
|
72
|
+
return {
|
|
73
|
+
width,
|
|
74
|
+
setWidth: React.useCallback((w) => {
|
|
75
|
+
const next = clamp(w);
|
|
76
|
+
setWidthState(next);
|
|
77
|
+
if (typeof window !== "undefined") window.localStorage.setItem(RAIL_WIDTH_KEY, String(next));
|
|
78
|
+
}, [clamp]),
|
|
79
|
+
collapsed,
|
|
80
|
+
setCollapsed: React.useCallback((c) => {
|
|
81
|
+
setCollapsedState(c);
|
|
82
|
+
if (typeof window !== "undefined") window.localStorage.setItem(RAIL_COLLAPSED_KEY, c ? "1" : "0");
|
|
83
|
+
}, [])
|
|
84
|
+
};
|
|
58
85
|
}
|
|
59
86
|
function AdminShellRail({ config, activeRoute, basePath, navigate }) {
|
|
60
87
|
const placement = config.placement ?? "left";
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
88
|
+
const isRight = placement === "right";
|
|
89
|
+
const { width, setWidth, collapsed, setCollapsed } = useRailState(typeof config.width === "number" ? config.width : 320, typeof config.minWidth === "number" ? config.minWidth : 280, typeof config.maxWidth === "number" ? config.maxWidth : 560);
|
|
90
|
+
const onResizeStart = React.useCallback((e) => {
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
const startX = e.clientX;
|
|
93
|
+
const startWidth = width;
|
|
94
|
+
document.body.style.cursor = "col-resize";
|
|
95
|
+
document.body.style.userSelect = "none";
|
|
96
|
+
const onMove = (ev) => {
|
|
97
|
+
const dx = ev.clientX - startX;
|
|
98
|
+
setWidth(isRight ? startWidth - dx : startWidth + dx);
|
|
99
|
+
};
|
|
100
|
+
const onUp = () => {
|
|
101
|
+
document.body.style.cursor = "";
|
|
102
|
+
document.body.style.userSelect = "";
|
|
103
|
+
window.removeEventListener("pointermove", onMove);
|
|
104
|
+
window.removeEventListener("pointerup", onUp);
|
|
105
|
+
};
|
|
106
|
+
window.addEventListener("pointermove", onMove);
|
|
107
|
+
window.addEventListener("pointerup", onUp);
|
|
108
|
+
}, [
|
|
109
|
+
width,
|
|
110
|
+
isRight,
|
|
111
|
+
setWidth
|
|
112
|
+
]);
|
|
113
|
+
const baseClass = cn("qa-admin-layout__secondary-rail bg-background h-svh min-h-0 shrink-0 overflow-hidden border-border-subtle", isRight ? "border-l" : "border-r", config.hiddenOnMobile === false ? "flex" : "hidden md:flex");
|
|
114
|
+
if (collapsed) return /* @__PURE__ */ jsx("aside", {
|
|
115
|
+
className: cn(baseClass, "w-11 flex-col items-center"),
|
|
68
116
|
"data-placement": placement,
|
|
69
|
-
|
|
70
|
-
children: /* @__PURE__ */ jsx(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
117
|
+
"data-collapsed": "true",
|
|
118
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
119
|
+
type: "button",
|
|
120
|
+
onClick: () => setCollapsed(false),
|
|
121
|
+
className: "text-muted-foreground hover:bg-surface-high hover:text-foreground focus-visible:ring-ring/40 mt-2.5 flex size-8 shrink-0 items-center justify-center rounded-[var(--control-radius-inner)] transition-[background-color,color,box-shadow] duration-[var(--motion-duration-base)] ease-[var(--motion-ease-standard)] focus-visible:ring-2 focus-visible:outline-none motion-reduce:transition-none",
|
|
122
|
+
title: "Expand panel",
|
|
123
|
+
"aria-label": "Expand panel",
|
|
124
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
125
|
+
icon: isRight ? "ph:caret-left" : "ph:caret-right",
|
|
126
|
+
width: 16,
|
|
127
|
+
height: 16
|
|
128
|
+
})
|
|
79
129
|
})
|
|
80
130
|
});
|
|
131
|
+
return /* @__PURE__ */ jsxs("aside", {
|
|
132
|
+
className: cn(baseClass, "relative flex-col", config.className),
|
|
133
|
+
"data-placement": placement,
|
|
134
|
+
style: { width: `${width}px` },
|
|
135
|
+
children: [
|
|
136
|
+
/* @__PURE__ */ jsx("div", {
|
|
137
|
+
onPointerDown: onResizeStart,
|
|
138
|
+
className: cn("group/resize absolute inset-y-0 z-20 flex w-2 cursor-col-resize items-center justify-center", isRight ? "left-0 -translate-x-1/2" : "right-0 translate-x-1/2"),
|
|
139
|
+
role: "separator",
|
|
140
|
+
"aria-orientation": "vertical",
|
|
141
|
+
"aria-label": "Resize panel",
|
|
142
|
+
children: /* @__PURE__ */ jsx("div", { className: "bg-border-subtle group-hover/resize:bg-border-strong h-full w-px transition-[background-color] duration-[var(--motion-duration-base)] ease-[var(--motion-ease-standard)] motion-reduce:transition-none" })
|
|
143
|
+
}),
|
|
144
|
+
/* @__PURE__ */ jsx("button", {
|
|
145
|
+
type: "button",
|
|
146
|
+
onClick: () => setCollapsed(true),
|
|
147
|
+
className: cn("text-muted-foreground hover:bg-surface-high hover:text-foreground focus-visible:ring-ring/40 absolute top-2.5 z-20 flex size-7 shrink-0 items-center justify-center rounded-[var(--control-radius-inner)] transition-[background-color,color,box-shadow] duration-[var(--motion-duration-base)] ease-[var(--motion-ease-standard)] focus-visible:ring-2 focus-visible:outline-none motion-reduce:transition-none", isRight ? "left-2.5" : "right-2.5"),
|
|
148
|
+
title: "Collapse panel",
|
|
149
|
+
"aria-label": "Collapse panel",
|
|
150
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
151
|
+
icon: isRight ? "ph:caret-right" : "ph:caret-left",
|
|
152
|
+
width: 15,
|
|
153
|
+
height: 15
|
|
154
|
+
})
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ jsx(ComponentRenderer, {
|
|
157
|
+
reference: config.component,
|
|
158
|
+
additionalProps: {
|
|
159
|
+
activeRoute,
|
|
160
|
+
basePath,
|
|
161
|
+
placement,
|
|
162
|
+
config,
|
|
163
|
+
navigate
|
|
164
|
+
}
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
});
|
|
81
168
|
}
|
|
82
169
|
/**
|
|
83
170
|
* AdminLayout Component
|
|
@@ -112,6 +112,10 @@ function matchRoute(segments, _collections = {}, globals = {}, pages = {}) {
|
|
|
112
112
|
}
|
|
113
113
|
return { type: "not-found" };
|
|
114
114
|
}
|
|
115
|
+
function isAuthRoute(segments) {
|
|
116
|
+
const [first] = segments;
|
|
117
|
+
return first ? AUTH_ROUTE_SEGMENTS.has(first) : false;
|
|
118
|
+
}
|
|
115
119
|
function formatDocumentTitle(pageTitle, appTitle) {
|
|
116
120
|
const title = pageTitle.trim();
|
|
117
121
|
const app = appTitle.trim() || "Admin";
|
|
@@ -478,7 +482,7 @@ function LazyPageRenderer({ config }) {
|
|
|
478
482
|
error: null
|
|
479
483
|
});
|
|
480
484
|
if (typeof component === "function") {
|
|
481
|
-
const result = component();
|
|
485
|
+
const result = component.constructor?.name === "AsyncFunction" ? component() : null;
|
|
482
486
|
let isThenable = false;
|
|
483
487
|
if (result != null) {
|
|
484
488
|
if (typeof result.then === "function") isThenable = true;
|
|
@@ -559,11 +563,22 @@ function LazyPageRenderer({ config }) {
|
|
|
559
563
|
* Uses Suspense internally - shows skeleton while config loads.
|
|
560
564
|
*/
|
|
561
565
|
function AdminRouter(props) {
|
|
566
|
+
if (isAuthRoute(props.segments)) return /* @__PURE__ */ jsx(React.Suspense, {
|
|
567
|
+
fallback: /* @__PURE__ */ jsx(AuthPageSkeleton, {}),
|
|
568
|
+
children: /* @__PURE__ */ jsx(AdminAuthRouter, { ...props })
|
|
569
|
+
});
|
|
562
570
|
return /* @__PURE__ */ jsx(React.Suspense, {
|
|
563
571
|
fallback: getFallbackForSegments(props.segments),
|
|
564
572
|
children: /* @__PURE__ */ jsx(AdminRouterInner, { ...props })
|
|
565
573
|
});
|
|
566
574
|
}
|
|
575
|
+
function AdminAuthRouter({ segments, pages: pagesProp, NotFoundComponent }) {
|
|
576
|
+
const admin = useAdminStore((state) => state.admin);
|
|
577
|
+
const pages = pagesProp ?? admin.getPages();
|
|
578
|
+
const route = React.useMemo(() => matchRoute(segments, {}, {}, pages), [segments, pages]);
|
|
579
|
+
if (route.type === "page") return /* @__PURE__ */ jsx(LazyPageRenderer, { config: route.config });
|
|
580
|
+
return /* @__PURE__ */ jsx(NotFoundComponent || DefaultNotFound, {});
|
|
581
|
+
}
|
|
567
582
|
/**
|
|
568
583
|
* Inner router component that uses Suspense for data loading.
|
|
569
584
|
* Guaranteed to have config loaded when rendering.
|
|
@@ -729,11 +744,12 @@ function AdminRouterInner({ segments, navigate, basePath = "/admin", searchParam
|
|
|
729
744
|
const selectedFormViewDefinition = views[selectedFormView];
|
|
730
745
|
const selectedFormViewConfig = mergeViewConfig(getViewBaseConfig(selectedFormViewDefinition), config?.form?.config ?? config?.form ?? activeCollectionSchema?.admin?.form);
|
|
731
746
|
const formViewLoader = getViewLoader(selectedFormViewDefinition);
|
|
732
|
-
|
|
747
|
+
const resolvedEditViewKind = selectedFormViewDefinition?.kind === "document" ? "document" : "form";
|
|
748
|
+
if (selectedFormViewDefinition && selectedFormViewDefinition.kind !== "form" && selectedFormViewDefinition.kind !== "document" && process.env.NODE_ENV !== "production") console.warn(`View "${selectedFormView}" kind "${selectedFormViewDefinition.kind}" != expected "form" | "document"`);
|
|
733
749
|
if (custom?.Form) return /* @__PURE__ */ jsx(custom.Form, {});
|
|
734
750
|
return /* @__PURE__ */ jsx(RegistryViewRenderer, {
|
|
735
751
|
loader: formViewLoader,
|
|
736
|
-
viewKind:
|
|
752
|
+
viewKind: resolvedEditViewKind,
|
|
737
753
|
viewId: selectedFormView,
|
|
738
754
|
componentProps: {
|
|
739
755
|
collection: name,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useResolveText, useSafeI18n, useTranslation } from "../../i18n/hooks.mjs";
|
|
2
2
|
import { cn, formatLabel } from "../../lib/utils.mjs";
|
|
3
|
-
import { selectAdmin, selectBasePath, selectContentLocale, selectNavigate, selectSetContentLocale, useAdminStore, useAdminStoreRaw } from "../../runtime/provider.mjs";
|
|
3
|
+
import { selectAdmin, selectBasePath, selectClient, selectContentLocale, selectNavigate, selectSetContentLocale, useAdminStore, useAdminStoreRaw } from "../../runtime/provider.mjs";
|
|
4
4
|
import { useSafeContentLocales } from "../../runtime/content-locales-provider.mjs";
|
|
5
5
|
import { ComponentRenderer } from "../../components/component-renderer.mjs";
|
|
6
6
|
import { Button } from "../../components/ui/button.mjs";
|
|
@@ -8,6 +8,7 @@ import { getFlagUrl } from "../../utils/locale-to-flag.mjs";
|
|
|
8
8
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, 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
|
+
import { resolveAssetUrl } from "../../utils/asset-url.mjs";
|
|
11
12
|
import { useLazyComponent } from "../../utils/use-lazy-component.mjs";
|
|
12
13
|
import { Skeleton } from "../../components/ui/skeleton.mjs";
|
|
13
14
|
import { useAuthClientSafe } from "../../hooks/use-auth.mjs";
|
|
@@ -17,7 +18,7 @@ import { BrandLogoMark } from "../../components/brand-logo.mjs";
|
|
|
17
18
|
import { getAdminPreferenceQueryKey, useAdminPreference, useSetAdminPreference } from "../../hooks/use-admin-preferences.mjs";
|
|
18
19
|
import { Icon } from "@iconify/react";
|
|
19
20
|
import * as React from "react";
|
|
20
|
-
import { useQueryClient } from "@tanstack/react-query";
|
|
21
|
+
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
21
22
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
23
|
import { toast } from "sonner";
|
|
23
24
|
|
|
@@ -28,6 +29,24 @@ import { toast } from "sonner";
|
|
|
28
29
|
* Navigation sidebar for the admin UI using shadcn sidebar primitives.
|
|
29
30
|
* Automatically reads from AdminProvider context when props are not provided.
|
|
30
31
|
*/
|
|
32
|
+
function getStringValue(value, key) {
|
|
33
|
+
if (!value || typeof value !== "object") return null;
|
|
34
|
+
const candidate = value[key];
|
|
35
|
+
return typeof candidate === "string" && candidate.length > 0 ? candidate : null;
|
|
36
|
+
}
|
|
37
|
+
function getAssetUrl(value) {
|
|
38
|
+
if (!value || typeof value !== "object") return null;
|
|
39
|
+
return resolveAssetUrl(getStringValue(value, "url") ?? getStringValue(value, "src")) ?? null;
|
|
40
|
+
}
|
|
41
|
+
function getUserAvatarUrl(user) {
|
|
42
|
+
if (!user || typeof user !== "object") return null;
|
|
43
|
+
const obj = user;
|
|
44
|
+
const avatarUrl = getAssetUrl(obj.avatar);
|
|
45
|
+
if (avatarUrl) return avatarUrl;
|
|
46
|
+
const imageUrl = getStringValue(obj, "image") ?? getAssetUrl(obj.image);
|
|
47
|
+
if (imageUrl) return resolveAssetUrl(imageUrl) ?? null;
|
|
48
|
+
return getAssetUrl(obj.photo) ?? getAssetUrl(obj.profileImage);
|
|
49
|
+
}
|
|
31
50
|
/**
|
|
32
51
|
* Extract typed props from untyped sidebar config items.
|
|
33
52
|
* Server sidebar items come as plain objects without strict typing.
|
|
@@ -406,6 +425,7 @@ function UserFooter({ theme = "system", setTheme, showThemeToggle }) {
|
|
|
406
425
|
const collapsed = state === "collapsed";
|
|
407
426
|
const authClient = useAuthClientSafe();
|
|
408
427
|
const { user, isPending } = useSessionState();
|
|
428
|
+
const client = useAdminStore(selectClient);
|
|
409
429
|
const navigate = useAdminStore(selectNavigate);
|
|
410
430
|
const basePath = useAdminStore(selectBasePath);
|
|
411
431
|
const admin = useAdminStore(selectAdmin);
|
|
@@ -422,6 +442,29 @@ function UserFooter({ theme = "system", setTheme, showThemeToggle }) {
|
|
|
422
442
|
const contentLocale = useAdminStore(selectContentLocale);
|
|
423
443
|
const setContentLocale = useAdminStore(selectSetContentLocale);
|
|
424
444
|
const hasMultipleContentLocales = (contentLocales?.locales?.length ?? 0) > 1;
|
|
445
|
+
const profileUser = useQuery({
|
|
446
|
+
queryKey: [
|
|
447
|
+
"questpie",
|
|
448
|
+
"collections",
|
|
449
|
+
"user",
|
|
450
|
+
"findOne",
|
|
451
|
+
contentLocale,
|
|
452
|
+
"current-profile",
|
|
453
|
+
user?.id
|
|
454
|
+
],
|
|
455
|
+
queryFn: async () => {
|
|
456
|
+
if (!user?.id) return null;
|
|
457
|
+
const userApi = client.collections?.user;
|
|
458
|
+
if (!userApi?.findOne) return null;
|
|
459
|
+
return userApi.findOne({
|
|
460
|
+
where: { id: user.id },
|
|
461
|
+
locale: contentLocale,
|
|
462
|
+
with: { avatar: true }
|
|
463
|
+
});
|
|
464
|
+
},
|
|
465
|
+
enabled: !!authClient && !!user?.id,
|
|
466
|
+
staleTime: 3e4
|
|
467
|
+
}).data ?? user;
|
|
425
468
|
const shouldShowThemeToggle = !!setTheme && showThemeToggle !== false;
|
|
426
469
|
const themeOptions = React.useMemo(() => [
|
|
427
470
|
{
|
|
@@ -471,16 +514,17 @@ function UserFooter({ theme = "system", setTheme, showThemeToggle }) {
|
|
|
471
514
|
};
|
|
472
515
|
if (isPending) return /* @__PURE__ */ jsx(UserFooterSkeleton, { collapsed });
|
|
473
516
|
if (!authClient || !user) return null;
|
|
474
|
-
const displayName =
|
|
475
|
-
const displayEmail =
|
|
517
|
+
const displayName = profileUser.name || profileUser.email?.split("@")[0] || "User";
|
|
518
|
+
const displayEmail = profileUser.email || "";
|
|
519
|
+
const avatarUrl = getUserAvatarUrl(profileUser) ?? getUserAvatarUrl(user);
|
|
476
520
|
return /* @__PURE__ */ jsx(SidebarFooter, {
|
|
477
521
|
className: "qa-sidebar__footer border-sidebar-border/70 border-t p-2",
|
|
478
522
|
children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsxs(DropdownMenuTrigger, {
|
|
479
523
|
className: cn("qa-sidebar__user-trigger flex w-full items-center gap-2.5 rounded-md p-2 text-left transition-[background-color,color,transform] duration-150 ease-out active:scale-[0.96]", "hover:bg-sidebar-accent text-sidebar-foreground", "focus-visible:ring-sidebar-ring focus-visible:ring-1 focus-visible:outline-none", collapsed && "justify-center"),
|
|
480
524
|
children: [/* @__PURE__ */ jsx("div", {
|
|
481
525
|
className: "qa-sidebar__user-avatar border-sidebar-border bg-sidebar-accent text-sidebar-accent-foreground flex size-8 shrink-0 items-center justify-center rounded-md border",
|
|
482
|
-
children:
|
|
483
|
-
src:
|
|
526
|
+
children: avatarUrl ? /* @__PURE__ */ jsx("img", {
|
|
527
|
+
src: avatarUrl,
|
|
484
528
|
alt: "",
|
|
485
529
|
className: "image-outline size-full rounded-md object-cover"
|
|
486
530
|
}) : /* @__PURE__ */ jsx(Icon, {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/client/views/layout/admin-view-layout.d.ts
|
|
4
|
+
|
|
5
|
+
interface AdminViewLayoutProps {
|
|
6
|
+
header?: React.ReactNode;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
contentClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
declare function AdminViewLayout({
|
|
12
|
+
header,
|
|
13
|
+
children,
|
|
14
|
+
className,
|
|
15
|
+
contentClassName
|
|
16
|
+
}: AdminViewLayoutProps): React.ReactElement;
|
|
17
|
+
interface AdminViewHeaderProps {
|
|
18
|
+
title: React.ReactNode;
|
|
19
|
+
titleAccessory?: React.ReactNode;
|
|
20
|
+
description?: React.ReactNode;
|
|
21
|
+
meta?: React.ReactNode;
|
|
22
|
+
actions?: React.ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
titleClassName?: string;
|
|
25
|
+
}
|
|
26
|
+
declare function AdminViewHeader({
|
|
27
|
+
title,
|
|
28
|
+
titleAccessory,
|
|
29
|
+
description,
|
|
30
|
+
meta,
|
|
31
|
+
actions,
|
|
32
|
+
className,
|
|
33
|
+
titleClassName
|
|
34
|
+
}: AdminViewHeaderProps): React.ReactElement;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { AdminViewHeader, AdminViewLayout };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime43 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/views/pages/accept-invite-page.d.ts
|
|
5
5
|
|
|
@@ -61,6 +61,6 @@ declare function AcceptInvitePage({
|
|
|
61
61
|
redirectTo,
|
|
62
62
|
loginPath,
|
|
63
63
|
minPasswordLength
|
|
64
|
-
}: AcceptInvitePageProps):
|
|
64
|
+
}: AcceptInvitePageProps): react_jsx_runtime43.JSX.Element;
|
|
65
65
|
//#endregion
|
|
66
66
|
export { AcceptInvitePage };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime41 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/client/views/pages/dashboard-page.d.ts
|
|
4
4
|
|
|
@@ -38,6 +38,6 @@ declare function DashboardPage({
|
|
|
38
38
|
title,
|
|
39
39
|
description,
|
|
40
40
|
className
|
|
41
|
-
}: DashboardPageProps):
|
|
41
|
+
}: DashboardPageProps): react_jsx_runtime41.JSX.Element;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { DashboardPage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime42 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/views/pages/forgot-password-page.d.ts
|
|
5
5
|
|
|
@@ -51,6 +51,6 @@ declare function ForgotPasswordPage({
|
|
|
51
51
|
logo,
|
|
52
52
|
loginPath,
|
|
53
53
|
resetPasswordRedirectUrl
|
|
54
|
-
}: ForgotPasswordPageProps):
|
|
54
|
+
}: ForgotPasswordPageProps): react_jsx_runtime42.JSX.Element;
|
|
55
55
|
//#endregion
|
|
56
56
|
export { ForgotPasswordPage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime45 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/views/pages/invite-page.d.ts
|
|
5
5
|
|
|
@@ -65,6 +65,6 @@ declare function InvitePage({
|
|
|
65
65
|
defaultRole,
|
|
66
66
|
showMessage,
|
|
67
67
|
onSuccess
|
|
68
|
-
}: InvitePageProps):
|
|
68
|
+
}: InvitePageProps): react_jsx_runtime45.JSX.Element;
|
|
69
69
|
//#endregion
|
|
70
70
|
export { InvitePage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime44 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/views/pages/login-page.d.ts
|
|
5
5
|
|
|
@@ -64,6 +64,6 @@ declare function LoginPage({
|
|
|
64
64
|
signUpPath,
|
|
65
65
|
showForgotPassword,
|
|
66
66
|
showSignUp
|
|
67
|
-
}: LoginPageProps):
|
|
67
|
+
}: LoginPageProps): react_jsx_runtime44.JSX.Element;
|
|
68
68
|
//#endregion
|
|
69
69
|
export { LoginPage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime47 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/views/pages/reset-password-page.d.ts
|
|
5
5
|
|
|
@@ -58,6 +58,6 @@ declare function ResetPasswordPage({
|
|
|
58
58
|
loginPath,
|
|
59
59
|
minPasswordLength,
|
|
60
60
|
getToken
|
|
61
|
-
}: ResetPasswordPageProps):
|
|
61
|
+
}: ResetPasswordPageProps): react_jsx_runtime47.JSX.Element;
|
|
62
62
|
//#endregion
|
|
63
63
|
export { ResetPasswordPage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime46 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/views/pages/setup-page.d.ts
|
|
5
5
|
|
|
@@ -56,6 +56,6 @@ declare function SetupPage({
|
|
|
56
56
|
redirectTo,
|
|
57
57
|
loginPath,
|
|
58
58
|
showLoginLink
|
|
59
|
-
}: SetupPageProps):
|
|
59
|
+
}: SetupPageProps): react_jsx_runtime46.JSX.Element;
|
|
60
60
|
//#endregion
|
|
61
61
|
export { SetupPage, SetupPageProps };
|