@infuro/cms-core 1.0.33 → 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 (164) hide show
  1. package/README.md +22 -6
  2. package/dist/OrderTrackPage-W3J6WIG2.js +426 -0
  3. package/dist/OrderTrackPage-Z6FCJQYY.cjs +428 -0
  4. package/dist/admin.cjs +34072 -20487
  5. package/dist/admin.d.cts +191 -9
  6. package/dist/admin.d.ts +191 -9
  7. package/dist/admin.js +33913 -20423
  8. package/dist/api.cjs +123 -16508
  9. package/dist/api.d.cts +633 -3
  10. package/dist/api.d.ts +633 -3
  11. package/dist/api.js +14 -16519
  12. package/dist/auth.cjs +196 -955
  13. package/dist/auth.d.cts +201 -42
  14. package/dist/auth.d.ts +201 -42
  15. package/dist/auth.js +4 -888
  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 +142 -84
  59. package/dist/cli.js +101 -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 -21070
  77. package/dist/index.d.cts +2255 -749
  78. package/dist/index.d.ts +2255 -749
  79. package/dist/index.js +1925 -19891
  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/1778660000004-CreateCustomerAndCustomerContacts.ts +99 -0
  85. package/dist/migrations/1778660000005-AddCustomerIdToVendorCustomers.ts +39 -0
  86. package/dist/migrations/1778660000006-UpdateVendorCustomersContactNullable.ts +36 -0
  87. package/dist/migrations/1778660000007-VendorOwnerCustomerContactsPermission.ts +39 -0
  88. package/dist/migrations/1779300000000-VendorOwnerContactsPermission.ts +39 -0
  89. package/dist/migrations/1779400000000-AddCustomerContactIdToOrders.ts +33 -0
  90. package/dist/migrations/1779400000000-ConvertStatusToEnum.ts +142 -0
  91. package/dist/migrations/1779400000000-SeedDefaultCurrencies.ts +33 -0
  92. package/dist/migrations/1779500000000-VendorRolesAndPermissions.ts +102 -0
  93. package/dist/migrations/1779600000000-VendorRegistrationProfile.ts +52 -0
  94. package/dist/migrations/1779700000000-CollectionIsCatalog.ts +22 -0
  95. package/dist/migrations/1779710000000-CollectionPlatformCatalog.ts +60 -0
  96. package/dist/migrations/1779720000000-ProductCategoryPlatformCatalog.ts +157 -0
  97. package/dist/migrations/1779800000000-EventsAndEventProducts.ts +173 -0
  98. package/dist/migrations/1779810000000-BackfillVendorRoleEventsPermissions.ts +38 -0
  99. package/dist/migrations/1779820000000-FixProductsCategoryForeignKey.ts +70 -0
  100. package/dist/migrations/1779830000000-ProductTitleColumn.ts +32 -0
  101. package/dist/migrations/1779840000000-EventAboutAndVisibilityFields.ts +34 -0
  102. package/dist/migrations/1779850000000-EventCityCountrySplit.ts +43 -0
  103. package/dist/migrations/1779860000000-CreateCombos.ts +140 -0
  104. package/dist/migrations/1780100000000-OrderAttendeesEventId.ts +55 -0
  105. package/dist/migrations/1780110000000-EventContactFormId.ts +49 -0
  106. package/dist/migrations/1780130000000-ProductVariants.ts +54 -0
  107. package/dist/migrations/1780140000000-EventManagementEnhancements.ts +44 -0
  108. package/dist/migrations/1780160000000-EventRegistrationGstProductContactForm.ts +79 -0
  109. package/dist/migrations/1780170000000-ComboCurrencyPrices.ts +20 -0
  110. package/dist/migrations/1781110000000-VendorOwnerCombosPermission.ts +38 -0
  111. package/dist/migrations/1781120000000-RefundPoliciesAndRequests.ts +225 -0
  112. package/dist/migrations/1781130000000-CreateAttendees.ts +44 -0
  113. package/dist/migrations/1781140000000-EventOrderNotifications.ts +29 -0
  114. package/dist/migrations/1781150000000-EventNamedLists.ts +28 -0
  115. package/dist/migrations/1781160000000-RefundPolicyEventTiers.ts +27 -0
  116. package/dist/migrations/1781170000000-EventRefundPolicy.ts +42 -0
  117. package/dist/migrations/1781180000000-RemoveCartItemsUniqueConstraint.ts +15 -0
  118. package/dist/migrations/1781190000000-RenameProductTaxesToProductConfig.ts +84 -0
  119. package/dist/migrations/1781200000000-VendorOwnerProductConfigPermissions.ts +51 -0
  120. package/dist/migrations/1781210000000-VendorRoleProductConfigPermissions.ts +46 -0
  121. package/dist/migrations/helpers/vendor-role-seed.ts +243 -0
  122. package/dist/paid-order-erp-3USEG6WL.js +3 -0
  123. package/dist/paid-order-erp-FSQ3GSXE.cjs +12 -0
  124. package/dist/pg-boss-service-4XF2TQ2E.js +2 -0
  125. package/dist/pg-boss-service-L6MTF4EQ.cjs +15 -0
  126. package/dist/razorpay-KLO2KNCB.js +49 -0
  127. package/dist/razorpay-U23LGY72.cjs +56 -0
  128. package/dist/rbac-debug-db-D7ME7QUY.cjs +35 -0
  129. package/dist/rbac-debug-db-MTCTVNNM.js +33 -0
  130. package/dist/sms-defaults-2NL24H57.js +2 -0
  131. package/dist/sms-defaults-KCOPKQBA.cjs +19 -0
  132. package/dist/stripe-4FD27QVJ.js +51 -0
  133. package/dist/stripe-VU6OEG2D.cjs +57 -0
  134. package/dist/theme.cjs +31 -59
  135. package/dist/theme.d.cts +78 -3
  136. package/dist/theme.d.ts +78 -3
  137. package/dist/theme.js +23 -20
  138. package/dist/vendor-invite-status-77O7ZQ3U.cjs +19 -0
  139. package/dist/vendor-invite-status-PWJ3DE76.js +2 -0
  140. package/dist/whatsapp-queue-3DXA4MXU.js +2 -0
  141. package/dist/whatsapp-queue-KG65MXD5.cjs +15 -0
  142. package/package.json +147 -141
  143. package/dist/admin.cjs.map +0 -1
  144. package/dist/admin.js.map +0 -1
  145. package/dist/api.cjs.map +0 -1
  146. package/dist/api.js.map +0 -1
  147. package/dist/auth.cjs.map +0 -1
  148. package/dist/auth.js.map +0 -1
  149. package/dist/cli.cjs.map +0 -1
  150. package/dist/cli.js.map +0 -1
  151. package/dist/config-DJ5CmQvS.d.cts +0 -8
  152. package/dist/config-DJ5CmQvS.d.ts +0 -8
  153. package/dist/hooks.cjs.map +0 -1
  154. package/dist/hooks.js.map +0 -1
  155. package/dist/index-DWd5Gjc4.d.ts +0 -582
  156. package/dist/index-rZTnpK7y.d.cts +0 -582
  157. package/dist/index.cjs.map +0 -1
  158. package/dist/index.js.map +0 -1
  159. package/dist/theme.cjs.map +0 -1
  160. package/dist/theme.js.map +0 -1
  161. package/dist/types-DCVaXlPV.d.cts +0 -78
  162. package/dist/types-DCVaXlPV.d.ts +0 -78
  163. package/dist/vendor-scope-DTYhJk_I.d.cts +0 -129
  164. 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. */
