@questpie/admin 3.0.2 → 3.0.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 +34 -5
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/blocks/block-renderer.mjs +4 -1
- package/dist/client/builder/types/action-types.d.mts +31 -3
- package/dist/client/builder/types/collection-types.d.mts +140 -0
- package/dist/client/builder/types/ui-config.d.mts +16 -2
- package/dist/client/builder/types/views.d.mts +57 -0
- package/dist/client/builder/types/widget-types.d.mts +5 -0
- package/dist/client/components/actions/action-button.mjs +137 -199
- package/dist/client/components/actions/action-dialog.mjs +198 -156
- package/dist/client/components/actions/confirmation-dialog.mjs +2 -2
- package/dist/client/components/actions/header-actions.mjs +52 -53
- package/dist/client/components/admin-link.d.mts +2 -2
- package/dist/client/components/auth/auth-loading.mjs +41 -18
- package/dist/client/components/blocks/block-fields-renderer.mjs +64 -28
- package/dist/client/components/blocks/block-insert-button.mjs +4 -4
- package/dist/client/components/blocks/block-item.mjs +2 -2
- package/dist/client/components/blocks/block-library-sidebar.mjs +2 -2
- package/dist/client/components/component-renderer.mjs +1 -1
- package/dist/client/components/fields/array-field.mjs +14 -14
- package/dist/client/components/fields/asset-preview-field.mjs +1 -1
- package/dist/client/components/fields/blocks-field/blocks-field.mjs +84 -104
- package/dist/client/components/fields/json-field.mjs +2 -2
- package/dist/client/components/fields/object-array-field.mjs +22 -22
- package/dist/client/components/fields/object-field.mjs +5 -5
- package/dist/client/components/fields/relation/displays/cards-display.mjs +16 -9
- package/dist/client/components/fields/relation/displays/chips-display.mjs +15 -12
- package/dist/client/components/fields/relation/displays/grid-display.mjs +15 -11
- package/dist/client/components/fields/relation/displays/list-display.mjs +33 -20
- package/dist/client/components/fields/relation/displays/table-display.mjs +62 -93
- package/dist/client/components/fields/relation/relation-items-display.mjs +1 -1
- package/dist/client/components/fields/relation-picker.mjs +7 -6
- package/dist/client/components/fields/relation-select.mjs +71 -47
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +392 -82
- package/dist/client/components/fields/rich-text-editor/extensions.mjs +54 -23
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +24 -50
- package/dist/client/components/fields/rich-text-editor/image-upload.mjs +66 -0
- package/dist/client/components/fields/rich-text-editor/index.d.mts +38 -0
- package/dist/client/components/fields/rich-text-editor/index.mjs +637 -376
- package/dist/client/components/fields/rich-text-editor/link-utils.mjs +26 -0
- package/dist/client/components/fields/rich-text-editor/presets.d.mts +10 -0
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +27 -6
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +464 -346
- package/dist/client/components/fields/rich-text-editor/types.d.mts +77 -0
- package/dist/client/components/fields/upload-field.mjs +45 -49
- package/dist/client/components/filter-builder/columns-tab.mjs +69 -62
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +473 -308
- package/dist/client/components/filter-builder/filters-tab.mjs +109 -82
- package/dist/client/components/filter-builder/saved-views-tab.mjs +300 -198
- package/dist/client/components/history-sidebar.mjs +850 -340
- package/dist/client/components/layout/field-layout-renderer.mjs +6 -5
- package/dist/client/components/locale-switcher.mjs +8 -8
- package/dist/client/components/media/media-grid.mjs +12 -9
- package/dist/client/components/media/media-picker-dialog.mjs +242 -230
- package/dist/client/components/preview/live-preview-mode.mjs +1 -1
- package/dist/client/components/primitives/asset-preview.mjs +37 -22
- package/dist/client/components/primitives/date-input.mjs +212 -249
- package/dist/client/components/primitives/dropzone.mjs +192 -159
- package/dist/client/components/primitives/field-select-control.mjs +93 -0
- package/dist/client/components/primitives/select-multi.mjs +251 -230
- package/dist/client/components/primitives/select-single.mjs +345 -290
- package/dist/client/components/primitives/time-input.mjs +2 -2
- package/dist/client/components/sheets/resource-sheet.mjs +2 -0
- package/dist/client/components/ui/accordion.mjs +4 -4
- package/dist/client/components/ui/alert.mjs +3 -3
- package/dist/client/components/ui/badge.mjs +4 -4
- package/dist/client/components/ui/button.mjs +47 -37
- package/dist/client/components/ui/card.mjs +2 -2
- package/dist/client/components/ui/checkbox.mjs +1 -1
- package/dist/client/components/ui/command.mjs +5 -5
- package/dist/client/components/ui/dialog.mjs +3 -3
- package/dist/client/components/ui/drawer.mjs +1 -1
- package/dist/client/components/ui/dropdown-menu.mjs +157 -15
- package/dist/client/components/ui/empty-state.mjs +88 -59
- package/dist/client/components/ui/field.mjs +2 -2
- package/dist/client/components/ui/input-group.mjs +3 -3
- package/dist/client/components/ui/input.mjs +1 -1
- package/dist/client/components/ui/kbd.mjs +1 -1
- package/dist/client/components/ui/label.mjs +1 -1
- package/dist/client/components/ui/popover.mjs +19 -11
- package/dist/client/components/ui/scroll-fade.mjs +170 -0
- package/dist/client/components/ui/search-input.mjs +1 -1
- package/dist/client/components/ui/select.mjs +129 -27
- package/dist/client/components/ui/sheet.mjs +54 -34
- package/dist/client/components/ui/sidebar.mjs +15 -14
- package/dist/client/components/ui/skeleton.mjs +28 -12
- package/dist/client/components/ui/switch.mjs +2 -2
- package/dist/client/components/ui/table.mjs +82 -74
- package/dist/client/components/ui/tabs.mjs +26 -31
- package/dist/client/components/ui/textarea.mjs +1 -1
- package/dist/client/components/ui/tooltip.mjs +1 -1
- package/dist/client/components/widgets/chart-widget.mjs +134 -96
- package/dist/client/components/widgets/progress-widget.mjs +59 -34
- package/dist/client/components/widgets/quick-actions-widget.mjs +184 -113
- package/dist/client/components/widgets/recent-items-widget.mjs +144 -102
- package/dist/client/components/widgets/stats-widget.mjs +91 -72
- package/dist/client/components/widgets/table-widget.mjs +159 -246
- package/dist/client/components/widgets/timeline-widget.mjs +66 -43
- package/dist/client/components/widgets/value-widget.mjs +261 -152
- package/dist/client/components/widgets/widget-empty-state.mjs +88 -0
- package/dist/client/components/widgets/widget-skeletons.mjs +53 -20
- package/dist/client/contexts/focus-context.d.mts +2 -2
- package/dist/client/hooks/use-action.mjs +63 -55
- package/dist/client/hooks/use-audit-history.mjs +1 -65
- package/dist/client/hooks/use-collection-validation.mjs +36 -23
- package/dist/client/hooks/use-collection.mjs +96 -1
- package/dist/client/hooks/use-saved-views.mjs +70 -49
- package/dist/client/hooks/use-server-actions.mjs +59 -40
- package/dist/client/hooks/use-server-validation.mjs +156 -41
- package/dist/client/hooks/use-server-widget-data.mjs +1 -1
- package/dist/client/hooks/use-setup-status.d.mts +3 -3
- package/dist/client/hooks/use-setup-status.mjs +2 -2
- package/dist/client/hooks/use-transition-stage.mjs +2 -10
- package/dist/client/hooks/use-validation-error-map.mjs +31 -13
- package/dist/client/hooks/use-view-state.mjs +238 -174
- package/dist/client/i18n/date-locale.mjs +33 -0
- package/dist/client/i18n/hooks.mjs +17 -1
- package/dist/client/lib/utils.mjs +3 -2
- 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/preview/preview-field.mjs +2 -2
- package/dist/client/runtime/provider.mjs +8 -1
- package/dist/client/runtime/translations-provider.mjs +1 -1
- package/dist/client/scope/picker.d.mts +2 -2
- package/dist/client/scope/provider.d.mts +2 -2
- package/dist/client/styles/base.css +1022 -0
- package/dist/client/styles/index.css +3 -589
- package/dist/client/utils/auto-expand-fields.mjs +4 -2
- package/dist/client/utils/keyboard-shortcuts.mjs +26 -0
- package/dist/client/utils/use-lazy-component.mjs +80 -0
- package/dist/client/views/auth/auth-layout.d.mts +18 -11
- package/dist/client/views/auth/auth-layout.mjs +291 -80
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/forgot-password-form.mjs +2 -2
- package/dist/client/views/auth/login-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.mjs +1 -1
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/reset-password-form.mjs +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- package/dist/client/views/collection/auto-form-fields.mjs +11 -9
- package/dist/client/views/collection/bulk-action-toolbar.mjs +173 -138
- package/dist/client/views/collection/cells/complex-cells.mjs +22 -22
- package/dist/client/views/collection/cells/primitive-cells.mjs +1 -1
- package/dist/client/views/collection/cells/relation-cells.mjs +147 -129
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +224 -278
- package/dist/client/views/collection/cells/shared/relation-chip.mjs +64 -36
- package/dist/client/views/collection/cells/upload-cells.mjs +199 -9
- package/dist/client/views/collection/columns/build-columns.mjs +29 -9
- package/dist/client/views/collection/columns/column-defaults.mjs +2 -2
- package/dist/client/views/collection/field-renderer.mjs +50 -89
- package/dist/client/views/collection/form-view.mjs +237 -227
- package/dist/client/views/collection/table-view.mjs +1162 -229
- package/dist/client/views/collection/view-skeletons.mjs +222 -79
- package/dist/client/views/common/global-search.mjs +29 -18
- package/dist/client/views/dashboard/dashboard-grid.mjs +678 -501
- package/dist/client/views/dashboard/dashboard-widget.mjs +6 -3
- package/dist/client/views/dashboard/widget-card.mjs +23 -14
- package/dist/client/views/globals/global-form-view.mjs +634 -589
- package/dist/client/views/layout/admin-layout-provider.mjs +67 -70
- package/dist/client/views/layout/admin-layout.d.mts +3 -6
- package/dist/client/views/layout/admin-layout.mjs +149 -172
- package/dist/client/views/layout/admin-router.mjs +747 -544
- package/dist/client/views/layout/admin-sidebar.d.mts +38 -1
- package/dist/client/views/layout/admin-sidebar.mjs +751 -591
- package/dist/client/views/layout/admin-theme.d.mts +10 -0
- package/dist/client/views/layout/admin-theme.mjs +84 -0
- package/dist/client/views/layout/admin-view-layout.mjs +161 -0
- package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
- package/dist/client/views/pages/accept-invite-page.mjs +49 -26
- 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/forgot-password-page.mjs +2 -19
- package/dist/client/views/pages/invite-page.d.mts +2 -2
- package/dist/client/views/pages/invite-page.mjs +2 -19
- package/dist/client/views/pages/login-page.d.mts +3 -3
- package/dist/client/views/pages/login-page.mjs +4 -21
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.mjs +3 -20
- package/dist/client/views/pages/setup-page.d.mts +2 -2
- package/dist/client/views/pages/setup-page.mjs +3 -20
- package/dist/client.d.mts +6 -2
- package/dist/client.mjs +2 -1
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +2 -1
- package/dist/server/augmentation/dashboard.d.mts +67 -3
- package/dist/server/augmentation/form-layout.d.mts +21 -0
- package/dist/server/augmentation/index.d.mts +1 -1
- package/dist/server/codegen/admin-client-template.mjs +4 -0
- package/dist/server/fields/blocks.d.mts +1 -1
- package/dist/server/fields/blocks.mjs +12 -0
- package/dist/server/fields/rich-text.d.mts +1 -1
- package/dist/server/fields/rich-text.mjs +8 -0
- package/dist/server/i18n/index.mjs +17 -1
- package/dist/server/i18n/messages/cs.mjs +23 -0
- package/dist/server/i18n/messages/de.mjs +23 -0
- package/dist/server/i18n/messages/en.mjs +64 -1
- package/dist/server/i18n/messages/es.mjs +23 -0
- package/dist/server/i18n/messages/fr.mjs +23 -0
- package/dist/server/i18n/messages/pl.mjs +23 -0
- package/dist/server/i18n/messages/pt.mjs +23 -0
- package/dist/server/i18n/messages/sk.mjs +83 -1
- package/dist/server/modules/admin/block/introspection.mjs +4 -1
- package/dist/server/modules/admin/block/prefetch.mjs +12 -2
- 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 +64 -64
- package/dist/server/modules/admin/collections/assets.d.mts +20 -20
- package/dist/server/modules/admin/collections/assets.mjs +0 -1
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +40 -28
- package/dist/server/modules/admin/collections/user.mjs +40 -9
- package/dist/server/modules/admin/collections/verification.d.mts +36 -36
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +2 -0
- package/dist/server/modules/admin/factories.mjs +7 -18
- package/dist/server/modules/admin/index.d.mts +1 -1
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/admin-config.mjs +34 -16
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +33 -0
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/setup.d.mts +10 -10
- package/dist/server/modules/admin/routes/setup.mjs +7 -7
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/translations.mjs +5 -1
- package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
- package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +1 -1
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +25 -25
- package/dist/server/modules/audit/.generated/module.d.mts +7 -7
- package/dist/server/modules/audit/.generated/module.mjs +1 -1
- package/dist/server/modules/audit/collections/audit-log.d.mts +39 -39
- package/dist/server/modules/audit/collections/audit-log.mjs +1 -1
- package/dist/server/modules/audit/config/app.mjs +99 -42
- package/dist/server/modules/audit/jobs/audit-cleanup.mjs +1 -1
- package/dist/server/plugin.mjs +4 -2
- package/dist/server/proxy-factories.d.mts +4 -3
- package/dist/server/proxy-factories.mjs +34 -8
- package/dist/shared/types/saved-views.types.d.mts +2 -0
- package/package.json +6 -4
- package/dist/client/components/fields/rich-text-editor/link-popover.mjs +0 -85
- package/dist/client/components/ui/spinner.mjs +0 -52
- package/dist/client/components/ui/toolbar.mjs +0 -136
- package/dist/client/contexts/breadcrumb-context.mjs +0 -60
- package/dist/client/views/layout/admin-topbar.mjs +0 -236
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { selectBasePath, selectBrandName, selectClient, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
|
|
2
|
-
import { AuthLayout } from "../auth/auth-layout.mjs";
|
|
2
|
+
import { AuthDefaultLogo, AuthLayout } from "../auth/auth-layout.mjs";
|
|
3
3
|
import { SetupForm } from "../auth/setup-form.mjs";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import * as React from "react";
|
|
@@ -81,7 +81,7 @@ function SetupPage(t0) {
|
|
|
81
81
|
const handleLoginClick = t5;
|
|
82
82
|
let t6;
|
|
83
83
|
if ($[9] !== brandName || $[10] !== logo) {
|
|
84
|
-
t6 = logo ?? /* @__PURE__ */ jsx(
|
|
84
|
+
t6 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName });
|
|
85
85
|
$[9] = brandName;
|
|
86
86
|
$[10] = logo;
|
|
87
87
|
$[11] = t6;
|
|
@@ -96,7 +96,7 @@ function SetupPage(t0) {
|
|
|
96
96
|
/* @__PURE__ */ jsx("button", {
|
|
97
97
|
type: "button",
|
|
98
98
|
onClick: handleLoginClick,
|
|
99
|
-
className: "text-
|
|
99
|
+
className: "text-foreground underline-offset-4 hover:underline",
|
|
100
100
|
children: "Sign in"
|
|
101
101
|
})
|
|
102
102
|
]
|
|
@@ -134,23 +134,6 @@ function SetupPage(t0) {
|
|
|
134
134
|
} else t9 = $[23];
|
|
135
135
|
return t9;
|
|
136
136
|
}
|
|
137
|
-
function DefaultLogo(t0) {
|
|
138
|
-
const $ = c(2);
|
|
139
|
-
const { brandName } = t0;
|
|
140
|
-
let t1;
|
|
141
|
-
if ($[0] !== brandName) {
|
|
142
|
-
t1 = /* @__PURE__ */ jsx("div", {
|
|
143
|
-
className: "text-center",
|
|
144
|
-
children: /* @__PURE__ */ jsx("h1", {
|
|
145
|
-
className: "text-xl font-bold",
|
|
146
|
-
children: brandName
|
|
147
|
-
})
|
|
148
|
-
});
|
|
149
|
-
$[0] = brandName;
|
|
150
|
-
$[1] = t1;
|
|
151
|
-
} else t1 = $[1];
|
|
152
|
-
return t1;
|
|
153
|
-
}
|
|
154
137
|
|
|
155
138
|
//#endregion
|
|
156
139
|
export { SetupPage };
|
package/dist/client.d.mts
CHANGED
|
@@ -11,6 +11,7 @@ import { createAdminAuthClient, useAuthClient } from "./client/hooks/use-auth.mj
|
|
|
11
11
|
import { ComponentRegistry, FieldComponentProps, FormViewConfig } from "./client/builder/types/field-types.mjs";
|
|
12
12
|
import { AdminProvider, AdminProviderProps, AdminState, AdminStore, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore } from "./client/runtime/provider.mjs";
|
|
13
13
|
import { useShallow } from "./client/runtime/index.mjs";
|
|
14
|
+
import { AdminSidebarBrandProps, AdminSidebarNavItemProps } from "./client/views/layout/admin-sidebar.mjs";
|
|
14
15
|
import { AdminLayout } from "./client/views/layout/admin-layout.mjs";
|
|
15
16
|
import { AdminLayoutProvider } from "./client/views/layout/admin-layout-provider.mjs";
|
|
16
17
|
import { AdminRouter, AdminRouterProps } from "./client/views/layout/admin-router.mjs";
|
|
@@ -19,6 +20,8 @@ import { BlockRenderer, BlockRendererProps } from "./client/blocks/block-rendere
|
|
|
19
20
|
import "./client/blocks/index.mjs";
|
|
20
21
|
import { RichTextRenderer, RichTextStyles, TipTapDoc, TipTapNode } from "./components/rich-text/rich-text-renderer.mjs";
|
|
21
22
|
import "./components/rich-text/index.mjs";
|
|
23
|
+
import { RichTextEditorProps } from "./client/components/fields/rich-text-editor/types.mjs";
|
|
24
|
+
import { RichTextEditor } from "./client/components/fields/rich-text-editor/index.mjs";
|
|
22
25
|
import { BlockScopeContextValue, BlockScopeProvider, BlockScopeProviderProps, useBlockScope, useResolveFieldPath } from "./client/preview/block-scope-context.mjs";
|
|
23
26
|
import { PreviewBanner, PreviewBannerProps } from "./client/preview/preview-banner.mjs";
|
|
24
27
|
import { PreviewField, PreviewFieldProps, PreviewProvider, StandalonePreviewField, usePreviewContext } from "./client/preview/preview-field.mjs";
|
|
@@ -29,7 +32,7 @@ import { AuthGuard } from "./client/components/auth/auth-guard.mjs";
|
|
|
29
32
|
import { AuthLoading } from "./client/components/auth/auth-loading.mjs";
|
|
30
33
|
import { Badge, BadgeProps, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, IconifyIcon, IconifyIconProps, createIconRenderer, isComponentReference, resolveIconElement } from "./client/components/component-renderer.mjs";
|
|
31
34
|
import { AcceptInviteForm } from "./client/views/auth/accept-invite-form.mjs";
|
|
32
|
-
import { AuthLayout } from "./client/views/auth/auth-layout.mjs";
|
|
35
|
+
import { AuthLayout, AuthLayoutProps } from "./client/views/auth/auth-layout.mjs";
|
|
33
36
|
import { ForgotPasswordForm } from "./client/views/auth/forgot-password-form.mjs";
|
|
34
37
|
import { LoginForm } from "./client/views/auth/login-form.mjs";
|
|
35
38
|
import { ResetPasswordForm } from "./client/views/auth/reset-password-form.mjs";
|
|
@@ -53,6 +56,7 @@ import { SetupStatus, useSetupStatus } from "./client/hooks/use-setup-status.mjs
|
|
|
53
56
|
import { useSidebarSearchParam } from "./client/hooks/use-sidebar-search-param.mjs";
|
|
54
57
|
import { AdminLink } from "./client/components/admin-link.mjs";
|
|
55
58
|
import { FlagConfig, getCountryCode, getFlagConfig, getFlagUrl } from "./client/utils/locale-to-flag.mjs";
|
|
59
|
+
import { CollectionFormViewProps, CollectionListViewProps, GlobalFormViewProps } from "./client/builder/types/views.mjs";
|
|
56
60
|
import { buildValidationSchema, buildZodFromIntrospection, createFormSchema } from "./client/builder/validation.mjs";
|
|
57
61
|
import { FocusContextValue, FocusProvider, FocusProviderProps, FocusState, parsePreviewFieldPath, scrollFieldIntoView, useFocus, useFocusOptional, useIsBlockFocused, useIsFieldFocused } from "./client/contexts/focus-context.mjs";
|
|
58
62
|
import { ScopeContextValue, ScopeOption, ScopePickerProps, ScopeProviderProps } from "./client/scope/types.mjs";
|
|
@@ -96,4 +100,4 @@ type CollectionFieldKeys<TApp extends QuestpieApp, TCollectionName extends strin
|
|
|
96
100
|
select: infer TSelect;
|
|
97
101
|
} ? keyof TSelect : never : never : never;
|
|
98
102
|
//#endregion
|
|
99
|
-
export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, type AdminProviderProps, AdminRouter, type AdminRouterProps, type AdminState, type AdminStore, type AdminToPreviewMessage, AnyQuestpieClient, type AnyWidgetConfig, type AppAdmin, AuthGuard, AuthLayout, 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 ChartWidgetConfig, CollectionFieldKeys, CollectionItem, CollectionNames, type ComponentRegistry, ComponentRenderer, type ComponentRendererProps, type ComponentRendererRegistry, type CustomWidgetConfig, DashboardPage, EMPTY_BLOCK_CONTENT, type FieldClickedMessage, type FieldComponentProps, type FieldDefinition, type FieldInstance, type FlagConfig, type FocusContextValue, type FocusFieldMessage, FocusProvider, type FocusProviderProps, type FocusState, ForgotPasswordForm, ForgotPasswordPage, type FormViewConfig, type FormViewDefinition, GlobalNames, type I18nContext, type I18nText, type IconComponent, IconifyIcon, type IconifyIconProps, type InferAdminCMS, InvitePage, type ListViewDefinition, LoginForm, LoginPage, type MaybeLazyComponent, type OptionItem, PreviewBanner, type PreviewBannerProps, type PreviewConfig, PreviewField, type PreviewFieldProps, PreviewProvider, type PreviewReadyMessage, type PreviewRefreshMessage, type PreviewToAdminMessage, type ProgressWidgetConfig, type QuickActionsWidgetConfig, type ReactiveFieldResult, type ReactiveFieldState, type RecentItemsWidgetConfig, type RefreshCompleteMessage, ResetPasswordForm, ResetPasswordPage, 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, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, 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 };
|
|
103
|
+
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, 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 ChartWidgetConfig, CollectionFieldKeys, type CollectionFormViewProps, CollectionItem, type CollectionListViewProps, CollectionNames, type ComponentRegistry, ComponentRenderer, type ComponentRendererProps, type ComponentRendererRegistry, type CustomWidgetConfig, DashboardPage, EMPTY_BLOCK_CONTENT, type FieldClickedMessage, type FieldComponentProps, type FieldDefinition, type FieldInstance, type FlagConfig, type FocusContextValue, type FocusFieldMessage, FocusProvider, type FocusProviderProps, type FocusState, ForgotPasswordForm, ForgotPasswordPage, type FormViewConfig, type FormViewDefinition, type GlobalFormViewProps, GlobalNames, type I18nContext, type I18nText, type IconComponent, IconifyIcon, type IconifyIconProps, type InferAdminCMS, InvitePage, type ListViewDefinition, LoginForm, LoginPage, type MaybeLazyComponent, type OptionItem, PreviewBanner, type PreviewBannerProps, type PreviewConfig, PreviewField, type PreviewFieldProps, PreviewProvider, type PreviewReadyMessage, type PreviewRefreshMessage, type PreviewToAdminMessage, type ProgressWidgetConfig, type QuickActionsWidgetConfig, type ReactiveFieldResult, type ReactiveFieldState, type RecentItemsWidgetConfig, type RefreshCompleteMessage, ResetPasswordForm, ResetPasswordPage, 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, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, 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
|
@@ -28,6 +28,7 @@ import { AdminRouter } from "./client/views/layout/admin-router.mjs";
|
|
|
28
28
|
import { BlockScopeProvider, useBlockScope, useResolveFieldPath } from "./client/preview/block-scope-context.mjs";
|
|
29
29
|
import { BlockRenderer } from "./client/blocks/block-renderer.mjs";
|
|
30
30
|
import { RichTextRenderer } from "./components/rich-text/rich-text-renderer.mjs";
|
|
31
|
+
import { RichTextEditor } from "./client/components/fields/rich-text-editor/index.mjs";
|
|
31
32
|
import { PreviewBanner } from "./client/preview/preview-banner.mjs";
|
|
32
33
|
import { PreviewField, PreviewProvider, StandalonePreviewField, usePreviewContext } from "./client/preview/preview-field.mjs";
|
|
33
34
|
import { useCollectionPreview } from "./client/preview/use-collection-preview.mjs";
|
|
@@ -50,4 +51,4 @@ import { useServerWidgetData } from "./client/hooks/use-server-widget-data.mjs";
|
|
|
50
51
|
import { ScopeProvider, createScopedFetch, useScope, useScopeSafe, useScopedFetch } from "./client/scope/provider.mjs";
|
|
51
52
|
import { ScopePicker } from "./client/scope/picker.mjs";
|
|
52
53
|
|
|
53
|
-
export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminRouter, AuthGuard, AuthLayout, AuthLoading, Badge, BlockRenderer, BlockScopeProvider, ComponentRenderer, DashboardPage, EMPTY_BLOCK_CONTENT, FocusProvider, ForgotPasswordForm, ForgotPasswordPage, IconifyIcon, InvitePage, LoginForm, LoginPage, PreviewBanner, PreviewField, PreviewProvider, ResetPasswordForm, ResetPasswordPage, RichTextRenderer, ScopePicker, ScopeProvider, SetupForm, SetupPage, StandalonePreviewField, buildValidationSchema, buildZodFromIntrospection, configureField, createAdminAuthClient, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, 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 };
|
|
54
|
+
export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminRouter, AuthGuard, AuthLayout, AuthLoading, Badge, BlockRenderer, BlockScopeProvider, ComponentRenderer, DashboardPage, EMPTY_BLOCK_CONTENT, FocusProvider, ForgotPasswordForm, ForgotPasswordPage, IconifyIcon, InvitePage, LoginForm, LoginPage, PreviewBanner, PreviewField, PreviewProvider, ResetPasswordForm, ResetPasswordPage, RichTextEditor, RichTextRenderer, ScopePicker, ScopeProvider, SetupForm, SetupPage, StandalonePreviewField, buildValidationSchema, buildZodFromIntrospection, configureField, createAdminAuthClient, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, 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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime20 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_runtime20.JSX.Element | null;
|
|
102
102
|
//#endregion
|
|
103
103
|
export { RichTextRenderer, RichTextStyles, TipTapDoc, TipTapNode };
|
package/dist/index.d.mts
CHANGED
|
@@ -11,12 +11,15 @@ import { createAdminAuthClient, useAuthClient } from "./client/hooks/use-auth.mj
|
|
|
11
11
|
import { ComponentRegistry, FieldComponentProps, FormViewConfig } from "./client/builder/types/field-types.mjs";
|
|
12
12
|
import { AdminProvider, AdminProviderProps, AdminState, AdminStore, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore } from "./client/runtime/provider.mjs";
|
|
13
13
|
import { useShallow } from "./client/runtime/index.mjs";
|
|
14
|
+
import { AdminSidebarBrandProps, AdminSidebarNavItemProps } from "./client/views/layout/admin-sidebar.mjs";
|
|
14
15
|
import { AdminLayout } from "./client/views/layout/admin-layout.mjs";
|
|
15
16
|
import { AdminLayoutProvider } from "./client/views/layout/admin-layout-provider.mjs";
|
|
16
17
|
import { AdminRouter, AdminRouterProps } from "./client/views/layout/admin-router.mjs";
|
|
17
18
|
import { BlockCategory, BlockContent, BlockNode, BlockRendererProps as BlockRendererProps$1, EMPTY_BLOCK_CONTENT, isBlockContent } from "./client/blocks/types.mjs";
|
|
18
19
|
import { BlockRenderer, BlockRendererProps } from "./client/blocks/block-renderer.mjs";
|
|
19
20
|
import { RichTextRenderer, RichTextStyles, TipTapDoc, TipTapNode } from "./components/rich-text/rich-text-renderer.mjs";
|
|
21
|
+
import { RichTextEditorProps } from "./client/components/fields/rich-text-editor/types.mjs";
|
|
22
|
+
import { RichTextEditor } from "./client/components/fields/rich-text-editor/index.mjs";
|
|
20
23
|
import { BlockScopeContextValue, BlockScopeProvider, BlockScopeProviderProps, useBlockScope, useResolveFieldPath } from "./client/preview/block-scope-context.mjs";
|
|
21
24
|
import { PreviewBanner, PreviewBannerProps } from "./client/preview/preview-banner.mjs";
|
|
22
25
|
import { PreviewField, PreviewFieldProps, PreviewProvider, StandalonePreviewField, usePreviewContext } from "./client/preview/preview-field.mjs";
|
|
@@ -26,7 +29,7 @@ import { AuthGuard } from "./client/components/auth/auth-guard.mjs";
|
|
|
26
29
|
import { AuthLoading } from "./client/components/auth/auth-loading.mjs";
|
|
27
30
|
import { Badge, BadgeProps, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, IconifyIcon, IconifyIconProps, createIconRenderer, isComponentReference, resolveIconElement } from "./client/components/component-renderer.mjs";
|
|
28
31
|
import { AcceptInviteForm } from "./client/views/auth/accept-invite-form.mjs";
|
|
29
|
-
import { AuthLayout } from "./client/views/auth/auth-layout.mjs";
|
|
32
|
+
import { AuthLayout, AuthLayoutProps } from "./client/views/auth/auth-layout.mjs";
|
|
30
33
|
import { ForgotPasswordForm } from "./client/views/auth/forgot-password-form.mjs";
|
|
31
34
|
import { LoginForm } from "./client/views/auth/login-form.mjs";
|
|
32
35
|
import { ResetPasswordForm } from "./client/views/auth/reset-password-form.mjs";
|
|
@@ -50,10 +53,11 @@ import { SetupStatus, useSetupStatus } from "./client/hooks/use-setup-status.mjs
|
|
|
50
53
|
import { useSidebarSearchParam } from "./client/hooks/use-sidebar-search-param.mjs";
|
|
51
54
|
import { AdminLink } from "./client/components/admin-link.mjs";
|
|
52
55
|
import { FlagConfig, getCountryCode, getFlagConfig, getFlagUrl } from "./client/utils/locale-to-flag.mjs";
|
|
56
|
+
import { CollectionFormViewProps, CollectionListViewProps, GlobalFormViewProps } from "./client/builder/types/views.mjs";
|
|
53
57
|
import { buildValidationSchema, buildZodFromIntrospection, createFormSchema } from "./client/builder/validation.mjs";
|
|
54
58
|
import { FocusContextValue, FocusProvider, FocusProviderProps, FocusState, parsePreviewFieldPath, scrollFieldIntoView, useFocus, useFocusOptional, useIsBlockFocused, useIsFieldFocused } from "./client/contexts/focus-context.mjs";
|
|
55
59
|
import { ScopeContextValue, ScopeOption, ScopePickerProps, ScopeProviderProps } from "./client/scope/types.mjs";
|
|
56
60
|
import { ScopePicker } from "./client/scope/picker.mjs";
|
|
57
61
|
import { ScopeProvider, createScopedFetch, useScope, useScopeSafe, useScopedFetch } from "./client/scope/provider.mjs";
|
|
58
62
|
import { AnyQuestpieClient, CollectionFieldKeys, CollectionItem, CollectionNames, GlobalNames } from "./client.mjs";
|
|
59
|
-
export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminProviderProps, AdminRouter, AdminRouterProps, AdminState, AdminStore, AdminToPreviewMessage, type AnyAdminMeta, AnyQuestpieClient, AnyWidgetConfig, AppAdmin, type ArrayFieldAdminMeta, AuthGuard, AuthLayout, 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, ChartWidgetConfig, CollectionFieldKeys, CollectionItem, CollectionNames, ComponentRegistry, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, CustomWidgetConfig, DashboardPage, type DateFieldAdminMeta, EMPTY_BLOCK_CONTENT, FieldClickedMessage, FieldComponentProps, FieldDefinition, FieldInstance, FlagConfig, FocusContextValue, FocusFieldMessage, FocusProvider, FocusProviderProps, FocusState, ForgotPasswordForm, ForgotPasswordPage, FormViewConfig, FormViewDefinition, GlobalNames, I18nContext, I18nText, IconComponent, IconifyIcon, IconifyIconProps, InferAdminCMS, InvitePage, type JsonFieldAdminMeta, ListViewDefinition, LoginForm, LoginPage, MaybeLazyComponent, type NumberFieldAdminMeta, type ObjectFieldAdminMeta, OptionItem, PreviewBanner, PreviewBannerProps, PreviewConfig, PreviewField, PreviewFieldProps, PreviewProvider, PreviewReadyMessage, PreviewRefreshMessage, PreviewToAdminMessage, ProgressWidgetConfig, QuickActionsWidgetConfig, ReactiveFieldResult, ReactiveFieldState, RecentItemsWidgetConfig, RefreshCompleteMessage, type RelationFieldAdminMeta, ResetPasswordForm, ResetPasswordPage, 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, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, 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 };
|
|
63
|
+
export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminProviderProps, AdminRouter, AdminRouterProps, AdminSidebarBrandProps, AdminSidebarNavItemProps, AdminState, AdminStore, AdminToPreviewMessage, type AnyAdminMeta, AnyQuestpieClient, AnyWidgetConfig, AppAdmin, type ArrayFieldAdminMeta, 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, ChartWidgetConfig, CollectionFieldKeys, CollectionFormViewProps, CollectionItem, CollectionListViewProps, CollectionNames, ComponentRegistry, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, CustomWidgetConfig, DashboardPage, type DateFieldAdminMeta, EMPTY_BLOCK_CONTENT, FieldClickedMessage, FieldComponentProps, FieldDefinition, FieldInstance, FlagConfig, FocusContextValue, FocusFieldMessage, FocusProvider, FocusProviderProps, FocusState, ForgotPasswordForm, ForgotPasswordPage, FormViewConfig, FormViewDefinition, GlobalFormViewProps, GlobalNames, I18nContext, I18nText, IconComponent, IconifyIcon, IconifyIconProps, InferAdminCMS, InvitePage, type JsonFieldAdminMeta, ListViewDefinition, LoginForm, LoginPage, MaybeLazyComponent, type NumberFieldAdminMeta, type ObjectFieldAdminMeta, OptionItem, PreviewBanner, PreviewBannerProps, PreviewConfig, PreviewField, PreviewFieldProps, PreviewProvider, PreviewReadyMessage, PreviewRefreshMessage, PreviewToAdminMessage, ProgressWidgetConfig, QuickActionsWidgetConfig, ReactiveFieldResult, ReactiveFieldState, RecentItemsWidgetConfig, RefreshCompleteMessage, type RelationFieldAdminMeta, ResetPasswordForm, ResetPasswordPage, 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, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, 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
|
@@ -28,6 +28,7 @@ import { AdminRouter } from "./client/views/layout/admin-router.mjs";
|
|
|
28
28
|
import { BlockScopeProvider, useBlockScope, useResolveFieldPath } from "./client/preview/block-scope-context.mjs";
|
|
29
29
|
import { BlockRenderer } from "./client/blocks/block-renderer.mjs";
|
|
30
30
|
import { RichTextRenderer } from "./components/rich-text/rich-text-renderer.mjs";
|
|
31
|
+
import { RichTextEditor } from "./client/components/fields/rich-text-editor/index.mjs";
|
|
31
32
|
import { PreviewBanner } from "./client/preview/preview-banner.mjs";
|
|
32
33
|
import { PreviewField, PreviewProvider, StandalonePreviewField, usePreviewContext } from "./client/preview/preview-field.mjs";
|
|
33
34
|
import { useCollectionPreview } from "./client/preview/use-collection-preview.mjs";
|
|
@@ -50,4 +51,4 @@ import { useServerWidgetData } from "./client/hooks/use-server-widget-data.mjs";
|
|
|
50
51
|
import { ScopeProvider, createScopedFetch, useScope, useScopeSafe, useScopedFetch } from "./client/scope/provider.mjs";
|
|
51
52
|
import { ScopePicker } from "./client/scope/picker.mjs";
|
|
52
53
|
|
|
53
|
-
export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminRouter, AuthGuard, AuthLayout, AuthLoading, Badge, BlockRenderer, BlockScopeProvider, ComponentRenderer, DashboardPage, EMPTY_BLOCK_CONTENT, FocusProvider, ForgotPasswordForm, ForgotPasswordPage, IconifyIcon, InvitePage, LoginForm, LoginPage, PreviewBanner, PreviewField, PreviewProvider, ResetPasswordForm, ResetPasswordPage, RichTextRenderer, ScopePicker, ScopeProvider, SetupForm, SetupPage, StandalonePreviewField, buildValidationSchema, buildZodFromIntrospection, configureField, createAdminAuthClient, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, 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 };
|
|
54
|
+
export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminRouter, AuthGuard, AuthLayout, AuthLoading, Badge, BlockRenderer, BlockScopeProvider, ComponentRenderer, DashboardPage, EMPTY_BLOCK_CONTENT, FocusProvider, ForgotPasswordForm, ForgotPasswordPage, IconifyIcon, InvitePage, LoginForm, LoginPage, PreviewBanner, PreviewField, PreviewProvider, ResetPasswordForm, ResetPasswordPage, RichTextEditor, RichTextRenderer, ScopePicker, ScopeProvider, SetupForm, SetupPage, StandalonePreviewField, buildValidationSchema, buildZodFromIntrospection, configureField, createAdminAuthClient, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, 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 };
|
|
@@ -46,6 +46,8 @@ interface ServerStatsWidget {
|
|
|
46
46
|
filter?: Record<string, unknown>;
|
|
47
47
|
/** Grid span (1-4) */
|
|
48
48
|
span?: number;
|
|
49
|
+
/** Grid row span. span=2 + rowSpan=2 renders as a 2x2 tile. */
|
|
50
|
+
rowSpan?: number;
|
|
49
51
|
/** Optional server-side data loader (overrides collection count) */
|
|
50
52
|
loader?: (ctx: WidgetFetchContext) => Promise<{
|
|
51
53
|
count: number;
|
|
@@ -76,6 +78,8 @@ interface ServerChartWidget {
|
|
|
76
78
|
filter?: Record<string, unknown>;
|
|
77
79
|
/** Grid span (1-4) */
|
|
78
80
|
span?: number;
|
|
81
|
+
/** Grid row span. */
|
|
82
|
+
rowSpan?: number;
|
|
79
83
|
/** Optional server-side data loader (overrides collection query) */
|
|
80
84
|
loader?: (ctx: WidgetFetchContext) => Promise<Array<{
|
|
81
85
|
name: string;
|
|
@@ -103,6 +107,8 @@ interface ServerRecentItemsWidget {
|
|
|
103
107
|
filter?: Record<string, unknown>;
|
|
104
108
|
/** Grid span (1-4) */
|
|
105
109
|
span?: number;
|
|
110
|
+
/** Grid row span. */
|
|
111
|
+
rowSpan?: number;
|
|
106
112
|
/** Optional server-side data loader */
|
|
107
113
|
loader?: (ctx: WidgetFetchContext) => Promise<unknown>;
|
|
108
114
|
/** Per-widget access rule */
|
|
@@ -119,8 +125,12 @@ interface ServerQuickActionsWidget {
|
|
|
119
125
|
label?: I18nText;
|
|
120
126
|
/** Actions to display */
|
|
121
127
|
actions: ServerQuickAction[];
|
|
128
|
+
/** Layout variant */
|
|
129
|
+
layout?: "grid" | "list";
|
|
122
130
|
/** Grid span (1-4) */
|
|
123
131
|
span?: number;
|
|
132
|
+
/** Grid row span. */
|
|
133
|
+
rowSpan?: number;
|
|
124
134
|
/** Per-widget access rule */
|
|
125
135
|
access?: WidgetAccessRule;
|
|
126
136
|
}
|
|
@@ -132,6 +142,8 @@ interface ServerQuickAction {
|
|
|
132
142
|
label: I18nText;
|
|
133
143
|
/** Action icon */
|
|
134
144
|
icon?: ComponentReference;
|
|
145
|
+
/** Visual variant */
|
|
146
|
+
variant?: "default" | "primary" | "secondary" | "outline";
|
|
135
147
|
/** Action to perform */
|
|
136
148
|
action: {
|
|
137
149
|
type: "create";
|
|
@@ -160,6 +172,8 @@ interface ServerCustomWidget {
|
|
|
160
172
|
props?: Record<string, unknown>;
|
|
161
173
|
/** Grid span (1-4) */
|
|
162
174
|
span?: number;
|
|
175
|
+
/** Grid row span. */
|
|
176
|
+
rowSpan?: number;
|
|
163
177
|
/** Optional server-side data loader */
|
|
164
178
|
loader?: (ctx: WidgetFetchContext) => Promise<unknown>;
|
|
165
179
|
/** Per-widget access rule */
|
|
@@ -176,8 +190,12 @@ interface ServerValueWidget {
|
|
|
176
190
|
label?: I18nText;
|
|
177
191
|
/** Icon reference */
|
|
178
192
|
icon?: ComponentReference;
|
|
193
|
+
/** Card visual variant */
|
|
194
|
+
cardVariant?: "default" | "compact" | "featured";
|
|
179
195
|
/** Grid span (1-4) */
|
|
180
196
|
span?: number;
|
|
197
|
+
/** Grid row span. */
|
|
198
|
+
rowSpan?: number;
|
|
181
199
|
/** Auto-refresh interval in milliseconds */
|
|
182
200
|
refreshInterval?: number;
|
|
183
201
|
/** Server-side data loader (required) */
|
|
@@ -223,6 +241,8 @@ interface ServerTableWidget {
|
|
|
223
241
|
filter?: Record<string, unknown>;
|
|
224
242
|
/** Grid span (1-4) */
|
|
225
243
|
span?: number;
|
|
244
|
+
/** Grid row span. */
|
|
245
|
+
rowSpan?: number;
|
|
226
246
|
/** Optional server-side data loader */
|
|
227
247
|
loader?: (ctx: WidgetFetchContext) => Promise<unknown>;
|
|
228
248
|
/** Per-widget access rule */
|
|
@@ -247,6 +267,8 @@ interface ServerTimelineWidget {
|
|
|
247
267
|
emptyMessage?: I18nText;
|
|
248
268
|
/** Grid span (1-4) */
|
|
249
269
|
span?: number;
|
|
270
|
+
/** Grid row span. */
|
|
271
|
+
rowSpan?: number;
|
|
250
272
|
/** Server-side data loader (required) */
|
|
251
273
|
loader: (ctx: WidgetFetchContext) => Promise<Array<{
|
|
252
274
|
id: string;
|
|
@@ -275,6 +297,8 @@ interface ServerProgressWidget {
|
|
|
275
297
|
showPercentage?: boolean;
|
|
276
298
|
/** Grid span (1-4) */
|
|
277
299
|
span?: number;
|
|
300
|
+
/** Grid row span. */
|
|
301
|
+
rowSpan?: number;
|
|
278
302
|
/** Server-side data loader (required) */
|
|
279
303
|
loader: (ctx: WidgetFetchContext) => Promise<{
|
|
280
304
|
current: number;
|
|
@@ -290,6 +314,8 @@ interface ServerProgressWidget {
|
|
|
290
314
|
*/
|
|
291
315
|
interface ServerDashboardSection {
|
|
292
316
|
type: "section";
|
|
317
|
+
/** Stable section ID, useful for keyed updates and contributions */
|
|
318
|
+
id?: string;
|
|
293
319
|
/** Section label */
|
|
294
320
|
label?: I18nText;
|
|
295
321
|
/** Section description */
|
|
@@ -300,22 +326,32 @@ interface ServerDashboardSection {
|
|
|
300
326
|
layout?: "grid" | "stack";
|
|
301
327
|
/** Grid columns */
|
|
302
328
|
columns?: number;
|
|
329
|
+
/** Fixed row height for widgets in this section */
|
|
330
|
+
rowHeight?: number | string;
|
|
331
|
+
/** Gap between items */
|
|
332
|
+
gap?: number;
|
|
303
333
|
/** Wrapper style */
|
|
304
334
|
wrapper?: "flat" | "card" | "collapsible";
|
|
305
335
|
/** Default collapsed (for collapsible) */
|
|
306
336
|
defaultCollapsed?: boolean;
|
|
307
337
|
/** Section items */
|
|
308
338
|
items: ServerDashboardItem[];
|
|
339
|
+
/** Custom CSS class */
|
|
340
|
+
className?: string;
|
|
309
341
|
}
|
|
310
342
|
/**
|
|
311
343
|
* Dashboard tabs - tabbed sections
|
|
312
344
|
*/
|
|
313
345
|
interface ServerDashboardTabs {
|
|
314
346
|
type: "tabs";
|
|
347
|
+
/** Stable tabs group ID */
|
|
348
|
+
id?: string;
|
|
315
349
|
/** Tabs configuration */
|
|
316
350
|
tabs: ServerDashboardTab[];
|
|
317
351
|
/** Default active tab ID */
|
|
318
352
|
defaultTab?: string;
|
|
353
|
+
/** Custom CSS class */
|
|
354
|
+
className?: string;
|
|
319
355
|
}
|
|
320
356
|
/**
|
|
321
357
|
* Single tab configuration
|
|
@@ -329,6 +365,14 @@ interface ServerDashboardTab {
|
|
|
329
365
|
icon?: ComponentReference;
|
|
330
366
|
/** Tab items */
|
|
331
367
|
items: ServerDashboardItem[];
|
|
368
|
+
/** Grid columns for this tab */
|
|
369
|
+
columns?: number;
|
|
370
|
+
/** Fixed row height for widgets in this tab */
|
|
371
|
+
rowHeight?: number | string;
|
|
372
|
+
/** Gap between tab items */
|
|
373
|
+
gap?: number;
|
|
374
|
+
/** Badge text */
|
|
375
|
+
badge?: string | number;
|
|
332
376
|
}
|
|
333
377
|
/**
|
|
334
378
|
* Dashboard layout item
|
|
@@ -361,6 +405,8 @@ interface ServerDashboardConfig {
|
|
|
361
405
|
actions?: ServerDashboardAction[];
|
|
362
406
|
/** Grid columns (default: 4) */
|
|
363
407
|
columns?: number;
|
|
408
|
+
/** Fixed row height for dashboard widgets */
|
|
409
|
+
rowHeight?: number | string;
|
|
364
410
|
/** Gap between widgets */
|
|
365
411
|
gap?: number;
|
|
366
412
|
/** Dashboard items */
|
|
@@ -480,10 +526,22 @@ interface DashboardSectionDef {
|
|
|
480
526
|
id: string;
|
|
481
527
|
/** Section title. */
|
|
482
528
|
label?: I18nText;
|
|
529
|
+
/** Section description. */
|
|
530
|
+
description?: I18nText;
|
|
483
531
|
/** Layout mode. */
|
|
484
|
-
layout?: "grid";
|
|
532
|
+
layout?: "grid" | "stack";
|
|
485
533
|
/** Grid columns for this section. */
|
|
486
534
|
columns?: number;
|
|
535
|
+
/** Fixed row height for widgets in this section. */
|
|
536
|
+
rowHeight?: number | string;
|
|
537
|
+
/** Gap between section items. */
|
|
538
|
+
gap?: number;
|
|
539
|
+
/** Wrapper style. */
|
|
540
|
+
wrapper?: "flat" | "card" | "collapsible";
|
|
541
|
+
/** Default collapsed state for collapsible sections. */
|
|
542
|
+
defaultCollapsed?: boolean;
|
|
543
|
+
/** Custom CSS class. */
|
|
544
|
+
className?: string;
|
|
487
545
|
}
|
|
488
546
|
/**
|
|
489
547
|
* Dashboard item (widget) definition for contributions.
|
|
@@ -502,6 +560,8 @@ interface DashboardItemDef {
|
|
|
502
560
|
label?: I18nText;
|
|
503
561
|
/** Grid span (1-4). */
|
|
504
562
|
span?: number;
|
|
563
|
+
/** Grid row span. */
|
|
564
|
+
rowSpan?: number;
|
|
505
565
|
/** Refresh interval in ms. */
|
|
506
566
|
refreshInterval?: number;
|
|
507
567
|
/** Widget-specific config (collection, filter, loader, chartType, etc.) */
|
|
@@ -519,14 +579,18 @@ interface DashboardContribution {
|
|
|
519
579
|
description?: I18nText;
|
|
520
580
|
/** Grid columns — last module/user wins. */
|
|
521
581
|
columns?: number;
|
|
582
|
+
/** Fixed widget row height — last module/user wins. */
|
|
583
|
+
rowHeight?: number | string;
|
|
584
|
+
/** Widget gap — last module/user wins. */
|
|
585
|
+
gap?: number;
|
|
522
586
|
/** Enable realtime — last module/user wins. */
|
|
523
587
|
realtime?: boolean;
|
|
524
588
|
/** Quick actions — concatenated from all modules. */
|
|
525
589
|
actions?: ServerDashboardAction[];
|
|
526
590
|
/** Section definitions — merged by id across modules. */
|
|
527
591
|
sections?: DashboardSectionDef[];
|
|
528
|
-
/** Widget items — appended to sections by sectionId. */
|
|
529
|
-
items?: DashboardItemDef
|
|
592
|
+
/** Widget items — appended to sections by sectionId, or direct layout items. */
|
|
593
|
+
items?: Array<DashboardItemDef | ServerDashboardItem>;
|
|
530
594
|
}
|
|
531
595
|
/**
|
|
532
596
|
* Context for dashboard callbacks on module() and config().
|
|
@@ -86,10 +86,31 @@ interface ListViewConfig {
|
|
|
86
86
|
field: string;
|
|
87
87
|
direction: "asc" | "desc";
|
|
88
88
|
};
|
|
89
|
+
/**
|
|
90
|
+
* Enables reorder mode for this list.
|
|
91
|
+
* Requires a numeric field named `order` on the collection.
|
|
92
|
+
*/
|
|
93
|
+
orderable?: boolean | {
|
|
94
|
+
/** Direction used when rendering the ordered list */
|
|
95
|
+
direction?: "asc" | "desc";
|
|
96
|
+
/** Gap between generated order values when writes are enabled */
|
|
97
|
+
step?: number;
|
|
98
|
+
};
|
|
89
99
|
/** Searchable fields */
|
|
90
100
|
searchable?: string[];
|
|
91
101
|
/** Filterable fields */
|
|
92
102
|
filterable?: string[];
|
|
103
|
+
/** Client-side grouping options for the current fetched page */
|
|
104
|
+
grouping?: {
|
|
105
|
+
/** Fields users can group by */
|
|
106
|
+
fields: string[];
|
|
107
|
+
/** Initial grouping field */
|
|
108
|
+
defaultField?: string;
|
|
109
|
+
/** Whether groups start collapsed */
|
|
110
|
+
defaultCollapsed?: boolean;
|
|
111
|
+
/** Show page-local item counts in group headers */
|
|
112
|
+
showCounts?: boolean;
|
|
113
|
+
};
|
|
93
114
|
/** Actions configuration */
|
|
94
115
|
actions?: {
|
|
95
116
|
header?: {
|
|
@@ -27,7 +27,7 @@ import { ActionsConfigContext, BuiltinActionType, ServerActionContext, ServerAct
|
|
|
27
27
|
*/
|
|
28
28
|
interface AdminConfigInput {
|
|
29
29
|
sidebar?: SidebarContribution;
|
|
30
|
-
dashboard?: DashboardContribution;
|
|
30
|
+
dashboard?: DashboardContribution | ServerDashboardConfig;
|
|
31
31
|
branding?: ServerBrandingConfig;
|
|
32
32
|
locale?: AdminLocaleConfig;
|
|
33
33
|
}
|
|
@@ -78,9 +78,13 @@ function generateCategoryEntries(files, catDecl) {
|
|
|
78
78
|
const keyProp = catDecl?.keyFromProperty;
|
|
79
79
|
return files.map((f) => {
|
|
80
80
|
if (keyProp) return `[${f.varName}.${keyProp}]: ${f.varName}`;
|
|
81
|
+
if (catDecl?.keyFromSource === "basename") return `${JSON.stringify(getSourceBasename(f))}: ${f.varName}`;
|
|
81
82
|
return `${JSON.stringify(f.key)}: ${f.varName}`;
|
|
82
83
|
}).join(", ");
|
|
83
84
|
}
|
|
85
|
+
function getSourceBasename(file) {
|
|
86
|
+
return (file.source.replaceAll("\\", "/").split("/").pop() ?? file.key).replace(/\.[^.]+$/, "");
|
|
87
|
+
}
|
|
84
88
|
/**
|
|
85
89
|
* Generate an import line for a discovered file.
|
|
86
90
|
*/
|
|
@@ -4,6 +4,18 @@ import { field, fieldType, getContext, isNotNull, isNull, jsonb, sql } from "que
|
|
|
4
4
|
|
|
5
5
|
//#region src/server/fields/blocks.ts
|
|
6
6
|
/**
|
|
7
|
+
* Blocks Field Type
|
|
8
|
+
*
|
|
9
|
+
* Visual block editor field stored as JSONB.
|
|
10
|
+
* Provides a tree-based structure for page builder functionality.
|
|
11
|
+
*
|
|
12
|
+
* The blocks field stores data in a normalized format:
|
|
13
|
+
* - _tree: Array of block nodes with id, type, and children
|
|
14
|
+
* - _values: Record mapping block id to field values
|
|
15
|
+
*
|
|
16
|
+
* This field type is only available when using the `adminModule`.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
7
19
|
* Get operators for blocks field.
|
|
8
20
|
* Provides operators for querying block content.
|
|
9
21
|
*/
|
|
@@ -3,6 +3,14 @@ import { field, fieldType, isNotNull, isNull, jsonb, sql } from "questpie";
|
|
|
3
3
|
|
|
4
4
|
//#region src/server/fields/rich-text.ts
|
|
5
5
|
/**
|
|
6
|
+
* Rich Text Field Type
|
|
7
|
+
*
|
|
8
|
+
* TipTap-based WYSIWYG editor field stored as JSONB.
|
|
9
|
+
* Provides structured rich text editing with configurable features.
|
|
10
|
+
*
|
|
11
|
+
* This field type is only available when using the `adminModule`.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
6
14
|
* Get operators for rich text field.
|
|
7
15
|
* Provides text search within the JSON structure.
|
|
8
16
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { messages } from "./messages/index.mjs";
|
|
2
|
+
import { validationMessagesEN, validationMessagesSK } from "questpie/shared";
|
|
2
3
|
|
|
3
4
|
//#region src/server/i18n/index.ts
|
|
4
5
|
/**
|
|
@@ -21,6 +22,15 @@ messages.fr;
|
|
|
21
22
|
messages.es;
|
|
22
23
|
messages.pt;
|
|
23
24
|
messages.pl;
|
|
25
|
+
const validationMessagesByLocale = {
|
|
26
|
+
en: validationMessagesEN,
|
|
27
|
+
sk: validationMessagesSK
|
|
28
|
+
};
|
|
29
|
+
function getValidationMessagesForLocale(locale) {
|
|
30
|
+
const normalizedLocale = locale.toLowerCase();
|
|
31
|
+
const baseLocale = normalizedLocale.split("-")[0];
|
|
32
|
+
return validationMessagesByLocale[locale] ?? validationMessagesByLocale[normalizedLocale] ?? (baseLocale ? validationMessagesByLocale[baseLocale] : void 0) ?? validationMessagesEN;
|
|
33
|
+
}
|
|
24
34
|
/**
|
|
25
35
|
* Get admin messages for a specific locale.
|
|
26
36
|
* Falls back to English if locale not found.
|
|
@@ -29,7 +39,13 @@ messages.pl;
|
|
|
29
39
|
* @returns Messages for the locale
|
|
30
40
|
*/
|
|
31
41
|
function getAdminMessagesForLocale(locale) {
|
|
32
|
-
|
|
42
|
+
const normalizedLocale = locale.toLowerCase();
|
|
43
|
+
const baseLocale = normalizedLocale.split("-")[0];
|
|
44
|
+
const localeMessages = messages[locale] ?? messages[normalizedLocale] ?? (baseLocale ? messages[baseLocale] : void 0) ?? messages.en ?? {};
|
|
45
|
+
return {
|
|
46
|
+
...getValidationMessagesForLocale(locale),
|
|
47
|
+
...localeMessages
|
|
48
|
+
};
|
|
33
49
|
}
|
|
34
50
|
/**
|
|
35
51
|
* Get list of supported admin UI locales.
|
|
@@ -208,6 +208,17 @@ var cs_default = {
|
|
|
208
208
|
"editor.underline": "Podtržení",
|
|
209
209
|
"editor.strikethrough": "Přeškrtnutí",
|
|
210
210
|
"editor.heading": "Nadpis {{level}}",
|
|
211
|
+
"editor.richTextToolbar": "Panel bohatého textu",
|
|
212
|
+
"editor.blockType": "Typ bloku",
|
|
213
|
+
"editor.selectionBlockType": "Typ vybraného bloku",
|
|
214
|
+
"editor.paragraph": "Odstavec",
|
|
215
|
+
"editor.textBlocks": "Textové bloky",
|
|
216
|
+
"editor.headings": "Nadpisy",
|
|
217
|
+
"editor.blocks": "Bloky",
|
|
218
|
+
"editor.formatting": "Formátování",
|
|
219
|
+
"editor.moreFormatting": "Další formátování",
|
|
220
|
+
"editor.alignment": "Zarovnání",
|
|
221
|
+
"editor.insert": "Vložit",
|
|
211
222
|
"editor.link": "Vložit odkaz",
|
|
212
223
|
"editor.image": "Vložit obrázek",
|
|
213
224
|
"editor.list": "Seznam",
|
|
@@ -241,6 +252,18 @@ var cs_default = {
|
|
|
241
252
|
"editor.chooseFile": "Vybrat soubor",
|
|
242
253
|
"editor.uploading": "Nahrávání...",
|
|
243
254
|
"editor.browseLibrary": "Procházet knihovnu",
|
|
255
|
+
"editor.startWriting": "Začněte psát...",
|
|
256
|
+
"editor.pasteOrTypeLink": "Vložte nebo zadejte odkaz...",
|
|
257
|
+
"editor.paragraphDescription": "Začít obyčejným textem",
|
|
258
|
+
"editor.heading1Description": "Velký sekční nadpis",
|
|
259
|
+
"editor.heading2Description": "Střední sekční nadpis",
|
|
260
|
+
"editor.heading3Description": "Menší sekční nadpis",
|
|
261
|
+
"editor.bulletListDescription": "Vytvořit odrážkový seznam",
|
|
262
|
+
"editor.orderedListDescription": "Vytvořit číslovaný seznam",
|
|
263
|
+
"editor.quoteDescription": "Vložit citaci",
|
|
264
|
+
"editor.codeBlockDescription": "Vložit ukázku kódu",
|
|
265
|
+
"editor.dividerDescription": "Vložit horizontální čáru",
|
|
266
|
+
"editor.tableDescription": "Vložit tabulku 3x3",
|
|
244
267
|
"toast.success": "Úspěch",
|
|
245
268
|
"toast.error": "Chyba",
|
|
246
269
|
"toast.warning": "Varování",
|