@carlonicora/nextjs-jsonapi 2.2.3 → 2.4.0

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 (92) hide show
  1. package/dist/{BlockNoteEditor-QTIDATPF.js → BlockNoteEditor-7WGCH2KB.js} +27 -26
  2. package/dist/BlockNoteEditor-7WGCH2KB.js.map +1 -0
  3. package/dist/{BlockNoteEditor-ADT6II2V.mjs → BlockNoteEditor-GWAV5ESO.mjs} +12 -11
  4. package/dist/BlockNoteEditor-GWAV5ESO.mjs.map +1 -0
  5. package/dist/billing/index.d.mts +40 -1
  6. package/dist/billing/index.d.ts +40 -1
  7. package/dist/billing/index.js +519 -462
  8. package/dist/billing/index.js.map +1 -1
  9. package/dist/billing/index.mjs +298 -241
  10. package/dist/billing/index.mjs.map +1 -1
  11. package/dist/{chunk-7DJOQTNN.mjs → chunk-3LVSA7IM.mjs} +2 -2
  12. package/dist/{chunk-F3BPNQDB.js → chunk-GYGMEDVS.js} +1135 -952
  13. package/dist/chunk-GYGMEDVS.js.map +1 -0
  14. package/dist/{chunk-DLTMYGLR.mjs → chunk-LCCRUWWY.mjs} +13 -1
  15. package/dist/chunk-LCCRUWWY.mjs.map +1 -0
  16. package/dist/{chunk-YEPE2HT6.mjs → chunk-M2EGUO2F.mjs} +2538 -2355
  17. package/dist/chunk-M2EGUO2F.mjs.map +1 -0
  18. package/dist/{chunk-LANOKEFZ.js → chunk-TOKHHZSP.js} +7 -7
  19. package/dist/{chunk-LANOKEFZ.js.map → chunk-TOKHHZSP.js.map} +1 -1
  20. package/dist/{chunk-KSU6CCW6.js → chunk-V66AZWPG.js} +14 -2
  21. package/dist/chunk-V66AZWPG.js.map +1 -0
  22. package/dist/client/index.d.mts +1 -1
  23. package/dist/client/index.d.ts +1 -1
  24. package/dist/client/index.js +4 -4
  25. package/dist/client/index.mjs +3 -3
  26. package/dist/components/index.d.mts +129 -4
  27. package/dist/components/index.d.ts +129 -4
  28. package/dist/components/index.js +16 -4
  29. package/dist/components/index.js.map +1 -1
  30. package/dist/components/index.mjs +15 -3
  31. package/dist/{content.fields-xH3TGvVk.d.mts → content.fields-1AlHDtDb.d.mts} +1 -0
  32. package/dist/{content.fields-xH3TGvVk.d.ts → content.fields-1AlHDtDb.d.ts} +1 -0
  33. package/dist/contexts/index.d.mts +22 -1
  34. package/dist/contexts/index.d.ts +22 -1
  35. package/dist/contexts/index.js +8 -4
  36. package/dist/contexts/index.js.map +1 -1
  37. package/dist/contexts/index.mjs +7 -3
  38. package/dist/core/index.d.mts +12 -2
  39. package/dist/core/index.d.ts +12 -2
  40. package/dist/core/index.js +4 -2
  41. package/dist/core/index.js.map +1 -1
  42. package/dist/core/index.mjs +3 -1
  43. package/dist/features/help/index.js +37 -37
  44. package/dist/features/help/index.mjs +3 -3
  45. package/dist/features/tokenusage/index.js +71 -71
  46. package/dist/features/tokenusage/index.mjs +3 -3
  47. package/dist/index.d.mts +2 -2
  48. package/dist/index.d.ts +2 -2
  49. package/dist/index.js +5 -3
  50. package/dist/index.js.map +1 -1
  51. package/dist/index.mjs +4 -2
  52. package/dist/server/index.js +3 -3
  53. package/dist/server/index.mjs +1 -1
  54. package/package.json +1 -1
  55. package/src/billing/index.ts +1 -0
  56. package/src/components/editors/BlockNoteEditor.tsx +12 -6
  57. package/src/components/index.ts +1 -0
  58. package/src/contexts/index.ts +1 -0
  59. package/src/features/administration/components/AdminIndexContainer.tsx +150 -0
  60. package/src/features/administration/components/__tests__/AdminIndexContainer.spec.tsx +96 -0
  61. package/src/features/administration/components/index.ts +1 -0
  62. package/src/features/administration/contexts/AdministrationContext.tsx +47 -0
  63. package/src/features/administration/contexts/index.ts +1 -0
  64. package/src/features/administration/data/admin-section.types.ts +30 -0
  65. package/src/features/administration/i18n-keys.ts +26 -0
  66. package/src/features/administration/index.ts +3 -0
  67. package/src/features/assistant/components/containers/AssistantPageContainer.tsx +8 -1
  68. package/src/features/billing/contexts/BillingContext.tsx +95 -0
  69. package/src/features/billing/contexts/index.ts +1 -0
  70. package/src/features/billing/index.ts +1 -0
  71. package/src/features/billing/stripe-product/components/containers/ProductsAdminContainer.tsx +39 -27
  72. package/src/features/billing/stripe-product/components/containers/ProductsAdminPageContainer.tsx +27 -0
  73. package/src/features/billing/stripe-product/components/containers/index.ts +1 -0
  74. package/src/features/company/components/containers/CompaniesListContainer.tsx +25 -0
  75. package/src/features/company/components/containers/index.ts +1 -0
  76. package/src/features/company/components/lists/CompaniesList.tsx +12 -1
  77. package/src/features/company/contexts/CompanyContext.tsx +13 -1
  78. package/src/features/company/data/entity-ai-status.ts +13 -0
  79. package/src/features/company/data/index.ts +1 -0
  80. package/src/features/user/components/containers/PlatformUsersContainer.tsx +23 -0
  81. package/src/features/user/components/containers/index.ts +1 -0
  82. package/src/features/user/components/lists/PlatformUsersList.tsx +45 -0
  83. package/src/features/user/components/lists/index.ts +1 -0
  84. package/src/features/user/data/user.fields.ts +1 -0
  85. package/src/features/user/hooks/useUserTableStructure.tsx +17 -0
  86. package/dist/BlockNoteEditor-ADT6II2V.mjs.map +0 -1
  87. package/dist/BlockNoteEditor-QTIDATPF.js.map +0 -1
  88. package/dist/chunk-DLTMYGLR.mjs.map +0 -1
  89. package/dist/chunk-F3BPNQDB.js.map +0 -1
  90. package/dist/chunk-KSU6CCW6.js.map +0 -1
  91. package/dist/chunk-YEPE2HT6.mjs.map +0 -1
  92. /package/dist/{chunk-7DJOQTNN.mjs.map → chunk-3LVSA7IM.mjs.map} +0 -0
