@questpie/admin 3.3.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/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/views/auth/accept-invite-form.d.mts +2 -2
- package/dist/client/views/auth/auth-layout.d.mts +3 -3
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- 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 +6 -3
- 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/pages/accept-invite-page.d.mts +2 -2
- package/dist/client/views/pages/dashboard-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
- package/dist/client/views/pages/invite-page.d.mts +2 -2
- package/dist/client/views/pages/login-page.d.mts +2 -2
- package/dist/client.d.mts +6 -6
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/factories.d.mts +21 -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/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/adapters/index.d.mts +2 -0
- package/dist/server/adapters/nextjs.d.mts +1 -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/auth-helpers.d.mts +1 -0
- 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/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 +68 -68
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +14 -14
- package/dist/server/modules/admin/collections/verification.d.mts +23 -23
- 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/preview.d.mts +11 -11
- 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/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 +27 -27
- package/dist/server/modules/audit/collections/audit-log.d.mts +7 -2
- package/dist/server/modules/audit/index.d.mts +1 -1
- package/dist/server/plugin.d.mts +1 -1
- package/dist/server/plugin.mjs +28 -28
- package/dist/server.d.mts +7 -4
- package/dist/server.mjs +7 -7
- package/package.json +13 -3
package/README.md
CHANGED
|
@@ -23,8 +23,7 @@ Add the admin module to `modules.ts`:
|
|
|
23
23
|
|
|
24
24
|
```ts
|
|
25
25
|
// questpie.config.ts
|
|
26
|
-
import { runtimeConfig } from "questpie";
|
|
27
|
-
|
|
26
|
+
import { runtimeConfig } from "questpie/app";
|
|
28
27
|
export default runtimeConfig({
|
|
29
28
|
app: { url: process.env.APP_URL! },
|
|
30
29
|
db: { url: process.env.DATABASE_URL! },
|
|
@@ -34,8 +33,7 @@ export default runtimeConfig({
|
|
|
34
33
|
|
|
35
34
|
```ts
|
|
36
35
|
// modules.ts
|
|
37
|
-
import { adminModule } from "@questpie/admin/
|
|
38
|
-
|
|
36
|
+
import { adminModule } from "@questpie/admin/modules/admin";
|
|
39
37
|
export default [adminModule] as const;
|
|
40
38
|
```
|
|
41
39
|
|
|
@@ -477,8 +475,8 @@ import {
|
|
|
477
475
|
} from "@questpie/admin/client";
|
|
478
476
|
|
|
479
477
|
// Server (admin module + server factories/config)
|
|
480
|
-
import { adminModule
|
|
481
|
-
|
|
478
|
+
import { adminModule } from "@questpie/admin/modules/admin";
|
|
479
|
+
import { auditModule } from "@questpie/admin/modules/audit";
|
|
482
480
|
// Styles
|
|
483
481
|
import "@questpie/admin/client/styles/index.css";
|
|
484
482
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BlockContent } from "./types.mjs";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/client/blocks/block-renderer.d.ts
|
|
6
6
|
|
|
@@ -50,6 +50,6 @@ declare function BlockRenderer({
|
|
|
50
50
|
onBlockClick,
|
|
51
51
|
onBlockInsert,
|
|
52
52
|
className
|
|
53
|
-
}: BlockRendererProps):
|
|
53
|
+
}: BlockRendererProps): react_jsx_runtime17.JSX.Element | null;
|
|
54
54
|
//#endregion
|
|
55
55
|
export { BlockRenderer, BlockRendererProps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SimpleMessages } from "../i18n/simple.mjs";
|
|
2
1
|
import { MaybeLazyComponent } from "./types/common.mjs";
|
|
2
|
+
import { ViewDefinition } from "./view/view.mjs";
|
|
3
3
|
import { FieldDefinition } from "./field/field.mjs";
|
|
4
4
|
import { PageDefinition } from "./page/page.mjs";
|
|
5
|
-
import { LocaleConfig } from "./types/ui-config.mjs";
|
|
6
|
-
import { ViewDefinition } from "./view/view.mjs";
|
|
7
5
|
import { WidgetDefinition } from "./widget/widget.mjs";
|
|
6
|
+
import { SimpleMessages } from "../i18n/simple.mjs";
|
|
7
|
+
import { LocaleConfig } from "./types/ui-config.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/client/builder/admin-types.d.ts
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { I18nText } from "../../i18n/types.mjs";
|
|
2
2
|
import { IconComponent, MaybeLazyComponent } from "./common.mjs";
|
|
3
|
-
import { FieldInstance } from "../field/field.mjs";
|
|
4
3
|
import { ComponentReference } from "../../../server/augmentation/common.mjs";
|
|
5
4
|
import "../../../server/augmentation.mjs";
|
|
5
|
+
import { FieldInstance } from "../field/field.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/client/builder/types/action-types.d.ts
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../i18n/types.mjs";
|
|
2
2
|
import { MaybeLazyComponent } from "./common.mjs";
|
|
3
|
-
import "../field/field.mjs";
|
|
4
3
|
import "../../../server/augmentation.mjs";
|
|
4
|
+
import "../field/field.mjs";
|
|
5
5
|
import "../admin.mjs";
|
|
6
6
|
import { ActionsConfig } from "./action-types.mjs";
|
|
7
7
|
|
|
@@ -60,6 +60,51 @@ interface ColumnConfigObject<TFieldNames extends string = string> {
|
|
|
60
60
|
*/
|
|
61
61
|
align?: "left" | "center" | "right";
|
|
62
62
|
}
|
|
63
|
+
interface ListViewLayoutConfig<TFieldNames extends string = string> {
|
|
64
|
+
density?: "compact" | "comfortable";
|
|
65
|
+
titleField?: TFieldNames;
|
|
66
|
+
subtitleField?: TFieldNames;
|
|
67
|
+
leadingFields?: TFieldNames[];
|
|
68
|
+
badgeFields?: TFieldNames[];
|
|
69
|
+
metaFields?: TFieldNames[];
|
|
70
|
+
}
|
|
71
|
+
type ListViewOutlineLevel<TFieldNames extends string = string> = {
|
|
72
|
+
kind: "field";
|
|
73
|
+
field: TFieldNames;
|
|
74
|
+
labelField?: TFieldNames;
|
|
75
|
+
order?: "asc" | "desc" | string[];
|
|
76
|
+
} | {
|
|
77
|
+
kind: "relation-field";
|
|
78
|
+
relation: TFieldNames;
|
|
79
|
+
field?: string;
|
|
80
|
+
labelField?: string;
|
|
81
|
+
order?: "asc" | "desc" | string[];
|
|
82
|
+
} | {
|
|
83
|
+
kind: "edge";
|
|
84
|
+
collection: string;
|
|
85
|
+
parentField: string;
|
|
86
|
+
childField: string;
|
|
87
|
+
where?: Record<string, unknown>;
|
|
88
|
+
groupByEdgeField?: string;
|
|
89
|
+
repeat?: boolean | {
|
|
90
|
+
maxDepth?: number;
|
|
91
|
+
};
|
|
92
|
+
} | {
|
|
93
|
+
kind: "path";
|
|
94
|
+
field: TFieldNames;
|
|
95
|
+
separator?: string;
|
|
96
|
+
syntheticFolders?: boolean;
|
|
97
|
+
repeat?: boolean | {
|
|
98
|
+
maxDepth?: number;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
interface ListViewOutlineConfig<TFieldNames extends string = string> {
|
|
102
|
+
levels: ListViewOutlineLevel<TFieldNames>[];
|
|
103
|
+
defaultExpanded?: boolean | "roots";
|
|
104
|
+
maxDepth?: number;
|
|
105
|
+
showCounts?: boolean;
|
|
106
|
+
preserveMatchingBranches?: boolean;
|
|
107
|
+
}
|
|
63
108
|
/**
|
|
64
109
|
* List view configuration
|
|
65
110
|
*/
|
|
@@ -91,11 +136,15 @@ interface ListViewConfig<TFieldNames extends string = string> {
|
|
|
91
136
|
* Enable search
|
|
92
137
|
* @default true
|
|
93
138
|
*/
|
|
94
|
-
searchable?: boolean;
|
|
139
|
+
searchable?: boolean | TFieldNames[];
|
|
95
140
|
/**
|
|
96
141
|
* Searchable fields (defaults to all text-like fields)
|
|
97
142
|
*/
|
|
98
143
|
searchFields?: TFieldNames[];
|
|
144
|
+
/**
|
|
145
|
+
* Filterable fields exposed by schema-driven list views.
|
|
146
|
+
*/
|
|
147
|
+
filterable?: TFieldNames[];
|
|
99
148
|
/**
|
|
100
149
|
* Enable row selection
|
|
101
150
|
* @default false
|
|
@@ -131,6 +180,14 @@ interface ListViewConfig<TFieldNames extends string = string> {
|
|
|
131
180
|
defaultCollapsed?: boolean;
|
|
132
181
|
showCounts?: boolean;
|
|
133
182
|
};
|
|
183
|
+
/**
|
|
184
|
+
* Dense list row layout hints used by list-like renderers.
|
|
185
|
+
*/
|
|
186
|
+
layout?: ListViewLayoutConfig<TFieldNames>;
|
|
187
|
+
/**
|
|
188
|
+
* Renderer-agnostic multi-level outline/grouping configuration.
|
|
189
|
+
*/
|
|
190
|
+
outline?: ListViewOutlineConfig<TFieldNames>;
|
|
134
191
|
/**
|
|
135
192
|
* Actions configuration for list view
|
|
136
193
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/preview/block-scope-context.d.ts
|
|
5
5
|
|
|
@@ -35,7 +35,7 @@ declare function BlockScopeProvider({
|
|
|
35
35
|
blockId,
|
|
36
36
|
basePath,
|
|
37
37
|
children
|
|
38
|
-
}: BlockScopeProviderProps):
|
|
38
|
+
}: BlockScopeProviderProps): react_jsx_runtime20.JSX.Element;
|
|
39
39
|
/**
|
|
40
40
|
* Get current block scope context.
|
|
41
41
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime21 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/client/preview/preview-banner.d.ts
|
|
4
4
|
|
|
@@ -40,6 +40,6 @@ declare function PreviewBanner({
|
|
|
40
40
|
isPreviewMode,
|
|
41
41
|
className,
|
|
42
42
|
exitPreviewUrl
|
|
43
|
-
}: PreviewBannerProps):
|
|
43
|
+
}: PreviewBannerProps): react_jsx_runtime21.JSX.Element | null;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { PreviewBanner, PreviewBannerProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/preview/preview-field.d.ts
|
|
5
5
|
|
|
@@ -68,7 +68,7 @@ declare function PreviewProvider({
|
|
|
68
68
|
}) => void;
|
|
69
69
|
onFieldValueEdited?: (payload: PreviewFieldValueEditedPayload) => void;
|
|
70
70
|
children: React.ReactNode;
|
|
71
|
-
}):
|
|
71
|
+
}): react_jsx_runtime22.JSX.Element;
|
|
72
72
|
/**
|
|
73
73
|
* Hook to access preview context.
|
|
74
74
|
*/
|
|
@@ -107,7 +107,7 @@ declare function PreviewField({
|
|
|
107
107
|
style,
|
|
108
108
|
onClick,
|
|
109
109
|
onValueCommit
|
|
110
|
-
}: PreviewFieldProps):
|
|
110
|
+
}: PreviewFieldProps): react_jsx_runtime22.JSX.Element;
|
|
111
111
|
/**
|
|
112
112
|
* Standalone PreviewField that works without context.
|
|
113
113
|
* Useful when you can't use PreviewProvider.
|
|
@@ -131,6 +131,6 @@ declare function StandalonePreviewField({
|
|
|
131
131
|
blockId?: string;
|
|
132
132
|
fieldType?: "regular" | "block" | "relation";
|
|
133
133
|
}) => void;
|
|
134
|
-
}):
|
|
134
|
+
}): react_jsx_runtime22.JSX.Element;
|
|
135
135
|
//#endregion
|
|
136
136
|
export { PreviewField, PreviewFieldProps, PreviewProvider, StandalonePreviewField, usePreviewContext };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/client/views/auth/accept-invite-form.d.ts
|
|
4
4
|
/**
|
|
@@ -67,6 +67,6 @@ declare function AcceptInviteForm({
|
|
|
67
67
|
className,
|
|
68
68
|
error,
|
|
69
69
|
minPasswordLength
|
|
70
|
-
}: AcceptInviteFormProps):
|
|
70
|
+
}: AcceptInviteFormProps): react_jsx_runtime2.JSX.Element;
|
|
71
71
|
//#endregion
|
|
72
72
|
export { AcceptInviteForm };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/views/auth/auth-layout.d.ts
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ declare function AuthDefaultLogo({
|
|
|
26
26
|
brandName
|
|
27
27
|
}: {
|
|
28
28
|
brandName: string;
|
|
29
|
-
}):
|
|
29
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
30
30
|
/**
|
|
31
31
|
* Minimal split layout for authentication pages (login, register, forgot password, etc.)
|
|
32
32
|
*
|
|
@@ -50,6 +50,6 @@ declare function AuthDefaultLogo({
|
|
|
50
50
|
* </AuthLayout>
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
|
-
declare function AuthLayout(props: AuthLayoutProps):
|
|
53
|
+
declare function AuthLayout(props: AuthLayoutProps): react_jsx_runtime0.JSX.Element;
|
|
54
54
|
//#endregion
|
|
55
55
|
export { AuthDefaultLogo, AuthLayout, AuthLayoutProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/client/views/auth/reset-password-form.d.ts
|
|
4
4
|
/**
|
|
@@ -60,6 +60,6 @@ declare function ResetPasswordForm({
|
|
|
60
60
|
minPasswordLength,
|
|
61
61
|
className,
|
|
62
62
|
error
|
|
63
|
-
}: ResetPasswordFormProps):
|
|
63
|
+
}: ResetPasswordFormProps): react_jsx_runtime6.JSX.Element;
|
|
64
64
|
//#endregion
|
|
65
65
|
export { ResetPasswordForm };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/client/views/auth/setup-form.d.ts
|
|
4
4
|
/**
|
|
@@ -55,6 +55,6 @@ declare function SetupForm({
|
|
|
55
55
|
className,
|
|
56
56
|
error,
|
|
57
57
|
minPasswordLength
|
|
58
|
-
}: SetupFormProps):
|
|
58
|
+
}: SetupFormProps): react_jsx_runtime7.JSX.Element;
|
|
59
59
|
//#endregion
|
|
60
60
|
export { SetupForm, SetupFormValues };
|