@infuro/cms-core 1.0.22 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin.cjs +3595 -1844
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.d.cts +42 -15
- package/dist/admin.d.ts +42 -15
- package/dist/admin.js +3626 -1874
- package/dist/admin.js.map +1 -1
- package/dist/api.cjs +325 -34
- package/dist/api.cjs.map +1 -1
- package/dist/api.js +326 -35
- package/dist/api.js.map +1 -1
- package/dist/index.cjs +328 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +329 -36
- package/dist/index.js.map +1 -1
- package/package.json +130 -129
package/dist/admin.d.cts
CHANGED
|
@@ -32,24 +32,39 @@ interface CustomNavSection {
|
|
|
32
32
|
title: string;
|
|
33
33
|
items: CustomNavItem[];
|
|
34
34
|
}
|
|
35
|
+
/** Single option for CRUD list filters and for `CustomCrudColumn.type === 'select'` form fields. */
|
|
36
|
+
interface CrudFilterSelectOption {
|
|
37
|
+
value: string;
|
|
38
|
+
label: string;
|
|
39
|
+
}
|
|
35
40
|
interface CustomCrudColumn {
|
|
36
41
|
field: string;
|
|
37
42
|
displayName: string;
|
|
38
43
|
type?: string;
|
|
44
|
+
/** Placeholder for plain text/number inputs in the CRUD modal form. */
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
/**
|
|
47
|
+
* For `type: 'select'`: fixed choices in Add/Edit (e.g. job application status).
|
|
48
|
+
* Example: `{ field: 'status', displayName: 'Status', type: 'select', options: [{ value: 'new', label: 'New' }, ...] }`
|
|
49
|
+
*/
|
|
50
|
+
options?: CrudFilterSelectOption[];
|
|
51
|
+
/** Initial value when creating a row (works with `select` and plain fields). */
|
|
52
|
+
defaultValue?: string | number | boolean;
|
|
39
53
|
/** When set, form renders an async searchable relation dropdown instead of a plain input. */
|
|
40
54
|
relationApi?: string;
|
|
41
55
|
/** Field on the relation entity to show in the list (default: 'name'). */
|
|
42
56
|
relationLabelField?: string;
|
|
43
57
|
/** Field on the relation entity to use as value (default: 'id'). */
|
|
44
58
|
relationValueField?: string;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
59
|
+
/** Override query param for auto-generated list filters (default: `field`). */
|
|
60
|
+
filterParam?: string;
|
|
61
|
+
/** Override filter control label (default: `displayName`). */
|
|
62
|
+
filterLabel?: string;
|
|
63
|
+
/** When `false`, this column is not used for auto-generated list filters. */
|
|
64
|
+
listFilter?: boolean;
|
|
50
65
|
}
|
|
51
66
|
interface CrudFilter {
|
|
52
|
-
/** Query param name (e.g. status, dateFrom, paymentRef). */
|
|
67
|
+
/** Query param name (e.g. status, dateFrom, paymentRef). List filter: select, dateRange, or text. */
|
|
53
68
|
param: string;
|
|
54
69
|
label: string;
|
|
55
70
|
type: 'select' | 'dateRange' | 'text';
|
|
@@ -111,8 +126,13 @@ type CrudFilterItem = {
|
|
|
111
126
|
label: string;
|
|
112
127
|
type: 'select' | 'dateRange' | 'text';
|
|
113
128
|
options?: CrudFilterOption[];
|
|
129
|
+
/** When set, merge runtime options from relation list fetch (id → label). */
|
|
130
|
+
relationApi?: string;
|
|
131
|
+
relationLabelField?: string;
|
|
132
|
+
relationValueField?: string;
|
|
114
133
|
};
|
|
115
|
-
|
|
134
|
+
|
|
135
|
+
declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, customViewPageUrl, defaultSortField, defaultSortOrder, filters, filterColumns, extraListParams, manageUserGroups, }: {
|
|
116
136
|
title: string;
|
|
117
137
|
apiEndpoint: string;
|
|
118
138
|
columns: any[];
|
|
@@ -121,18 +141,23 @@ declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, custom
|
|
|
121
141
|
defaultSortField?: string;
|
|
122
142
|
defaultSortOrder?: 'asc' | 'desc';
|
|
123
143
|
filters?: CrudFilterItem[];
|
|
144
|
+
/** Full column config for deriving list filters (`select`, `boolean`, `relationApi`). List `columns` may omit hidden fields. */
|
|
145
|
+
filterColumns?: any[];
|
|
124
146
|
extraListParams?: Record<string, string>;
|
|
125
147
|
/** When true, show group (role) selector for each user; requires GET /api/admin/roles. */
|
|
126
148
|
manageUserGroups?: boolean;
|
|
127
149
|
}): react_jsx_runtime.JSX.Element;
|
|
128
150
|
|
|
129
|
-
|
|
130
|
-
isOpen:
|
|
131
|
-
onClose:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
151
|
+
type CreateEditFormProps = {
|
|
152
|
+
isOpen: boolean;
|
|
153
|
+
onClose: () => void;
|
|
154
|
+
/** Called only after a successful POST/PUT so parents can refetch lists without reloading on cancel. */
|
|
155
|
+
onSaveSuccess?: () => void;
|
|
156
|
+
apiEndpoint: string;
|
|
157
|
+
columns: any[];
|
|
158
|
+
existingData?: Record<string, unknown> | null;
|
|
159
|
+
};
|
|
160
|
+
declare function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns, existingData, }: CreateEditFormProps): react_jsx_runtime.JSX.Element | null;
|
|
136
161
|
|
|
137
162
|
declare function FormBuilder({ formId }: {
|
|
138
163
|
formId?: string;
|
|
@@ -246,6 +271,8 @@ declare function AdminPageResolver({ slug }: {
|
|
|
246
271
|
|
|
247
272
|
declare function SettingsPage(): react_jsx_runtime.JSX.Element;
|
|
248
273
|
|
|
274
|
+
declare function AdminProfilePage(): react_jsx_runtime.JSX.Element | null;
|
|
275
|
+
|
|
249
276
|
declare function LayoutSettingsPage(): react_jsx_runtime.JSX.Element;
|
|
250
277
|
|
|
251
278
|
interface PageBuilderPageProps {
|
|
@@ -296,4 +323,4 @@ declare function CmsProviders({ children }: {
|
|
|
296
323
|
children: React.ReactNode;
|
|
297
324
|
}): react_jsx_runtime.JSX.Element;
|
|
298
325
|
|
|
299
|
-
export { AdminCRUD, AdminConfigContext, DashboardPage as AdminDashboardPage, ForgotPasswordPage as AdminForgotPasswordPage, AdminHeader, InvitePage as AdminInvitePage, AdminLayout, type AdminLayoutProps, AdminPageResolver, ResetPasswordPage as AdminResetPasswordPage, SettingsPage as AdminSettingsPage, AdminShell, AdminSidebar, SigninPage as AdminSignInPage, AnalyticsCard, AnalyticsChart, AnalyticsExclusion, BlogEditor as BlogEditorPage, BrandEditPage, CategoryAutocomplete, CmsProviders, CollectionEditPage, ComponentSettings, CreateEditForm, type CustomCrudColumn, type CustomCrudConfig, type CustomNavItem, type CustomNavSection, DailyUserChart, DetailPageHeader, type DetailPageHeaderMenuItem, DetailPageLayout, FormBuilder, GeographicMap, JoditRichText, LayoutSettingsPage, NavbarEditor, PageBuilderPage, type PluginDescriptor, ProductEditPage, STORE_CRUD_CONFIGS, TagAutocomplete, type ThemeRegistryItem, UserAutocomplete, AdminLayout as default };
|
|
326
|
+
export { AdminCRUD, AdminConfigContext, DashboardPage as AdminDashboardPage, ForgotPasswordPage as AdminForgotPasswordPage, AdminHeader, InvitePage as AdminInvitePage, AdminLayout, type AdminLayoutProps, AdminPageResolver, AdminProfilePage, ResetPasswordPage as AdminResetPasswordPage, SettingsPage as AdminSettingsPage, AdminShell, AdminSidebar, SigninPage as AdminSignInPage, AnalyticsCard, AnalyticsChart, AnalyticsExclusion, BlogEditor as BlogEditorPage, BrandEditPage, CategoryAutocomplete, CmsProviders, CollectionEditPage, ComponentSettings, CreateEditForm, type CustomCrudColumn, type CustomCrudConfig, type CustomNavItem, type CustomNavSection, DailyUserChart, DetailPageHeader, type DetailPageHeaderMenuItem, DetailPageLayout, FormBuilder, GeographicMap, JoditRichText, LayoutSettingsPage, NavbarEditor, PageBuilderPage, type PluginDescriptor, ProductEditPage, STORE_CRUD_CONFIGS, TagAutocomplete, type ThemeRegistryItem, UserAutocomplete, AdminLayout as default };
|
package/dist/admin.d.ts
CHANGED
|
@@ -32,24 +32,39 @@ interface CustomNavSection {
|
|
|
32
32
|
title: string;
|
|
33
33
|
items: CustomNavItem[];
|
|
34
34
|
}
|
|
35
|
+
/** Single option for CRUD list filters and for `CustomCrudColumn.type === 'select'` form fields. */
|
|
36
|
+
interface CrudFilterSelectOption {
|
|
37
|
+
value: string;
|
|
38
|
+
label: string;
|
|
39
|
+
}
|
|
35
40
|
interface CustomCrudColumn {
|
|
36
41
|
field: string;
|
|
37
42
|
displayName: string;
|
|
38
43
|
type?: string;
|
|
44
|
+
/** Placeholder for plain text/number inputs in the CRUD modal form. */
|
|
45
|
+
placeholder?: string;
|
|
46
|
+
/**
|
|
47
|
+
* For `type: 'select'`: fixed choices in Add/Edit (e.g. job application status).
|
|
48
|
+
* Example: `{ field: 'status', displayName: 'Status', type: 'select', options: [{ value: 'new', label: 'New' }, ...] }`
|
|
49
|
+
*/
|
|
50
|
+
options?: CrudFilterSelectOption[];
|
|
51
|
+
/** Initial value when creating a row (works with `select` and plain fields). */
|
|
52
|
+
defaultValue?: string | number | boolean;
|
|
39
53
|
/** When set, form renders an async searchable relation dropdown instead of a plain input. */
|
|
40
54
|
relationApi?: string;
|
|
41
55
|
/** Field on the relation entity to show in the list (default: 'name'). */
|
|
42
56
|
relationLabelField?: string;
|
|
43
57
|
/** Field on the relation entity to use as value (default: 'id'). */
|
|
44
58
|
relationValueField?: string;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
59
|
+
/** Override query param for auto-generated list filters (default: `field`). */
|
|
60
|
+
filterParam?: string;
|
|
61
|
+
/** Override filter control label (default: `displayName`). */
|
|
62
|
+
filterLabel?: string;
|
|
63
|
+
/** When `false`, this column is not used for auto-generated list filters. */
|
|
64
|
+
listFilter?: boolean;
|
|
50
65
|
}
|
|
51
66
|
interface CrudFilter {
|
|
52
|
-
/** Query param name (e.g. status, dateFrom, paymentRef). */
|
|
67
|
+
/** Query param name (e.g. status, dateFrom, paymentRef). List filter: select, dateRange, or text. */
|
|
53
68
|
param: string;
|
|
54
69
|
label: string;
|
|
55
70
|
type: 'select' | 'dateRange' | 'text';
|
|
@@ -111,8 +126,13 @@ type CrudFilterItem = {
|
|
|
111
126
|
label: string;
|
|
112
127
|
type: 'select' | 'dateRange' | 'text';
|
|
113
128
|
options?: CrudFilterOption[];
|
|
129
|
+
/** When set, merge runtime options from relation list fetch (id → label). */
|
|
130
|
+
relationApi?: string;
|
|
131
|
+
relationLabelField?: string;
|
|
132
|
+
relationValueField?: string;
|
|
114
133
|
};
|
|
115
|
-
|
|
134
|
+
|
|
135
|
+
declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, customViewPageUrl, defaultSortField, defaultSortOrder, filters, filterColumns, extraListParams, manageUserGroups, }: {
|
|
116
136
|
title: string;
|
|
117
137
|
apiEndpoint: string;
|
|
118
138
|
columns: any[];
|
|
@@ -121,18 +141,23 @@ declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, custom
|
|
|
121
141
|
defaultSortField?: string;
|
|
122
142
|
defaultSortOrder?: 'asc' | 'desc';
|
|
123
143
|
filters?: CrudFilterItem[];
|
|
144
|
+
/** Full column config for deriving list filters (`select`, `boolean`, `relationApi`). List `columns` may omit hidden fields. */
|
|
145
|
+
filterColumns?: any[];
|
|
124
146
|
extraListParams?: Record<string, string>;
|
|
125
147
|
/** When true, show group (role) selector for each user; requires GET /api/admin/roles. */
|
|
126
148
|
manageUserGroups?: boolean;
|
|
127
149
|
}): react_jsx_runtime.JSX.Element;
|
|
128
150
|
|
|
129
|
-
|
|
130
|
-
isOpen:
|
|
131
|
-
onClose:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
151
|
+
type CreateEditFormProps = {
|
|
152
|
+
isOpen: boolean;
|
|
153
|
+
onClose: () => void;
|
|
154
|
+
/** Called only after a successful POST/PUT so parents can refetch lists without reloading on cancel. */
|
|
155
|
+
onSaveSuccess?: () => void;
|
|
156
|
+
apiEndpoint: string;
|
|
157
|
+
columns: any[];
|
|
158
|
+
existingData?: Record<string, unknown> | null;
|
|
159
|
+
};
|
|
160
|
+
declare function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns, existingData, }: CreateEditFormProps): react_jsx_runtime.JSX.Element | null;
|
|
136
161
|
|
|
137
162
|
declare function FormBuilder({ formId }: {
|
|
138
163
|
formId?: string;
|
|
@@ -246,6 +271,8 @@ declare function AdminPageResolver({ slug }: {
|
|
|
246
271
|
|
|
247
272
|
declare function SettingsPage(): react_jsx_runtime.JSX.Element;
|
|
248
273
|
|
|
274
|
+
declare function AdminProfilePage(): react_jsx_runtime.JSX.Element | null;
|
|
275
|
+
|
|
249
276
|
declare function LayoutSettingsPage(): react_jsx_runtime.JSX.Element;
|
|
250
277
|
|
|
251
278
|
interface PageBuilderPageProps {
|
|
@@ -296,4 +323,4 @@ declare function CmsProviders({ children }: {
|
|
|
296
323
|
children: React.ReactNode;
|
|
297
324
|
}): react_jsx_runtime.JSX.Element;
|
|
298
325
|
|
|
299
|
-
export { AdminCRUD, AdminConfigContext, DashboardPage as AdminDashboardPage, ForgotPasswordPage as AdminForgotPasswordPage, AdminHeader, InvitePage as AdminInvitePage, AdminLayout, type AdminLayoutProps, AdminPageResolver, ResetPasswordPage as AdminResetPasswordPage, SettingsPage as AdminSettingsPage, AdminShell, AdminSidebar, SigninPage as AdminSignInPage, AnalyticsCard, AnalyticsChart, AnalyticsExclusion, BlogEditor as BlogEditorPage, BrandEditPage, CategoryAutocomplete, CmsProviders, CollectionEditPage, ComponentSettings, CreateEditForm, type CustomCrudColumn, type CustomCrudConfig, type CustomNavItem, type CustomNavSection, DailyUserChart, DetailPageHeader, type DetailPageHeaderMenuItem, DetailPageLayout, FormBuilder, GeographicMap, JoditRichText, LayoutSettingsPage, NavbarEditor, PageBuilderPage, type PluginDescriptor, ProductEditPage, STORE_CRUD_CONFIGS, TagAutocomplete, type ThemeRegistryItem, UserAutocomplete, AdminLayout as default };
|
|
326
|
+
export { AdminCRUD, AdminConfigContext, DashboardPage as AdminDashboardPage, ForgotPasswordPage as AdminForgotPasswordPage, AdminHeader, InvitePage as AdminInvitePage, AdminLayout, type AdminLayoutProps, AdminPageResolver, AdminProfilePage, ResetPasswordPage as AdminResetPasswordPage, SettingsPage as AdminSettingsPage, AdminShell, AdminSidebar, SigninPage as AdminSignInPage, AnalyticsCard, AnalyticsChart, AnalyticsExclusion, BlogEditor as BlogEditorPage, BrandEditPage, CategoryAutocomplete, CmsProviders, CollectionEditPage, ComponentSettings, CreateEditForm, type CustomCrudColumn, type CustomCrudConfig, type CustomNavItem, type CustomNavSection, DailyUserChart, DetailPageHeader, type DetailPageHeaderMenuItem, DetailPageLayout, FormBuilder, GeographicMap, JoditRichText, LayoutSettingsPage, NavbarEditor, PageBuilderPage, type PluginDescriptor, ProductEditPage, STORE_CRUD_CONFIGS, TagAutocomplete, type ThemeRegistryItem, UserAutocomplete, AdminLayout as default };
|