@@ -89,6 +89,36 @@ type BillingAlertBannerProps = {
89
89
  };
90
90
  declare function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }: BillingAlertBannerProps): React.JSX.Element | null;
91
91
 
92
+ interface BillingContextType {
93
+ /**
94
+ * Bumped every time the provider's own actions change the product catalogue.
95
+ * ProductsAdminContainer reloads on it — the create action lives up here in
96
+ * the page title bar, so it cannot call the container's loader directly.
97
+ */
98
+ refreshToken: number;
99
+ refresh: () => void;
100
+ }
101
+ type BillingProviderProps = {
102
+ children: ReactNode;
103
+ };
104
+ /**
105
+ * Page chrome for the administrative billing surface (Stripe products, prices
106
+ * and their credit allowances).
107
+ *
108
+ * Billing gets its own provider rather than borrowing AdministrationProvider so
109
+ * the page carries its own name — and, like CompanyProvider with CompanyEditor,
110
+ * it owns the page's ACTIONS: the create-product control is published through
111
+ * `title.functions`, which RoundPageContainerTitle renders in the header bar.
112
+ * That is where every other page in this codebase puts its primary action.
113
+ */
114
+ declare const BillingProvider: ({ children }: BillingProviderProps) => React.JSX.Element;
115
+ declare const useBillingContext: () => BillingContextType;
116
+ /**
117
+ * Non-throwing variant. ProductsAdminContainer predates this provider and is
118
+ * still mounted bare by other consumers, so it must keep working without one.
119
+ */
120
+ declare const useOptionalBillingContext: () => BillingContextType | undefined;
121
+
92
122
  declare function PaymentMethodsContainer(): React.JSX.Element;
