@infuro/cms-core 1.0.4 → 1.0.5
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 +3205 -1349
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.d.cts +44 -2
- package/dist/admin.d.ts +44 -2
- package/dist/admin.js +3219 -1359
- 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
|
|
|
@@ -75,12 +97,26 @@ declare function AdminHeader(): react_jsx_runtime.JSX.Element;
|
|
|
75
97
|
|
|
76
98
|
declare function AdminSidebar(): react_jsx_runtime.JSX.Element;
|
|
77
99
|
|
|
78
|
-
|
|
100
|
+
type CrudFilterOption = {
|
|
101
|
+
value: string;
|
|
102
|
+
label: string;
|
|
103
|
+
};
|
|
104
|
+
type CrudFilterItem = {
|
|
105
|
+
param: string;
|
|
106
|
+
label: string;
|
|
107
|
+
type: 'select' | 'dateRange' | 'text';
|
|
108
|
+
options?: CrudFilterOption[];
|
|
109
|
+
};
|
|
110
|
+
declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, customViewPageUrl, defaultSortField, defaultSortOrder, filters, extraListParams, }: {
|
|
79
111
|
title: string;
|
|
80
112
|
apiEndpoint: string;
|
|
81
113
|
columns: any[];
|
|
82
114
|
addEditPageUrl: string;
|
|
83
115
|
customViewPageUrl?: string;
|
|
116
|
+
defaultSortField?: string;
|
|
117
|
+
defaultSortOrder?: 'asc' | 'desc';
|
|
118
|
+
filters?: CrudFilterItem[];
|
|
119
|
+
extraListParams?: Record<string, string>;
|
|
84
120
|
}): react_jsx_runtime.JSX.Element;
|
|
85
121
|
|
|
86
122
|
declare function CreateEditForm({ isOpen, onClose, apiEndpoint, columns, existingData }: {
|
|
@@ -202,8 +238,14 @@ interface PageBuilderPageProps {
|
|
|
202
238
|
}
|
|
203
239
|
declare function PageBuilderPage({ pageId }: PageBuilderPageProps): react_jsx_runtime.JSX.Element;
|
|
204
240
|
|
|
241
|
+
declare function BrandEditPage({ brandId }: {
|
|
242
|
+
brandId: string;
|
|
243
|
+
}): react_jsx_runtime.JSX.Element;
|
|
244
|
+
|
|
245
|
+
declare const STORE_CRUD_CONFIGS: Record<string, CustomCrudConfig>;
|
|
246
|
+
|
|
205
247
|
declare function CmsProviders({ children }: {
|
|
206
248
|
children: React.ReactNode;
|
|
207
249
|
}): react_jsx_runtime.JSX.Element;
|
|
208
250
|
|
|
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 };
|
|
251
|
+
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
|
|
|
@@ -75,12 +97,26 @@ declare function AdminHeader(): react_jsx_runtime.JSX.Element;
|
|
|
75
97
|
|
|
76
98
|
declare function AdminSidebar(): react_jsx_runtime.JSX.Element;
|
|
77
99
|
|
|
78
|
-
|
|
100
|
+
type CrudFilterOption = {
|
|
101
|
+
value: string;
|
|
102
|
+
label: string;
|
|
103
|
+
};
|
|
104
|
+
type CrudFilterItem = {
|
|
105
|
+
param: string;
|
|
106
|
+
label: string;
|
|
107
|
+
type: 'select' | 'dateRange' | 'text';
|
|
108
|
+
options?: CrudFilterOption[];
|
|
109
|
+
};
|
|
110
|
+
declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, customViewPageUrl, defaultSortField, defaultSortOrder, filters, extraListParams, }: {
|
|
79
111
|
title: string;
|
|
80
112
|
apiEndpoint: string;
|
|
81
113
|
columns: any[];
|
|
82
114
|
addEditPageUrl: string;
|
|
83
115
|
customViewPageUrl?: string;
|
|
116
|
+
defaultSortField?: string;
|
|
117
|
+
defaultSortOrder?: 'asc' | 'desc';
|
|
118
|
+
filters?: CrudFilterItem[];
|
|
119
|
+
extraListParams?: Record<string, string>;
|
|
84
120
|
}): react_jsx_runtime.JSX.Element;
|
|
85
121
|
|
|
86
122
|
declare function CreateEditForm({ isOpen, onClose, apiEndpoint, columns, existingData }: {
|
|
@@ -202,8 +238,14 @@ interface PageBuilderPageProps {
|
|
|
202
238
|
}
|
|
203
239
|
declare function PageBuilderPage({ pageId }: PageBuilderPageProps): react_jsx_runtime.JSX.Element;
|
|
204
240
|
|
|
241
|
+
declare function BrandEditPage({ brandId }: {
|
|
242
|
+
brandId: string;
|
|
243
|
+
}): react_jsx_runtime.JSX.Element;
|
|
244
|
+
|
|
245
|
+
declare const STORE_CRUD_CONFIGS: Record<string, CustomCrudConfig>;
|
|
246
|
+
|
|
205
247
|
declare function CmsProviders({ children }: {
|
|
206
248
|
children: React.ReactNode;
|
|
207
249
|
}): react_jsx_runtime.JSX.Element;
|
|
208
250
|
|
|
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 };
|
|
251
|
+
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 };
|