@infuro/cms-core 1.0.34 → 1.0.35
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 +13 -0
- package/dist/OrderTrackPage-W3J6WIG2.js +426 -0
- package/dist/OrderTrackPage-Z6FCJQYY.cjs +428 -0
- package/dist/admin.cjs +34329 -20923
- package/dist/admin.d.cts +186 -9
- package/dist/admin.d.ts +186 -9
- package/dist/admin.js +34140 -20829
- package/dist/api.cjs +120 -17515
- package/dist/api.d.cts +633 -3
- package/dist/api.d.ts +633 -3
- package/dist/api.js +14 -17528
- package/dist/auth.cjs +192 -1034
- package/dist/auth.d.cts +194 -51
- package/dist/auth.d.ts +194 -51
- package/dist/auth.js +4 -966
- package/dist/chunk-2XE4X74C.js +29602 -0
- package/dist/chunk-3DZRIZOD.cjs +52 -0
- package/dist/chunk-3KPNTQBV.cjs +620 -0
- package/dist/chunk-46GKADYE.cjs +84 -0
- package/dist/chunk-4TRPKBKO.js +589 -0
- package/dist/chunk-5ELSW2UP.js +150 -0
- package/dist/chunk-6KPQWRFW.js +171 -0
- package/dist/chunk-7NMT3GBR.cjs +29 -0
- package/dist/chunk-7YIBMQDR.cjs +86 -0
- package/dist/chunk-BGJAV67S.cjs +29710 -0
- package/dist/chunk-CNTSLED2.cjs +559 -0
- package/dist/chunk-CRFV5WJK.js +16 -0
- package/dist/chunk-D5FBNKQM.cjs +104 -0
- package/dist/chunk-EF2JBPDM.js +114 -0
- package/dist/chunk-EQPITOP6.js +543 -0
- package/dist/chunk-GO7PPYNU.js +76 -0
- package/dist/chunk-HF3L2GIT.cjs +194 -0
- package/dist/chunk-J7XHLOLO.js +830 -0
- package/dist/chunk-JBRR5UYL.js +87 -0
- package/dist/chunk-JC6DLWTE.js +21 -0
- package/dist/chunk-JHF4YYRC.cjs +188 -0
- package/dist/chunk-JXF23MPG.js +25 -0
- package/dist/chunk-MQBT33IV.js +48 -0
- package/dist/chunk-N44BJZ4C.cjs +123 -0
- package/dist/chunk-OOTLNH63.cjs +18 -0
- package/dist/chunk-PAMVINEX.cjs +577 -0
- package/dist/chunk-PNOKNSG2.cjs +222 -0
- package/dist/chunk-QM733NUK.js +186 -0
- package/dist/chunk-R73BKDRO.cjs +90 -0
- package/dist/chunk-SHUYVCID.js +4 -0
- package/dist/chunk-SYBOCAWB.js +97 -0
- package/dist/chunk-TDV6EJHV.js +192 -0
- package/dist/chunk-TFUOHI37.cjs +839 -0
- package/dist/chunk-TIAEXJLI.cjs +182 -0
- package/dist/chunk-UPLVMVRX.cjs +23 -0
- package/dist/chunk-USNT2KNT.cjs +6 -0
- package/dist/chunk-WEMDMVHQ.js +216 -0
- package/dist/chunk-XDSNZUW7.js +564 -0
- package/dist/chunk-XQ3QUHWR.cjs +83 -0
- package/dist/chunk-XW5ATPRW.cjs +155 -0
- package/dist/chunk-ZQ4X6OAU.js +82 -0
- package/dist/chunk-ZSVCP6N3.js +83 -0
- package/dist/cli.cjs +103 -84
- package/dist/cli.js +62 -27
- package/dist/email-FKR4FXFI.js +5 -0
- package/dist/email-KVKVPNCL.cjs +58 -0
- package/dist/email-queue-CGZBVVAS.js +2 -0
- package/dist/email-queue-TPZWLTIV.cjs +23 -0
- package/dist/erp-config-enabled-CUMQ6N2V.cjs +11 -0
- package/dist/erp-config-enabled-T37X7T34.js +2 -0
- package/dist/erp-order-invoice-3YISSOWW.js +3 -0
- package/dist/erp-order-invoice-ZR5F2KTA.cjs +12 -0
- package/dist/event-order-defaults-6E543227.js +2 -0
- package/dist/event-order-defaults-DUGDVGJI.cjs +39 -0
- package/dist/event-order-notifications-5GSAOYVS.cjs +27 -0
- package/dist/event-order-notifications-IIIF23D5.js +10 -0
- package/dist/hooks.cjs +259 -132
- package/dist/hooks.d.cts +42 -1
- package/dist/hooks.d.ts +42 -1
- package/dist/hooks.js +234 -91
- package/dist/index.cjs +3884 -22307
- package/dist/index.d.cts +2203 -772
- package/dist/index.d.ts +2203 -772
- package/dist/index.js +2871 -22064
- package/dist/interpolate-WAKPN56R.cjs +11 -0
- package/dist/interpolate-WDUWDF3I.js +2 -0
- package/dist/layout-36UFTHC5.cjs +11 -0
- package/dist/layout-AOBN26XG.js +2 -0
- package/dist/migrations/1779400000000-ConvertStatusToEnum.ts +142 -0
- package/dist/migrations/1779400000000-SeedDefaultCurrencies.ts +33 -0
- package/dist/migrations/1779500000000-VendorRolesAndPermissions.ts +102 -0
- package/dist/migrations/1779600000000-VendorRegistrationProfile.ts +52 -0
- package/dist/migrations/1779700000000-CollectionIsCatalog.ts +22 -0
- package/dist/migrations/1779710000000-CollectionPlatformCatalog.ts +60 -0
- package/dist/migrations/1779720000000-ProductCategoryPlatformCatalog.ts +157 -0
- package/dist/migrations/1779800000000-EventsAndEventProducts.ts +173 -0
- package/dist/migrations/1779810000000-BackfillVendorRoleEventsPermissions.ts +38 -0
- package/dist/migrations/1779820000000-FixProductsCategoryForeignKey.ts +70 -0
- package/dist/migrations/1779830000000-ProductTitleColumn.ts +32 -0
- package/dist/migrations/1779840000000-EventAboutAndVisibilityFields.ts +34 -0
- package/dist/migrations/1779850000000-EventCityCountrySplit.ts +43 -0
- package/dist/migrations/1779860000000-CreateCombos.ts +140 -0
- package/dist/migrations/1780100000000-OrderAttendeesEventId.ts +55 -0
- package/dist/migrations/1780110000000-EventContactFormId.ts +49 -0
- package/dist/migrations/1780130000000-ProductVariants.ts +54 -0
- package/dist/migrations/1780140000000-EventManagementEnhancements.ts +44 -0
- package/dist/migrations/1780160000000-EventRegistrationGstProductContactForm.ts +79 -0
- package/dist/migrations/1780170000000-ComboCurrencyPrices.ts +20 -0
- package/dist/migrations/1781110000000-VendorOwnerCombosPermission.ts +38 -0
- package/dist/migrations/1781120000000-RefundPoliciesAndRequests.ts +225 -0
- package/dist/migrations/1781130000000-CreateAttendees.ts +44 -0
- package/dist/migrations/1781140000000-EventOrderNotifications.ts +29 -0
- package/dist/migrations/1781150000000-EventNamedLists.ts +28 -0
- package/dist/migrations/1781160000000-RefundPolicyEventTiers.ts +27 -0
- package/dist/migrations/1781170000000-EventRefundPolicy.ts +42 -0
- package/dist/migrations/1781180000000-RemoveCartItemsUniqueConstraint.ts +15 -0
- package/dist/migrations/1781190000000-RenameProductTaxesToProductConfig.ts +84 -0
- package/dist/migrations/1781200000000-VendorOwnerProductConfigPermissions.ts +51 -0
- package/dist/migrations/1781210000000-VendorRoleProductConfigPermissions.ts +46 -0
- package/dist/migrations/helpers/vendor-role-seed.ts +243 -0
- package/dist/paid-order-erp-3USEG6WL.js +3 -0
- package/dist/paid-order-erp-FSQ3GSXE.cjs +12 -0
- package/dist/pg-boss-service-4XF2TQ2E.js +2 -0
- package/dist/pg-boss-service-L6MTF4EQ.cjs +15 -0
- package/dist/razorpay-KLO2KNCB.js +49 -0
- package/dist/razorpay-U23LGY72.cjs +56 -0
- package/dist/rbac-debug-db-D7ME7QUY.cjs +35 -0
- package/dist/rbac-debug-db-MTCTVNNM.js +33 -0
- package/dist/sms-defaults-2NL24H57.js +2 -0
- package/dist/sms-defaults-KCOPKQBA.cjs +19 -0
- package/dist/stripe-4FD27QVJ.js +51 -0
- package/dist/stripe-VU6OEG2D.cjs +57 -0
- package/dist/theme.cjs +31 -59
- package/dist/theme.d.cts +78 -3
- package/dist/theme.d.ts +78 -3
- package/dist/theme.js +23 -20
- package/dist/vendor-invite-status-77O7ZQ3U.cjs +19 -0
- package/dist/vendor-invite-status-PWJ3DE76.js +2 -0
- package/dist/whatsapp-queue-3DXA4MXU.js +2 -0
- package/dist/whatsapp-queue-KG65MXD5.cjs +15 -0
- package/package.json +147 -142
- package/dist/admin.cjs.map +0 -1
- package/dist/admin.js.map +0 -1
- package/dist/api.cjs.map +0 -1
- package/dist/api.js.map +0 -1
- package/dist/auth.cjs.map +0 -1
- package/dist/auth.js.map +0 -1
- package/dist/cli.cjs.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/config-DJ5CmQvS.d.cts +0 -8
- package/dist/config-DJ5CmQvS.d.ts +0 -8
- package/dist/hooks.cjs.map +0 -1
- package/dist/hooks.js.map +0 -1
- package/dist/index-Bf5GO8fu.d.cts +0 -583
- package/dist/index-DOiJuMQA.d.ts +0 -583
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/theme.cjs.map +0 -1
- package/dist/theme.js.map +0 -1
- package/dist/types-DCVaXlPV.d.cts +0 -78
- package/dist/types-DCVaXlPV.d.ts +0 -78
- package/dist/vendor-scope-DTYhJk_I.d.cts +0 -129
- package/dist/vendor-scope-DTYhJk_I.d.ts +0 -129
package/dist/admin.d.cts
CHANGED
|
@@ -1,7 +1,82 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import React$1 from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import React$1, { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type PropType = 'text' | 'textarea' | 'richtext' | 'image' | 'color' | 'select' | 'number' | 'boolean' | 'url' | 'entity';
|
|
5
|
+
interface PropDefinition {
|
|
6
|
+
name: string;
|
|
7
|
+
label: string;
|
|
8
|
+
type: PropType;
|
|
9
|
+
options?: {
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[];
|
|
13
|
+
entity?: string;
|
|
14
|
+
displayField?: string;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface ComponentMeta {
|
|
18
|
+
name: string;
|
|
19
|
+
label: string;
|
|
20
|
+
category: string;
|
|
21
|
+
icon: string;
|
|
22
|
+
description: string;
|
|
23
|
+
defaultProps: Record<string, any>;
|
|
24
|
+
props?: PropDefinition[];
|
|
25
|
+
canContainChildren?: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface ThemeComponent {
|
|
28
|
+
meta: ComponentMeta;
|
|
29
|
+
component: React.ComponentType<any>;
|
|
30
|
+
}
|
|
31
|
+
interface NavItem {
|
|
32
|
+
id: string;
|
|
33
|
+
label: string;
|
|
34
|
+
url: string;
|
|
35
|
+
openInNewTab?: boolean;
|
|
36
|
+
/** When set, url is derived from the linked page slug. */
|
|
37
|
+
pageId?: number;
|
|
38
|
+
children?: NavItem[];
|
|
39
|
+
}
|
|
40
|
+
interface NavbarConfig {
|
|
41
|
+
logo: string;
|
|
42
|
+
items: NavItem[];
|
|
43
|
+
ctaLabel?: string;
|
|
44
|
+
ctaUrl?: string;
|
|
45
|
+
/** Optional variant for theme-specific layout (e.g. "page2"). */
|
|
46
|
+
variant?: string;
|
|
47
|
+
}
|
|
48
|
+
interface FooterConfig {
|
|
49
|
+
copyright: string;
|
|
50
|
+
columns: {
|
|
51
|
+
title: string;
|
|
52
|
+
links: {
|
|
53
|
+
label: string;
|
|
54
|
+
url: string;
|
|
55
|
+
}[];
|
|
56
|
+
}[];
|
|
57
|
+
socialLinks: {
|
|
58
|
+
icon: string;
|
|
59
|
+
url: string;
|
|
60
|
+
}[];
|
|
61
|
+
/** When set, footer shows this logo (e.g. same as navbar). */
|
|
62
|
+
logo?: string;
|
|
63
|
+
}
|
|
64
|
+
interface LayoutConfig {
|
|
65
|
+
navbar?: {
|
|
66
|
+
component: React.ComponentType<NavbarConfig>;
|
|
67
|
+
};
|
|
68
|
+
footer?: {
|
|
69
|
+
component: React.ComponentType<FooterConfig>;
|
|
70
|
+
fields: PropDefinition[];
|
|
71
|
+
defaults: Record<string, any>;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
interface ThemeConfig {
|
|
75
|
+
name: string;
|
|
76
|
+
label: string;
|
|
77
|
+
components: ThemeComponent[];
|
|
78
|
+
layout?: LayoutConfig;
|
|
79
|
+
}
|
|
5
80
|
|
|
6
81
|
interface ThemeRegistryItem {
|
|
7
82
|
id: string;
|
|
@@ -46,6 +121,8 @@ interface CustomCrudColumn {
|
|
|
46
121
|
/**
|
|
47
122
|
* For `type: 'select'`: fixed choices in Add/Edit (e.g. job application status).
|
|
48
123
|
* Example: `{ field: 'status', displayName: 'Status', type: 'select', options: [{ value: 'new', label: 'New' }, ...] }`
|
|
124
|
+
*
|
|
125
|
+
* For `type: 'multiSelect'`: checkbox list; use `relationApi` or static `options` (values stored as string[]).
|
|
49
126
|
*/
|
|
50
127
|
options?: CrudFilterSelectOption[];
|
|
51
128
|
/** Initial value when creating a row (works with `select` and plain fields). */
|
|
@@ -68,6 +145,7 @@ interface CustomCrudColumn {
|
|
|
68
145
|
hideInCreate?: boolean;
|
|
69
146
|
/** When true, column is omitted from the list table but still available in Add/Edit. */
|
|
70
147
|
hideInTable?: boolean;
|
|
148
|
+
hideInEdit?: boolean;
|
|
71
149
|
}
|
|
72
150
|
interface CrudFilter {
|
|
73
151
|
/** Query param name (e.g. status, dateFrom, paymentRef). List filter: select, dateRange, or text. */
|
|
@@ -90,10 +168,41 @@ interface CustomCrudConfig {
|
|
|
90
168
|
filters?: CrudFilter[];
|
|
91
169
|
resource?: string;
|
|
92
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Frontend-defined labels for products shown on a collection edit page.
|
|
173
|
+
* Key by catalog category id (e.g. `"1"`), slug (e.g. `"events"`), or `"default"`.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* categoryRelatedProductLabels={{
|
|
177
|
+
* "1": { sectionTitle: "Tickets", addLabel: "Add ticket", createLabel: "Create ticket", listTitle: "Tickets" },
|
|
178
|
+
* merchandise: { addLabel: "Add merchandise", createLabel: "Create merchandise" },
|
|
179
|
+
* }}
|
|
180
|
+
*/
|
|
181
|
+
interface CategoryRelatedProductLabels {
|
|
182
|
+
/** Section heading above the related products table. Default: "Products". */
|
|
183
|
+
sectionTitle?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Section subtitle. Supports `{categoryName}` and `{collectionName}` placeholders.
|
|
186
|
+
* When omitted, a generic description is generated from the active category/collection.
|
|
187
|
+
*/
|
|
188
|
+
sectionDescription?: string;
|
|
189
|
+
/** Header and section primary action. Default: "Add product". */
|
|
190
|
+
addLabel?: string;
|
|
191
|
+
/** Empty-state CTA. Default: "Create product". */
|
|
192
|
+
createLabel?: string;
|
|
193
|
+
/** Embedded list table title. Default: "Products". */
|
|
194
|
+
listTitle?: string;
|
|
195
|
+
emptyTitle?: string;
|
|
196
|
+
emptyDescription?: string;
|
|
197
|
+
}
|
|
93
198
|
interface AdminConfigValue {
|
|
94
199
|
customNavItems: CustomNavItem[];
|
|
95
200
|
customNavSections?: CustomNavSection[];
|
|
96
201
|
customCrudConfigs: Record<string, CustomCrudConfig>;
|
|
202
|
+
/** Per-category labels for collection edit → related products UI (not from DB schema). */
|
|
203
|
+
categoryRelatedProductLabels?: Record<string, CategoryRelatedProductLabels>;
|
|
204
|
+
/** Optional footer on order detail (e.g. ticket attendees for event commerce). */
|
|
205
|
+
renderOrderDetailFooter?: (orderId: string) => React$1.ReactNode;
|
|
97
206
|
theme?: ThemeConfig;
|
|
98
207
|
themeRegistry?: ThemeRegistryItem[];
|
|
99
208
|
activeThemeId?: string;
|
|
@@ -104,15 +213,22 @@ interface AdminConfigValue {
|
|
|
104
213
|
declare const AdminConfigContext: React$1.Context<AdminConfigValue>;
|
|
105
214
|
|
|
106
215
|
interface AdminLayoutProps {
|
|
107
|
-
children: React
|
|
216
|
+
children: React.ReactNode;
|
|
108
217
|
customNavItems?: CustomNavItem[];
|
|
109
218
|
customNavSections?: CustomNavSection[];
|
|
110
219
|
customCrudConfigs?: Record<string, CustomCrudConfig>;
|
|
220
|
+
/**
|
|
221
|
+
* Labels for products on collection edit pages, keyed by category id, slug, or `"default"`.
|
|
222
|
+
* Example: `{ "1": { addLabel: "Add ticket", listTitle: "Tickets" } }`
|
|
223
|
+
*/
|
|
224
|
+
categoryRelatedProductLabels?: Record<string, CategoryRelatedProductLabels>;
|
|
225
|
+
/** Rendered below order detail content (host app: attendees, event passes, etc.). */
|
|
226
|
+
renderOrderDetailFooter?: (orderId: string) => React.ReactNode;
|
|
111
227
|
theme?: ThemeConfig;
|
|
112
228
|
themeRegistry?: ThemeRegistryItem[];
|
|
113
229
|
pluginDescriptors?: PluginDescriptor[];
|
|
114
230
|
}
|
|
115
|
-
declare function AdminLayout({ children, customNavItems, customNavSections, customCrudConfigs, theme, themeRegistry, pluginDescriptors }: AdminLayoutProps): react_jsx_runtime.JSX.Element;
|
|
231
|
+
declare function AdminLayout({ children, customNavItems, customNavSections, customCrudConfigs, categoryRelatedProductLabels, renderOrderDetailFooter, theme, themeRegistry, pluginDescriptors, }: AdminLayoutProps): react_jsx_runtime.JSX.Element;
|
|
116
232
|
|
|
117
233
|
declare function AdminShell({ children }: {
|
|
118
234
|
children: React.ReactNode;
|
|
@@ -153,7 +269,12 @@ type CrudFilterItem = {
|
|
|
153
269
|
maxParam?: string;
|
|
154
270
|
};
|
|
155
271
|
|
|
156
|
-
|
|
272
|
+
type CrudEmptyState = {
|
|
273
|
+
title: string;
|
|
274
|
+
description?: string;
|
|
275
|
+
action?: ReactNode;
|
|
276
|
+
};
|
|
277
|
+
declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, customViewPageUrl, defaultSortField, defaultSortOrder, filters, filterColumns, extraListParams, createQueryParams, manageUserGroups, emptyState, embedded, disableRowClick, customRowActions, headerActions, }: {
|
|
157
278
|
title: string;
|
|
158
279
|
apiEndpoint: string;
|
|
159
280
|
columns: any[];
|
|
@@ -165,8 +286,20 @@ declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, custom
|
|
|
165
286
|
/** Full column config for deriving list filters (`select`, `boolean`, `relationApi`). List `columns` may omit hidden fields. */
|
|
166
287
|
filterColumns?: any[];
|
|
167
288
|
extraListParams?: Record<string, string>;
|
|
289
|
+
/** Query string params appended to dedicated create URLs (e.g. preset collectionId). */
|
|
290
|
+
createQueryParams?: Record<string, string>;
|
|
168
291
|
/** When true, show group (role) selector for each user; requires GET /api/admin/roles. */
|
|
169
292
|
manageUserGroups?: boolean;
|
|
293
|
+
/** Shown when the list is empty and no search or filters are applied. */
|
|
294
|
+
emptyState?: CrudEmptyState;
|
|
295
|
+
/** Compact embed: no page header toolbar (import/export/add). */
|
|
296
|
+
embedded?: boolean;
|
|
297
|
+
/** Disable navigating to detail/edit on row click. */
|
|
298
|
+
disableRowClick?: boolean;
|
|
299
|
+
/** Replace default row action buttons (edit/delete). */
|
|
300
|
+
customRowActions?: (item: Record<string, unknown>) => React.ReactNode;
|
|
301
|
+
/** Custom header actions inserted adjacent to import/export/add buttons. */
|
|
302
|
+
headerActions?: ReactNode;
|
|
170
303
|
}): react_jsx_runtime.JSX.Element;
|
|
171
304
|
|
|
172
305
|
type CreateEditFormProps = {
|
|
@@ -321,15 +454,25 @@ declare function CollectionEditPage({ collectionId }: {
|
|
|
321
454
|
collectionId: string;
|
|
322
455
|
}): react_jsx_runtime.JSX.Element;
|
|
323
456
|
|
|
457
|
+
declare function EventEditPage({ eventId }: {
|
|
458
|
+
eventId: string;
|
|
459
|
+
}): react_jsx_runtime.JSX.Element;
|
|
460
|
+
|
|
461
|
+
declare function EventDetailPage({ eventId }: {
|
|
462
|
+
eventId: string;
|
|
463
|
+
}): react_jsx_runtime.JSX.Element;
|
|
464
|
+
|
|
324
465
|
declare function BlogGeneratorPage(): react_jsx_runtime.JSX.Element;
|
|
325
466
|
|
|
326
467
|
/** @deprecated Use Admin → Plugins → Job scheduler. Kept for old bookmarks. */
|
|
327
468
|
declare function SchedulesPage(): react_jsx_runtime.JSX.Element;
|
|
328
469
|
|
|
329
|
-
declare function
|
|
330
|
-
|
|
470
|
+
declare function VendorEditPage({ vendorId }: {
|
|
471
|
+
vendorId: string;
|
|
331
472
|
}): react_jsx_runtime.JSX.Element;
|
|
332
473
|
|
|
474
|
+
declare function VendorsListPage(): react_jsx_runtime.JSX.Element;
|
|
475
|
+
|
|
333
476
|
declare function VendorTeamPage(): react_jsx_runtime.JSX.Element;
|
|
334
477
|
|
|
335
478
|
interface JobSchedulesToolProps {
|
|
@@ -363,10 +506,44 @@ declare function DetailPageLayout({ main, sidebar, }: {
|
|
|
363
506
|
sidebar?: React$1.ReactNode;
|
|
364
507
|
}): react_jsx_runtime.JSX.Element;
|
|
365
508
|
|
|
509
|
+
interface AdminNavItem {
|
|
510
|
+
href: string;
|
|
511
|
+
label: string;
|
|
512
|
+
icon?: string;
|
|
513
|
+
}
|
|
514
|
+
declare const DEFAULT_ADMIN_NAV: AdminNavItem[];
|
|
515
|
+
|
|
366
516
|
declare const STORE_CRUD_CONFIGS: Record<string, CustomCrudConfig>;
|
|
367
517
|
|
|
518
|
+
declare const DEFAULT_CATEGORY_RELATED_PRODUCT_LABELS: {
|
|
519
|
+
readonly sectionTitle: "Products";
|
|
520
|
+
readonly addLabel: "Add product";
|
|
521
|
+
readonly createLabel: "Create product";
|
|
522
|
+
readonly listTitle: "Products";
|
|
523
|
+
readonly emptyTitle: "No products found";
|
|
524
|
+
readonly emptyDescription: "This collection does not have any products yet.";
|
|
525
|
+
};
|
|
526
|
+
type ResolvedCategoryRelatedProductLabels = {
|
|
527
|
+
sectionTitle: string;
|
|
528
|
+
sectionDescription: string;
|
|
529
|
+
addLabel: string;
|
|
530
|
+
createLabel: string;
|
|
531
|
+
listTitle: string;
|
|
532
|
+
emptyTitle: string;
|
|
533
|
+
emptyDescription: string;
|
|
534
|
+
};
|
|
535
|
+
/** Resolve frontend-defined labels for the collection edit products section. */
|
|
536
|
+
declare function resolveCategoryRelatedProductLabels(config: Record<string, CategoryRelatedProductLabels> | undefined, categoryId: number | string | null | undefined, categorySlug?: string | null, context?: {
|
|
537
|
+
categoryName?: string;
|
|
538
|
+
collectionName?: string;
|
|
539
|
+
}): ResolvedCategoryRelatedProductLabels;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Theme + toast wrapper for admin. SessionProvider must live at the app root
|
|
543
|
+
* (see README providers.tsx) — do not nest a second SessionProvider here.
|
|
544
|
+
*/
|
|
368
545
|
declare function CmsProviders({ children }: {
|
|
369
546
|
children: React.ReactNode;
|
|
370
547
|
}): react_jsx_runtime.JSX.Element;
|
|
371
548
|
|
|
372
|
-
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, BlogGeneratorPage, BrandEditPage, CategoryAutocomplete, CmsProviders, CollectionEditPage, ComponentSettings, CreateEditForm, type CustomCrudColumn, type CustomCrudConfig, type CustomNavItem, type CustomNavSection, DailyUserChart, DetailPageHeader, type DetailPageHeaderMenuItem, DetailPageLayout, FormBuilder, GeographicMap, JobSchedulesTool, JoditRichText, LayoutSettingsPage, NavbarEditor, PageBuilderPage, type PluginDescriptor, ProductEditPage, STORE_CRUD_CONFIGS, SchedulesPage, TagAutocomplete, type ThemeRegistryItem, UserAutocomplete,
|
|
549
|
+
export { AdminCRUD, AdminConfigContext, DashboardPage as AdminDashboardPage, ForgotPasswordPage as AdminForgotPasswordPage, AdminHeader, InvitePage as AdminInvitePage, AdminLayout, type AdminLayoutProps, type AdminNavItem, AdminPageResolver, AdminProfilePage, ResetPasswordPage as AdminResetPasswordPage, SettingsPage as AdminSettingsPage, AdminShell, AdminSidebar, SigninPage as AdminSignInPage, AnalyticsCard, AnalyticsChart, AnalyticsExclusion, BlogEditor as BlogEditorPage, BlogGeneratorPage, BrandEditPage, CategoryAutocomplete, type CategoryRelatedProductLabels, CmsProviders, CollectionEditPage, ComponentSettings, CreateEditForm, type CustomCrudColumn, type CustomCrudConfig, type CustomNavItem, type CustomNavSection, DEFAULT_ADMIN_NAV, DEFAULT_CATEGORY_RELATED_PRODUCT_LABELS, DailyUserChart, DetailPageHeader, type DetailPageHeaderMenuItem, DetailPageLayout, EventDetailPage, EventEditPage, FormBuilder, GeographicMap, JobSchedulesTool, JoditRichText, LayoutSettingsPage, NavbarEditor, PageBuilderPage, type PluginDescriptor, ProductEditPage, type ResolvedCategoryRelatedProductLabels, STORE_CRUD_CONFIGS, SchedulesPage, TagAutocomplete, type ThemeRegistryItem, UserAutocomplete, VendorEditPage, VendorTeamPage, VendorsListPage, AdminLayout as default, resolveCategoryRelatedProductLabels };
|
package/dist/admin.d.ts
CHANGED
|
@@ -1,7 +1,82 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import React$1 from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import React$1, { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type PropType = 'text' | 'textarea' | 'richtext' | 'image' | 'color' | 'select' | 'number' | 'boolean' | 'url' | 'entity';
|
|
5
|
+
interface PropDefinition {
|
|
6
|
+
name: string;
|
|
7
|
+
label: string;
|
|
8
|
+
type: PropType;
|
|
9
|
+
options?: {
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[];
|
|
13
|
+
entity?: string;
|
|
14
|
+
displayField?: string;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface ComponentMeta {
|
|
18
|
+
name: string;
|
|
19
|
+
label: string;
|
|
20
|
+
category: string;
|
|
21
|
+
icon: string;
|
|
22
|
+
description: string;
|
|
23
|
+
defaultProps: Record<string, any>;
|
|
24
|
+
props?: PropDefinition[];
|
|
25
|
+
canContainChildren?: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface ThemeComponent {
|
|
28
|
+
meta: ComponentMeta;
|
|
29
|
+
component: React.ComponentType<any>;
|
|
30
|
+
}
|
|
31
|
+
interface NavItem {
|
|
32
|
+
id: string;
|
|
33
|
+
label: string;
|
|
34
|
+
url: string;
|
|
35
|
+
openInNewTab?: boolean;
|
|
36
|
+
/** When set, url is derived from the linked page slug. */
|
|
37
|
+
pageId?: number;
|
|
38
|
+
children?: NavItem[];
|
|
39
|
+
}
|
|
40
|
+
interface NavbarConfig {
|
|
41
|
+
logo: string;
|
|
42
|
+
items: NavItem[];
|
|
43
|
+
ctaLabel?: string;
|
|
44
|
+
ctaUrl?: string;
|
|
45
|
+
/** Optional variant for theme-specific layout (e.g. "page2"). */
|
|
46
|
+
variant?: string;
|
|
47
|
+
}
|
|
48
|
+
interface FooterConfig {
|
|
49
|
+
copyright: string;
|
|
50
|
+
columns: {
|
|
51
|
+
title: string;
|
|
52
|
+
links: {
|
|
53
|
+
label: string;
|
|
54
|
+
url: string;
|
|
55
|
+
}[];
|
|
56
|
+
}[];
|
|
57
|
+
socialLinks: {
|
|
58
|
+
icon: string;
|
|
59
|
+
url: string;
|
|
60
|
+
}[];
|
|
61
|
+
/** When set, footer shows this logo (e.g. same as navbar). */
|
|
62
|
+
logo?: string;
|
|
63
|
+
}
|
|
64
|
+
interface LayoutConfig {
|
|
65
|
+
navbar?: {
|
|
66
|
+
component: React.ComponentType<NavbarConfig>;
|
|
67
|
+
};
|
|
68
|
+
footer?: {
|
|
69
|
+
component: React.ComponentType<FooterConfig>;
|
|
70
|
+
fields: PropDefinition[];
|
|
71
|
+
defaults: Record<string, any>;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
interface ThemeConfig {
|
|
75
|
+
name: string;
|
|
76
|
+
label: string;
|
|
77
|
+
components: ThemeComponent[];
|
|
78
|
+
layout?: LayoutConfig;
|
|
79
|
+
}
|
|
5
80
|
|
|
6
81
|
interface ThemeRegistryItem {
|
|
7
82
|
id: string;
|
|
@@ -46,6 +121,8 @@ interface CustomCrudColumn {
|
|
|
46
121
|
/**
|
|
47
122
|
* For `type: 'select'`: fixed choices in Add/Edit (e.g. job application status).
|
|
48
123
|
* Example: `{ field: 'status', displayName: 'Status', type: 'select', options: [{ value: 'new', label: 'New' }, ...] }`
|
|
124
|
+
*
|
|
125
|
+
* For `type: 'multiSelect'`: checkbox list; use `relationApi` or static `options` (values stored as string[]).
|
|
49
126
|
*/
|
|
50
127
|
options?: CrudFilterSelectOption[];
|
|
51
128
|
/** Initial value when creating a row (works with `select` and plain fields). */
|
|
@@ -68,6 +145,7 @@ interface CustomCrudColumn {
|
|
|
68
145
|
hideInCreate?: boolean;
|
|
69
146
|
/** When true, column is omitted from the list table but still available in Add/Edit. */
|
|
70
147
|
hideInTable?: boolean;
|
|
148
|
+
hideInEdit?: boolean;
|
|
71
149
|
}
|
|
72
150
|
interface CrudFilter {
|
|
73
151
|
/** Query param name (e.g. status, dateFrom, paymentRef). List filter: select, dateRange, or text. */
|
|
@@ -90,10 +168,41 @@ interface CustomCrudConfig {
|
|
|
90
168
|
filters?: CrudFilter[];
|
|
91
169
|
resource?: string;
|
|
92
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Frontend-defined labels for products shown on a collection edit page.
|
|
173
|
+
* Key by catalog category id (e.g. `"1"`), slug (e.g. `"events"`), or `"default"`.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* categoryRelatedProductLabels={{
|
|
177
|
+
* "1": { sectionTitle: "Tickets", addLabel: "Add ticket", createLabel: "Create ticket", listTitle: "Tickets" },
|
|
178
|
+
* merchandise: { addLabel: "Add merchandise", createLabel: "Create merchandise" },
|
|
179
|
+
* }}
|
|
180
|
+
*/
|
|
181
|
+
interface CategoryRelatedProductLabels {
|
|
182
|
+
/** Section heading above the related products table. Default: "Products". */
|
|
183
|
+
sectionTitle?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Section subtitle. Supports `{categoryName}` and `{collectionName}` placeholders.
|
|
186
|
+
* When omitted, a generic description is generated from the active category/collection.
|
|
187
|
+
*/
|
|
188
|
+
sectionDescription?: string;
|
|
189
|
+
/** Header and section primary action. Default: "Add product". */
|
|
190
|
+
addLabel?: string;
|
|
191
|
+
/** Empty-state CTA. Default: "Create product". */
|
|
192
|
+
createLabel?: string;
|
|
193
|
+
/** Embedded list table title. Default: "Products". */
|
|
194
|
+
listTitle?: string;
|
|
195
|
+
emptyTitle?: string;
|
|
196
|
+
emptyDescription?: string;
|
|
197
|
+
}
|
|
93
198
|
interface AdminConfigValue {
|
|
94
199
|
customNavItems: CustomNavItem[];
|
|
95
200
|
customNavSections?: CustomNavSection[];
|
|
96
201
|
customCrudConfigs: Record<string, CustomCrudConfig>;
|
|
202
|
+
/** Per-category labels for collection edit → related products UI (not from DB schema). */
|
|
203
|
+
categoryRelatedProductLabels?: Record<string, CategoryRelatedProductLabels>;
|
|
204
|
+
/** Optional footer on order detail (e.g. ticket attendees for event commerce). */
|
|
205
|
+
renderOrderDetailFooter?: (orderId: string) => React$1.ReactNode;
|
|
97
206
|
theme?: ThemeConfig;
|
|
98
207
|
themeRegistry?: ThemeRegistryItem[];
|
|
99
208
|
activeThemeId?: string;
|
|
@@ -104,15 +213,22 @@ interface AdminConfigValue {
|
|
|
104
213
|
declare const AdminConfigContext: React$1.Context<AdminConfigValue>;
|
|
105
214
|
|
|
106
215
|
interface AdminLayoutProps {
|
|
107
|
-
children: React
|
|
216
|
+
children: React.ReactNode;
|
|
108
217
|
customNavItems?: CustomNavItem[];
|
|
109
218
|
customNavSections?: CustomNavSection[];
|
|
110
219
|
customCrudConfigs?: Record<string, CustomCrudConfig>;
|
|
220
|
+
/**
|
|
221
|
+
* Labels for products on collection edit pages, keyed by category id, slug, or `"default"`.
|
|
222
|
+
* Example: `{ "1": { addLabel: "Add ticket", listTitle: "Tickets" } }`
|
|
223
|
+
*/
|
|
224
|
+
categoryRelatedProductLabels?: Record<string, CategoryRelatedProductLabels>;
|
|
225
|
+
/** Rendered below order detail content (host app: attendees, event passes, etc.). */
|
|
226
|
+
renderOrderDetailFooter?: (orderId: string) => React.ReactNode;
|
|
111
227
|
theme?: ThemeConfig;
|
|
112
228
|
themeRegistry?: ThemeRegistryItem[];
|
|
113
229
|
pluginDescriptors?: PluginDescriptor[];
|
|
114
230
|
}
|
|
115
|
-
declare function AdminLayout({ children, customNavItems, customNavSections, customCrudConfigs, theme, themeRegistry, pluginDescriptors }: AdminLayoutProps): react_jsx_runtime.JSX.Element;
|
|
231
|
+
declare function AdminLayout({ children, customNavItems, customNavSections, customCrudConfigs, categoryRelatedProductLabels, renderOrderDetailFooter, theme, themeRegistry, pluginDescriptors, }: AdminLayoutProps): react_jsx_runtime.JSX.Element;
|
|
116
232
|
|
|
117
233
|
declare function AdminShell({ children }: {
|
|
118
234
|
children: React.ReactNode;
|
|
@@ -153,7 +269,12 @@ type CrudFilterItem = {
|
|
|
153
269
|
maxParam?: string;
|
|
154
270
|
};
|
|
155
271
|
|
|
156
|
-
|
|
272
|
+
type CrudEmptyState = {
|
|
273
|
+
title: string;
|
|
274
|
+
description?: string;
|
|
275
|
+
action?: ReactNode;
|
|
276
|
+
};
|
|
277
|
+
declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, customViewPageUrl, defaultSortField, defaultSortOrder, filters, filterColumns, extraListParams, createQueryParams, manageUserGroups, emptyState, embedded, disableRowClick, customRowActions, headerActions, }: {
|
|
157
278
|
title: string;
|
|
158
279
|
apiEndpoint: string;
|
|
159
280
|
columns: any[];
|
|
@@ -165,8 +286,20 @@ declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, custom
|
|
|
165
286
|
/** Full column config for deriving list filters (`select`, `boolean`, `relationApi`). List `columns` may omit hidden fields. */
|
|
166
287
|
filterColumns?: any[];
|
|
167
288
|
extraListParams?: Record<string, string>;
|
|
289
|
+
/** Query string params appended to dedicated create URLs (e.g. preset collectionId). */
|
|
290
|
+
createQueryParams?: Record<string, string>;
|
|
168
291
|
/** When true, show group (role) selector for each user; requires GET /api/admin/roles. */
|
|
169
292
|
manageUserGroups?: boolean;
|
|
293
|
+
/** Shown when the list is empty and no search or filters are applied. */
|
|
294
|
+
emptyState?: CrudEmptyState;
|
|
295
|
+
/** Compact embed: no page header toolbar (import/export/add). */
|
|
296
|
+
embedded?: boolean;
|
|
297
|
+
/** Disable navigating to detail/edit on row click. */
|
|
298
|
+
disableRowClick?: boolean;
|
|
299
|
+
/** Replace default row action buttons (edit/delete). */
|
|
300
|
+
customRowActions?: (item: Record<string, unknown>) => React.ReactNode;
|
|
301
|
+
/** Custom header actions inserted adjacent to import/export/add buttons. */
|
|
302
|
+
headerActions?: ReactNode;
|
|
170
303
|
}): react_jsx_runtime.JSX.Element;
|
|
171
304
|
|
|
172
305
|
type CreateEditFormProps = {
|
|
@@ -321,15 +454,25 @@ declare function CollectionEditPage({ collectionId }: {
|
|
|
321
454
|
collectionId: string;
|
|
322
455
|
}): react_jsx_runtime.JSX.Element;
|
|
323
456
|
|
|
457
|
+
declare function EventEditPage({ eventId }: {
|
|
458
|
+
eventId: string;
|
|
459
|
+
}): react_jsx_runtime.JSX.Element;
|
|
460
|
+
|
|
461
|
+
declare function EventDetailPage({ eventId }: {
|
|
462
|
+
eventId: string;
|
|
463
|
+
}): react_jsx_runtime.JSX.Element;
|
|
464
|
+
|
|
324
465
|
declare function BlogGeneratorPage(): react_jsx_runtime.JSX.Element;
|
|
325
466
|
|
|
326
467
|
/** @deprecated Use Admin → Plugins → Job scheduler. Kept for old bookmarks. */
|
|
327
468
|
declare function SchedulesPage(): react_jsx_runtime.JSX.Element;
|
|
328
469
|
|
|
329
|
-
declare function
|
|
330
|
-
|
|
470
|
+
declare function VendorEditPage({ vendorId }: {
|
|
471
|
+
vendorId: string;
|
|
331
472
|
}): react_jsx_runtime.JSX.Element;
|
|
332
473
|
|
|
474
|
+
declare function VendorsListPage(): react_jsx_runtime.JSX.Element;
|
|
475
|
+
|
|
333
476
|
declare function VendorTeamPage(): react_jsx_runtime.JSX.Element;
|
|
334
477
|
|
|
335
478
|
interface JobSchedulesToolProps {
|
|
@@ -363,10 +506,44 @@ declare function DetailPageLayout({ main, sidebar, }: {
|
|
|
363
506
|
sidebar?: React$1.ReactNode;
|
|
364
507
|
}): react_jsx_runtime.JSX.Element;
|
|
365
508
|
|
|
509
|
+
interface AdminNavItem {
|
|
510
|
+
href: string;
|
|
511
|
+
label: string;
|
|
512
|
+
icon?: string;
|
|
513
|
+
}
|
|
514
|
+
declare const DEFAULT_ADMIN_NAV: AdminNavItem[];
|
|
515
|
+
|
|
366
516
|
declare const STORE_CRUD_CONFIGS: Record<string, CustomCrudConfig>;
|
|
367
517
|
|
|
518
|
+
declare const DEFAULT_CATEGORY_RELATED_PRODUCT_LABELS: {
|
|
519
|
+
readonly sectionTitle: "Products";
|
|
520
|
+
readonly addLabel: "Add product";
|
|
521
|
+
readonly createLabel: "Create product";
|
|
522
|
+
readonly listTitle: "Products";
|
|
523
|
+
readonly emptyTitle: "No products found";
|
|
524
|
+
readonly emptyDescription: "This collection does not have any products yet.";
|
|
525
|
+
};
|
|
526
|
+
type ResolvedCategoryRelatedProductLabels = {
|
|
527
|
+
sectionTitle: string;
|
|
528
|
+
sectionDescription: string;
|
|
529
|
+
addLabel: string;
|
|
530
|
+
createLabel: string;
|
|
531
|
+
listTitle: string;
|
|
532
|
+
emptyTitle: string;
|
|
533
|
+
emptyDescription: string;
|
|
534
|
+
};
|
|
535
|
+
/** Resolve frontend-defined labels for the collection edit products section. */
|
|
536
|
+
declare function resolveCategoryRelatedProductLabels(config: Record<string, CategoryRelatedProductLabels> | undefined, categoryId: number | string | null | undefined, categorySlug?: string | null, context?: {
|
|
537
|
+
categoryName?: string;
|
|
538
|
+
collectionName?: string;
|
|
539
|
+
}): ResolvedCategoryRelatedProductLabels;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Theme + toast wrapper for admin. SessionProvider must live at the app root
|
|
543
|
+
* (see README providers.tsx) — do not nest a second SessionProvider here.
|
|
544
|
+
*/
|
|
368
545
|
declare function CmsProviders({ children }: {
|
|
369
546
|
children: React.ReactNode;
|
|
370
547
|
}): react_jsx_runtime.JSX.Element;
|
|
371
548
|
|
|
372
|
-
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, BlogGeneratorPage, BrandEditPage, CategoryAutocomplete, CmsProviders, CollectionEditPage, ComponentSettings, CreateEditForm, type CustomCrudColumn, type CustomCrudConfig, type CustomNavItem, type CustomNavSection, DailyUserChart, DetailPageHeader, type DetailPageHeaderMenuItem, DetailPageLayout, FormBuilder, GeographicMap, JobSchedulesTool, JoditRichText, LayoutSettingsPage, NavbarEditor, PageBuilderPage, type PluginDescriptor, ProductEditPage, STORE_CRUD_CONFIGS, SchedulesPage, TagAutocomplete, type ThemeRegistryItem, UserAutocomplete,
|
|
549
|
+
export { AdminCRUD, AdminConfigContext, DashboardPage as AdminDashboardPage, ForgotPasswordPage as AdminForgotPasswordPage, AdminHeader, InvitePage as AdminInvitePage, AdminLayout, type AdminLayoutProps, type AdminNavItem, AdminPageResolver, AdminProfilePage, ResetPasswordPage as AdminResetPasswordPage, SettingsPage as AdminSettingsPage, AdminShell, AdminSidebar, SigninPage as AdminSignInPage, AnalyticsCard, AnalyticsChart, AnalyticsExclusion, BlogEditor as BlogEditorPage, BlogGeneratorPage, BrandEditPage, CategoryAutocomplete, type CategoryRelatedProductLabels, CmsProviders, CollectionEditPage, ComponentSettings, CreateEditForm, type CustomCrudColumn, type CustomCrudConfig, type CustomNavItem, type CustomNavSection, DEFAULT_ADMIN_NAV, DEFAULT_CATEGORY_RELATED_PRODUCT_LABELS, DailyUserChart, DetailPageHeader, type DetailPageHeaderMenuItem, DetailPageLayout, EventDetailPage, EventEditPage, FormBuilder, GeographicMap, JobSchedulesTool, JoditRichText, LayoutSettingsPage, NavbarEditor, PageBuilderPage, type PluginDescriptor, ProductEditPage, type ResolvedCategoryRelatedProductLabels, STORE_CRUD_CONFIGS, SchedulesPage, TagAutocomplete, type ThemeRegistryItem, UserAutocomplete, VendorEditPage, VendorTeamPage, VendorsListPage, AdminLayout as default, resolveCategoryRelatedProductLabels };
|