93
123
 
94
124
  type PaymentMethodCardProps = {
@@ -155,6 +185,15 @@ declare function PricesList({ productId, onPricesChange }: PricesListProps): Rea
155
185
 
156
186
  declare function ProductsAdminContainer(): React.JSX.Element;
157
187
 
188
+ /**
189
+ * Page shell around the Stripe product/price administration surface.
190
+ *
191
+ * Client component by necessity: `module={Modules.StripeProduct}` is a registry
192
+ * entry with an icon component and methods, which a Server Component cannot pass
193
+ * across the boundary.
194
+ */
195
+ declare function ProductsAdminPageContainer(): React.JSX.Element;
196
+
158
197
  type ProductEditorProps = {
159
198
  product?: StripeProductInterface;
160
199
  open: boolean;
@@ -289,4 +328,4 @@ type PromoCodeInputProps = {
289
328
  };
290
329
  declare function PromoCodeInput({ appliedCode, isValidating, error, onApply, onRemove, disabled, }: PromoCodeInputProps): React.JSX.Element;
291
330
 
292
- export { BillingAlertBanner, BillingDashboardContainer, BillingDetailModal, type BillingInterval, BillingUsageSummaryCard, CancelSubscriptionDialog, CustomerInfoCard, IntervalToggle, type IntervalToggleProps, InvoiceDetails, InvoiceStatusBadge, InvoicesContainer, InvoicesList, InvoicesSummaryCard, PaymentMethodCard, PaymentMethodEditor, PaymentMethodForm, PaymentMethodSummaryCard, PaymentMethodsContainer, PaymentMethodsList, PriceEditor, PricesList, PricingCard, type PricingCardProps, ProductEditor, ProductPricingList, type ProductPricingListProps, ProductPricingRow, type ProductPricingRowProps, ProductsAdminContainer, ProductsList, PromoCodeInput, ProrationPreview, StripeProvider, SubscriptionConfirmation, SubscriptionDetails, SubscriptionStatusBadge, SubscriptionSummaryCard, SubscriptionsContainer, SubscriptionsList, UsageContainer, UsageHistoryTable, UsageSummaryCard, UsageSummaryCards, formatCurrency, formatDate, formatInterval, isStripeConfigured };
331
+ export { BillingAlertBanner, BillingDashboardContainer, BillingDetailModal, type BillingInterval, BillingProvider, BillingUsageSummaryCard, CancelSubscriptionDialog, CustomerInfoCard, IntervalToggle, type IntervalToggleProps, InvoiceDetails, InvoiceStatusBadge, InvoicesContainer, InvoicesList, InvoicesSummaryCard, PaymentMethodCard, PaymentMethodEditor, PaymentMethodForm, PaymentMethodSummaryCard, PaymentMethodsContainer, PaymentMethodsList, PriceEditor, PricesList, PricingCard, type PricingCardProps, ProductEditor, ProductPricingList, type ProductPricingListProps, ProductPricingRow, type ProductPricingRowProps, ProductsAdminContainer, ProductsAdminPageContainer, ProductsList, PromoCodeInput, ProrationPreview, StripeProvider, SubscriptionConfirmation, SubscriptionDetails, SubscriptionStatusBadge, SubscriptionSummaryCard, SubscriptionsContainer, SubscriptionsList, UsageContainer, UsageHistoryTable, UsageSummaryCard, UsageSummaryCards, formatCurrency, formatDate, formatInterval, isStripeConfigured, useBillingContext, useOptionalBillingContext };