@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.
Files changed (158) hide show
  1. package/README.md +13 -0
  2. package/dist/OrderTrackPage-W3J6WIG2.js +426 -0
  3. package/dist/OrderTrackPage-Z6FCJQYY.cjs +428 -0
  4. package/dist/admin.cjs +34329 -20923
  5. package/dist/admin.d.cts +186 -9
  6. package/dist/admin.d.ts +186 -9
  7. package/dist/admin.js +34140 -20829
  8. package/dist/api.cjs +120 -17515
  9. package/dist/api.d.cts +633 -3
  10. package/dist/api.d.ts +633 -3
  11. package/dist/api.js +14 -17528
  12. package/dist/auth.cjs +192 -1034
  13. package/dist/auth.d.cts +194 -51
  14. package/dist/auth.d.ts +194 -51
  15. package/dist/auth.js +4 -966
  16. package/dist/chunk-2XE4X74C.js +29602 -0
  17. package/dist/chunk-3DZRIZOD.cjs +52 -0
  18. package/dist/chunk-3KPNTQBV.cjs +620 -0
  19. package/dist/chunk-46GKADYE.cjs +84 -0
  20. package/dist/chunk-4TRPKBKO.js +589 -0
  21. package/dist/chunk-5ELSW2UP.js +150 -0
  22. package/dist/chunk-6KPQWRFW.js +171 -0
  23. package/dist/chunk-7NMT3GBR.cjs +29 -0
  24. package/dist/chunk-7YIBMQDR.cjs +86 -0
  25. package/dist/chunk-BGJAV67S.cjs +29710 -0
  26. package/dist/chunk-CNTSLED2.cjs +559 -0
  27. package/dist/chunk-CRFV5WJK.js +16 -0
  28. package/dist/chunk-D5FBNKQM.cjs +104 -0
  29. package/dist/chunk-EF2JBPDM.js +114 -0
  30. package/dist/chunk-EQPITOP6.js +543 -0
  31. package/dist/chunk-GO7PPYNU.js +76 -0
  32. package/dist/chunk-HF3L2GIT.cjs +194 -0
  33. package/dist/chunk-J7XHLOLO.js +830 -0
  34. package/dist/chunk-JBRR5UYL.js +87 -0
  35. package/dist/chunk-JC6DLWTE.js +21 -0
  36. package/dist/chunk-JHF4YYRC.cjs +188 -0
  37. package/dist/chunk-JXF23MPG.js +25 -0
  38. package/dist/chunk-MQBT33IV.js +48 -0
  39. package/dist/chunk-N44BJZ4C.cjs +123 -0
  40. package/dist/chunk-OOTLNH63.cjs +18 -0
  41. package/dist/chunk-PAMVINEX.cjs +577 -0
  42. package/dist/chunk-PNOKNSG2.cjs +222 -0
  43. package/dist/chunk-QM733NUK.js +186 -0
  44. package/dist/chunk-R73BKDRO.cjs +90 -0
  45. package/dist/chunk-SHUYVCID.js +4 -0
  46. package/dist/chunk-SYBOCAWB.js +97 -0
  47. package/dist/chunk-TDV6EJHV.js +192 -0
  48. package/dist/chunk-TFUOHI37.cjs +839 -0
  49. package/dist/chunk-TIAEXJLI.cjs +182 -0
  50. package/dist/chunk-UPLVMVRX.cjs +23 -0
  51. package/dist/chunk-USNT2KNT.cjs +6 -0
  52. package/dist/chunk-WEMDMVHQ.js +216 -0
  53. package/dist/chunk-XDSNZUW7.js +564 -0
  54. package/dist/chunk-XQ3QUHWR.cjs +83 -0
  55. package/dist/chunk-XW5ATPRW.cjs +155 -0
  56. package/dist/chunk-ZQ4X6OAU.js +82 -0
  57. package/dist/chunk-ZSVCP6N3.js +83 -0
  58. package/dist/cli.cjs +103 -84
  59. package/dist/cli.js +62 -27
  60. package/dist/email-FKR4FXFI.js +5 -0
  61. package/dist/email-KVKVPNCL.cjs +58 -0
  62. package/dist/email-queue-CGZBVVAS.js +2 -0
  63. package/dist/email-queue-TPZWLTIV.cjs +23 -0
  64. package/dist/erp-config-enabled-CUMQ6N2V.cjs +11 -0
  65. package/dist/erp-config-enabled-T37X7T34.js +2 -0
  66. package/dist/erp-order-invoice-3YISSOWW.js +3 -0
  67. package/dist/erp-order-invoice-ZR5F2KTA.cjs +12 -0
  68. package/dist/event-order-defaults-6E543227.js +2 -0
  69. package/dist/event-order-defaults-DUGDVGJI.cjs +39 -0
  70. package/dist/event-order-notifications-5GSAOYVS.cjs +27 -0
  71. package/dist/event-order-notifications-IIIF23D5.js +10 -0
  72. package/dist/hooks.cjs +259 -132
  73. package/dist/hooks.d.cts +42 -1
  74. package/dist/hooks.d.ts +42 -1
  75. package/dist/hooks.js +234 -91
  76. package/dist/index.cjs +3884 -22307
  77. package/dist/index.d.cts +2203 -772
  78. package/dist/index.d.ts +2203 -772
  79. package/dist/index.js +2871 -22064
  80. package/dist/interpolate-WAKPN56R.cjs +11 -0
  81. package/dist/interpolate-WDUWDF3I.js +2 -0
  82. package/dist/layout-36UFTHC5.cjs +11 -0
  83. package/dist/layout-AOBN26XG.js +2 -0
  84. package/dist/migrations/1779400000000-ConvertStatusToEnum.ts +142 -0
  85. package/dist/migrations/1779400000000-SeedDefaultCurrencies.ts +33 -0
  86. package/dist/migrations/1779500000000-VendorRolesAndPermissions.ts +102 -0
  87. package/dist/migrations/1779600000000-VendorRegistrationProfile.ts +52 -0
  88. package/dist/migrations/1779700000000-CollectionIsCatalog.ts +22 -0
  89. package/dist/migrations/1779710000000-CollectionPlatformCatalog.ts +60 -0
  90. package/dist/migrations/1779720000000-ProductCategoryPlatformCatalog.ts +157 -0
  91. package/dist/migrations/1779800000000-EventsAndEventProducts.ts +173 -0
  92. package/dist/migrations/1779810000000-BackfillVendorRoleEventsPermissions.ts +38 -0
  93. package/dist/migrations/1779820000000-FixProductsCategoryForeignKey.ts +70 -0
  94. package/dist/migrations/1779830000000-ProductTitleColumn.ts +32 -0
  95. package/dist/migrations/1779840000000-EventAboutAndVisibilityFields.ts +34 -0
  96. package/dist/migrations/1779850000000-EventCityCountrySplit.ts +43 -0
  97. package/dist/migrations/1779860000000-CreateCombos.ts +140 -0
  98. package/dist/migrations/1780100000000-OrderAttendeesEventId.ts +55 -0
  99. package/dist/migrations/1780110000000-EventContactFormId.ts +49 -0
  100. package/dist/migrations/1780130000000-ProductVariants.ts +54 -0
  101. package/dist/migrations/1780140000000-EventManagementEnhancements.ts +44 -0
  102. package/dist/migrations/1780160000000-EventRegistrationGstProductContactForm.ts +79 -0
  103. package/dist/migrations/1780170000000-ComboCurrencyPrices.ts +20 -0
  104. package/dist/migrations/1781110000000-VendorOwnerCombosPermission.ts +38 -0
  105. package/dist/migrations/1781120000000-RefundPoliciesAndRequests.ts +225 -0
  106. package/dist/migrations/1781130000000-CreateAttendees.ts +44 -0
  107. package/dist/migrations/1781140000000-EventOrderNotifications.ts +29 -0
  108. package/dist/migrations/1781150000000-EventNamedLists.ts +28 -0
  109. package/dist/migrations/1781160000000-RefundPolicyEventTiers.ts +27 -0
  110. package/dist/migrations/1781170000000-EventRefundPolicy.ts +42 -0
  111. package/dist/migrations/1781180000000-RemoveCartItemsUniqueConstraint.ts +15 -0
  112. package/dist/migrations/1781190000000-RenameProductTaxesToProductConfig.ts +84 -0
  113. package/dist/migrations/1781200000000-VendorOwnerProductConfigPermissions.ts +51 -0
  114. package/dist/migrations/1781210000000-VendorRoleProductConfigPermissions.ts +46 -0
  115. package/dist/migrations/helpers/vendor-role-seed.ts +243 -0
  116. package/dist/paid-order-erp-3USEG6WL.js +3 -0
  117. package/dist/paid-order-erp-FSQ3GSXE.cjs +12 -0
  118. package/dist/pg-boss-service-4XF2TQ2E.js +2 -0
  119. package/dist/pg-boss-service-L6MTF4EQ.cjs +15 -0
  120. package/dist/razorpay-KLO2KNCB.js +49 -0
  121. package/dist/razorpay-U23LGY72.cjs +56 -0
  122. package/dist/rbac-debug-db-D7ME7QUY.cjs +35 -0
  123. package/dist/rbac-debug-db-MTCTVNNM.js +33 -0
  124. package/dist/sms-defaults-2NL24H57.js +2 -0
  125. package/dist/sms-defaults-KCOPKQBA.cjs +19 -0
  126. package/dist/stripe-4FD27QVJ.js +51 -0
  127. package/dist/stripe-VU6OEG2D.cjs +57 -0
  128. package/dist/theme.cjs +31 -59
  129. package/dist/theme.d.cts +78 -3
  130. package/dist/theme.d.ts +78 -3
  131. package/dist/theme.js +23 -20
  132. package/dist/vendor-invite-status-77O7ZQ3U.cjs +19 -0
  133. package/dist/vendor-invite-status-PWJ3DE76.js +2 -0
  134. package/dist/whatsapp-queue-3DXA4MXU.js +2 -0
  135. package/dist/whatsapp-queue-KG65MXD5.cjs +15 -0
  136. package/package.json +147 -142
  137. package/dist/admin.cjs.map +0 -1
  138. package/dist/admin.js.map +0 -1
  139. package/dist/api.cjs.map +0 -1
  140. package/dist/api.js.map +0 -1
  141. package/dist/auth.cjs.map +0 -1
  142. package/dist/auth.js.map +0 -1
  143. package/dist/cli.cjs.map +0 -1
  144. package/dist/cli.js.map +0 -1
  145. package/dist/config-DJ5CmQvS.d.cts +0 -8
  146. package/dist/config-DJ5CmQvS.d.ts +0 -8
  147. package/dist/hooks.cjs.map +0 -1
  148. package/dist/hooks.js.map +0 -1
  149. package/dist/index-Bf5GO8fu.d.cts +0 -583
  150. package/dist/index-DOiJuMQA.d.ts +0 -583
  151. package/dist/index.cjs.map +0 -1
  152. package/dist/index.js.map +0 -1
  153. package/dist/theme.cjs.map +0 -1
  154. package/dist/theme.js.map +0 -1
  155. package/dist/types-DCVaXlPV.d.cts +0 -78
  156. package/dist/types-DCVaXlPV.d.ts +0 -78
  157. package/dist/vendor-scope-DTYhJk_I.d.cts +0 -129
  158. 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
- import { c as ThemeConfig, C as ComponentMeta, a as NavbarConfig } from './types-DCVaXlPV.cjs';
4
- export { A as AdminNavItem, D as DEFAULT_ADMIN_NAV } from './config-DJ5CmQvS.cjs';
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$1.ReactNode;
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
- declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, customViewPageUrl, defaultSortField, defaultSortOrder, filters, filterColumns, extraListParams, manageUserGroups, }: {
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 VendorOnboardPage({ showCreateForm }: {
330
- showCreateForm?: boolean;
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, VendorOnboardPage, VendorTeamPage, AdminLayout as default };
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
- import { c as ThemeConfig, C as ComponentMeta, a as NavbarConfig } from './types-DCVaXlPV.js';
4
- export { A as AdminNavItem, D as DEFAULT_ADMIN_NAV } from './config-DJ5CmQvS.js';
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$1.ReactNode;
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
- declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, customViewPageUrl, defaultSortField, defaultSortOrder, filters, filterColumns, extraListParams, manageUserGroups, }: {
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 VendorOnboardPage({ showCreateForm }: {
330
- showCreateForm?: boolean;
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, VendorOnboardPage, VendorTeamPage, AdminLayout as default };
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 };