@@ -88,11 +166,43 @@ interface CustomCrudConfig {
88
166
  defaultSortField?: string;
89
167
  /** Optional list filters (status, date range, paymentRef, orderNumber, etc.). */
90
168
  filters?: CrudFilter[];
169
+ resource?: string;
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;
91
197
  }
92
198
  interface AdminConfigValue {
93
199
  customNavItems: CustomNavItem[];
94
200
  customNavSections?: CustomNavSection[];
95
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;
96
206
  theme?: ThemeConfig;
97
207
  themeRegistry?: ThemeRegistryItem[];
98
208
  activeThemeId?: string;
@@ -103,15 +213,22 @@ interface AdminConfigValue {
103
213
  declare const AdminConfigContext: React$1.Context<AdminConfigValue>;
104
214
 
105
215
  interface AdminLayoutProps {
106
- children: React$1.ReactNode;
216
+ children: React.ReactNode;
107
217
  customNavItems?: CustomNavItem[];
108
218
  customNavSections?: CustomNavSection[];
109
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;
110
227
  theme?: ThemeConfig;
111
228
  themeRegistry?: ThemeRegistryItem[];
112
229
  pluginDescriptors?: PluginDescriptor[];
113
230
  }
114
- 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;
115
232
 
116
233
  declare function AdminShell({ children }: {
117
234
  children: React.ReactNode;
@@ -152,7 +269,12 @@ type CrudFilterItem = {
152
269
  maxParam?: string;
153
270
  };
154
271
 
155
- 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, }: {
156
278
  title: string;
157
279
  apiEndpoint: string;
158
280
  columns: any[];
@@ -164,8 +286,20 @@ declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, custom
164
286
  /** Full column config for deriving list filters (`select`, `boolean`, `relationApi`). List `columns` may omit hidden fields. */
165
287
  filterColumns?: any[];
166
288
  extraListParams?: Record<string, string>;
289
+ /** Query string params appended to dedicated create URLs (e.g. preset collectionId). */
290
+ createQueryParams?: Record<string, string>;
167
291
  /** When true, show group (role) selector for each user; requires GET /api/admin/roles. */
168
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;
169
303
  }): react_jsx_runtime.JSX.Element;
170
304
 
171
305
  type CreateEditFormProps = {
@@ -178,8 +312,10 @@ type CreateEditFormProps = {
178
312
  existingData?: Record<string, unknown> | null;
179
313
  /** When creating: pre-fill the modal from this row (POST only; omit `id` in payload). */
180
314
  duplicateSeed?: Record<string, unknown> | null;
315
+ /** Resource key from config — used to conditionally show password fields for 'customer'. */
316
+ resource?: string;
181
317
  };
182
- declare function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns, existingData, duplicateSeed, }: CreateEditFormProps): react_jsx_runtime.JSX.Element | null;
318
+ declare function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns, existingData, duplicateSeed, resource, }: CreateEditFormProps): react_jsx_runtime.JSX.Element | null;
183
319
 
