@infuro/cms-core 1.0.4 → 1.0.6
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 +77 -30
- package/dist/admin.cjs +3910 -1883
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.d.cts +48 -3
- package/dist/admin.d.ts +48 -3
- package/dist/admin.js +3894 -1854
- package/dist/admin.js.map +1 -1
- package/dist/api.cjs +296 -4
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.cts +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.js +297 -5
- package/dist/api.js.map +1 -1
- package/dist/{index-DP3LK1XN.d.cts → index-BPnATEXW.d.cts} +3 -0
- package/dist/{index-DP3LK1XN.d.ts → index-BPnATEXW.d.ts} +3 -0
- package/dist/index.cjs +1521 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +270 -13
- package/dist/index.d.ts +270 -13
- package/dist/index.js +1512 -107
- package/dist/index.js.map +1 -1
- package/package.json +9 -3
package/dist/admin.d.cts
CHANGED
|
@@ -18,6 +18,8 @@ interface PluginDescriptor {
|
|
|
18
18
|
version: string;
|
|
19
19
|
description?: string;
|
|
20
20
|
enabled?: boolean;
|
|
21
|
+
/** Icon name for card display (e.g. 'storage', 'email', 'payment') */
|
|
22
|
+
icon?: string;
|
|
21
23
|
}
|
|
22
24
|
interface CustomNavItem {
|
|
23
25
|
href: string;
|
|
@@ -39,11 +41,30 @@ interface CustomCrudColumn {
|
|
|
39
41
|
/** Field on the relation entity to use as value (default: 'id'). */
|
|
40
42
|
relationValueField?: string;
|
|
41
43
|
}
|
|
44
|
+
/** Single filter: select (status, method, inventory) or dateRange or text (paymentRef, orderNumber). */
|
|
45
|
+
interface CrudFilterSelectOption {
|
|
46
|
+
value: string;
|
|
47
|
+
label: string;
|
|
48
|
+
}
|
|
49
|
+
interface CrudFilter {
|
|
50
|
+
/** Query param name (e.g. status, dateFrom, paymentRef). */
|
|
51
|
+
param: string;
|
|
52
|
+
label: string;
|
|
53
|
+
type: 'select' | 'dateRange' | 'text';
|
|
54
|
+
/** For type select: options. For dateRange: param is base; API expects param+From and param+To (e.g. dateFrom, dateTo). */
|
|
55
|
+
options?: CrudFilterSelectOption[];
|
|
56
|
+
}
|
|
42
57
|
interface CustomCrudConfig {
|
|
43
58
|
title: string;
|
|
44
59
|
apiEndpoint: string;
|
|
45
60
|
columns: CustomCrudColumn[];
|
|
46
61
|
addEditPageUrl: string;
|
|
62
|
+
/** Default sort order for list (e.g. 'desc' for newest first). */
|
|
63
|
+
defaultSortOrder?: 'asc' | 'desc';
|
|
64
|
+
/** Default sort field for list (e.g. 'createdAt'). */
|
|
65
|
+
defaultSortField?: string;
|
|
66
|
+
/** Optional list filters (status, date range, paymentRef, orderNumber, etc.). */
|
|
67
|
+
filters?: CrudFilter[];
|
|
47
68
|
}
|
|
48
69
|
interface AdminConfigValue {
|
|
49
70
|
customNavItems: CustomNavItem[];
|
|
@@ -53,6 +74,7 @@ interface AdminConfigValue {
|
|
|
53
74
|
themeRegistry?: ThemeRegistryItem[];
|
|
54
75
|
activeThemeId?: string;
|
|
55
76
|
pluginDescriptors?: PluginDescriptor[];
|
|
77
|
+
storeEnabled?: boolean;
|
|
56
78
|
}
|
|
57
79
|
declare const AdminConfigContext: React$1.Context<AdminConfigValue>;
|
|
58
80
|
|
|
@@ -73,14 +95,31 @@ declare function AdminShell({ children }: {
|
|
|
73
95
|
|
|
74
96
|
declare function AdminHeader(): react_jsx_runtime.JSX.Element;
|
|
75
97
|
|
|
76
|
-
|
|
98
|
+
interface AdminSidebarProps {
|
|
99
|
+
variant?: 'sidebar' | 'drawer';
|
|
100
|
+
}
|
|
101
|
+
declare function AdminSidebar({ variant }: AdminSidebarProps): react_jsx_runtime.JSX.Element;
|
|
77
102
|
|
|
78
|
-
|
|
103
|
+
type CrudFilterOption = {
|
|
104
|
+
value: string;
|
|
105
|
+
label: string;
|
|
106
|
+
};
|
|
107
|
+
type CrudFilterItem = {
|
|
108
|
+
param: string;
|
|
109
|
+
label: string;
|
|
110
|
+
type: 'select' | 'dateRange' | 'text';
|
|
111
|
+
options?: CrudFilterOption[];
|
|
112
|
+
};
|
|
113
|
+
declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, customViewPageUrl, defaultSortField, defaultSortOrder, filters, extraListParams, }: {
|
|
79
114
|
title: string;
|
|
80
115
|
apiEndpoint: string;
|
|
81
116
|
columns: any[];
|
|
82
117
|
addEditPageUrl: string;
|
|
83
118
|
customViewPageUrl?: string;
|
|
119
|
+
defaultSortField?: string;
|
|
120
|
+
defaultSortOrder?: 'asc' | 'desc';
|
|
121
|
+
filters?: CrudFilterItem[];
|
|
122
|
+
extraListParams?: Record<string, string>;
|
|
84
123
|
}): react_jsx_runtime.JSX.Element;
|
|
85
124
|
|
|
86
125
|
declare function CreateEditForm({ isOpen, onClose, apiEndpoint, columns, existingData }: {
|
|
@@ -202,8 +241,14 @@ interface PageBuilderPageProps {
|
|
|
202
241
|
}
|
|
203
242
|
declare function PageBuilderPage({ pageId }: PageBuilderPageProps): react_jsx_runtime.JSX.Element;
|
|
204
243
|
|
|
244
|
+
declare function BrandEditPage({ brandId }: {
|
|
245
|
+
brandId: string;
|
|
246
|
+
}): react_jsx_runtime.JSX.Element;
|
|
247
|
+
|
|
248
|
+
declare const STORE_CRUD_CONFIGS: Record<string, CustomCrudConfig>;
|
|
249
|
+
|
|
205
250
|
declare function CmsProviders({ children }: {
|
|
206
251
|
children: React.ReactNode;
|
|
207
252
|
}): react_jsx_runtime.JSX.Element;
|
|
208
253
|
|
|
209
|
-
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, CategoryAutocomplete, CmsProviders, ComponentSettings, CreateEditForm, type CustomCrudColumn, type CustomCrudConfig, type CustomNavItem, type CustomNavSection, DailyUserChart, FormBuilder, GeographicMap, LayoutSettingsPage, NavbarEditor, PageBuilderPage, type PluginDescriptor, TagAutocomplete, type ThemeRegistryItem, UserAutocomplete, AdminLayout as default };
|
|
254
|
+
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, ComponentSettings, CreateEditForm, type CustomCrudColumn, type CustomCrudConfig, type CustomNavItem, type CustomNavSection, DailyUserChart, FormBuilder, GeographicMap, LayoutSettingsPage, NavbarEditor, PageBuilderPage, type PluginDescriptor, STORE_CRUD_CONFIGS, TagAutocomplete, type ThemeRegistryItem, UserAutocomplete, AdminLayout as default };
|
package/dist/admin.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ interface PluginDescriptor {
|
|
|
18
18
|
version: string;
|
|
19
19
|
description?: string;
|
|
20
20
|
enabled?: boolean;
|
|
21
|
+
/** Icon name for card display (e.g. 'storage', 'email', 'payment') */
|
|
22
|
+
icon?: string;
|
|
21
23
|
}
|
|
22
24
|
interface CustomNavItem {
|
|
23
25
|
href: string;
|
|
@@ -39,11 +41,30 @@ interface CustomCrudColumn {
|
|
|
39
41
|
/** Field on the relation entity to use as value (default: 'id'). */
|
|
40
42
|
relationValueField?: string;
|
|
41
43
|
}
|
|
44
|
+
/** Single filter: select (status, method, inventory) or dateRange or text (paymentRef, orderNumber). */
|
|
45
|
+
interface CrudFilterSelectOption {
|
|
46
|
+
value: string;
|
|
47
|
+
label: string;
|
|
48
|
+
}
|
|
49
|
+
interface CrudFilter {
|
|
50
|
+
/** Query param name (e.g. status, dateFrom, paymentRef). */
|
|
51
|
+
param: string;
|
|
52
|
+
label: string;
|
|
53
|
+
type: 'select' | 'dateRange' | 'text';
|
|
54
|
+
/** For type select: options. For dateRange: param is base; API expects param+From and param+To (e.g. dateFrom, dateTo). */
|
|
55
|
+
options?: CrudFilterSelectOption[];
|
|
56
|
+
}
|
|
42
57
|
interface CustomCrudConfig {
|
|
43
58
|
title: string;
|
|
44
59
|
apiEndpoint: string;
|
|
45
60
|
columns: CustomCrudColumn[];
|
|
46
61
|
addEditPageUrl: string;
|
|
62
|
+
/** Default sort order for list (e.g. 'desc' for newest first). */
|
|
63
|
+
defaultSortOrder?: 'asc' | 'desc';
|
|
64
|
+
/** Default sort field for list (e.g. 'createdAt'). */
|
|
65
|
+
defaultSortField?: string;
|
|
66
|
+
/** Optional list filters (status, date range, paymentRef, orderNumber, etc.). */
|
|
67
|
+
filters?: CrudFilter[];
|
|
47
68
|
}
|
|
48
69
|
interface AdminConfigValue {
|
|
49
70
|
customNavItems: CustomNavItem[];
|
|
@@ -53,6 +74,7 @@ interface AdminConfigValue {
|
|
|
53
74
|
themeRegistry?: ThemeRegistryItem[];
|
|
54
75
|
activeThemeId?: string;
|
|
55
76
|
pluginDescriptors?: PluginDescriptor[];
|
|
77
|
+
storeEnabled?: boolean;
|
|
56
78
|
}
|
|
57
79
|
declare const AdminConfigContext: React$1.Context<AdminConfigValue>;
|
|
58
80
|
|
|
@@ -73,14 +95,31 @@ declare function AdminShell({ children }: {
|
|
|
73
95
|
|
|
74
96
|
declare function AdminHeader(): react_jsx_runtime.JSX.Element;
|
|
75
97
|
|
|
76
|
-
|
|
98
|
+
interface AdminSidebarProps {
|
|
99
|
+
variant?: 'sidebar' | 'drawer';
|
|
100
|
+
}
|
|
101
|
+
declare function AdminSidebar({ variant }: AdminSidebarProps): react_jsx_runtime.JSX.Element;
|
|
77
102
|
|
|
78
|
-
|
|
103
|
+
type CrudFilterOption = {
|
|
104
|
+
value: string;
|
|
105
|
+
label: string;
|
|
106
|
+
};
|
|
107
|
+
type CrudFilterItem = {
|
|
108
|
+
param: string;
|
|
109
|
+
label: string;
|
|
110
|
+
type: 'select' | 'dateRange' | 'text';
|
|
111
|
+
options?: CrudFilterOption[];
|
|
112
|
+
};
|
|
113
|
+
declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, customViewPageUrl, defaultSortField, defaultSortOrder, filters, extraListParams, }: {
|
|
79
114
|
title: string;
|
|
80
115
|
apiEndpoint: string;
|
|
81
116
|
columns: any[];
|
|
82
117
|
addEditPageUrl: string;
|
|
83
118
|
customViewPageUrl?: string;
|
|
119
|
+
defaultSortField?: string;
|
|
120
|
+
defaultSortOrder?: 'asc' | 'desc';
|
|
121
|
+
filters?: CrudFilterItem[];
|
|
122
|
+
extraListParams?: Record<string, string>;
|
|
84
123
|
}): react_jsx_runtime.JSX.Element;
|
|
85
124
|
|
|
86
125
|
declare function CreateEditForm({ isOpen, onClose, apiEndpoint, columns, existingData }: {
|
|
@@ -202,8 +241,14 @@ interface PageBuilderPageProps {
|
|
|
202
241
|
}
|
|
203
242
|
declare function PageBuilderPage({ pageId }: PageBuilderPageProps): react_jsx_runtime.JSX.Element;
|
|
204
243
|
|
|
244
|
+
declare function BrandEditPage({ brandId }: {
|
|
245
|
+
brandId: string;
|
|
246
|
+
}): react_jsx_runtime.JSX.Element;
|
|
247
|
+
|
|
248
|
+
declare const STORE_CRUD_CONFIGS: Record<string, CustomCrudConfig>;
|
|
249
|
+
|
|
205
250
|
declare function CmsProviders({ children }: {
|
|
206
251
|
children: React.ReactNode;
|
|
207
252
|
}): react_jsx_runtime.JSX.Element;
|
|
208
253
|
|
|
209
|
-
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, CategoryAutocomplete, CmsProviders, ComponentSettings, CreateEditForm, type CustomCrudColumn, type CustomCrudConfig, type CustomNavItem, type CustomNavSection, DailyUserChart, FormBuilder, GeographicMap, LayoutSettingsPage, NavbarEditor, PageBuilderPage, type PluginDescriptor, TagAutocomplete, type ThemeRegistryItem, UserAutocomplete, AdminLayout as default };
|
|
254
|
+
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, ComponentSettings, CreateEditForm, type CustomCrudColumn, type CustomCrudConfig, type CustomNavItem, type CustomNavSection, DailyUserChart, FormBuilder, GeographicMap, LayoutSettingsPage, NavbarEditor, PageBuilderPage, type PluginDescriptor, STORE_CRUD_CONFIGS, TagAutocomplete, type ThemeRegistryItem, UserAutocomplete, AdminLayout as default };
|