@questpie/admin 3.2.7 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/builder/admin-types.d.mts +3 -3
- package/dist/client/builder/types/action-types.d.mts +1 -1
- package/dist/client/builder/types/collection-types.d.mts +59 -2
- package/dist/client/components/blocks/block-editor-provider.mjs +13 -0
- package/dist/client/components/fields/array-field.mjs +105 -122
- package/dist/client/components/fields/asset-preview-field.mjs +1 -1
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +1 -1
- package/dist/client/components/fields/boolean-field.mjs +1 -1
- package/dist/client/components/fields/date-field.mjs +1 -1
- package/dist/client/components/fields/datetime-field.mjs +1 -1
- package/dist/client/components/fields/email-field.mjs +1 -1
- package/dist/client/components/fields/field-wrapper.mjs +44 -15
- package/dist/client/components/fields/number-field.mjs +1 -1
- package/dist/client/components/fields/object-array-field.mjs +179 -149
- package/dist/client/components/fields/object-field.mjs +96 -87
- package/dist/client/components/fields/relation-picker.mjs +1 -1
- package/dist/client/components/fields/relation-select.mjs +1 -1
- package/dist/client/components/fields/rich-text-editor/index.mjs +1 -1
- package/dist/client/components/fields/select-field.mjs +1 -1
- package/dist/client/components/fields/text-field.mjs +1 -1
- package/dist/client/components/fields/textarea-field.mjs +1 -1
- package/dist/client/components/fields/time-field.mjs +1 -1
- package/dist/client/components/fields/upload-field.mjs +1 -1
- package/dist/client/components/history-sidebar.mjs +10 -4
- package/dist/client/components/structured-diff.mjs +367 -0
- package/dist/client/components/ui/sidebar.mjs +1 -1
- package/dist/client/hooks/use-field-options.mjs +34 -15
- package/dist/client/hooks/use-transition-stage.mjs +2 -2
- package/dist/client/modules/admin.d.mts +3 -0
- package/dist/client/modules/admin.mjs +3 -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/utils/auto-expand-fields.mjs +1 -1
- package/dist/client/views/collection/auto-form-fields.mjs +23 -19
- package/dist/client/views/collection/cells/complex-cells.mjs +1 -1
- package/dist/client/views/collection/columns/build-columns.mjs +1 -1
- package/dist/client/views/collection/columns/column-defaults.mjs +17 -4
- package/dist/client/views/collection/field-renderer.mjs +19 -7
- package/dist/client/views/collection/form-view.mjs +10 -6
- package/dist/client/views/collection/list-view.mjs +830 -0
- package/dist/client/views/collection/outline.mjs +363 -0
- package/dist/client/views/collection/table-view.mjs +25 -16
- package/dist/client/views/globals/global-form-view.mjs +47 -27
- package/dist/client/views/layout/admin-layout.d.mts +15 -1
- package/dist/client/views/layout/admin-layout.mjs +95 -31
- package/dist/client/views/layout/admin-sidebar.mjs +2 -2
- package/dist/client.d.mts +6 -6
- package/dist/client.mjs +1 -1
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/factories.d.mts +19 -0
- package/dist/factories.mjs +11 -0
- package/dist/fields.d.mts +4 -0
- package/dist/fields.mjs +5 -0
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +1 -1
- package/dist/modules/admin.d.mts +10 -0
- package/dist/modules/admin.mjs +9 -0
- package/dist/modules/audit.d.mts +5 -0
- package/dist/modules/audit.mjs +5 -0
- package/dist/server/augmentation/form-layout.d.mts +57 -2
- package/dist/server/augmentation/index.d.mts +3 -1
- package/dist/server/augmentation/shell.d.mts +48 -0
- package/dist/server/augmentation.d.mts +2 -1
- package/dist/server/codegen/admin-client-template.mjs +11 -4
- package/dist/server/fields/blocks.d.mts +9 -2
- package/dist/server/fields/blocks.mjs +1 -1
- package/dist/server/fields/index.d.mts +2 -2
- package/dist/server/fields/index.mjs +2 -2
- package/dist/server/fields/rich-text.d.mts +9 -2
- package/dist/server/fields/rich-text.mjs +1 -1
- package/dist/server/i18n/messages/cs.mjs +8 -0
- package/dist/server/i18n/messages/de.mjs +8 -0
- package/dist/server/i18n/messages/en.mjs +8 -0
- package/dist/server/i18n/messages/es.mjs +8 -0
- package/dist/server/i18n/messages/fr.mjs +8 -0
- package/dist/server/i18n/messages/pl.mjs +8 -0
- package/dist/server/i18n/messages/pt.mjs +8 -0
- package/dist/server/i18n/messages/sk.mjs +8 -0
- package/dist/server/modules/admin/.generated/module.d.mts +24 -19
- package/dist/server/modules/admin/.generated/module.mjs +5 -1
- package/dist/server/modules/admin/.generated/registries.d.mts +6 -4
- package/dist/server/modules/admin/client/.generated/module.d.mts +70 -70
- package/dist/server/modules/admin/client/.generated/module.mjs +3 -1
- package/dist/server/modules/admin/client/views/collection-form.d.mts +6 -0
- package/dist/server/modules/admin/client/views/collection-table.d.mts +6 -0
- package/dist/server/modules/admin/client/views/global-form.d.mts +6 -0
- package/dist/server/modules/admin/client/views/list-view.d.mts +6 -0
- package/dist/server/modules/admin/client/views/list-view.mjs +10 -0
- package/dist/server/modules/admin/collections/account.d.mts +50 -50
- package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
- 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 +39 -39
- package/dist/server/modules/admin/collections/assets.d.mts +39 -39
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +63 -63
- package/dist/server/modules/admin/collections/verification.d.mts +36 -36
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +17 -0
- package/dist/server/modules/admin/index.d.mts +30 -31
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -17
- package/dist/server/modules/admin/routes/admin-config.mjs +21 -5
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +18 -12
- package/dist/server/modules/admin/routes/i18n-helpers.d.mts +4 -0
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.d.mts +24 -19
- package/dist/server/modules/admin/routes/preview.mjs +83 -62
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/route-helpers.mjs +36 -1
- package/dist/server/modules/admin/routes/setup.d.mts +7 -14
- package/dist/server/modules/admin/routes/setup.mjs +16 -3
- 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/views/list-view.d.mts +8 -0
- package/dist/server/modules/admin/views/list-view.mjs +7 -0
- 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 +87 -80
- package/dist/server/modules/audit/collections/audit-log.mjs +7 -2
- package/dist/server/modules/audit/config/localize-title.mjs +67 -0
- package/dist/server/modules/audit/index.d.mts +3 -2
- package/dist/server/modules/audit/jobs/audit-cleanup.d.mts +2 -2
- package/dist/server/modules/audit/log-audit-entry.d.mts +85 -0
- package/dist/server/modules/audit/log-audit-entry.mjs +125 -0
- package/dist/server/plugin.d.mts +1 -1
- package/dist/server/plugin.mjs +31 -31
- package/dist/server.d.mts +6 -4
- package/dist/server.mjs +9 -8
- package/dist/shared/preview-utils.d.mts +4 -4
- package/dist/shared/preview-utils.mjs +5 -7
- package/package.json +13 -3
- package/dist/client/hooks/use-audit-history.mjs +0 -38
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useSafeI18n } from "../../i18n/hooks.mjs";
|
|
2
2
|
import { cn } from "../../lib/utils.mjs";
|
|
3
3
|
import { useAdminStore } from "../../runtime/provider.mjs";
|
|
4
|
+
import { ComponentRenderer } from "../../components/component-renderer.mjs";
|
|
5
|
+
import { useAdminConfig } from "../../hooks/use-admin-config.mjs";
|
|
4
6
|
import { shouldHandleAdminShortcut } from "../../utils/keyboard-shortcuts.mjs";
|
|
5
7
|
import { SidebarInset, SidebarProvider } from "../../components/ui/sidebar.mjs";
|
|
6
8
|
import { Toaster } from "../../components/ui/sonner.mjs";
|
|
@@ -29,6 +31,54 @@ function useLayoutProps(props) {
|
|
|
29
31
|
navigate: props.navigate ?? storeNavigate
|
|
30
32
|
};
|
|
31
33
|
}
|
|
34
|
+
function normalizeRoute(route) {
|
|
35
|
+
return route.replace(/\/+$/, "") || "/";
|
|
36
|
+
}
|
|
37
|
+
function resolveRouteRule(rule, basePath) {
|
|
38
|
+
if (rule.startsWith("/")) return normalizeRoute(rule);
|
|
39
|
+
return normalizeRoute(`${basePath}/${rule.replace(/^\/+/, "")}`);
|
|
40
|
+
}
|
|
41
|
+
function routeMatchesRule(activeRoute, rule, basePath, match) {
|
|
42
|
+
if (!activeRoute) return false;
|
|
43
|
+
const active = normalizeRoute(activeRoute);
|
|
44
|
+
const target = resolveRouteRule(rule, basePath);
|
|
45
|
+
if (match === "exact") return active === target;
|
|
46
|
+
return active === target || active.startsWith(`${target}/`);
|
|
47
|
+
}
|
|
48
|
+
function shouldRenderShellRail(config, activeRoute, basePath) {
|
|
49
|
+
const routes = config.routes;
|
|
50
|
+
if (!routes) return true;
|
|
51
|
+
const match = routes.match ?? "prefix";
|
|
52
|
+
if (!(!routes.include?.length || routes.include.some((rule) => routeMatchesRule(activeRoute, rule, basePath, match)))) return false;
|
|
53
|
+
return !routes.exclude?.some((rule) => routeMatchesRule(activeRoute, rule, basePath, match));
|
|
54
|
+
}
|
|
55
|
+
function toCssLength(value) {
|
|
56
|
+
if (value === void 0) return void 0;
|
|
57
|
+
return typeof value === "number" ? `${value}px` : value;
|
|
58
|
+
}
|
|
59
|
+
function AdminShellRail({ config, activeRoute, basePath, navigate }) {
|
|
60
|
+
const placement = config.placement ?? "left";
|
|
61
|
+
const style = {
|
|
62
|
+
width: toCssLength(config.width ?? 320),
|
|
63
|
+
minWidth: toCssLength(config.minWidth ?? config.width ?? 280),
|
|
64
|
+
maxWidth: toCssLength(config.maxWidth)
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ jsx("aside", {
|
|
67
|
+
className: cn("qa-admin-layout__secondary-rail bg-background h-svh min-h-0 shrink-0 flex-col overflow-hidden", config.hiddenOnMobile === false ? "flex" : "hidden md:flex", placement === "left" ? "border-border-subtle border-r" : "border-border-subtle border-l", config.className),
|
|
68
|
+
"data-placement": placement,
|
|
69
|
+
style,
|
|
70
|
+
children: /* @__PURE__ */ jsx(ComponentRenderer, {
|
|
71
|
+
reference: config.component,
|
|
72
|
+
additionalProps: {
|
|
73
|
+
activeRoute,
|
|
74
|
+
basePath,
|
|
75
|
+
placement,
|
|
76
|
+
config,
|
|
77
|
+
navigate
|
|
78
|
+
}
|
|
79
|
+
})
|
|
80
|
+
});
|
|
81
|
+
}
|
|
32
82
|
/**
|
|
33
83
|
* AdminLayout Component
|
|
34
84
|
*
|
|
@@ -61,6 +111,15 @@ function AdminLayout({ LinkComponent, activeRoute, basePath = "/admin", brandNam
|
|
|
61
111
|
const [isSearchOpen, setIsSearchOpen] = React.useState(false);
|
|
62
112
|
const openSearch = React.useCallback(() => setIsSearchOpen(true), []);
|
|
63
113
|
const closeSearch = React.useCallback(() => setIsSearchOpen(false), []);
|
|
114
|
+
const { data: serverConfig } = useAdminConfig();
|
|
115
|
+
const currentActiveRoute = activeRoute ?? (typeof window !== "undefined" ? window.location.pathname : void 0);
|
|
116
|
+
const secondaryRailConfig = serverConfig?.shell?.secondaryRail;
|
|
117
|
+
const secondaryRail = !!secondaryRailConfig && shouldRenderShellRail(secondaryRailConfig, currentActiveRoute, basePath) && secondaryRailConfig ? /* @__PURE__ */ jsx(AdminShellRail, {
|
|
118
|
+
config: secondaryRailConfig,
|
|
119
|
+
activeRoute: currentActiveRoute,
|
|
120
|
+
basePath,
|
|
121
|
+
navigate
|
|
122
|
+
}) : null;
|
|
64
123
|
React.useEffect(() => {
|
|
65
124
|
const down = (e) => {
|
|
66
125
|
if (shouldHandleAdminShortcut(e, { key: "k" })) {
|
|
@@ -90,38 +149,43 @@ function AdminLayout({ LinkComponent, activeRoute, basePath = "/admin", brandNam
|
|
|
90
149
|
/* @__PURE__ */ jsxs(SidebarProvider, {
|
|
91
150
|
defaultOpen: !sidebarCollapsedProp,
|
|
92
151
|
className: "qa-admin-layout__sidebar-wrapper bg-sidebar mx-auto h-svh max-w-[1920px] overflow-hidden",
|
|
93
|
-
children: [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
className:
|
|
116
|
-
|
|
152
|
+
children: [
|
|
153
|
+
/* @__PURE__ */ jsx(AdminSidebar, {
|
|
154
|
+
LinkComponent,
|
|
155
|
+
activeRoute: currentActiveRoute,
|
|
156
|
+
basePath,
|
|
157
|
+
brandName,
|
|
158
|
+
theme,
|
|
159
|
+
setTheme,
|
|
160
|
+
showThemeToggle,
|
|
161
|
+
onSearchOpen: openSearch,
|
|
162
|
+
...sidebarProps
|
|
163
|
+
}),
|
|
164
|
+
secondaryRailConfig?.placement !== "right" && secondaryRail,
|
|
165
|
+
/* @__PURE__ */ jsxs(SidebarInset, {
|
|
166
|
+
className: "qa-admin-layout__content bg-background flex h-svh flex-col overflow-hidden md:rounded-tl-2xl",
|
|
167
|
+
children: [
|
|
168
|
+
shouldShowHeader && header && /* @__PURE__ */ jsx("header", {
|
|
169
|
+
className: "qa-admin-layout__header border-border-subtle border-b",
|
|
170
|
+
children: header
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ jsx("main", {
|
|
173
|
+
id: "main-content",
|
|
174
|
+
className: "qa-admin-layout__main min-w-0 flex-1 overflow-y-auto",
|
|
175
|
+
tabIndex: -1,
|
|
176
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
177
|
+
className: cn("qa-admin-layout__main-content min-w-0", layoutMode === "default" && "mx-auto max-w-5xl px-3 pt-1 pb-6 md:px-4 md:pt-2 md:pb-8", layoutMode === "wide" && "px-3 pt-1 pb-6 md:px-4 md:pt-2 md:pb-8", layoutMode === "full" && "px-2 pt-1 pb-6 md:px-3 md:pb-8", layoutMode === "immersive" && "p-0"),
|
|
178
|
+
children
|
|
179
|
+
})
|
|
180
|
+
}),
|
|
181
|
+
shouldShowFooter && footer && /* @__PURE__ */ jsx("footer", {
|
|
182
|
+
className: "qa-admin-layout__footer border-border-subtle border-t",
|
|
183
|
+
children: footer
|
|
117
184
|
})
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
})
|
|
123
|
-
]
|
|
124
|
-
})]
|
|
185
|
+
]
|
|
186
|
+
}),
|
|
187
|
+
secondaryRailConfig?.placement === "right" && secondaryRail
|
|
188
|
+
]
|
|
125
189
|
}),
|
|
126
190
|
/* @__PURE__ */ jsx(Toaster, {
|
|
127
191
|
theme,
|
|
@@ -4,10 +4,10 @@ import { selectAdmin, selectBasePath, selectContentLocale, selectNavigate, selec
|
|
|
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";
|
|
7
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "../../components/ui/tooltip.mjs";
|
|
8
|
-
import { useAdminConfig } from "../../hooks/use-admin-config.mjs";
|
|
9
7
|
import { getFlagUrl } from "../../utils/locale-to-flag.mjs";
|
|
10
8
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../../components/ui/dropdown-menu.mjs";
|
|
9
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../../components/ui/tooltip.mjs";
|
|
10
|
+
import { useAdminConfig } from "../../hooks/use-admin-config.mjs";
|
|
11
11
|
import { useLazyComponent } from "../../utils/use-lazy-component.mjs";
|
|
12
12
|
import { Skeleton } from "../../components/ui/skeleton.mjs";
|
|
13
13
|
import { useAuthClientSafe } from "../../hooks/use-auth.mjs";
|
package/dist/client.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BaseWidgetAdminMeta, WidgetTypeRegistry } from "./augmentation.mjs";
|
|
2
1
|
import { I18nContext, I18nText } from "./client/i18n/types.mjs";
|
|
3
2
|
import { BaseFieldProps, IconComponent, MaybeLazyComponent } from "./client/builder/types/common.mjs";
|
|
3
|
+
import { FormViewDefinition, ListViewDefinition, ViewDefinition, ViewKind, view } from "./client/builder/view/view.mjs";
|
|
4
|
+
import { Badge, BadgeProps, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, IconifyIcon, IconifyIconProps, createIconRenderer, isComponentReference, resolveIconElement } from "./client/components/component-renderer.mjs";
|
|
4
5
|
import { FieldDefinition, FieldInstance, configureField, field } from "./client/builder/field/field.mjs";
|
|
5
6
|
import { PageDefinition, page } from "./client/builder/page/page.mjs";
|
|
6
|
-
import { AnyWidgetConfig, BaseWidgetConfig, ChartWidgetConfig, CustomWidgetConfig, ProgressWidgetConfig, QuickActionsWidgetConfig, RecentItemsWidgetConfig, StatsWidgetConfig, TableWidgetConfig, TimelineWidgetConfig, ValueWidgetConfig, WidgetComponentProps, WidgetConfig } from "./client/builder/types/widget-types.mjs";
|
|
7
|
-
import { FormViewDefinition, ListViewDefinition, ViewDefinition, ViewKind, view } from "./client/builder/view/view.mjs";
|
|
8
7
|
import { WidgetDefinition, widget } from "./client/builder/widget/widget.mjs";
|
|
8
|
+
import { AnyWidgetConfig, BaseWidgetConfig, ChartWidgetConfig, CustomWidgetConfig, ProgressWidgetConfig, QuickActionsWidgetConfig, RecentItemsWidgetConfig, StatsWidgetConfig, TableWidgetConfig, TimelineWidgetConfig, ValueWidgetConfig, WidgetComponentProps, WidgetConfig } from "./client/builder/types/widget-types.mjs";
|
|
9
9
|
import { Admin, AppAdmin, InferAdminCMS } from "./client/builder/admin.mjs";
|
|
10
10
|
import { createAdminClient } from "./client/create-admin-client.mjs";
|
|
11
11
|
import { TypedHooks, createTypedHooks } from "./client/hooks/typed-hooks.mjs";
|
|
@@ -15,7 +15,7 @@ import { BrandLogoConfig, BrandingConfig } from "./client/types/admin-config.mjs
|
|
|
15
15
|
import { AdminProvider, AdminProviderProps, AdminState, AdminStore, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore } from "./client/runtime/provider.mjs";
|
|
16
16
|
import { useShallow } from "./client/runtime/index.mjs";
|
|
17
17
|
import { AdminSidebarBrandProps, AdminSidebarNavItemProps } from "./client/views/layout/admin-sidebar.mjs";
|
|
18
|
-
import { AdminLayout } from "./client/views/layout/admin-layout.mjs";
|
|
18
|
+
import { AdminLayout, AdminShellRailProps } from "./client/views/layout/admin-layout.mjs";
|
|
19
19
|
import { AdminLayoutProvider } from "./client/views/layout/admin-layout-provider.mjs";
|
|
20
20
|
import { AdminRouter, AdminRouterProps } from "./client/views/layout/admin-router.mjs";
|
|
21
21
|
import { BlockCategory, BlockContent, BlockNode, BlockRendererProps as BlockRendererProps$1, EMPTY_BLOCK_CONTENT, isBlockContent } from "./client/blocks/types.mjs";
|
|
@@ -33,7 +33,6 @@ import { UseCollectionPreviewOptions, UseCollectionPreviewResult, useCollectionP
|
|
|
33
33
|
import "./client/preview/index.mjs";
|
|
34
34
|
import { AuthGuard } from "./client/components/auth/auth-guard.mjs";
|
|
35
35
|
import { AuthLoading } from "./client/components/auth/auth-loading.mjs";
|
|
36
|
-
import { Badge, BadgeProps, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, IconifyIcon, IconifyIconProps, createIconRenderer, isComponentReference, resolveIconElement } from "./client/components/component-renderer.mjs";
|
|
37
36
|
import { AcceptInviteForm } from "./client/views/auth/accept-invite-form.mjs";
|
|
38
37
|
import { AuthDefaultLogo, AuthLayout, AuthLayoutProps } from "./client/views/auth/auth-layout.mjs";
|
|
39
38
|
import { BrandLogoMark, BrandLogoMarkProps } from "./client/components/brand-logo.mjs";
|
|
@@ -61,6 +60,7 @@ import { SetupStatus, useSetupStatus } from "./client/hooks/use-setup-status.mjs
|
|
|
61
60
|
import { useSidebarSearchParam } from "./client/hooks/use-sidebar-search-param.mjs";
|
|
62
61
|
import { AdminLink } from "./client/components/admin-link.mjs";
|
|
63
62
|
import { FlagConfig, getCountryCode, getFlagConfig, getFlagUrl } from "./client/utils/locale-to-flag.mjs";
|
|
63
|
+
import { BaseWidgetAdminMeta, WidgetTypeRegistry } from "./augmentation.mjs";
|
|
64
64
|
import { CollectionFormViewProps, CollectionListViewProps, GlobalFormViewProps } from "./client/builder/types/views.mjs";
|
|
65
65
|
import { buildValidationSchema, buildZodFromIntrospection, createFormSchema } from "./client/builder/validation.mjs";
|
|
66
66
|
import { FocusContextValue, FocusProvider, FocusProviderProps, FocusState, parsePreviewFieldPath, scrollFieldIntoView, useFocus, useFocusOptional, useIsBlockFocused, useIsFieldFocused } from "./client/contexts/focus-context.mjs";
|
|
@@ -105,4 +105,4 @@ type CollectionFieldKeys<TApp extends QuestpieApp, TCollectionName extends strin
|
|
|
105
105
|
select: infer TSelect;
|
|
106
106
|
} ? keyof TSelect : never : never : never;
|
|
107
107
|
//#endregion
|
|
108
|
-
export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, type AdminProviderProps, AdminRouter, type AdminRouterProps, type AdminSidebarBrandProps, type AdminSidebarNavItemProps, type AdminState, type AdminStore, type AdminToPreviewMessage, AnyQuestpieClient, type AnyWidgetConfig, type AppAdmin, AuthDefaultLogo, AuthGuard, AuthLayout, type AuthLayoutProps, AuthLoading, Badge, type BadgeProps, type BaseFieldProps, type BaseWidgetAdminMeta, type BaseWidgetConfig, type BlockCategory, type BlockClickedMessage, type BlockContent, type BlockNode, BlockRenderer, type BlockRendererProps as BlockRendererComponentProps, type BlockRendererProps$1 as BlockRendererProps, type BlockScopeContextValue, BlockScopeProvider, type BlockScopeProviderProps, type BrandLogoConfig, BrandLogoMark, type BrandLogoMarkProps, type BrandSnapshot, type BrandingConfig, type ChartWidgetConfig, CollectionFieldKeys, type CollectionFormViewProps, CollectionItem, type CollectionListViewProps, CollectionNames, type CommitMessage, type ComponentRegistry, ComponentRenderer, type ComponentRendererProps, type ComponentRendererRegistry, type CustomWidgetConfig, DashboardPage, EMPTY_BLOCK_CONTENT, type FieldClickedMessage, type FieldComponentProps, type FieldDefinition, type FieldInstance, type FieldValueEditedMessage, type FlagConfig, type FocusContextValue, type FocusFieldMessage, FocusProvider, type FocusProviderProps, type FocusState, ForgotPasswordForm, ForgotPasswordPage, type FormViewConfig, type FormViewDefinition, type FullResyncMessage, type GlobalFormViewProps, GlobalNames, type I18nContext, type I18nText, type IconComponent, IconifyIcon, type IconifyIconProps, type InferAdminCMS, type InitSnapshotMessage, InvitePage, type ListViewDefinition, LoginForm, LoginPage, type MaybeLazyComponent, type OptionItem, type PageDefinition, type PatchAppliedMessage, type PatchBatchMessage, PreviewBanner, type PreviewBannerProps, type PreviewConfig, PreviewField, type PreviewFieldProps, type PreviewPatchOp, PreviewProvider, type PreviewReadyMessage, type PreviewRefreshMessage, type PreviewToAdminMessage, type ProgressWidgetConfig, type QuickActionsWidgetConfig, type ReactiveFieldResult, type ReactiveFieldState, type RecentItemsWidgetConfig, type RefreshCompleteMessage, ResetPasswordForm, ResetPasswordPage, type ResyncRequestMessage, RichTextEditor, type RichTextEditorProps, RichTextRenderer, type RichTextStyles, type ScopeContextValue, type ScopeOption, ScopePicker, type ScopePickerProps, ScopeProvider, type ScopeProviderProps, type SelectBlockMessage, SetupForm, type SetupFormValues, SetupPage, type SetupPageProps, type SetupStatus, StandalonePreviewField, type StatsWidgetConfig, type TableWidgetConfig, type TimelineWidgetConfig, type TipTapDoc, type TipTapNode, type TypedHooks, type UseCollectionPreviewOptions, type UseCollectionPreviewResult, type UseFieldOptionsOptions, type UseFieldOptionsResult, type UseReactiveFieldsOptions, type UseReactiveFieldsResult, type ValueWidgetConfig, type ViewDefinition, type ViewKind, type WidgetComponentProps, type WidgetConfig, type WidgetDefinition, type WidgetTypeRegistry, buildValidationSchema, buildZodFromIntrospection, configureField, createAdminAuthClient, createAdminClient, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, page, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, useBrand, useBrandSnapshotRef, useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionPreview, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions, useCurrentUser, useFieldOptions, useFocus, useFocusOptional, useGlobal, useGlobalRevertVersion, useGlobalUpdate, useGlobalVersions, useIsBlockFocused, useIsDesktop, useIsFieldFocused, useIsMobile, useMediaQuery, usePreviewContext, useReactiveFields, useResolveFieldPath, useScope, useScopeSafe, useScopedFetch, useSearchParamToggle, useServerWidgetData, useSetupStatus, useShallow, useSidebarSearchParam, view, widget };
|
|
108
|
+
export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, type AdminProviderProps, AdminRouter, type AdminRouterProps, type AdminShellRailProps, type AdminSidebarBrandProps, type AdminSidebarNavItemProps, type AdminState, type AdminStore, type AdminToPreviewMessage, AnyQuestpieClient, type AnyWidgetConfig, type AppAdmin, AuthDefaultLogo, AuthGuard, AuthLayout, type AuthLayoutProps, AuthLoading, Badge, type BadgeProps, type BaseFieldProps, type BaseWidgetAdminMeta, type BaseWidgetConfig, type BlockCategory, type BlockClickedMessage, type BlockContent, type BlockNode, BlockRenderer, type BlockRendererProps as BlockRendererComponentProps, type BlockRendererProps$1 as BlockRendererProps, type BlockScopeContextValue, BlockScopeProvider, type BlockScopeProviderProps, type BrandLogoConfig, BrandLogoMark, type BrandLogoMarkProps, type BrandSnapshot, type BrandingConfig, type ChartWidgetConfig, CollectionFieldKeys, type CollectionFormViewProps, CollectionItem, type CollectionListViewProps, CollectionNames, type CommitMessage, type ComponentRegistry, ComponentRenderer, type ComponentRendererProps, type ComponentRendererRegistry, type CustomWidgetConfig, DashboardPage, EMPTY_BLOCK_CONTENT, type FieldClickedMessage, type FieldComponentProps, type FieldDefinition, type FieldInstance, type FieldValueEditedMessage, type FlagConfig, type FocusContextValue, type FocusFieldMessage, FocusProvider, type FocusProviderProps, type FocusState, ForgotPasswordForm, ForgotPasswordPage, type FormViewConfig, type FormViewDefinition, type FullResyncMessage, type GlobalFormViewProps, GlobalNames, type I18nContext, type I18nText, type IconComponent, IconifyIcon, type IconifyIconProps, type InferAdminCMS, type InitSnapshotMessage, InvitePage, type ListViewDefinition, LoginForm, LoginPage, type MaybeLazyComponent, type OptionItem, type PageDefinition, type PatchAppliedMessage, type PatchBatchMessage, PreviewBanner, type PreviewBannerProps, type PreviewConfig, PreviewField, type PreviewFieldProps, type PreviewPatchOp, PreviewProvider, type PreviewReadyMessage, type PreviewRefreshMessage, type PreviewToAdminMessage, type ProgressWidgetConfig, type QuickActionsWidgetConfig, type ReactiveFieldResult, type ReactiveFieldState, type RecentItemsWidgetConfig, type RefreshCompleteMessage, ResetPasswordForm, ResetPasswordPage, type ResyncRequestMessage, RichTextEditor, type RichTextEditorProps, RichTextRenderer, type RichTextStyles, type ScopeContextValue, type ScopeOption, ScopePicker, type ScopePickerProps, ScopeProvider, type ScopeProviderProps, type SelectBlockMessage, SetupForm, type SetupFormValues, SetupPage, type SetupPageProps, type SetupStatus, StandalonePreviewField, type StatsWidgetConfig, type TableWidgetConfig, type TimelineWidgetConfig, type TipTapDoc, type TipTapNode, type TypedHooks, type UseCollectionPreviewOptions, type UseCollectionPreviewResult, type UseFieldOptionsOptions, type UseFieldOptionsResult, type UseReactiveFieldsOptions, type UseReactiveFieldsResult, type ValueWidgetConfig, type ViewDefinition, type ViewKind, type WidgetComponentProps, type WidgetConfig, type WidgetDefinition, type WidgetTypeRegistry, buildValidationSchema, buildZodFromIntrospection, configureField, createAdminAuthClient, createAdminClient, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, page, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, useBrand, useBrandSnapshotRef, useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionPreview, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions, useCurrentUser, useFieldOptions, useFocus, useFocusOptional, useGlobal, useGlobalRevertVersion, useGlobalUpdate, useGlobalVersions, useIsBlockFocused, useIsDesktop, useIsFieldFocused, useIsMobile, useMediaQuery, usePreviewContext, useReactiveFields, useResolveFieldPath, useScope, useScopeSafe, useScopedFetch, useSearchParamToggle, useServerWidgetData, useSetupStatus, useShallow, useSidebarSearchParam, view, widget };
|
package/dist/client.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { AdminProvider, selectAdmin, selectBasePath, selectClient, selectNavigat
|
|
|
4
4
|
import { useShallow } from "./client/runtime/index.mjs";
|
|
5
5
|
import { Badge, ComponentRenderer, IconifyIcon, createIconRenderer, isComponentReference, resolveIconElement } from "./client/components/component-renderer.mjs";
|
|
6
6
|
import { configureField, field } from "./client/builder/field/field.mjs";
|
|
7
|
-
import { EMPTY_BLOCK_CONTENT, isBlockContent } from "./client/blocks/types.mjs";
|
|
8
7
|
import { getCountryCode, getFlagConfig, getFlagUrl } from "./client/utils/locale-to-flag.mjs";
|
|
8
|
+
import { EMPTY_BLOCK_CONTENT, isBlockContent } from "./client/blocks/types.mjs";
|
|
9
9
|
import { FocusProvider, parsePreviewFieldPath, scrollFieldIntoView, useFocus, useFocusOptional, useIsBlockFocused, useIsFieldFocused } from "./client/contexts/focus-context.mjs";
|
|
10
10
|
import { useIsDesktop, useIsMobile, useMediaQuery } from "./client/hooks/use-media-query.mjs";
|
|
11
11
|
import { buildValidationSchema, buildZodFromIntrospection, createFormSchema } from "./client/builder/validation.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime19 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_runtime19.JSX.Element | null;
|
|
102
102
|
//#endregion
|
|
103
103
|
export { RichTextRenderer, RichTextStyles, TipTapDoc, TipTapNode };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ActionReference, AdminLocaleConfig, ComponentReference, ComponentType, ComponentTypeRegistry } from "./server/augmentation/common.mjs";
|
|
2
|
+
import { AdminBlockConfig, AdminCollectionConfig, AdminGlobalConfig, BlockCategoryConfig, FieldLayoutItem, FormFieldLayoutItem, FormReactiveConfig, FormReactiveContext, FormSectionLayout, FormSidebarConfig, FormTabConfig, FormTabsLayout, FormViewConfig, ListViewConfig, PreviewConfig } from "./server/augmentation/form-layout.mjs";
|
|
3
|
+
import { AdminConfigContext, ComponentDefinition, ComponentFactory, EditViewDefinition, EditViewFactory, FilterViewsByKind, FormViewConfigContext, ListViewConfigContext, ListViewDefinition, ListViewFactory, ViewDefinition, ViewKind, ViewKindRegistry } from "./server/augmentation/views.mjs";
|
|
4
|
+
import { DashboardActionFactory, DashboardActionProxy, DashboardCallback, DashboardCallbackContext, DashboardConfigContext, DashboardContribution, DashboardItemDef, DashboardProxy, DashboardSectionDef, ServerBrandingConfig, ServerChartWidget, ServerCustomWidget, ServerDashboardAction, ServerDashboardConfig, ServerDashboardItem, ServerDashboardSection, ServerDashboardTab, ServerDashboardTabs, ServerDashboardWidget, ServerProgressWidget, ServerQuickAction, ServerQuickActionsWidget, ServerRecentItemsWidget, ServerStatsWidget, ServerTableWidget, ServerTimelineWidget, ServerValueWidget, WidgetAccessRule, WidgetFetchContext } from "./server/augmentation/dashboard.mjs";
|
|
5
|
+
import { ServerSidebarCollectionItem, ServerSidebarConfig, ServerSidebarDividerItem, ServerSidebarGlobalItem, ServerSidebarItem, ServerSidebarLinkItem, ServerSidebarPageItem, ServerSidebarSection, SidebarCallback, SidebarCallbackContext, SidebarConfigContext, SidebarContribution, SidebarItemDef, SidebarProxy, SidebarSectionDef } from "./server/augmentation/sidebar.mjs";
|
|
6
|
+
import { AdminShellRailPlacement, AdminShellRouteRules, ServerAdminShellConfig, ServerAdminShellRailConfig } from "./server/augmentation/shell.mjs";
|
|
7
|
+
import { ActionsConfigContext, BuiltinActionType, ServerActionContext, ServerActionDefinition, ServerActionDownload, ServerActionEffects, ServerActionError, ServerActionForm, ServerActionFormField, ServerActionHandler, ServerActionRedirect, ServerActionResult, ServerActionSuccess, ServerActionsConfig } from "./server/augmentation/actions.mjs";
|
|
8
|
+
import { AdminConfigInput, adminConfig } from "./server/augmentation/index.mjs";
|
|
9
|
+
import "./server/augmentation.mjs";
|
|
10
|
+
import { AnyBlockBuilder, AnyBlockDefinition, BlockBuilder, BlockBuilderState, BlockDefinition, BlockPrefetchContext, BlockPrefetchFn, BlockPrefetchWith, BlockPrefetchWithOptions, ExpandWithResult, ExpandedRecord, InferBlockData, InferBlockValues, block } from "./server/modules/admin/block/block-builder.mjs";
|
|
11
|
+
import { BlockSchema, getBlocksByCategory, introspectBlock, introspectBlocks } from "./server/modules/admin/block/introspection.mjs";
|
|
12
|
+
import { BlocksPrefetchContext, createBlocksPrefetchHook, processBlocksDocument, processDocumentBlocksPrefetch } from "./server/modules/admin/block/prefetch.mjs";
|
|
13
|
+
import "./server/block/index.mjs";
|
|
14
|
+
import { component, editView, filterViewsByKind, listView, view } from "./server/registry-helpers.mjs";
|
|
15
|
+
import { createActionCallbackProxy, createActionProxy, createComponentCallbackProxy, createComponentProxy, createDashboardCallbackContext, createDashboardContributionProxy, createFieldProxy, createSidebarCallbackContext, createSidebarContributionProxy, createViewCallbackProxy, createViewProxy, resolveDashboardCallback, resolveSidebarCallback } from "./server/proxy-factories.mjs";
|
|
16
|
+
import { AuthSession, GetAdminSessionOptions, RequireAdminAuthOptions, getAdminSession, isAdminUser, requireAdminAuth } from "./server/modules/admin/auth-helpers.mjs";
|
|
17
|
+
import { NextAuthMiddlewareOptions, createNextAuthMiddleware, getNextAdminSession } from "./server/adapters/nextjs.mjs";
|
|
18
|
+
import { BeforeLoadContext, TanStackAuthGuardOptions, createTanStackAuthGuard, createTanStackSessionLoader } from "./server/adapters/tanstack.mjs";
|
|
19
|
+
export { type ActionReference, type ActionsConfigContext, type AdminBlockConfig, type AdminCollectionConfig, type AdminConfigContext, type AdminConfigInput, type AdminGlobalConfig, type AdminLocaleConfig, type AdminShellRailPlacement, type AdminShellRouteRules, type AnyBlockBuilder, type AnyBlockDefinition, type AuthSession, BeforeLoadContext, BlockBuilder, type BlockBuilderState, type BlockCategoryConfig, type BlockDefinition, type BlockPrefetchContext, type BlockPrefetchFn, type BlockPrefetchWith, type BlockPrefetchWithOptions, type BlockSchema, type BlocksPrefetchContext, type BuiltinActionType, type ComponentDefinition, type ComponentFactory, type ComponentReference, type ComponentType, type ComponentTypeRegistry, type DashboardActionFactory, type DashboardActionProxy, type DashboardCallback, type DashboardCallbackContext, type DashboardConfigContext, type DashboardContribution, type DashboardItemDef, type DashboardProxy, type DashboardSectionDef, type EditViewDefinition, type EditViewFactory, type ExpandWithResult, type ExpandedRecord, type FieldLayoutItem, type FilterViewsByKind, type FormFieldLayoutItem, type FormReactiveConfig, type FormReactiveContext, type FormSectionLayout, type FormSidebarConfig, type FormTabConfig, type FormTabsLayout, type FormViewConfig, type FormViewConfigContext, type GetAdminSessionOptions, type InferBlockData, type InferBlockValues, type ListViewConfig, type ListViewConfigContext, type ListViewDefinition, type ListViewFactory, NextAuthMiddlewareOptions, type PreviewConfig, type RequireAdminAuthOptions, type ServerActionContext, type ServerActionDefinition, type ServerActionDownload, type ServerActionEffects, type ServerActionError, type ServerActionForm, type ServerActionFormField, type ServerActionHandler, type ServerActionRedirect, type ServerActionResult, type ServerActionSuccess, type ServerActionsConfig, type ServerAdminShellConfig, type ServerAdminShellRailConfig, type ServerBrandingConfig, type ServerChartWidget, type ServerCustomWidget, type ServerDashboardAction, type ServerDashboardConfig, type ServerDashboardItem, type ServerDashboardSection, type ServerDashboardTab, type ServerDashboardTabs, type ServerDashboardWidget, type ServerProgressWidget, type ServerQuickAction, type ServerQuickActionsWidget, type ServerRecentItemsWidget, type ServerSidebarCollectionItem, type ServerSidebarConfig, type ServerSidebarDividerItem, type ServerSidebarGlobalItem, type ServerSidebarItem, type ServerSidebarLinkItem, type ServerSidebarPageItem, type ServerSidebarSection, type ServerStatsWidget, type ServerTableWidget, type ServerTimelineWidget, type ServerValueWidget, type SidebarCallback, type SidebarCallbackContext, type SidebarConfigContext, type SidebarContribution, type SidebarItemDef, type SidebarProxy, type SidebarSectionDef, TanStackAuthGuardOptions, type ViewDefinition, type ViewKind, type ViewKindRegistry, type WidgetAccessRule, type WidgetFetchContext, adminConfig, block, component, createActionCallbackProxy, createActionProxy, createBlocksPrefetchHook, createComponentCallbackProxy, createComponentProxy, createDashboardCallbackContext, createDashboardContributionProxy, createFieldProxy, createNextAuthMiddleware, createSidebarCallbackContext, createSidebarContributionProxy, createTanStackAuthGuard, createTanStackSessionLoader, createViewCallbackProxy, createViewProxy, editView, filterViewsByKind, getAdminSession, getBlocksByCategory, getNextAdminSession, introspectBlock, introspectBlocks, isAdminUser, listView, processBlocksDocument, processDocumentBlocksPrefetch, requireAdminAuth, resolveDashboardCallback, resolveSidebarCallback, view };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { adminConfig } from "./server/augmentation/index.mjs";
|
|
2
|
+
import { component, editView, filterViewsByKind, listView, view } from "./server/registry-helpers.mjs";
|
|
3
|
+
import { createActionCallbackProxy, createActionProxy, createComponentCallbackProxy, createComponentProxy, createDashboardCallbackContext, createDashboardContributionProxy, createFieldProxy, createSidebarCallbackContext, createSidebarContributionProxy, createViewCallbackProxy, createViewProxy, resolveDashboardCallback, resolveSidebarCallback } from "./server/proxy-factories.mjs";
|
|
4
|
+
import { createBlocksPrefetchHook, processBlocksDocument, processDocumentBlocksPrefetch } from "./server/modules/admin/block/prefetch.mjs";
|
|
5
|
+
import { BlockBuilder, block } from "./server/modules/admin/block/block-builder.mjs";
|
|
6
|
+
import { getBlocksByCategory, introspectBlock, introspectBlocks } from "./server/modules/admin/block/introspection.mjs";
|
|
7
|
+
import { getAdminSession, isAdminUser, requireAdminAuth } from "./server/modules/admin/auth-helpers.mjs";
|
|
8
|
+
import { createNextAuthMiddleware, getNextAdminSession } from "./server/adapters/nextjs.mjs";
|
|
9
|
+
import { createTanStackAuthGuard, createTanStackSessionLoader } from "./server/adapters/tanstack.mjs";
|
|
10
|
+
|
|
11
|
+
export { BlockBuilder, adminConfig, block, component, createActionCallbackProxy, createActionProxy, createBlocksPrefetchHook, createComponentCallbackProxy, createComponentProxy, createDashboardCallbackContext, createDashboardContributionProxy, createFieldProxy, createNextAuthMiddleware, createSidebarCallbackContext, createSidebarContributionProxy, createTanStackAuthGuard, createTanStackSessionLoader, createViewCallbackProxy, createViewProxy, editView, filterViewsByKind, getAdminSession, getBlocksByCategory, getNextAdminSession, introspectBlock, introspectBlocks, isAdminUser, listView, processBlocksDocument, processDocumentBlocksPrefetch, requireAdminAuth, resolveDashboardCallback, resolveSidebarCallback, view };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BlockNode, BlockValues, BlocksDocument, BlocksFieldMeta, BlocksFieldState, blocks, blocksFieldType } from "./server/fields/blocks.mjs";
|
|
2
|
+
import { RichTextFeature, RichTextFieldMeta, RichTextFieldState, TipTapDocument, TipTapNode, richText, richTextFieldType } from "./server/fields/rich-text.mjs";
|
|
3
|
+
import { adminFields } from "./server/fields/index.mjs";
|
|
4
|
+
export { type BlockNode, type BlockValues, type BlocksDocument, type BlocksFieldMeta, type BlocksFieldState, type RichTextFeature, type RichTextFieldMeta, type RichTextFieldState, type TipTapDocument, type TipTapNode, adminFields, blocks, blocksFieldType, richText, richTextFieldType };
|
package/dist/fields.mjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { blocks, blocksFieldType } from "./server/fields/blocks.mjs";
|
|
2
|
+
import { richText, richTextFieldType } from "./server/fields/rich-text.mjs";
|
|
3
|
+
import { adminFields } from "./server/fields/index.mjs";
|
|
4
|
+
|
|
5
|
+
export { adminFields, blocks, blocksFieldType, richText, richTextFieldType };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AnyAdminMeta, ArrayFieldAdminMeta, BaseAdminMeta, BaseWidgetAdminMeta, BooleanFieldAdminMeta, DateFieldAdminMeta, JsonFieldAdminMeta, NumberFieldAdminMeta, ObjectFieldAdminMeta, RelationFieldAdminMeta, SelectFieldAdminMeta, TextFieldAdminMeta, TextareaFieldAdminMeta, TimeFieldAdminMeta, UploadFieldAdminMeta, WidgetTypeRegistry } from "./augmentation.mjs";
|
|
2
1
|
import { I18nContext, I18nText } from "./client/i18n/types.mjs";
|
|
3
2
|
import { BaseFieldProps, IconComponent, MaybeLazyComponent } from "./client/builder/types/common.mjs";
|
|
3
|
+
import { FormViewDefinition, ListViewDefinition, ViewDefinition, ViewKind, view } from "./client/builder/view/view.mjs";
|
|
4
|
+
import { Badge, BadgeProps, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, IconifyIcon, IconifyIconProps, createIconRenderer, isComponentReference, resolveIconElement } from "./client/components/component-renderer.mjs";
|
|
4
5
|
import { FieldDefinition, FieldInstance, configureField, field } from "./client/builder/field/field.mjs";
|
|
5
6
|
import { PageDefinition, page } from "./client/builder/page/page.mjs";
|
|
6
|
-
import { AnyWidgetConfig, BaseWidgetConfig, ChartWidgetConfig, CustomWidgetConfig, ProgressWidgetConfig, QuickActionsWidgetConfig, RecentItemsWidgetConfig, StatsWidgetConfig, TableWidgetConfig, TimelineWidgetConfig, ValueWidgetConfig, WidgetComponentProps, WidgetConfig } from "./client/builder/types/widget-types.mjs";
|
|
7
|
-
import { FormViewDefinition, ListViewDefinition, ViewDefinition, ViewKind, view } from "./client/builder/view/view.mjs";
|
|
8
7
|
import { WidgetDefinition, widget } from "./client/builder/widget/widget.mjs";
|
|
8
|
+
import { AnyWidgetConfig, BaseWidgetConfig, ChartWidgetConfig, CustomWidgetConfig, ProgressWidgetConfig, QuickActionsWidgetConfig, RecentItemsWidgetConfig, StatsWidgetConfig, TableWidgetConfig, TimelineWidgetConfig, ValueWidgetConfig, WidgetComponentProps, WidgetConfig } from "./client/builder/types/widget-types.mjs";
|
|
9
9
|
import { Admin, AppAdmin, InferAdminCMS } from "./client/builder/admin.mjs";
|
|
10
10
|
import { createAdminClient } from "./client/create-admin-client.mjs";
|
|
11
11
|
import { TypedHooks, createTypedHooks } from "./client/hooks/typed-hooks.mjs";
|
|
@@ -15,7 +15,7 @@ import { BrandLogoConfig, BrandingConfig } from "./client/types/admin-config.mjs
|
|
|
15
15
|
import { AdminProvider, AdminProviderProps, AdminState, AdminStore, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore } from "./client/runtime/provider.mjs";
|
|
16
16
|
import { useShallow } from "./client/runtime/index.mjs";
|
|
17
17
|
import { AdminSidebarBrandProps, AdminSidebarNavItemProps } from "./client/views/layout/admin-sidebar.mjs";
|
|
18
|
-
import { AdminLayout } from "./client/views/layout/admin-layout.mjs";
|
|
18
|
+
import { AdminLayout, AdminShellRailProps } from "./client/views/layout/admin-layout.mjs";
|
|
19
19
|
import { AdminLayoutProvider } from "./client/views/layout/admin-layout-provider.mjs";
|
|
20
20
|
import { AdminRouter, AdminRouterProps } from "./client/views/layout/admin-router.mjs";
|
|
21
21
|
import { BlockCategory, BlockContent, BlockNode, BlockRendererProps as BlockRendererProps$1, EMPTY_BLOCK_CONTENT, isBlockContent } from "./client/blocks/types.mjs";
|
|
@@ -30,7 +30,6 @@ import { AdminToPreviewMessage, BlockClickedMessage, CommitMessage, FieldClicked
|
|
|
30
30
|
import { UseCollectionPreviewOptions, UseCollectionPreviewResult, useCollectionPreview } from "./client/preview/use-collection-preview.mjs";
|
|
31
31
|
import { AuthGuard } from "./client/components/auth/auth-guard.mjs";
|
|
32
32
|
import { AuthLoading } from "./client/components/auth/auth-loading.mjs";
|
|
33
|
-
import { Badge, BadgeProps, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, IconifyIcon, IconifyIconProps, createIconRenderer, isComponentReference, resolveIconElement } from "./client/components/component-renderer.mjs";
|
|
34
33
|
import { AcceptInviteForm } from "./client/views/auth/accept-invite-form.mjs";
|
|
35
34
|
import { AuthDefaultLogo, AuthLayout, AuthLayoutProps } from "./client/views/auth/auth-layout.mjs";
|
|
36
35
|
import { BrandLogoMark, BrandLogoMarkProps } from "./client/components/brand-logo.mjs";
|
|
@@ -58,6 +57,7 @@ import { SetupStatus, useSetupStatus } from "./client/hooks/use-setup-status.mjs
|
|
|
58
57
|
import { useSidebarSearchParam } from "./client/hooks/use-sidebar-search-param.mjs";
|
|
59
58
|
import { AdminLink } from "./client/components/admin-link.mjs";
|
|
60
59
|
import { FlagConfig, getCountryCode, getFlagConfig, getFlagUrl } from "./client/utils/locale-to-flag.mjs";
|
|
60
|
+
import { AnyAdminMeta, ArrayFieldAdminMeta, BaseAdminMeta, BaseWidgetAdminMeta, BooleanFieldAdminMeta, DateFieldAdminMeta, JsonFieldAdminMeta, NumberFieldAdminMeta, ObjectFieldAdminMeta, RelationFieldAdminMeta, SelectFieldAdminMeta, TextFieldAdminMeta, TextareaFieldAdminMeta, TimeFieldAdminMeta, UploadFieldAdminMeta, WidgetTypeRegistry } from "./augmentation.mjs";
|
|
61
61
|
import { CollectionFormViewProps, CollectionListViewProps, GlobalFormViewProps } from "./client/builder/types/views.mjs";
|
|
62
62
|
import { buildValidationSchema, buildZodFromIntrospection, createFormSchema } from "./client/builder/validation.mjs";
|
|
63
63
|
import { FocusContextValue, FocusProvider, FocusProviderProps, FocusState, parsePreviewFieldPath, scrollFieldIntoView, useFocus, useFocusOptional, useIsBlockFocused, useIsFieldFocused } from "./client/contexts/focus-context.mjs";
|
|
@@ -65,4 +65,4 @@ import { ScopeContextValue, ScopeOption, ScopePickerProps, ScopeProviderProps }
|
|
|
65
65
|
import { ScopePicker } from "./client/scope/picker.mjs";
|
|
66
66
|
import { ScopeProvider, createScopedFetch, useScope, useScopeSafe, useScopedFetch } from "./client/scope/provider.mjs";
|
|
67
67
|
import { AnyQuestpieClient, CollectionFieldKeys, CollectionItem, CollectionNames, GlobalNames } from "./client.mjs";
|
|
68
|
-
export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminProviderProps, AdminRouter, AdminRouterProps, AdminSidebarBrandProps, AdminSidebarNavItemProps, AdminState, AdminStore, AdminToPreviewMessage, type AnyAdminMeta, AnyQuestpieClient, AnyWidgetConfig, AppAdmin, type ArrayFieldAdminMeta, AuthDefaultLogo, AuthGuard, AuthLayout, AuthLayoutProps, AuthLoading, Badge, BadgeProps, type BaseAdminMeta, BaseFieldProps, BaseWidgetAdminMeta, BaseWidgetConfig, BlockCategory, BlockClickedMessage, BlockContent, BlockNode, BlockRenderer, BlockRendererProps as BlockRendererComponentProps, BlockRendererProps$1 as BlockRendererProps, BlockScopeContextValue, BlockScopeProvider, BlockScopeProviderProps, type BooleanFieldAdminMeta, BrandLogoConfig, BrandLogoMark, BrandLogoMarkProps, BrandSnapshot, BrandingConfig, ChartWidgetConfig, CollectionFieldKeys, CollectionFormViewProps, CollectionItem, CollectionListViewProps, CollectionNames, CommitMessage, ComponentRegistry, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, CustomWidgetConfig, DashboardPage, type DateFieldAdminMeta, EMPTY_BLOCK_CONTENT, FieldClickedMessage, FieldComponentProps, FieldDefinition, FieldInstance, FieldValueEditedMessage, FlagConfig, FocusContextValue, FocusFieldMessage, FocusProvider, FocusProviderProps, FocusState, ForgotPasswordForm, ForgotPasswordPage, FormViewConfig, FormViewDefinition, FullResyncMessage, GlobalFormViewProps, GlobalNames, I18nContext, I18nText, IconComponent, IconifyIcon, IconifyIconProps, InferAdminCMS, InitSnapshotMessage, InvitePage, type JsonFieldAdminMeta, ListViewDefinition, LoginForm, LoginPage, MaybeLazyComponent, type NumberFieldAdminMeta, type ObjectFieldAdminMeta, OptionItem, PageDefinition, PatchAppliedMessage, PatchBatchMessage, PreviewBanner, PreviewBannerProps, PreviewConfig, PreviewField, PreviewFieldProps, PreviewPatchOp, PreviewProvider, PreviewReadyMessage, PreviewRefreshMessage, PreviewToAdminMessage, ProgressWidgetConfig, QuickActionsWidgetConfig, ReactiveFieldResult, ReactiveFieldState, RecentItemsWidgetConfig, RefreshCompleteMessage, type RelationFieldAdminMeta, ResetPasswordForm, ResetPasswordPage, ResyncRequestMessage, RichTextEditor, RichTextEditorProps, RichTextRenderer, RichTextStyles, ScopeContextValue, ScopeOption, ScopePicker, ScopePickerProps, ScopeProvider, ScopeProviderProps, SelectBlockMessage, type SelectFieldAdminMeta, SetupForm, SetupFormValues, SetupPage, SetupPageProps, SetupStatus, StandalonePreviewField, StatsWidgetConfig, TableWidgetConfig, type TextFieldAdminMeta, type TextareaFieldAdminMeta, type TimeFieldAdminMeta, TimelineWidgetConfig, TipTapDoc, TipTapNode, TypedHooks, type UploadFieldAdminMeta, UseCollectionPreviewOptions, UseCollectionPreviewResult, UseFieldOptionsOptions, UseFieldOptionsResult, UseReactiveFieldsOptions, UseReactiveFieldsResult, ValueWidgetConfig, ViewDefinition, ViewKind, WidgetComponentProps, WidgetConfig, WidgetDefinition, WidgetTypeRegistry, buildValidationSchema, buildZodFromIntrospection, configureField, createAdminAuthClient, createAdminClient, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, page, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, useBrand, useBrandSnapshotRef, useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionPreview, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions, useCurrentUser, useFieldOptions, useFocus, useFocusOptional, useGlobal, useGlobalRevertVersion, useGlobalUpdate, useGlobalVersions, useIsBlockFocused, useIsDesktop, useIsFieldFocused, useIsMobile, useMediaQuery, usePreviewContext, useReactiveFields, useResolveFieldPath, useScope, useScopeSafe, useScopedFetch, useSearchParamToggle, useServerWidgetData, useSetupStatus, useShallow, useSidebarSearchParam, view, widget };
|
|
68
|
+
export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminProviderProps, AdminRouter, AdminRouterProps, AdminShellRailProps, AdminSidebarBrandProps, AdminSidebarNavItemProps, AdminState, AdminStore, AdminToPreviewMessage, type AnyAdminMeta, AnyQuestpieClient, AnyWidgetConfig, AppAdmin, type ArrayFieldAdminMeta, AuthDefaultLogo, AuthGuard, AuthLayout, AuthLayoutProps, AuthLoading, Badge, BadgeProps, type BaseAdminMeta, BaseFieldProps, BaseWidgetAdminMeta, BaseWidgetConfig, BlockCategory, BlockClickedMessage, BlockContent, BlockNode, BlockRenderer, BlockRendererProps as BlockRendererComponentProps, BlockRendererProps$1 as BlockRendererProps, BlockScopeContextValue, BlockScopeProvider, BlockScopeProviderProps, type BooleanFieldAdminMeta, BrandLogoConfig, BrandLogoMark, BrandLogoMarkProps, BrandSnapshot, BrandingConfig, ChartWidgetConfig, CollectionFieldKeys, CollectionFormViewProps, CollectionItem, CollectionListViewProps, CollectionNames, CommitMessage, ComponentRegistry, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, CustomWidgetConfig, DashboardPage, type DateFieldAdminMeta, EMPTY_BLOCK_CONTENT, FieldClickedMessage, FieldComponentProps, FieldDefinition, FieldInstance, FieldValueEditedMessage, FlagConfig, FocusContextValue, FocusFieldMessage, FocusProvider, FocusProviderProps, FocusState, ForgotPasswordForm, ForgotPasswordPage, FormViewConfig, FormViewDefinition, FullResyncMessage, GlobalFormViewProps, GlobalNames, I18nContext, I18nText, IconComponent, IconifyIcon, IconifyIconProps, InferAdminCMS, InitSnapshotMessage, InvitePage, type JsonFieldAdminMeta, ListViewDefinition, LoginForm, LoginPage, MaybeLazyComponent, type NumberFieldAdminMeta, type ObjectFieldAdminMeta, OptionItem, PageDefinition, PatchAppliedMessage, PatchBatchMessage, PreviewBanner, PreviewBannerProps, PreviewConfig, PreviewField, PreviewFieldProps, PreviewPatchOp, PreviewProvider, PreviewReadyMessage, PreviewRefreshMessage, PreviewToAdminMessage, ProgressWidgetConfig, QuickActionsWidgetConfig, ReactiveFieldResult, ReactiveFieldState, RecentItemsWidgetConfig, RefreshCompleteMessage, type RelationFieldAdminMeta, ResetPasswordForm, ResetPasswordPage, ResyncRequestMessage, RichTextEditor, RichTextEditorProps, RichTextRenderer, RichTextStyles, ScopeContextValue, ScopeOption, ScopePicker, ScopePickerProps, ScopeProvider, ScopeProviderProps, SelectBlockMessage, type SelectFieldAdminMeta, SetupForm, SetupFormValues, SetupPage, SetupPageProps, SetupStatus, StandalonePreviewField, StatsWidgetConfig, TableWidgetConfig, type TextFieldAdminMeta, type TextareaFieldAdminMeta, type TimeFieldAdminMeta, TimelineWidgetConfig, TipTapDoc, TipTapNode, TypedHooks, type UploadFieldAdminMeta, UseCollectionPreviewOptions, UseCollectionPreviewResult, UseFieldOptionsOptions, UseFieldOptionsResult, UseReactiveFieldsOptions, UseReactiveFieldsResult, ValueWidgetConfig, ViewDefinition, ViewKind, WidgetComponentProps, WidgetConfig, WidgetDefinition, WidgetTypeRegistry, buildValidationSchema, buildZodFromIntrospection, configureField, createAdminAuthClient, createAdminClient, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, page, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, useBrand, useBrandSnapshotRef, useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionPreview, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions, useCurrentUser, useFieldOptions, useFocus, useFocusOptional, useGlobal, useGlobalRevertVersion, useGlobalUpdate, useGlobalVersions, useIsBlockFocused, useIsDesktop, useIsFieldFocused, useIsMobile, useMediaQuery, usePreviewContext, useReactiveFields, useResolveFieldPath, useScope, useScopeSafe, useScopedFetch, useSearchParamToggle, useServerWidgetData, useSetupStatus, useShallow, useSidebarSearchParam, view, widget };
|
package/dist/index.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { AdminProvider, selectAdmin, selectBasePath, selectClient, selectNavigat
|
|
|
4
4
|
import { useShallow } from "./client/runtime/index.mjs";
|
|
5
5
|
import { Badge, ComponentRenderer, IconifyIcon, createIconRenderer, isComponentReference, resolveIconElement } from "./client/components/component-renderer.mjs";
|
|
6
6
|
import { configureField, field } from "./client/builder/field/field.mjs";
|
|
7
|
-
import { EMPTY_BLOCK_CONTENT, isBlockContent } from "./client/blocks/types.mjs";
|
|
8
7
|
import { getCountryCode, getFlagConfig, getFlagUrl } from "./client/utils/locale-to-flag.mjs";
|
|
8
|
+
import { EMPTY_BLOCK_CONTENT, isBlockContent } from "./client/blocks/types.mjs";
|
|
9
9
|
import { FocusProvider, parsePreviewFieldPath, scrollFieldIntoView, useFocus, useFocusOptional, useIsBlockFocused, useIsFieldFocused } from "./client/contexts/focus-context.mjs";
|
|
10
10
|
import { useIsDesktop, useIsMobile, useMediaQuery } from "./client/hooks/use-media-query.mjs";
|
|
11
11
|
import { buildValidationSchema, buildZodFromIntrospection, createFormSchema } from "./client/builder/validation.mjs";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ExecuteActionRequest, ExecuteActionResponse, actionFunctions, executeAction, executeActionFn, getActionsConfig, getActionsConfigFn } from "../server/modules/admin/routes/execute-action.mjs";
|
|
2
|
+
import { PreviewTokenPayload, createPreviewFunctions, createPreviewTokenVerifier, verifyPreviewTokenDirect } from "../server/modules/admin/routes/preview.mjs";
|
|
3
|
+
import { batchReactive, fieldOptions, reactiveFunctions } from "../server/modules/admin/routes/reactive.mjs";
|
|
4
|
+
import { createFirstAdmin, isSetupRequired, setupFunctions } from "../server/modules/admin/routes/setup.mjs";
|
|
5
|
+
import { fetchWidgetData, widgetDataFunctions } from "../server/modules/admin/routes/widget-data.mjs";
|
|
6
|
+
import { AdminCollections } from "../server/modules/admin/.generated/module.mjs";
|
|
7
|
+
import { FilterOperator, FilterRule, SortConfig, ViewConfiguration } from "../shared/types/saved-views.types.mjs";
|
|
8
|
+
import { savedViewsCollection } from "../server/modules/admin-preferences/collections/saved-views.mjs";
|
|
9
|
+
import { AdminModule, adminModule, adminRoutes } from "../server/modules/admin/index.mjs";
|
|
10
|
+
export { type AdminCollections, type AdminModule, type ExecuteActionRequest, type ExecuteActionResponse, type FilterOperator, type FilterRule, type PreviewTokenPayload, type SortConfig, type ViewConfiguration, actionFunctions, adminModule, adminRoutes, batchReactive, createFirstAdmin, createPreviewFunctions, createPreviewTokenVerifier, executeAction, executeActionFn, fetchWidgetData, fieldOptions, getActionsConfig, getActionsConfigFn, isSetupRequired, reactiveFunctions, savedViewsCollection, setupFunctions, verifyPreviewTokenDirect, widgetDataFunctions };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { savedViewsCollection } from "../server/modules/admin-preferences/collections/saved-views.mjs";
|
|
2
|
+
import { actionFunctions, executeAction, executeActionFn, getActionsConfig, getActionsConfigFn } from "../server/modules/admin/routes/execute-action.mjs";
|
|
3
|
+
import { createPreviewFunctions, createPreviewTokenVerifier, verifyPreviewTokenDirect } from "../server/modules/admin/routes/preview.mjs";
|
|
4
|
+
import { batchReactive, fieldOptions, reactiveFunctions } from "../server/modules/admin/routes/reactive.mjs";
|
|
5
|
+
import { createFirstAdmin, isSetupRequired, setupFunctions } from "../server/modules/admin/routes/setup.mjs";
|
|
6
|
+
import { fetchWidgetData, widgetDataFunctions } from "../server/modules/admin/routes/widget-data.mjs";
|
|
7
|
+
import { adminModule, adminRoutes } from "../server/modules/admin/index.mjs";
|
|
8
|
+
|
|
9
|
+
export { actionFunctions, adminModule, adminRoutes, batchReactive, createFirstAdmin, createPreviewFunctions, createPreviewTokenVerifier, executeAction, executeActionFn, fetchWidgetData, fieldOptions, getActionsConfig, getActionsConfigFn, isSetupRequired, reactiveFunctions, savedViewsCollection, setupFunctions, verifyPreviewTokenDirect, widgetDataFunctions };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AUDIT_LOG_COLLECTION, auditLogCollection } from "../server/modules/audit/collections/audit-log.mjs";
|
|
2
|
+
import { AuditModule, _module } from "../server/modules/audit/.generated/module.mjs";
|
|
3
|
+
import { AuditActorType, AuditContext, LogAuditEntryOptions, logAuditEntry } from "../server/modules/audit/log-audit-entry.mjs";
|
|
4
|
+
import "../server/modules/audit/index.mjs";
|
|
5
|
+
export { AUDIT_LOG_COLLECTION, type AuditActorType, type AuditContext, type AuditModule, type LogAuditEntryOptions, auditLogCollection, _module as auditModule, logAuditEntry };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AUDIT_LOG_COLLECTION, auditLogCollection } from "../server/modules/audit/collections/audit-log.mjs";
|
|
2
|
+
import module_default from "../server/modules/audit/.generated/module.mjs";
|
|
3
|
+
import { logAuditEntry } from "../server/modules/audit/log-audit-entry.mjs";
|
|
4
|
+
|
|
5
|
+
export { AUDIT_LOG_COLLECTION, auditLogCollection, module_default as auditModule, logAuditEntry };
|
|
@@ -72,9 +72,60 @@ interface AdminBlockConfig {
|
|
|
72
72
|
/** Hide from block picker (useful for deprecated blocks) */
|
|
73
73
|
hidden?: boolean;
|
|
74
74
|
}
|
|
75
|
+
interface ListViewLayoutConfig {
|
|
76
|
+
/** Visual density for row rendering. */
|
|
77
|
+
density?: "compact" | "comfortable";
|
|
78
|
+
/** Primary field rendered as the row title. Defaults to collection title. */
|
|
79
|
+
titleField?: string;
|
|
80
|
+
/** Secondary field rendered under the title. */
|
|
81
|
+
subtitleField?: string;
|
|
82
|
+
/** Fields rendered before the title, typically icons/status markers. */
|
|
83
|
+
leadingFields?: string[];
|
|
84
|
+
/** Fields rendered as compact badges near the title. */
|
|
85
|
+
badgeFields?: string[];
|
|
86
|
+
/** Fields rendered as muted right-side metadata. */
|
|
87
|
+
metaFields?: string[];
|
|
88
|
+
}
|
|
89
|
+
type ListViewOutlineLevel = {
|
|
90
|
+
kind: "field";
|
|
91
|
+
field: string;
|
|
92
|
+
labelField?: string;
|
|
93
|
+
order?: "asc" | "desc" | string[];
|
|
94
|
+
} | {
|
|
95
|
+
kind: "relation-field";
|
|
96
|
+
relation: string;
|
|
97
|
+
field?: string;
|
|
98
|
+
labelField?: string;
|
|
99
|
+
order?: "asc" | "desc" | string[];
|
|
100
|
+
} | {
|
|
101
|
+
kind: "edge";
|
|
102
|
+
collection: string;
|
|
103
|
+
parentField: string;
|
|
104
|
+
childField: string;
|
|
105
|
+
where?: Record<string, unknown>;
|
|
106
|
+
groupByEdgeField?: string;
|
|
107
|
+
repeat?: boolean | {
|
|
108
|
+
maxDepth?: number;
|
|
109
|
+
};
|
|
110
|
+
} | {
|
|
111
|
+
kind: "path";
|
|
112
|
+
field: string;
|
|
113
|
+
separator?: string;
|
|
114
|
+
syntheticFolders?: boolean;
|
|
115
|
+
repeat?: boolean | {
|
|
116
|
+
maxDepth?: number;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
interface ListViewOutlineConfig {
|
|
120
|
+
levels: ListViewOutlineLevel[];
|
|
121
|
+
defaultExpanded?: boolean | "roots";
|
|
122
|
+
maxDepth?: number;
|
|
123
|
+
showCounts?: boolean;
|
|
124
|
+
preserveMatchingBranches?: boolean;
|
|
125
|
+
}
|
|
75
126
|
/**
|
|
76
127
|
* List view configuration for a collection.
|
|
77
|
-
* Defines columns, sorting, filtering, and actions.
|
|
128
|
+
* Defines columns, sorting, filtering, outline grouping, and actions.
|
|
78
129
|
*/
|
|
79
130
|
interface ListViewConfig {
|
|
80
131
|
/** View type to use (e.g., "table", "cards") */
|
|
@@ -111,6 +162,10 @@ interface ListViewConfig {
|
|
|
111
162
|
/** Show page-local item counts in group headers */
|
|
112
163
|
showCounts?: boolean;
|
|
113
164
|
};
|
|
165
|
+
/** Dense flex/list renderer layout hints for list-like views. */
|
|
166
|
+
layout?: ListViewLayoutConfig;
|
|
167
|
+
/** Renderer-agnostic multi-level outline/grouping configuration. */
|
|
168
|
+
outline?: ListViewOutlineConfig;
|
|
114
169
|
/** Actions configuration */
|
|
115
170
|
actions?: {
|
|
116
171
|
header?: {
|
|
@@ -375,4 +430,4 @@ interface AdminGlobalConfig {
|
|
|
375
430
|
audit?: boolean;
|
|
376
431
|
}
|
|
377
432
|
//#endregion
|
|
378
|
-
export { AdminBlockConfig, AdminCollectionConfig, AdminGlobalConfig, BlockCategoryConfig, FieldLayoutItem, FormFieldLayoutItem, FormReactiveConfig, FormReactiveContext, FormReactivePropValue, FormSectionLayout, FormSidebarConfig, FormTabConfig, FormTabsLayout, FormViewConfig, ListViewConfig, PreviewConfig };
|
|
433
|
+
export { AdminBlockConfig, AdminCollectionConfig, AdminGlobalConfig, BlockCategoryConfig, FieldLayoutItem, FormFieldLayoutItem, FormReactiveConfig, FormReactiveContext, FormReactivePropValue, FormSectionLayout, FormSidebarConfig, FormTabConfig, FormTabsLayout, FormViewConfig, ListViewConfig, ListViewLayoutConfig, ListViewOutlineConfig, ListViewOutlineLevel, PreviewConfig };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ActionReference, AdminLocaleConfig, ComponentReference, ComponentType, ComponentTypeRegistry } from "./common.mjs";
|
|
2
|
-
import { AdminBlockConfig, AdminCollectionConfig, AdminGlobalConfig, BlockCategoryConfig, FieldLayoutItem, FormFieldLayoutItem, FormReactiveConfig, FormReactiveContext, FormReactivePropValue, FormSectionLayout, FormSidebarConfig, FormTabConfig, FormTabsLayout, FormViewConfig, ListViewConfig, PreviewConfig } from "./form-layout.mjs";
|
|
2
|
+
import { AdminBlockConfig, AdminCollectionConfig, AdminGlobalConfig, BlockCategoryConfig, FieldLayoutItem, FormFieldLayoutItem, FormReactiveConfig, FormReactiveContext, FormReactivePropValue, FormSectionLayout, FormSidebarConfig, FormTabConfig, FormTabsLayout, FormViewConfig, ListViewConfig, ListViewLayoutConfig, ListViewOutlineConfig, ListViewOutlineLevel, PreviewConfig } from "./form-layout.mjs";
|
|
3
3
|
import { AdminConfigContext, ComponentDefinition, ComponentFactory, EditViewDefinition, EditViewFactory, FilterViewsByKind, FormViewConfigContext, ListViewConfigContext, ListViewDefinition, ListViewFactory, ViewDefinition, ViewKind, ViewKindRegistry } from "./views.mjs";
|
|
4
4
|
import { BrandLogo, DashboardActionFactory, DashboardActionProxy, DashboardCallback, DashboardCallbackContext, DashboardConfigContext, DashboardContribution, DashboardItemDef, DashboardProxy, DashboardSectionDef, ServerBrandingConfig, ServerChartWidget, ServerCustomWidget, ServerDashboardAction, ServerDashboardConfig, ServerDashboardItem, ServerDashboardSection, ServerDashboardTab, ServerDashboardTabs, ServerDashboardWidget, ServerProgressWidget, ServerQuickAction, ServerQuickActionsWidget, ServerRecentItemsWidget, ServerStatsWidget, ServerTableWidget, ServerTimelineWidget, ServerValueWidget, WidgetAccessRule, WidgetFetchContext } from "./dashboard.mjs";
|
|
5
5
|
import { ServerSidebarCollectionItem, ServerSidebarConfig, ServerSidebarDividerItem, ServerSidebarGlobalItem, ServerSidebarItem, ServerSidebarLinkItem, ServerSidebarPageItem, ServerSidebarSection, SidebarCallback, SidebarCallbackContext, SidebarConfigContext, SidebarContribution, SidebarItemDef, SidebarProxy, SidebarSectionDef } from "./sidebar.mjs";
|
|
6
|
+
import { AdminShellRailPlacement, AdminShellRouteRules, ServerAdminShellConfig, ServerAdminShellRailConfig } from "./shell.mjs";
|
|
6
7
|
import { ActionsConfigContext, BuiltinActionType, ServerActionContext, ServerActionDefinition, ServerActionDownload, ServerActionEffects, ServerActionError, ServerActionForm, ServerActionFormField, ServerActionFormFieldConfig, ServerActionFormFieldDefinition, ServerActionHandler, ServerActionRedirect, ServerActionResult, ServerActionSuccess, ServerActionsConfig } from "./actions.mjs";
|
|
7
8
|
|
|
8
9
|
//#region src/server/augmentation/index.d.ts
|
|
@@ -28,6 +29,7 @@ import { ActionsConfigContext, BuiltinActionType, ServerActionContext, ServerAct
|
|
|
28
29
|
interface AdminConfigInput {
|
|
29
30
|
sidebar?: SidebarContribution;
|
|
30
31
|
dashboard?: DashboardContribution | ServerDashboardConfig;
|
|
32
|
+
shell?: ServerAdminShellConfig;
|
|
31
33
|
branding?: ServerBrandingConfig;
|
|
32
34
|
locale?: AdminLocaleConfig;
|
|
33
35
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ComponentReference } from "./common.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/server/augmentation/shell.d.ts
|
|
4
|
+
|
|
5
|
+
type AdminShellRailPlacement = "left" | "right";
|
|
6
|
+
interface AdminShellRouteRules {
|
|
7
|
+
/**
|
|
8
|
+
* Route prefixes or exact paths where this region should render.
|
|
9
|
+
* Relative values are resolved against the admin base path.
|
|
10
|
+
* Empty/omitted include means all admin routes.
|
|
11
|
+
*/
|
|
12
|
+
include?: string[];
|
|
13
|
+
/** Route prefixes or exact paths where this region should be hidden. */
|
|
14
|
+
exclude?: string[];
|
|
15
|
+
/** How include/exclude rules are matched. Defaults to "prefix". */
|
|
16
|
+
match?: "prefix" | "exact";
|
|
17
|
+
}
|
|
18
|
+
interface ServerAdminShellRailConfig {
|
|
19
|
+
/** Client component reference rendered inside the shell rail. */
|
|
20
|
+
component: ComponentReference;
|
|
21
|
+
/**
|
|
22
|
+
* Where to place the rail relative to the main content.
|
|
23
|
+
* "left" renders between the primary sidebar and content.
|
|
24
|
+
* @default "left"
|
|
25
|
+
*/
|
|
26
|
+
placement?: AdminShellRailPlacement;
|
|
27
|
+
/** CSS width. Numbers are treated as pixels. */
|
|
28
|
+
width?: number | string;
|
|
29
|
+
/** CSS min-width. Numbers are treated as pixels. */
|
|
30
|
+
minWidth?: number | string;
|
|
31
|
+
/** CSS max-width. Numbers are treated as pixels. */
|
|
32
|
+
maxWidth?: number | string;
|
|
33
|
+
/** Hide the rail below the md breakpoint. Defaults to true. */
|
|
34
|
+
hiddenOnMobile?: boolean;
|
|
35
|
+
/** Optional route rules controlling where this rail appears. */
|
|
36
|
+
routes?: AdminShellRouteRules;
|
|
37
|
+
/** Additional class name for the rail container. */
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
interface ServerAdminShellConfig {
|
|
41
|
+
/**
|
|
42
|
+
* Secondary side region for contextual app UI, such as recent work,
|
|
43
|
+
* conversations, inspectors, or project switchers.
|
|
44
|
+
*/
|
|
45
|
+
secondaryRail?: ServerAdminShellRailConfig;
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { AdminShellRailPlacement, AdminShellRouteRules, ServerAdminShellConfig, ServerAdminShellRailConfig };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ActionReference, AdminLocaleConfig, ComponentReference, ComponentType, ComponentTypeRegistry } from "./augmentation/common.mjs";
|
|
2
|
-
import { AdminBlockConfig, AdminCollectionConfig, AdminGlobalConfig, BlockCategoryConfig, FieldLayoutItem, FormFieldLayoutItem, FormReactiveConfig, FormReactiveContext, FormReactivePropValue, FormSectionLayout, FormSidebarConfig, FormTabConfig, FormTabsLayout, FormViewConfig, ListViewConfig, PreviewConfig } from "./augmentation/form-layout.mjs";
|
|
2
|
+
import { AdminBlockConfig, AdminCollectionConfig, AdminGlobalConfig, BlockCategoryConfig, FieldLayoutItem, FormFieldLayoutItem, FormReactiveConfig, FormReactiveContext, FormReactivePropValue, FormSectionLayout, FormSidebarConfig, FormTabConfig, FormTabsLayout, FormViewConfig, ListViewConfig, ListViewLayoutConfig, ListViewOutlineConfig, ListViewOutlineLevel, PreviewConfig } from "./augmentation/form-layout.mjs";
|
|
3
3
|
import { AdminConfigContext, ComponentDefinition, ComponentFactory, EditViewDefinition, EditViewFactory, FilterViewsByKind, FormViewConfigContext, ListViewConfigContext, ListViewDefinition, ListViewFactory, ViewDefinition, ViewKind, ViewKindRegistry } from "./augmentation/views.mjs";
|
|
4
4
|
import { BrandLogo, DashboardActionFactory, DashboardActionProxy, DashboardCallback, DashboardCallbackContext, DashboardConfigContext, DashboardContribution, DashboardItemDef, DashboardProxy, DashboardSectionDef, ServerBrandingConfig, ServerChartWidget, ServerCustomWidget, ServerDashboardAction, ServerDashboardConfig, ServerDashboardItem, ServerDashboardSection, ServerDashboardTab, ServerDashboardTabs, ServerDashboardWidget, ServerProgressWidget, ServerQuickAction, ServerQuickActionsWidget, ServerRecentItemsWidget, ServerStatsWidget, ServerTableWidget, ServerTimelineWidget, ServerValueWidget, WidgetAccessRule, WidgetFetchContext } from "./augmentation/dashboard.mjs";
|
|
5
5
|
import { ServerSidebarCollectionItem, ServerSidebarConfig, ServerSidebarDividerItem, ServerSidebarGlobalItem, ServerSidebarItem, ServerSidebarLinkItem, ServerSidebarPageItem, ServerSidebarSection, SidebarCallback, SidebarCallbackContext, SidebarConfigContext, SidebarContribution, SidebarItemDef, SidebarProxy, SidebarSectionDef } from "./augmentation/sidebar.mjs";
|
|
6
|
+
import { AdminShellRailPlacement, AdminShellRouteRules, ServerAdminShellConfig, ServerAdminShellRailConfig } from "./augmentation/shell.mjs";
|
|
6
7
|
import { ActionsConfigContext, BuiltinActionType, ServerActionContext, ServerActionDefinition, ServerActionDownload, ServerActionEffects, ServerActionError, ServerActionForm, ServerActionFormField, ServerActionFormFieldConfig, ServerActionFormFieldDefinition, ServerActionHandler, ServerActionRedirect, ServerActionResult, ServerActionSuccess, ServerActionsConfig } from "./augmentation/actions.mjs";
|
|
7
8
|
import { AdminConfigInput, adminConfig } from "./augmentation/index.mjs";
|