184
320
  declare function FormBuilder({ formId, duplicateFromId, }: {
185
321
  formId?: string;
@@ -318,12 +454,24 @@ declare function CollectionEditPage({ collectionId }: {
318
454
  collectionId: string;
319
455
  }): react_jsx_runtime.JSX.Element;
320
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
+
321
465
  declare function BlogGeneratorPage(): react_jsx_runtime.JSX.Element;
322
466
 
323
467
  /** @deprecated Use Admin → Plugins → Job scheduler. Kept for old bookmarks. */
324
468
  declare function SchedulesPage(): react_jsx_runtime.JSX.Element;
325
469
 
326
- declare function VendorOnboardPage(): react_jsx_runtime.JSX.Element;
470
+ declare function VendorEditPage({ vendorId }: {
471
+ vendorId: string;
472
+ }): react_jsx_runtime.JSX.Element;
473
+
474
+ declare function VendorsListPage(): react_jsx_runtime.JSX.Element;
327
475
 
328
476
  declare function VendorTeamPage(): react_jsx_runtime.JSX.Element;
329
477
 
@@ -358,10 +506,44 @@ declare function DetailPageLayout({ main, sidebar, }: {
358
506
  sidebar?: React$1.ReactNode;
359
507
  }): react_jsx_runtime.JSX.Element;
360
508
 
509
+ interface AdminNavItem {
510
+ href: string;
511
+ label: string;
512
+ icon?: string;
513
+ }
514
+ declare const DEFAULT_ADMIN_NAV: AdminNavItem[];
515
+
361
516
  declare const STORE_CRUD_CONFIGS: Record<string, CustomCrudConfig>;
362
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
+ */
363
545
  declare function CmsProviders({ children }: {
364
546
  children: React.ReactNode;
365
547
  }): react_jsx_runtime.JSX.Element;
366
548
 
367
- 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. */
@@ -88,11 +166,43 @@ interface CustomCrudConfig {
88
166
  defaultSortField?: string;
89
167
  /** Optional list filters (status, date range, paymentRef, orderNumber, etc.). */
90
168
  filters?: CrudFilter[];
169
+ resource?: string;
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;
91
197
  }
92
198
  interface AdminConfigValue {
93
199
  customNavItems: CustomNavItem[];
94
200
  customNavSections?: CustomNavSection[];
95
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;
96
206
  theme?: ThemeConfig;
97
207
  themeRegistry?: ThemeRegistryItem[];
98
208
  activeThemeId?: string;
@@ -103,15 +213,22 @@ interface AdminConfigValue {
103
213
  declare const AdminConfigContext: React$1.Context<AdminConfigValue>;
104
214
 
105
215
  interface AdminLayoutProps {
106
- children: React$1.ReactNode;
216
+ children: React.ReactNode;
107
217
  customNavItems?: CustomNavItem[];
108
218
  customNavSections?: CustomNavSection[];
109
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;
110
227
  theme?: ThemeConfig;
111
228
  themeRegistry?: ThemeRegistryItem[];
112
229
  pluginDescriptors?: PluginDescriptor[];
113
230
  }
114
- 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;
115
232
 
116
233
  declare function AdminShell({ children }: {
117
234
  children: React.ReactNode;
@@ -152,7 +269,12 @@ type CrudFilterItem = {
152
269
  maxParam?: string;
153
270
  };
154
271
 
155
- 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, }: {
156
278
  title: string;
157
279
  apiEndpoint: string;
158
280
  columns: any[];
@@ -164,8 +286,20 @@ declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, custom
164
286
  /** Full column config for deriving list filters (`select`, `boolean`, `relationApi`). List `columns` may omit hidden fields. */
165
287
  filterColumns?: any[];
166
288
  extraListParams?: Record<string, string>;
289
+ /** Query string params appended to dedicated create URLs (e.g. preset collectionId). */
290
+ createQueryParams?: Record<string, string>;
167
291
  /** When true, show group (role) selector for each user; requires GET /api/admin/roles. */
168
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;
169
303
  }): react_jsx_runtime.JSX.Element;
170
304
 
171
305
  type CreateEditFormProps = {
@@ -178,8 +312,10 @@ type CreateEditFormProps = {
178
312
  existingData?: Record<string, unknown> | null;
179
313
  /** When creating: pre-fill the modal from this row (POST only; omit `id` in payload). */
180
314
  duplicateSeed?: Record<string, unknown> | null;
315
+ /** Resource key from config — used to conditionally show password fields for 'customer'. */
316
+ resource?: string;
181
317
  };
182
- declare function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns, existingData, duplicateSeed, }: CreateEditFormProps): react_jsx_runtime.JSX.Element | null;
318
+ declare function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns, existingData, duplicateSeed, resource, }: CreateEditFormProps): react_jsx_runtime.JSX.Element | null;
183
319
 
184
320
  declare function FormBuilder({ formId, duplicateFromId, }: {
185
321
  formId?: string;
@@ -318,12 +454,24 @@ declare function CollectionEditPage({ collectionId }: {
318
454
  collectionId: string;
319
455
  }): react_jsx_runtime.JSX.Element;
320
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
+
321
465
  declare function BlogGeneratorPage(): react_jsx_runtime.JSX.Element;
322
466
 
323
467
  /** @deprecated Use Admin → Plugins → Job scheduler. Kept for old bookmarks. */
324
468
  declare function SchedulesPage(): react_jsx_runtime.JSX.Element;
325
469
 
326
- declare function VendorOnboardPage(): react_jsx_runtime.JSX.Element;
470
+ declare function VendorEditPage({ vendorId }: {
471
+ vendorId: string;
472
+ }): react_jsx_runtime.JSX.Element;
473
+
474
+ declare function VendorsListPage(): react_jsx_runtime.JSX.Element;
327
475
 
328
476
  declare function VendorTeamPage(): react_jsx_runtime.JSX.Element;
329
477
 
@@ -358,10 +506,44 @@ declare function DetailPageLayout({ main, sidebar, }: {
358
506
  sidebar?: React$1.ReactNode;
359
507
  }): react_jsx_runtime.JSX.Element;
360
508
 
509
+ interface AdminNavItem {
510
+ href: string;
511
+ label: string;
512
+ icon?: string;
513
+ }
514
+ declare const DEFAULT_ADMIN_NAV: AdminNavItem[];
515
+
361
516
  declare const STORE_CRUD_CONFIGS: Record<string, CustomCrudConfig>;
362
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
+ */
363
545
  declare function CmsProviders({ children }: {
364
546
  children: React.ReactNode;
365
547
  }): react_jsx_runtime.JSX.Element;
366
548
 
367
- 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 };