@carlonicora/nextjs-jsonapi 2.3.0 → 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 (83) hide show
  1. package/dist/{BlockNoteEditor-PNAVMGHB.js → BlockNoteEditor-7WGCH2KB.js} +19 -19
  2. package/dist/{BlockNoteEditor-PNAVMGHB.js.map → BlockNoteEditor-7WGCH2KB.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-3PS3HYVI.mjs → BlockNoteEditor-GWAV5ESO.mjs} +4 -4
  4. package/dist/billing/index.d.mts +40 -1
  5. package/dist/billing/index.d.ts +40 -1
  6. package/dist/billing/index.js +519 -462
  7. package/dist/billing/index.js.map +1 -1
  8. package/dist/billing/index.mjs +298 -241
  9. package/dist/billing/index.mjs.map +1 -1
  10. package/dist/{chunk-MN2BUSEU.mjs → chunk-3LVSA7IM.mjs} +2 -2
  11. package/dist/{chunk-QYUYQO2M.js → chunk-GYGMEDVS.js} +1132 -950
  12. package/dist/chunk-GYGMEDVS.js.map +1 -0
  13. package/dist/{chunk-EQEW64CH.mjs → chunk-LCCRUWWY.mjs} +2 -1
  14. package/dist/{chunk-EQEW64CH.mjs.map → chunk-LCCRUWWY.mjs.map} +1 -1
  15. package/dist/{chunk-FSMXD3N7.mjs → chunk-M2EGUO2F.mjs} +2535 -2353
  16. package/dist/chunk-M2EGUO2F.mjs.map +1 -0
  17. package/dist/{chunk-OHJQYVSI.js → chunk-TOKHHZSP.js} +7 -7
  18. package/dist/{chunk-OHJQYVSI.js.map → chunk-TOKHHZSP.js.map} +1 -1
  19. package/dist/{chunk-X5TPKMBS.js → chunk-V66AZWPG.js} +2 -1
  20. package/dist/chunk-V66AZWPG.js.map +1 -0
  21. package/dist/client/index.d.mts +1 -1
  22. package/dist/client/index.d.ts +1 -1
  23. package/dist/client/index.js +4 -4
  24. package/dist/client/index.mjs +3 -3
  25. package/dist/components/index.d.mts +121 -3
  26. package/dist/components/index.d.ts +121 -3
  27. package/dist/components/index.js +16 -4
  28. package/dist/components/index.js.map +1 -1
  29. package/dist/components/index.mjs +15 -3
  30. package/dist/{content.fields-xH3TGvVk.d.mts → content.fields-1AlHDtDb.d.mts} +1 -0
  31. package/dist/{content.fields-xH3TGvVk.d.ts → content.fields-1AlHDtDb.d.ts} +1 -0
  32. package/dist/contexts/index.d.mts +22 -1
  33. package/dist/contexts/index.d.ts +22 -1
  34. package/dist/contexts/index.js +8 -4
  35. package/dist/contexts/index.js.map +1 -1
  36. package/dist/contexts/index.mjs +7 -3
  37. package/dist/core/index.d.mts +1 -1
  38. package/dist/core/index.d.ts +1 -1
  39. package/dist/core/index.js +2 -2
  40. package/dist/core/index.mjs +1 -1
  41. package/dist/features/help/index.js +37 -37
  42. package/dist/features/help/index.mjs +3 -3
  43. package/dist/features/tokenusage/index.js +71 -71
  44. package/dist/features/tokenusage/index.mjs +3 -3
  45. package/dist/index.d.mts +1 -1
  46. package/dist/index.d.ts +1 -1
  47. package/dist/index.js +3 -3
  48. package/dist/index.mjs +2 -2
  49. package/dist/server/index.js +3 -3
  50. package/dist/server/index.mjs +1 -1
  51. package/package.json +1 -1
  52. package/src/billing/index.ts +1 -0
  53. package/src/components/index.ts +1 -0
  54. package/src/contexts/index.ts +1 -0
  55. package/src/features/administration/components/AdminIndexContainer.tsx +150 -0
  56. package/src/features/administration/components/__tests__/AdminIndexContainer.spec.tsx +96 -0
  57. package/src/features/administration/components/index.ts +1 -0
  58. package/src/features/administration/contexts/AdministrationContext.tsx +47 -0
  59. package/src/features/administration/contexts/index.ts +1 -0
  60. package/src/features/administration/data/admin-section.types.ts +30 -0
  61. package/src/features/administration/i18n-keys.ts +26 -0
  62. package/src/features/administration/index.ts +3 -0
  63. package/src/features/billing/contexts/BillingContext.tsx +95 -0
  64. package/src/features/billing/contexts/index.ts +1 -0
  65. package/src/features/billing/index.ts +1 -0
  66. package/src/features/billing/stripe-product/components/containers/ProductsAdminContainer.tsx +39 -27
  67. package/src/features/billing/stripe-product/components/containers/ProductsAdminPageContainer.tsx +27 -0
  68. package/src/features/billing/stripe-product/components/containers/index.ts +1 -0
  69. package/src/features/company/components/containers/CompaniesListContainer.tsx +25 -0
  70. package/src/features/company/components/containers/index.ts +1 -0
  71. package/src/features/company/components/lists/CompaniesList.tsx +12 -1
  72. package/src/features/company/contexts/CompanyContext.tsx +13 -1
  73. package/src/features/user/components/containers/PlatformUsersContainer.tsx +23 -0
  74. package/src/features/user/components/containers/index.ts +1 -0
  75. package/src/features/user/components/lists/PlatformUsersList.tsx +45 -0
  76. package/src/features/user/components/lists/index.ts +1 -0
  77. package/src/features/user/data/user.fields.ts +1 -0
  78. package/src/features/user/hooks/useUserTableStructure.tsx +17 -0
  79. package/dist/chunk-FSMXD3N7.mjs.map +0 -1
  80. package/dist/chunk-QYUYQO2M.js.map +0 -1
  81. package/dist/chunk-X5TPKMBS.js.map +0 -1
  82. /package/dist/{BlockNoteEditor-3PS3HYVI.mjs.map → BlockNoteEditor-GWAV5ESO.mjs.map} +0 -0
  83. /package/dist/{chunk-MN2BUSEU.mjs.map → chunk-3LVSA7IM.mjs.map} +0 -0
@@ -26,8 +26,8 @@ import {
26
26
  TableHeader,
27
27
  TableRow,
28
28
  usePageUrlGenerator
29
- } from "../../chunk-FSMXD3N7.mjs";
30
- import "../../chunk-MN2BUSEU.mjs";
29
+ } from "../../chunk-M2EGUO2F.mjs";
30
+ import "../../chunk-3LVSA7IM.mjs";
31
31
  import {
32
32
  AbstractService,
33
33
  EndpointCreator,
@@ -39,7 +39,7 @@ import {
39
39
  TokenUsageAdminTimeline,
40
40
  TokenUsageAdminTimelineModule,
41
41
  cn
42
- } from "../../chunk-EQEW64CH.mjs";
42
+ } from "../../chunk-LCCRUWWY.mjs";
43
43
  import "../../chunk-AUXK7QSA.mjs";
44
44
  import "../../chunk-C7C7VY4F.mjs";
45
45
  import "../../chunk-E5YA5Z5X.mjs";
package/dist/index.d.mts CHANGED
@@ -8,7 +8,7 @@ import { A as AbstractService } from './AbstractService-B0T7h8fX.mjs';
8
8
  export { H as HttpMethod, N as NextRef, P as PreviousRef, S as SelfRef, T as TotalRef, b as clearLastApiMeta, c as clearLastApiTotal, d as getGlobalErrorHandler, a as getLastApiMeta, g as getLastApiTotal, s as setGlobalErrorHandler } from './AbstractService-B0T7h8fX.mjs';
9
9
  export { AppModuleDefinitions, Assistant, AssistantAction, AssistantActionInput, AssistantActionInterface, AssistantActionModule, AssistantActionService, AssistantActionStatus, AssistantMessage, AssistantMessageModule, AssistantMessageService, AssistantModule, AssistantService, AuditLog, AuditLogInterface, AuditLogModule, AuditLogService, Auth, AuthModule, AuthorModule, BackupCodeVerify, BackupCodeVerifyInput, BackupCodeVerifyModule, Billing, BillingModule, BillingService, BlockDiffOptions, BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, Chunk, ChunkInput, ChunkModule, ClientAbstractService, ClientHttpMethod, ClientNextRef, ClientPreviousRef, ClientSelfRef, ClientTotalRef, CodiceFiscaleValidationOptions, Company, CompanyFields, CompanyModule, Content, ContentModule, DataClass, DataClass as DataClassRegistry, DiffBlock, DiffResult, EndpointCreator, EndpointQuery, EntityAiStatus, EntityObject, Feature, FeatureModule, FormatOption, FoundationModuleDefinitions, HowTo, HowToFields, HowToModule, HowToService, InviteValidation, JsonApiDataFactory, MOBILE_BREAKPOINT, Module, ModuleDefinitions, ModuleModule, ModulePathsModule, ModuleRegistrar, ModuleRegistry, Modules, Notification, NotificationFields, NotificationModule, OAuthClient, OAuthModule, OAuthService, Passkey, PasskeyAuthenticationOptions, PasskeyAuthenticationOptionsInput, PasskeyAuthenticationOptionsInterface, PasskeyAuthenticationOptionsModule, PasskeyModule, PasskeyRegistrationOptions, PasskeyRegistrationOptionsInput, PasskeyRegistrationOptionsInterface, PasskeyRegistrationOptionsModule, PasskeyRegistrationVerify, PasskeyRegistrationVerifyInput, PasskeyRegistrationVerifyModule, PasskeyRename, PasskeyRenameInput, PasskeyRenameModule, PasskeyVerifyLogin, PasskeyVerifyLoginInput, PasskeyVerifyLoginModule, PaymentMethod, PermissionMappingModule, Push, PushInput, PushInterface, PushModule, RbacMatrixModule, ReferralModule, ReferralService, ReferralStats, ReferralStatsModule, RehydrationFactory, Role, RoleModule, S3, S3Module, SearchResultInterface, StripeCustomer, StripeCustomerModule, StripeCustomerService, StripeInvoice, StripeInvoiceModule, StripeInvoiceService, StripePaymentMethodModule, StripePrice, StripePriceModule, StripePriceService, StripeProduct, StripeProductModule, StripeProductService, StripePromotionCode, StripePromotionCodeModule, StripePromotionCodeService, StripeSubscription, StripeSubscriptionModule, StripeSubscriptionService, StripeUsage, StripeUsageModule, StripeUsageService, TableOptions, ToastOptions, TotpAuthenticator, TotpAuthenticatorModule, TotpSetup, TotpSetupInput, TotpSetupInterface, TotpSetupModule, TotpVerify, TotpVerifyInput, TotpVerifyLogin, TotpVerifyLoginInput, TotpVerifyLoginModule, TotpVerifyModule, TwoFactorChallenge, TwoFactorChallengeInput, TwoFactorChallengeModule, TwoFactorEnable, TwoFactorEnableInput, TwoFactorEnableModule, TwoFactorService, TwoFactorStatus, TwoFactorStatusInterface, TwoFactorStatusModule, User, UserModule, UserObject, VIEWPORT_COOKIE_NAME, Waitlist, WaitlistInput, WaitlistInterface, WaitlistModule, WaitlistService, WaitlistStats, WaitlistStatsInterface, WaitlistStatsModule, WaitlistStatus, WordDiff, checkPermissions, checkPermissionsFromServer, cn, composeRefs, dismissToast, entityObjectSchema, exists, formatCodiceFiscale, formatDate, formatLocalDate, formatPartitaIva, getBootstrapper, getClientGlobalErrorHandler, getTableComponents, getTableOptions, getValueFromPath, hasBootstrapper, isRemoteImageSrc, rehydrate, rehydrateList, resetBootstrapStore, setBootstrapper, setClientGlobalErrorHandler, showCustomToast, showError, showToast, translateData, translateResponse, tryBootstrap, useComposedRefs, useIsMobile, userObjectSchema, validateCodiceFiscale, validateItalianTaxCode, validatePartitaIva } from './core/index.mjs';
10
10
  export { c as AssistantMessageInput, d as AssistantMessageInterface, A as AssistantMessageRole, b as AssistantMessageType, B as BreadcrumbItemData, e as ChunkInterface, C as ChunkRelationshipMeta, H as HowToInput, a as HowToInterface } from './AssistantMessageInterface-Ce8FcllX.mjs';
11
- export { C as ContentFields, D as D3Link, a as D3Node, R as RoleFields, U as UserFields } from './content.fields-xH3TGvVk.mjs';
11
+ export { C as ContentFields, D as D3Link, a as D3Node, R as RoleFields, U as UserFields } from './content.fields-1AlHDtDb.mjs';
12
12
  export { ClassValue } from 'clsx';
13
13
  export { A as AuthComponent, P as PasskeyInterface, T as TotpAuthenticatorInterface, b as getIcon, a as getIconByModule, c as getIconByModuleName, g as getInitials, d as getLucideIcon, e as getLucideIconByModule, f as getLucideIconByModuleName } from './AuthComponent-Cik96ElA.mjs';
14
14
  export { A as Action, d as ModuleDefinition, a as ModuleFactory, c as ModulePermissionDefinition, M as ModuleWithPermissions, P as PageUrl, b as PermissionCheck, e as PermissionConfig, f as PermissionModule, g as PermissionUser } from './types-Bq_UA8Lg.mjs';
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import { A as AbstractService } from './AbstractService-Cew0PD0L.js';
8
8
  export { H as HttpMethod, N as NextRef, P as PreviousRef, S as SelfRef, T as TotalRef, b as clearLastApiMeta, c as clearLastApiTotal, d as getGlobalErrorHandler, a as getLastApiMeta, g as getLastApiTotal, s as setGlobalErrorHandler } from './AbstractService-Cew0PD0L.js';
9
9
  export { AppModuleDefinitions, Assistant, AssistantAction, AssistantActionInput, AssistantActionInterface, AssistantActionModule, AssistantActionService, AssistantActionStatus, AssistantMessage, AssistantMessageModule, AssistantMessageService, AssistantModule, AssistantService, AuditLog, AuditLogInterface, AuditLogModule, AuditLogService, Auth, AuthModule, AuthorModule, BackupCodeVerify, BackupCodeVerifyInput, BackupCodeVerifyModule, Billing, BillingModule, BillingService, BlockDiffOptions, BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, Chunk, ChunkInput, ChunkModule, ClientAbstractService, ClientHttpMethod, ClientNextRef, ClientPreviousRef, ClientSelfRef, ClientTotalRef, CodiceFiscaleValidationOptions, Company, CompanyFields, CompanyModule, Content, ContentModule, DataClass, DataClass as DataClassRegistry, DiffBlock, DiffResult, EndpointCreator, EndpointQuery, EntityAiStatus, EntityObject, Feature, FeatureModule, FormatOption, FoundationModuleDefinitions, HowTo, HowToFields, HowToModule, HowToService, InviteValidation, JsonApiDataFactory, MOBILE_BREAKPOINT, Module, ModuleDefinitions, ModuleModule, ModulePathsModule, ModuleRegistrar, ModuleRegistry, Modules, Notification, NotificationFields, NotificationModule, OAuthClient, OAuthModule, OAuthService, Passkey, PasskeyAuthenticationOptions, PasskeyAuthenticationOptionsInput, PasskeyAuthenticationOptionsInterface, PasskeyAuthenticationOptionsModule, PasskeyModule, PasskeyRegistrationOptions, PasskeyRegistrationOptionsInput, PasskeyRegistrationOptionsInterface, PasskeyRegistrationOptionsModule, PasskeyRegistrationVerify, PasskeyRegistrationVerifyInput, PasskeyRegistrationVerifyModule, PasskeyRename, PasskeyRenameInput, PasskeyRenameModule, PasskeyVerifyLogin, PasskeyVerifyLoginInput, PasskeyVerifyLoginModule, PaymentMethod, PermissionMappingModule, Push, PushInput, PushInterface, PushModule, RbacMatrixModule, ReferralModule, ReferralService, ReferralStats, ReferralStatsModule, RehydrationFactory, Role, RoleModule, S3, S3Module, SearchResultInterface, StripeCustomer, StripeCustomerModule, StripeCustomerService, StripeInvoice, StripeInvoiceModule, StripeInvoiceService, StripePaymentMethodModule, StripePrice, StripePriceModule, StripePriceService, StripeProduct, StripeProductModule, StripeProductService, StripePromotionCode, StripePromotionCodeModule, StripePromotionCodeService, StripeSubscription, StripeSubscriptionModule, StripeSubscriptionService, StripeUsage, StripeUsageModule, StripeUsageService, TableOptions, ToastOptions, TotpAuthenticator, TotpAuthenticatorModule, TotpSetup, TotpSetupInput, TotpSetupInterface, TotpSetupModule, TotpVerify, TotpVerifyInput, TotpVerifyLogin, TotpVerifyLoginInput, TotpVerifyLoginModule, TotpVerifyModule, TwoFactorChallenge, TwoFactorChallengeInput, TwoFactorChallengeModule, TwoFactorEnable, TwoFactorEnableInput, TwoFactorEnableModule, TwoFactorService, TwoFactorStatus, TwoFactorStatusInterface, TwoFactorStatusModule, User, UserModule, UserObject, VIEWPORT_COOKIE_NAME, Waitlist, WaitlistInput, WaitlistInterface, WaitlistModule, WaitlistService, WaitlistStats, WaitlistStatsInterface, WaitlistStatsModule, WaitlistStatus, WordDiff, checkPermissions, checkPermissionsFromServer, cn, composeRefs, dismissToast, entityObjectSchema, exists, formatCodiceFiscale, formatDate, formatLocalDate, formatPartitaIva, getBootstrapper, getClientGlobalErrorHandler, getTableComponents, getTableOptions, getValueFromPath, hasBootstrapper, isRemoteImageSrc, rehydrate, rehydrateList, resetBootstrapStore, setBootstrapper, setClientGlobalErrorHandler, showCustomToast, showError, showToast, translateData, translateResponse, tryBootstrap, useComposedRefs, useIsMobile, userObjectSchema, validateCodiceFiscale, validateItalianTaxCode, validatePartitaIva } from './core/index.js';
10
10
  export { c as AssistantMessageInput, d as AssistantMessageInterface, A as AssistantMessageRole, b as AssistantMessageType, B as BreadcrumbItemData, e as ChunkInterface, C as ChunkRelationshipMeta, H as HowToInput, a as HowToInterface } from './AssistantMessageInterface-Dh0BpbP2.js';
11
- export { C as ContentFields, D as D3Link, a as D3Node, R as RoleFields, U as UserFields } from './content.fields-xH3TGvVk.js';
11
+ export { C as ContentFields, D as D3Link, a as D3Node, R as RoleFields, U as UserFields } from './content.fields-1AlHDtDb.js';
12
12
  export { ClassValue } from 'clsx';
13
13
  export { A as AuthComponent, P as PasskeyInterface, T as TotpAuthenticatorInterface, b as getIcon, a as getIconByModule, c as getIconByModuleName, g as getInitials, d as getLucideIcon, e as getLucideIconByModule, f as getLucideIconByModuleName } from './AuthComponent-DTTKu3VK.js';
14
14
  export { A as Action, d as ModuleDefinition, a as ModuleFactory, c as ModulePermissionDefinition, M as ModuleWithPermissions, P as PageUrl, b as PermissionCheck, e as PermissionConfig, f as PermissionModule, g as PermissionUser } from './types-bsm8Fp55.js';
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
 
21
- var _chunkOHJQYVSIjs = require('./chunk-OHJQYVSI.js');
21
+ var _chunkTOKHHZSPjs = require('./chunk-TOKHHZSP.js');
22
22
 
23
23
 
24
24
 
@@ -216,7 +216,7 @@ var _chunkOHJQYVSIjs = require('./chunk-OHJQYVSI.js');
216
216
 
217
217
 
218
218
 
219
- var _chunkX5TPKMBSjs = require('./chunk-X5TPKMBS.js');
219
+ var _chunkV66AZWPGjs = require('./chunk-V66AZWPG.js');
220
220
  require('./chunk-LXKSUWAV.js');
221
221
  require('./chunk-IBS6NI7D.js');
222
222
 
@@ -457,5 +457,5 @@ require('./chunk-7QVYU63E.js');
457
457
 
458
458
 
459
459
 
460
- exports.ACTION_TYPES = _chunkOHJQYVSIjs.ACTION_TYPES; exports.AVAILABLE_OAUTH_SCOPES = _chunkX5TPKMBSjs.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunkX5TPKMBSjs.AbstractApiData; exports.AbstractService = _chunkX5TPKMBSjs.AbstractService; exports.Action = _chunkX5TPKMBSjs.Action; exports.Assistant = _chunkX5TPKMBSjs.Assistant; exports.AssistantAction = _chunkX5TPKMBSjs.AssistantAction; exports.AssistantActionModule = _chunkX5TPKMBSjs.AssistantActionModule; exports.AssistantActionService = _chunkX5TPKMBSjs.AssistantActionService; exports.AssistantMessage = _chunkX5TPKMBSjs.AssistantMessage; exports.AssistantMessageModule = _chunkX5TPKMBSjs.AssistantMessageModule; exports.AssistantMessageService = _chunkX5TPKMBSjs.AssistantMessageService; exports.AssistantModule = _chunkX5TPKMBSjs.AssistantModule; exports.AssistantService = _chunkX5TPKMBSjs.AssistantService; exports.AuditLog = _chunkX5TPKMBSjs.AuditLog; exports.AuditLogModule = _chunkX5TPKMBSjs.AuditLogModule; exports.AuditLogService = _chunkX5TPKMBSjs.AuditLogService; exports.Auth = _chunkX5TPKMBSjs.Auth; exports.AuthComponent = _chunkX5TPKMBSjs.AuthComponent; exports.AuthModule = _chunkX5TPKMBSjs.AuthModule; exports.AuthService = _chunkX5TPKMBSjs.AuthService; exports.AuthorModule = _chunkX5TPKMBSjs.AuthorModule; exports.BackupCodeVerify = _chunkX5TPKMBSjs.BackupCodeVerify; exports.BackupCodeVerifyModule = _chunkX5TPKMBSjs.BackupCodeVerifyModule; exports.Billing = _chunkX5TPKMBSjs.Billing; exports.BillingModule = _chunkX5TPKMBSjs.BillingModule; exports.BillingService = _chunkX5TPKMBSjs.BillingService; exports.BlockNoteDiffUtil = _chunkX5TPKMBSjs.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunkX5TPKMBSjs.BlockNoteWordDiffRendererUtil; exports.COMPANY_ADMINISTRATOR_ROLE_ID = _chunkOHJQYVSIjs.COMPANY_ADMINISTRATOR_ROLE_ID; exports.Chunk = _chunkX5TPKMBSjs.Chunk; exports.ChunkModule = _chunkX5TPKMBSjs.ChunkModule; exports.ClientAbstractService = _chunkX5TPKMBSjs.ClientAbstractService; exports.ClientHttpMethod = _chunkX5TPKMBSjs.ClientHttpMethod; exports.Company = _chunkX5TPKMBSjs.Company; exports.CompanyFields = _chunkX5TPKMBSjs.CompanyFields; exports.CompanyModule = _chunkX5TPKMBSjs.CompanyModule; exports.CompanyService = _chunkX5TPKMBSjs.CompanyService; exports.Content = _chunkX5TPKMBSjs.Content; exports.ContentFields = _chunkX5TPKMBSjs.ContentFields; exports.ContentModule = _chunkX5TPKMBSjs.ContentModule; exports.ContentService = _chunkX5TPKMBSjs.ContentService; exports.DEFAULT_GRANT_TYPES = _chunkX5TPKMBSjs.DEFAULT_GRANT_TYPES; exports.DataClass = _chunkFPO4DLZNjs.DataClassRegistry; exports.DataClassRegistry = _chunkFPO4DLZNjs.DataClassRegistry; exports.EndpointCreator = _chunkX5TPKMBSjs.EndpointCreator; exports.EntityAiStatus = _chunkX5TPKMBSjs.EntityAiStatus; exports.Feature = _chunkX5TPKMBSjs.Feature; exports.FeatureModule = _chunkX5TPKMBSjs.FeatureModule; exports.FeatureService = _chunkX5TPKMBSjs.FeatureService; exports.HowTo = _chunkX5TPKMBSjs.HowTo; exports.HowToFields = _chunkX5TPKMBSjs.HowToFields; exports.HowToModule = _chunkX5TPKMBSjs.HowToModule; exports.HowToService = _chunkX5TPKMBSjs.HowToService; exports.HttpMethod = _chunkX5TPKMBSjs.HttpMethod; exports.InvoiceStatus = _chunkX5TPKMBSjs.InvoiceStatus; exports.JsonApiDataFactory = _chunkFPO4DLZNjs.JsonApiDataFactory; exports.MOBILE_BREAKPOINT = _chunkX5TPKMBSjs.MOBILE_BREAKPOINT; exports.Module = _chunkX5TPKMBSjs.Module; exports.ModuleModule = _chunkX5TPKMBSjs.ModuleModule; exports.ModulePaths = _chunkX5TPKMBSjs.ModulePaths; exports.ModulePathsModule = _chunkX5TPKMBSjs.ModulePathsModule; exports.ModuleRegistrar = _chunkX5TPKMBSjs.ModuleRegistrar; exports.ModuleRegistry = _chunkX5TPKMBSjs.ModuleRegistry; exports.Modules = _chunkX5TPKMBSjs.Modules; exports.Notification = _chunkX5TPKMBSjs.Notification; exports.NotificationFields = _chunkX5TPKMBSjs.NotificationFields; exports.NotificationModule = _chunkX5TPKMBSjs.NotificationModule; exports.NotificationService = _chunkX5TPKMBSjs.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunkX5TPKMBSjs.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunkX5TPKMBSjs.OAuthClient; exports.OAuthModule = _chunkX5TPKMBSjs.OAuthModule; exports.OAuthService = _chunkX5TPKMBSjs.OAuthService; exports.Passkey = _chunkX5TPKMBSjs.Passkey; exports.PasskeyAuthenticationOptions = _chunkX5TPKMBSjs.PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = _chunkX5TPKMBSjs.PasskeyAuthenticationOptionsModule; exports.PasskeyModule = _chunkX5TPKMBSjs.PasskeyModule; exports.PasskeyRegistrationOptions = _chunkX5TPKMBSjs.PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = _chunkX5TPKMBSjs.PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = _chunkX5TPKMBSjs.PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = _chunkX5TPKMBSjs.PasskeyRegistrationVerifyModule; exports.PasskeyRename = _chunkX5TPKMBSjs.PasskeyRename; exports.PasskeyRenameModule = _chunkX5TPKMBSjs.PasskeyRenameModule; exports.PasskeyVerifyLogin = _chunkX5TPKMBSjs.PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = _chunkX5TPKMBSjs.PasskeyVerifyLoginModule; exports.PaymentMethod = _chunkX5TPKMBSjs.PaymentMethod; exports.PermissionMapping = _chunkX5TPKMBSjs.PermissionMapping; exports.PermissionMappingModule = _chunkX5TPKMBSjs.PermissionMappingModule; exports.Push = _chunkX5TPKMBSjs.Push; exports.PushModule = _chunkX5TPKMBSjs.PushModule; exports.PushService = _chunkX5TPKMBSjs.PushService; exports.RbacMatrixModel = _chunkX5TPKMBSjs.RbacMatrixModel; exports.RbacMatrixModule = _chunkX5TPKMBSjs.RbacMatrixModule; exports.RbacService = _chunkOHJQYVSIjs.RbacService; exports.ReferralModule = _chunkX5TPKMBSjs.ReferralModule; exports.ReferralService = _chunkX5TPKMBSjs.ReferralService; exports.ReferralStats = _chunkX5TPKMBSjs.ReferralStats; exports.ReferralStatsModule = _chunkX5TPKMBSjs.ReferralStatsModule; exports.RehydrationFactory = _chunkX5TPKMBSjs.RehydrationFactory; exports.Role = _chunkX5TPKMBSjs.Role; exports.RoleFields = _chunkX5TPKMBSjs.RoleFields; exports.RoleModule = _chunkX5TPKMBSjs.RoleModule; exports.RoleService = _chunkX5TPKMBSjs.RoleService; exports.S3 = _chunkX5TPKMBSjs.S3; exports.S3Module = _chunkX5TPKMBSjs.S3Module; exports.S3Service = _chunkX5TPKMBSjs.S3Service; exports.StripeCustomer = _chunkX5TPKMBSjs.StripeCustomer; exports.StripeCustomerModule = _chunkX5TPKMBSjs.StripeCustomerModule; exports.StripeCustomerService = _chunkX5TPKMBSjs.StripeCustomerService; exports.StripeInvoice = _chunkX5TPKMBSjs.StripeInvoice; exports.StripeInvoiceModule = _chunkX5TPKMBSjs.StripeInvoiceModule; exports.StripeInvoiceService = _chunkX5TPKMBSjs.StripeInvoiceService; exports.StripePaymentMethodModule = _chunkX5TPKMBSjs.StripePaymentMethodModule; exports.StripePrice = _chunkX5TPKMBSjs.StripePrice; exports.StripePriceModule = _chunkX5TPKMBSjs.StripePriceModule; exports.StripePriceService = _chunkX5TPKMBSjs.StripePriceService; exports.StripeProduct = _chunkX5TPKMBSjs.StripeProduct; exports.StripeProductModule = _chunkX5TPKMBSjs.StripeProductModule; exports.StripeProductService = _chunkX5TPKMBSjs.StripeProductService; exports.StripePromotionCode = _chunkX5TPKMBSjs.StripePromotionCode; exports.StripePromotionCodeModule = _chunkX5TPKMBSjs.StripePromotionCodeModule; exports.StripePromotionCodeService = _chunkX5TPKMBSjs.StripePromotionCodeService; exports.StripeSubscription = _chunkX5TPKMBSjs.StripeSubscription; exports.StripeSubscriptionModule = _chunkX5TPKMBSjs.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunkX5TPKMBSjs.StripeSubscriptionService; exports.StripeUsage = _chunkX5TPKMBSjs.StripeUsage; exports.StripeUsageModule = _chunkX5TPKMBSjs.StripeUsageModule; exports.StripeUsageService = _chunkX5TPKMBSjs.StripeUsageService; exports.SubscriptionStatus = _chunkX5TPKMBSjs.SubscriptionStatus; exports.TableOptions = _chunkX5TPKMBSjs.TableOptions; exports.TokenUsageAdminBreakdownModule = _chunkX5TPKMBSjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminSummaryModule = _chunkX5TPKMBSjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTimelineModule = _chunkX5TPKMBSjs.TokenUsageAdminTimelineModule; exports.TotpAuthenticator = _chunkX5TPKMBSjs.TotpAuthenticator; exports.TotpAuthenticatorModule = _chunkX5TPKMBSjs.TotpAuthenticatorModule; exports.TotpSetup = _chunkX5TPKMBSjs.TotpSetup; exports.TotpSetupModule = _chunkX5TPKMBSjs.TotpSetupModule; exports.TotpVerify = _chunkX5TPKMBSjs.TotpVerify; exports.TotpVerifyLogin = _chunkX5TPKMBSjs.TotpVerifyLogin; exports.TotpVerifyLoginModule = _chunkX5TPKMBSjs.TotpVerifyLoginModule; exports.TotpVerifyModule = _chunkX5TPKMBSjs.TotpVerifyModule; exports.TwoFactorChallenge = _chunkX5TPKMBSjs.TwoFactorChallenge; exports.TwoFactorChallengeModule = _chunkX5TPKMBSjs.TwoFactorChallengeModule; exports.TwoFactorEnable = _chunkX5TPKMBSjs.TwoFactorEnable; exports.TwoFactorEnableModule = _chunkX5TPKMBSjs.TwoFactorEnableModule; exports.TwoFactorService = _chunkX5TPKMBSjs.TwoFactorService; exports.TwoFactorStatus = _chunkX5TPKMBSjs.TwoFactorStatus; exports.TwoFactorStatusModule = _chunkX5TPKMBSjs.TwoFactorStatusModule; exports.User = _chunkX5TPKMBSjs.User; exports.UserFields = _chunkX5TPKMBSjs.UserFields; exports.UserModule = _chunkX5TPKMBSjs.UserModule; exports.UserService = _chunkX5TPKMBSjs.UserService; exports.VIEWPORT_COOKIE_NAME = _chunkX5TPKMBSjs.VIEWPORT_COOKIE_NAME; exports.Waitlist = _chunkX5TPKMBSjs.Waitlist; exports.WaitlistModule = _chunkX5TPKMBSjs.WaitlistModule; exports.WaitlistService = _chunkX5TPKMBSjs.WaitlistService; exports.WaitlistStats = _chunkX5TPKMBSjs.WaitlistStats; exports.WaitlistStatsModule = _chunkX5TPKMBSjs.WaitlistStatsModule; exports.checkPermissions = _chunkX5TPKMBSjs.checkPermissions; exports.checkPermissionsFromServer = _chunkX5TPKMBSjs.checkPermissionsFromServer; exports.clearLastApiMeta = _chunkX5TPKMBSjs.clearLastApiMeta; exports.clearLastApiTotal = _chunkX5TPKMBSjs.clearLastApiTotal; exports.cn = _chunkX5TPKMBSjs.cn; exports.composeRefs = _chunkX5TPKMBSjs.composeRefs; exports.configureAuth = _chunkX5TPKMBSjs.configureAuth; exports.configureI18n = _chunkOHJQYVSIjs.configureI18n; exports.configureJsonApi = _chunkOHJQYVSIjs.configureJsonApi; exports.configureLogin = _chunkOHJQYVSIjs.configureLogin; exports.configureReferral = _chunkOHJQYVSIjs.configureReferral; exports.configureRoles = _chunkOHJQYVSIjs.configureRoles; exports.configureWaitlist = _chunkOHJQYVSIjs.configureWaitlist; exports.createJsonApiInclusion = _chunkX5TPKMBSjs.createJsonApiInclusion; exports.dismissToast = _chunkX5TPKMBSjs.dismissToast; exports.entityObjectSchema = _chunkX5TPKMBSjs.entityObjectSchema; exports.exists = _chunkX5TPKMBSjs.exists; exports.formatCodiceFiscale = _chunkX5TPKMBSjs.formatCodiceFiscale; exports.formatDate = _chunkX5TPKMBSjs.formatDate; exports.formatLocalDate = _chunkX5TPKMBSjs.formatLocalDate; exports.formatPartitaIva = _chunkX5TPKMBSjs.formatPartitaIva; exports.getApiUrl = _chunkOHJQYVSIjs.getApiUrl; exports.getAppUrl = _chunkOHJQYVSIjs.getAppUrl; exports.getBootstrapper = _chunkFPO4DLZNjs.getBootstrapper; exports.getClientGlobalErrorHandler = _chunkX5TPKMBSjs.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunkX5TPKMBSjs.getGlobalErrorHandler; exports.getIcon = _chunkX5TPKMBSjs.getIcon; exports.getIconByModule = _chunkX5TPKMBSjs.getIconByModule; exports.getIconByModuleName = _chunkX5TPKMBSjs.getIconByModuleName; exports.getInitials = _chunkX5TPKMBSjs.getInitials; exports.getLastApiMeta = _chunkX5TPKMBSjs.getLastApiMeta; exports.getLastApiTotal = _chunkX5TPKMBSjs.getLastApiTotal; exports.getLucideIcon = _chunkX5TPKMBSjs.getLucideIcon; exports.getLucideIconByModule = _chunkX5TPKMBSjs.getLucideIconByModule; exports.getLucideIconByModuleName = _chunkX5TPKMBSjs.getLucideIconByModuleName; exports.getPublicApiUrl = _chunkOHJQYVSIjs.getPublicApiUrl; exports.getReferralConfig = _chunkOHJQYVSIjs.getReferralConfig; exports.getRoleId = _chunkOHJQYVSIjs.getRoleId; exports.getStripePublishableKey = _chunkOHJQYVSIjs.getStripePublishableKey; exports.getTableComponents = _chunkX5TPKMBSjs.getTableComponents; exports.getTableOptions = _chunkX5TPKMBSjs.getTableOptions; exports.getTokenHandler = _chunkX5TPKMBSjs.getTokenHandler; exports.getTrackablePages = _chunkOHJQYVSIjs.getTrackablePages; exports.getValueFromPath = _chunkX5TPKMBSjs.getValueFromPath; exports.getWaitlistConfig = _chunkOHJQYVSIjs.getWaitlistConfig; exports.hasBootstrapper = _chunkFPO4DLZNjs.hasBootstrapper; exports.isReferralEnabled = _chunkOHJQYVSIjs.isReferralEnabled; exports.isRemoteImageSrc = _chunkX5TPKMBSjs.isRemoteImageSrc; exports.isRolesConfigured = _chunkOHJQYVSIjs.isRolesConfigured; exports.rehydrate = _chunkX5TPKMBSjs.rehydrate; exports.rehydrateList = _chunkX5TPKMBSjs.rehydrateList; exports.resetBootstrapStore = _chunkFPO4DLZNjs.resetBootstrapStore; exports.setBootstrapper = _chunkFPO4DLZNjs.setBootstrapper; exports.setClientGlobalErrorHandler = _chunkX5TPKMBSjs.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunkX5TPKMBSjs.setGlobalErrorHandler; exports.showCustomToast = _chunkX5TPKMBSjs.showCustomToast; exports.showError = _chunkX5TPKMBSjs.showError; exports.showToast = _chunkX5TPKMBSjs.showToast; exports.translateData = _chunkFPO4DLZNjs.translateData; exports.translateResponse = _chunkFPO4DLZNjs.translateResponse; exports.tryBootstrap = _chunkFPO4DLZNjs.tryBootstrap; exports.useComposedRefs = _chunkX5TPKMBSjs.useComposedRefs; exports.useIsMobile = _chunkX5TPKMBSjs.useIsMobile; exports.userObjectSchema = _chunkX5TPKMBSjs.userObjectSchema; exports.validateCodiceFiscale = _chunkX5TPKMBSjs.validateCodiceFiscale; exports.validateItalianTaxCode = _chunkX5TPKMBSjs.validateItalianTaxCode; exports.validatePartitaIva = _chunkX5TPKMBSjs.validatePartitaIva;
460
+ exports.ACTION_TYPES = _chunkTOKHHZSPjs.ACTION_TYPES; exports.AVAILABLE_OAUTH_SCOPES = _chunkV66AZWPGjs.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunkV66AZWPGjs.AbstractApiData; exports.AbstractService = _chunkV66AZWPGjs.AbstractService; exports.Action = _chunkV66AZWPGjs.Action; exports.Assistant = _chunkV66AZWPGjs.Assistant; exports.AssistantAction = _chunkV66AZWPGjs.AssistantAction; exports.AssistantActionModule = _chunkV66AZWPGjs.AssistantActionModule; exports.AssistantActionService = _chunkV66AZWPGjs.AssistantActionService; exports.AssistantMessage = _chunkV66AZWPGjs.AssistantMessage; exports.AssistantMessageModule = _chunkV66AZWPGjs.AssistantMessageModule; exports.AssistantMessageService = _chunkV66AZWPGjs.AssistantMessageService; exports.AssistantModule = _chunkV66AZWPGjs.AssistantModule; exports.AssistantService = _chunkV66AZWPGjs.AssistantService; exports.AuditLog = _chunkV66AZWPGjs.AuditLog; exports.AuditLogModule = _chunkV66AZWPGjs.AuditLogModule; exports.AuditLogService = _chunkV66AZWPGjs.AuditLogService; exports.Auth = _chunkV66AZWPGjs.Auth; exports.AuthComponent = _chunkV66AZWPGjs.AuthComponent; exports.AuthModule = _chunkV66AZWPGjs.AuthModule; exports.AuthService = _chunkV66AZWPGjs.AuthService; exports.AuthorModule = _chunkV66AZWPGjs.AuthorModule; exports.BackupCodeVerify = _chunkV66AZWPGjs.BackupCodeVerify; exports.BackupCodeVerifyModule = _chunkV66AZWPGjs.BackupCodeVerifyModule; exports.Billing = _chunkV66AZWPGjs.Billing; exports.BillingModule = _chunkV66AZWPGjs.BillingModule; exports.BillingService = _chunkV66AZWPGjs.BillingService; exports.BlockNoteDiffUtil = _chunkV66AZWPGjs.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunkV66AZWPGjs.BlockNoteWordDiffRendererUtil; exports.COMPANY_ADMINISTRATOR_ROLE_ID = _chunkTOKHHZSPjs.COMPANY_ADMINISTRATOR_ROLE_ID; exports.Chunk = _chunkV66AZWPGjs.Chunk; exports.ChunkModule = _chunkV66AZWPGjs.ChunkModule; exports.ClientAbstractService = _chunkV66AZWPGjs.ClientAbstractService; exports.ClientHttpMethod = _chunkV66AZWPGjs.ClientHttpMethod; exports.Company = _chunkV66AZWPGjs.Company; exports.CompanyFields = _chunkV66AZWPGjs.CompanyFields; exports.CompanyModule = _chunkV66AZWPGjs.CompanyModule; exports.CompanyService = _chunkV66AZWPGjs.CompanyService; exports.Content = _chunkV66AZWPGjs.Content; exports.ContentFields = _chunkV66AZWPGjs.ContentFields; exports.ContentModule = _chunkV66AZWPGjs.ContentModule; exports.ContentService = _chunkV66AZWPGjs.ContentService; exports.DEFAULT_GRANT_TYPES = _chunkV66AZWPGjs.DEFAULT_GRANT_TYPES; exports.DataClass = _chunkFPO4DLZNjs.DataClassRegistry; exports.DataClassRegistry = _chunkFPO4DLZNjs.DataClassRegistry; exports.EndpointCreator = _chunkV66AZWPGjs.EndpointCreator; exports.EntityAiStatus = _chunkV66AZWPGjs.EntityAiStatus; exports.Feature = _chunkV66AZWPGjs.Feature; exports.FeatureModule = _chunkV66AZWPGjs.FeatureModule; exports.FeatureService = _chunkV66AZWPGjs.FeatureService; exports.HowTo = _chunkV66AZWPGjs.HowTo; exports.HowToFields = _chunkV66AZWPGjs.HowToFields; exports.HowToModule = _chunkV66AZWPGjs.HowToModule; exports.HowToService = _chunkV66AZWPGjs.HowToService; exports.HttpMethod = _chunkV66AZWPGjs.HttpMethod; exports.InvoiceStatus = _chunkV66AZWPGjs.InvoiceStatus; exports.JsonApiDataFactory = _chunkFPO4DLZNjs.JsonApiDataFactory; exports.MOBILE_BREAKPOINT = _chunkV66AZWPGjs.MOBILE_BREAKPOINT; exports.Module = _chunkV66AZWPGjs.Module; exports.ModuleModule = _chunkV66AZWPGjs.ModuleModule; exports.ModulePaths = _chunkV66AZWPGjs.ModulePaths; exports.ModulePathsModule = _chunkV66AZWPGjs.ModulePathsModule; exports.ModuleRegistrar = _chunkV66AZWPGjs.ModuleRegistrar; exports.ModuleRegistry = _chunkV66AZWPGjs.ModuleRegistry; exports.Modules = _chunkV66AZWPGjs.Modules; exports.Notification = _chunkV66AZWPGjs.Notification; exports.NotificationFields = _chunkV66AZWPGjs.NotificationFields; exports.NotificationModule = _chunkV66AZWPGjs.NotificationModule; exports.NotificationService = _chunkV66AZWPGjs.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunkV66AZWPGjs.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunkV66AZWPGjs.OAuthClient; exports.OAuthModule = _chunkV66AZWPGjs.OAuthModule; exports.OAuthService = _chunkV66AZWPGjs.OAuthService; exports.Passkey = _chunkV66AZWPGjs.Passkey; exports.PasskeyAuthenticationOptions = _chunkV66AZWPGjs.PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = _chunkV66AZWPGjs.PasskeyAuthenticationOptionsModule; exports.PasskeyModule = _chunkV66AZWPGjs.PasskeyModule; exports.PasskeyRegistrationOptions = _chunkV66AZWPGjs.PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = _chunkV66AZWPGjs.PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = _chunkV66AZWPGjs.PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = _chunkV66AZWPGjs.PasskeyRegistrationVerifyModule; exports.PasskeyRename = _chunkV66AZWPGjs.PasskeyRename; exports.PasskeyRenameModule = _chunkV66AZWPGjs.PasskeyRenameModule; exports.PasskeyVerifyLogin = _chunkV66AZWPGjs.PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = _chunkV66AZWPGjs.PasskeyVerifyLoginModule; exports.PaymentMethod = _chunkV66AZWPGjs.PaymentMethod; exports.PermissionMapping = _chunkV66AZWPGjs.PermissionMapping; exports.PermissionMappingModule = _chunkV66AZWPGjs.PermissionMappingModule; exports.Push = _chunkV66AZWPGjs.Push; exports.PushModule = _chunkV66AZWPGjs.PushModule; exports.PushService = _chunkV66AZWPGjs.PushService; exports.RbacMatrixModel = _chunkV66AZWPGjs.RbacMatrixModel; exports.RbacMatrixModule = _chunkV66AZWPGjs.RbacMatrixModule; exports.RbacService = _chunkTOKHHZSPjs.RbacService; exports.ReferralModule = _chunkV66AZWPGjs.ReferralModule; exports.ReferralService = _chunkV66AZWPGjs.ReferralService; exports.ReferralStats = _chunkV66AZWPGjs.ReferralStats; exports.ReferralStatsModule = _chunkV66AZWPGjs.ReferralStatsModule; exports.RehydrationFactory = _chunkV66AZWPGjs.RehydrationFactory; exports.Role = _chunkV66AZWPGjs.Role; exports.RoleFields = _chunkV66AZWPGjs.RoleFields; exports.RoleModule = _chunkV66AZWPGjs.RoleModule; exports.RoleService = _chunkV66AZWPGjs.RoleService; exports.S3 = _chunkV66AZWPGjs.S3; exports.S3Module = _chunkV66AZWPGjs.S3Module; exports.S3Service = _chunkV66AZWPGjs.S3Service; exports.StripeCustomer = _chunkV66AZWPGjs.StripeCustomer; exports.StripeCustomerModule = _chunkV66AZWPGjs.StripeCustomerModule; exports.StripeCustomerService = _chunkV66AZWPGjs.StripeCustomerService; exports.StripeInvoice = _chunkV66AZWPGjs.StripeInvoice; exports.StripeInvoiceModule = _chunkV66AZWPGjs.StripeInvoiceModule; exports.StripeInvoiceService = _chunkV66AZWPGjs.StripeInvoiceService; exports.StripePaymentMethodModule = _chunkV66AZWPGjs.StripePaymentMethodModule; exports.StripePrice = _chunkV66AZWPGjs.StripePrice; exports.StripePriceModule = _chunkV66AZWPGjs.StripePriceModule; exports.StripePriceService = _chunkV66AZWPGjs.StripePriceService; exports.StripeProduct = _chunkV66AZWPGjs.StripeProduct; exports.StripeProductModule = _chunkV66AZWPGjs.StripeProductModule; exports.StripeProductService = _chunkV66AZWPGjs.StripeProductService; exports.StripePromotionCode = _chunkV66AZWPGjs.StripePromotionCode; exports.StripePromotionCodeModule = _chunkV66AZWPGjs.StripePromotionCodeModule; exports.StripePromotionCodeService = _chunkV66AZWPGjs.StripePromotionCodeService; exports.StripeSubscription = _chunkV66AZWPGjs.StripeSubscription; exports.StripeSubscriptionModule = _chunkV66AZWPGjs.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunkV66AZWPGjs.StripeSubscriptionService; exports.StripeUsage = _chunkV66AZWPGjs.StripeUsage; exports.StripeUsageModule = _chunkV66AZWPGjs.StripeUsageModule; exports.StripeUsageService = _chunkV66AZWPGjs.StripeUsageService; exports.SubscriptionStatus = _chunkV66AZWPGjs.SubscriptionStatus; exports.TableOptions = _chunkV66AZWPGjs.TableOptions; exports.TokenUsageAdminBreakdownModule = _chunkV66AZWPGjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminSummaryModule = _chunkV66AZWPGjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTimelineModule = _chunkV66AZWPGjs.TokenUsageAdminTimelineModule; exports.TotpAuthenticator = _chunkV66AZWPGjs.TotpAuthenticator; exports.TotpAuthenticatorModule = _chunkV66AZWPGjs.TotpAuthenticatorModule; exports.TotpSetup = _chunkV66AZWPGjs.TotpSetup; exports.TotpSetupModule = _chunkV66AZWPGjs.TotpSetupModule; exports.TotpVerify = _chunkV66AZWPGjs.TotpVerify; exports.TotpVerifyLogin = _chunkV66AZWPGjs.TotpVerifyLogin; exports.TotpVerifyLoginModule = _chunkV66AZWPGjs.TotpVerifyLoginModule; exports.TotpVerifyModule = _chunkV66AZWPGjs.TotpVerifyModule; exports.TwoFactorChallenge = _chunkV66AZWPGjs.TwoFactorChallenge; exports.TwoFactorChallengeModule = _chunkV66AZWPGjs.TwoFactorChallengeModule; exports.TwoFactorEnable = _chunkV66AZWPGjs.TwoFactorEnable; exports.TwoFactorEnableModule = _chunkV66AZWPGjs.TwoFactorEnableModule; exports.TwoFactorService = _chunkV66AZWPGjs.TwoFactorService; exports.TwoFactorStatus = _chunkV66AZWPGjs.TwoFactorStatus; exports.TwoFactorStatusModule = _chunkV66AZWPGjs.TwoFactorStatusModule; exports.User = _chunkV66AZWPGjs.User; exports.UserFields = _chunkV66AZWPGjs.UserFields; exports.UserModule = _chunkV66AZWPGjs.UserModule; exports.UserService = _chunkV66AZWPGjs.UserService; exports.VIEWPORT_COOKIE_NAME = _chunkV66AZWPGjs.VIEWPORT_COOKIE_NAME; exports.Waitlist = _chunkV66AZWPGjs.Waitlist; exports.WaitlistModule = _chunkV66AZWPGjs.WaitlistModule; exports.WaitlistService = _chunkV66AZWPGjs.WaitlistService; exports.WaitlistStats = _chunkV66AZWPGjs.WaitlistStats; exports.WaitlistStatsModule = _chunkV66AZWPGjs.WaitlistStatsModule; exports.checkPermissions = _chunkV66AZWPGjs.checkPermissions; exports.checkPermissionsFromServer = _chunkV66AZWPGjs.checkPermissionsFromServer; exports.clearLastApiMeta = _chunkV66AZWPGjs.clearLastApiMeta; exports.clearLastApiTotal = _chunkV66AZWPGjs.clearLastApiTotal; exports.cn = _chunkV66AZWPGjs.cn; exports.composeRefs = _chunkV66AZWPGjs.composeRefs; exports.configureAuth = _chunkV66AZWPGjs.configureAuth; exports.configureI18n = _chunkTOKHHZSPjs.configureI18n; exports.configureJsonApi = _chunkTOKHHZSPjs.configureJsonApi; exports.configureLogin = _chunkTOKHHZSPjs.configureLogin; exports.configureReferral = _chunkTOKHHZSPjs.configureReferral; exports.configureRoles = _chunkTOKHHZSPjs.configureRoles; exports.configureWaitlist = _chunkTOKHHZSPjs.configureWaitlist; exports.createJsonApiInclusion = _chunkV66AZWPGjs.createJsonApiInclusion; exports.dismissToast = _chunkV66AZWPGjs.dismissToast; exports.entityObjectSchema = _chunkV66AZWPGjs.entityObjectSchema; exports.exists = _chunkV66AZWPGjs.exists; exports.formatCodiceFiscale = _chunkV66AZWPGjs.formatCodiceFiscale; exports.formatDate = _chunkV66AZWPGjs.formatDate; exports.formatLocalDate = _chunkV66AZWPGjs.formatLocalDate; exports.formatPartitaIva = _chunkV66AZWPGjs.formatPartitaIva; exports.getApiUrl = _chunkTOKHHZSPjs.getApiUrl; exports.getAppUrl = _chunkTOKHHZSPjs.getAppUrl; exports.getBootstrapper = _chunkFPO4DLZNjs.getBootstrapper; exports.getClientGlobalErrorHandler = _chunkV66AZWPGjs.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunkV66AZWPGjs.getGlobalErrorHandler; exports.getIcon = _chunkV66AZWPGjs.getIcon; exports.getIconByModule = _chunkV66AZWPGjs.getIconByModule; exports.getIconByModuleName = _chunkV66AZWPGjs.getIconByModuleName; exports.getInitials = _chunkV66AZWPGjs.getInitials; exports.getLastApiMeta = _chunkV66AZWPGjs.getLastApiMeta; exports.getLastApiTotal = _chunkV66AZWPGjs.getLastApiTotal; exports.getLucideIcon = _chunkV66AZWPGjs.getLucideIcon; exports.getLucideIconByModule = _chunkV66AZWPGjs.getLucideIconByModule; exports.getLucideIconByModuleName = _chunkV66AZWPGjs.getLucideIconByModuleName; exports.getPublicApiUrl = _chunkTOKHHZSPjs.getPublicApiUrl; exports.getReferralConfig = _chunkTOKHHZSPjs.getReferralConfig; exports.getRoleId = _chunkTOKHHZSPjs.getRoleId; exports.getStripePublishableKey = _chunkTOKHHZSPjs.getStripePublishableKey; exports.getTableComponents = _chunkV66AZWPGjs.getTableComponents; exports.getTableOptions = _chunkV66AZWPGjs.getTableOptions; exports.getTokenHandler = _chunkV66AZWPGjs.getTokenHandler; exports.getTrackablePages = _chunkTOKHHZSPjs.getTrackablePages; exports.getValueFromPath = _chunkV66AZWPGjs.getValueFromPath; exports.getWaitlistConfig = _chunkTOKHHZSPjs.getWaitlistConfig; exports.hasBootstrapper = _chunkFPO4DLZNjs.hasBootstrapper; exports.isReferralEnabled = _chunkTOKHHZSPjs.isReferralEnabled; exports.isRemoteImageSrc = _chunkV66AZWPGjs.isRemoteImageSrc; exports.isRolesConfigured = _chunkTOKHHZSPjs.isRolesConfigured; exports.rehydrate = _chunkV66AZWPGjs.rehydrate; exports.rehydrateList = _chunkV66AZWPGjs.rehydrateList; exports.resetBootstrapStore = _chunkFPO4DLZNjs.resetBootstrapStore; exports.setBootstrapper = _chunkFPO4DLZNjs.setBootstrapper; exports.setClientGlobalErrorHandler = _chunkV66AZWPGjs.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunkV66AZWPGjs.setGlobalErrorHandler; exports.showCustomToast = _chunkV66AZWPGjs.showCustomToast; exports.showError = _chunkV66AZWPGjs.showError; exports.showToast = _chunkV66AZWPGjs.showToast; exports.translateData = _chunkFPO4DLZNjs.translateData; exports.translateResponse = _chunkFPO4DLZNjs.translateResponse; exports.tryBootstrap = _chunkFPO4DLZNjs.tryBootstrap; exports.useComposedRefs = _chunkV66AZWPGjs.useComposedRefs; exports.useIsMobile = _chunkV66AZWPGjs.useIsMobile; exports.userObjectSchema = _chunkV66AZWPGjs.userObjectSchema; exports.validateCodiceFiscale = _chunkV66AZWPGjs.validateCodiceFiscale; exports.validateItalianTaxCode = _chunkV66AZWPGjs.validateItalianTaxCode; exports.validatePartitaIva = _chunkV66AZWPGjs.validatePartitaIva;
461
461
  //# sourceMappingURL=index.js.map
package/dist/index.mjs CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  getWaitlistConfig,
19
19
  isReferralEnabled,
20
20
  isRolesConfigured
21
- } from "./chunk-MN2BUSEU.mjs";
21
+ } from "./chunk-3LVSA7IM.mjs";
22
22
  import {
23
23
  AVAILABLE_OAUTH_SCOPES,
24
24
  AbstractApiData,
@@ -216,7 +216,7 @@ import {
216
216
  validateCodiceFiscale,
217
217
  validateItalianTaxCode,
218
218
  validatePartitaIva
219
- } from "./chunk-EQEW64CH.mjs";
219
+ } from "./chunk-LCCRUWWY.mjs";
220
220
  import "./chunk-AUXK7QSA.mjs";
221
221
  import "./chunk-C7C7VY4F.mjs";
222
222
  import {
@@ -15,7 +15,7 @@ var _chunkIOLU4ASDjs = require('../chunk-IOLU4ASD.js');
15
15
 
16
16
 
17
17
 
18
- var _chunkX5TPKMBSjs = require('../chunk-X5TPKMBS.js');
18
+ var _chunkV66AZWPGjs = require('../chunk-V66AZWPG.js');
19
19
  require('../chunk-LXKSUWAV.js');
20
20
  require('../chunk-IBS6NI7D.js');
21
21
 
@@ -86,7 +86,7 @@ var ServerSession = class {
86
86
  if (!rawModules) return false;
87
87
  const modules = JSON.parse(_pako.ungzip.call(void 0, Buffer.from(rawModules, "base64"), { toText: true }));
88
88
  const selectedModule = modules.find((module) => module.id === params.module.moduleId);
89
- return _chunkX5TPKMBSjs.checkPermissionsFromServer.call(void 0, {
89
+ return _chunkV66AZWPGjs.checkPermissionsFromServer.call(void 0, {
90
90
  module: params.module,
91
91
  action: params.action,
92
92
  data: params.data,
@@ -296,5 +296,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, ServerJsonApiDelete, "ServerJsonApiDelete")
296
296
 
297
297
 
298
298
 
299
- exports.ServerAuthService = _chunkX5TPKMBSjs.AuthService; exports.ServerCompanyService = _chunkX5TPKMBSjs.CompanyService; exports.ServerContentService = _chunkX5TPKMBSjs.ContentService; exports.ServerFeatureService = _chunkX5TPKMBSjs.FeatureService; exports.ServerJsonApiDelete = ServerJsonApiDelete; exports.ServerJsonApiGet = ServerJsonApiGet; exports.ServerJsonApiPatch = ServerJsonApiPatch; exports.ServerJsonApiPost = ServerJsonApiPost; exports.ServerJsonApiPut = ServerJsonApiPut; exports.ServerNotificationService = _chunkX5TPKMBSjs.NotificationService; exports.ServerPushService = _chunkX5TPKMBSjs.PushService; exports.ServerRoleService = _chunkX5TPKMBSjs.RoleService; exports.ServerS3Service = _chunkX5TPKMBSjs.S3Service; exports.ServerSession = ServerSession; exports.ServerUserService = _chunkX5TPKMBSjs.UserService; exports.configureServerJsonApi = configureServerJsonApi; exports.getServerApiUrl = getServerApiUrl; exports.getServerAppUrl = getServerAppUrl; exports.getServerToken = _chunkYUO55Q5Ajs.getServerToken; exports.getServerTrackablePages = getServerTrackablePages; exports.invalidateCacheTag = invalidateCacheTag; exports.invalidateCacheTags = invalidateCacheTags; exports.serverRequest = _chunkIOLU4ASDjs.serverRequest;
299
+ exports.ServerAuthService = _chunkV66AZWPGjs.AuthService; exports.ServerCompanyService = _chunkV66AZWPGjs.CompanyService; exports.ServerContentService = _chunkV66AZWPGjs.ContentService; exports.ServerFeatureService = _chunkV66AZWPGjs.FeatureService; exports.ServerJsonApiDelete = ServerJsonApiDelete; exports.ServerJsonApiGet = ServerJsonApiGet; exports.ServerJsonApiPatch = ServerJsonApiPatch; exports.ServerJsonApiPost = ServerJsonApiPost; exports.ServerJsonApiPut = ServerJsonApiPut; exports.ServerNotificationService = _chunkV66AZWPGjs.NotificationService; exports.ServerPushService = _chunkV66AZWPGjs.PushService; exports.ServerRoleService = _chunkV66AZWPGjs.RoleService; exports.ServerS3Service = _chunkV66AZWPGjs.S3Service; exports.ServerSession = ServerSession; exports.ServerUserService = _chunkV66AZWPGjs.UserService; exports.configureServerJsonApi = configureServerJsonApi; exports.getServerApiUrl = getServerApiUrl; exports.getServerAppUrl = getServerAppUrl; exports.getServerToken = _chunkYUO55Q5Ajs.getServerToken; exports.getServerTrackablePages = getServerTrackablePages; exports.invalidateCacheTag = invalidateCacheTag; exports.invalidateCacheTags = invalidateCacheTags; exports.serverRequest = _chunkIOLU4ASDjs.serverRequest;
300
300
  //# sourceMappingURL=index.js.map
@@ -15,7 +15,7 @@ import {
15
15
  S3Service,
16
16
  UserService,
17
17
  checkPermissionsFromServer
18
- } from "../chunk-EQEW64CH.mjs";
18
+ } from "../chunk-LCCRUWWY.mjs";
19
19
  import "../chunk-AUXK7QSA.mjs";
20
20
  import "../chunk-C7C7VY4F.mjs";
21
21
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carlonicora/nextjs-jsonapi",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Next.js JSON:API client with server/client support and caching",
5
5
  "author": "Carlo Nicora",
6
6
  "license": "GPL-3.0-or-later",
@@ -1,5 +1,6 @@
1
1
  // Billing components - separate entry point to avoid loading Stripe.js globally
2
2
  export * from "../features/billing/components";
3
+ export * from "../features/billing/contexts";
3
4
  export * from "../features/billing/stripe-customer/components";
4
5
  export * from "../features/billing/stripe-invoice/components";
5
6
  export * from "../features/billing/stripe-price/components";
@@ -20,6 +20,7 @@ export { parseFiscalData } from "../utils/fiscal-utils";
20
20
 
21
21
  // Feature components
22
22
  export * from "../features/auth/components";
23
+ export * from "../features/administration";
23
24
  // Billing components moved to separate entry point: @carlonicora/nextjs-jsonapi/billing
24
25
  export * from "../features/company/components";
25
26
  export * from "../features/content/components";
@@ -1,3 +1,4 @@
1
+ export * from "../features/administration/contexts";
1
2
  export * from "../features/company/contexts/CompanyContext";
2
3
  export * from "../features/notification/contexts/NotificationContext";
3
4
  export * from "../features/onboarding/contexts";
@@ -0,0 +1,150 @@
1
+ "use client";
2
+
3
+ import { Building2Icon, CoinsIcon, CreditCardIcon, ShieldCheckIcon, UsersIcon } from "lucide-react";
4
+ import { useTranslations } from "next-intl";
5
+ import { getStripePublishableKey } from "../../../client/config";
6
+ import { MicroLabel, RoundPageContainer } from "../../../components";
7
+ import { Link } from "../../../shadcnui";
8
+ import { AdministrationProvider } from "../contexts/AdministrationContext";
9
+ import type { AdminGroup, AdminSection } from "../data/admin-section.types";
10
+
11
+ /**
12
+ * The sections every NJA project has. Hrefs are constants rather than props:
13
+ * the path convention IS the contract that makes this component reusable, and
14
+ * it already exists in the package (see TOKEN_USAGE_ADMIN_PAGE_URL in
15
+ * features/tokenusage/contexts/TokenUsageAdminContext.tsx).
16
+ */
17
+ const PLATFORM_SECTIONS: AdminSection[] = [
18
+ {
19
+ key: "companies",
20
+ icon: Building2Icon,
21
+ labelKey: "entities.companies",
22
+ labelValues: { count: 2 },
23
+ descriptionKey: "administration.companies.description",
24
+ href: "/administration/companies",
25
+ },
26
+ {
27
+ key: "users",
28
+ icon: UsersIcon,
29
+ labelKey: "entities.users",
30
+ labelValues: { count: 2 },
31
+ descriptionKey: "administration.users.description",
32
+ href: "/administration/users",
33
+ },
34
+ {
35
+ key: "token-usage",
36
+ icon: CoinsIcon,
37
+ labelKey: "token_usage.admin.title",
38
+ descriptionKey: "administration.token_usage.description",
39
+ href: "/administration/token-usage",
40
+ },
41
+ {
42
+ key: "rbac",
43
+ icon: ShieldCheckIcon,
44
+ labelKey: "entities.rbac",
45
+ labelValues: { count: 2 },
46
+ descriptionKey: "administration.rbac.description",
47
+ href: "/administration/rbac",
48
+ },
49
+ ];
50
+
51
+ /**
52
+ * The only conditional entry. getStripePublishableKey comes from /client rather
53
+ * than isStripeConfigured() from /billing on purpose: /billing exists to keep
54
+ * Stripe.js out of the global bundle, and isStripeConfigured lives in
55
+ * StripeProvider.tsx, which imports @stripe/stripe-js at module scope. The two
56
+ * are the same check — isStripeConfigured is a one-line wrapper over this call.
57
+ */
58
+ const BILLING_SECTION: AdminSection = {
59
+ key: "billing",
60
+ icon: CreditCardIcon,
61
+ labelKey: "billing.admin.products.title",
62
+ descriptionKey: "administration.billing.description",
63
+ href: "/administration/billing",
64
+ };
65
+
66
+ /** Keys of the built-in platform sections, for `hiddenSections`. */
67
+ export type PlatformSectionKey = "companies" | "users" | "token-usage" | "rbac" | "billing";
68
+
69
+ type AdminIndexProps = {
70
+ /** Project-specific groups, appended after the built-in platform group. */
71
+ additionalGroups?: AdminGroup[];
72
+ /**
73
+ * Built-in sections to leave out. Every NJA project gets the same platform
74
+ * group by default, but a project whose backend does not wire a foundation
75
+ * must be able to drop its entry rather than advertise a route that throws —
76
+ * narr8, for instance, never calls `RbacModule.register()`, so it has no RBAC
77
+ * controllers at all.
78
+ */
79
+ hiddenSections?: PlatformSectionKey[];
80
+ };
81
+
82
+ /**
83
+ * The grid itself, with no page shell — this is what the specs render, because
84
+ * RoundPageContainer pulls in the app Header and its four header contexts.
85
+ */
86
+ export function AdminIndexGrid({ additionalGroups = [], hiddenSections = [] }: AdminIndexProps) {
87
+ const t = useTranslations();
88
+
89
+ const available = getStripePublishableKey() ? [...PLATFORM_SECTIONS, BILLING_SECTION] : PLATFORM_SECTIONS;
90
+
91
+ const platformGroup: AdminGroup = {
92
+ key: "platform",
93
+ labelKey: "administration.group.platform",
94
+ sections: available.filter((section) => !hiddenSections.includes(section.key as PlatformSectionKey)),
95
+ };
96
+
97
+ const groups = [platformGroup, ...additionalGroups].filter((group) => group.sections.length > 0);
98
+
99
+ return (
100
+ <div className="mx-auto flex w-full max-w-5xl flex-1 flex-col gap-8 py-8">
101
+ {/* No page title here: AdministrationProvider feeds "Administration" to
102
+ RoundPageContainerTitle, which owns the page's name. Repeating it as a
103
+ role-1 title would triple up with that strip and the breadcrumb. */}
104
+ <p className="text-muted-foreground text-sm">{t("administration.subtitle")}</p>
105
+
106
+ {groups.map((group) => (
107
+ <div key={group.key}>
108
+ <MicroLabel as="h3" className="mb-2 px-3">
109
+ {t(group.labelKey, group.labelValues)}
110
+ </MicroLabel>
111
+ <div className="grid grid-cols-1 gap-1 md:grid-cols-2 lg:grid-cols-3">
112
+ {group.sections.map((section) => (
113
+ <Link
114
+ key={section.key}
115
+ href={section.href}
116
+ className="text-foreground font-normal"
117
+ data-testid={`admin-index-${section.key}`}
118
+ >
119
+ <div className="hover:bg-muted/50 flex cursor-pointer items-center gap-3 rounded-md px-3 py-2">
120
+ <section.icon className="text-muted-foreground h-4 w-4 shrink-0" />
121
+ <div className="flex flex-col">
122
+ <span className="text-sm font-medium">{t(section.labelKey, section.labelValues)}</span>
123
+ <span className="text-muted-foreground text-xs">
124
+ {t(section.descriptionKey, section.descriptionValues)}
125
+ </span>
126
+ </div>
127
+ </div>
128
+ </Link>
129
+ ))}
130
+ </div>
131
+ </div>
132
+ ))}
133
+ </div>
134
+ );
135
+ }
136
+
137
+ /**
138
+ * Drop-in administration landing page. Mount it bare — it brings its own shell
139
+ * and its own page chrome (AdministrationProvider), so it does not inherit the
140
+ * title and breadcrumb of whatever page rendered before it.
141
+ */
142
+ export function AdminIndexContainer({ additionalGroups, hiddenSections }: AdminIndexProps) {
143
+ return (
144
+ <AdministrationProvider>
145
+ <RoundPageContainer>
146
+ <AdminIndexGrid additionalGroups={additionalGroups} hiddenSections={hiddenSections} />
147
+ </RoundPageContainer>
148
+ </AdministrationProvider>
149
+ );
150
+ }
@@ -0,0 +1,96 @@
1
+ import { render, screen } from "@testing-library/react";
2
+ import { BookOpenIcon } from "lucide-react";
3
+ import { beforeEach, describe, expect, it } from "vitest";
4
+ import { configureJsonApi } from "../../../../client/config";
5
+ import { configureI18n } from "../../../../i18n";
6
+ import { AdminIndexGrid } from "../AdminIndexContainer";
7
+ import type { AdminGroup } from "../../data/admin-section.types";
8
+
9
+ // next-intl is globally mocked in vitest.setup.ts with `t = (key) => key`, so
10
+ // every label below renders as its own key. That is what the assertions match.
11
+ const configure = (stripePublishableKey?: string) => {
12
+ configureJsonApi({ apiUrl: "http://api.test", stripePublishableKey });
13
+ configureI18n({
14
+ useRouter: () => ({
15
+ push: () => {},
16
+ replace: () => {},
17
+ back: () => {},
18
+ forward: () => {},
19
+ refresh: () => {},
20
+ prefetch: () => {},
21
+ }),
22
+ useTranslations: () => (key: string) => key,
23
+ usePathname: () => "/administration",
24
+ Link: ({ href, children, ...props }: any) => (
25
+ <a href={href} {...props}>
26
+ {children}
27
+ </a>
28
+ ),
29
+ });
30
+ };
31
+
32
+ const extraGroup: AdminGroup = {
33
+ key: "documentation",
34
+ labelKey: "administration.group.documentation",
35
+ sections: [
36
+ {
37
+ key: "howtos",
38
+ icon: BookOpenIcon,
39
+ labelKey: "entities.howtos",
40
+ labelValues: { count: 2 },
41
+ descriptionKey: "administration.howtos.description",
42
+ href: "/administration/howtos",
43
+ },
44
+ ],
45
+ };
46
+
47
+ describe("AdminIndexGrid", () => {
48
+ beforeEach(() => configure());
49
+
50
+ it("renders the four unconditional platform entries with their hrefs", () => {
51
+ render(<AdminIndexGrid />);
52
+
53
+ expect(screen.getByTestId("admin-index-companies")).toHaveAttribute("href", "/administration/companies");
54
+ expect(screen.getByTestId("admin-index-users")).toHaveAttribute("href", "/administration/users");
55
+ expect(screen.getByTestId("admin-index-token-usage")).toHaveAttribute("href", "/administration/token-usage");
56
+ expect(screen.getByTestId("admin-index-rbac")).toHaveAttribute("href", "/administration/rbac");
57
+ });
58
+
59
+ it("omits the billing entry when no Stripe publishable key is configured", () => {
60
+ render(<AdminIndexGrid />);
61
+
62
+ expect(screen.queryByTestId("admin-index-billing")).not.toBeInTheDocument();
63
+ });
64
+
65
+ it("includes the billing entry when a Stripe publishable key is configured", () => {
66
+ configure("pk_test_123");
67
+ render(<AdminIndexGrid />);
68
+
69
+ expect(screen.getByTestId("admin-index-billing")).toHaveAttribute("href", "/administration/billing");
70
+ });
71
+
72
+ it("appends additionalGroups after the platform group, in order", () => {
73
+ render(<AdminIndexGrid additionalGroups={[extraGroup]} />);
74
+
75
+ const headings = screen.getAllByRole("heading", { level: 3 }).map((h) => h.textContent);
76
+ expect(headings).toEqual(["administration.group.platform", "administration.group.documentation"]);
77
+ expect(screen.getByTestId("admin-index-howtos")).toHaveAttribute("href", "/administration/howtos");
78
+ });
79
+
80
+ it("skips a group that has no sections", () => {
81
+ render(
82
+ <AdminIndexGrid additionalGroups={[{ key: "empty", labelKey: "administration.group.empty", sections: [] }]} />,
83
+ );
84
+
85
+ expect(screen.queryByText("administration.group.empty")).not.toBeInTheDocument();
86
+ });
87
+
88
+ it("renders the subtitle but not a page title of its own", () => {
89
+ render(<AdminIndexGrid />);
90
+
91
+ expect(screen.getByText("administration.subtitle")).toBeInTheDocument();
92
+ // The page's name comes from AdministrationProvider via
93
+ // RoundPageContainerTitle, so the grid must not repeat it.
94
+ expect(screen.queryByText("administration.title")).not.toBeInTheDocument();
95
+ });
96
+ });
@@ -0,0 +1 @@
1
+ export { AdminIndexContainer, AdminIndexGrid } from "./AdminIndexContainer";
@@ -0,0 +1,47 @@
1
+ "use client";
2
+
3
+ import { useTranslations } from "next-intl";
4
+ import { createContext, ReactNode, useContext } from "react";
5
+ import { SharedProvider } from "../../../contexts/SharedContext";
6
+ import { BreadcrumbItemData } from "../../../interfaces";
7
+
8
+ interface AdministrationContextType {}
9
+
10
+ const AdministrationContext = createContext<AdministrationContextType | undefined>(undefined);
11
+
12
+ type AdministrationProviderProps = {
13
+ children: ReactNode;
14
+ };
15
+
16
+ /**
17
+ * Supplies the page chrome for every administration surface.
18
+ *
19
+ * `RoundPageContainerTitle` and the header breadcrumb both read
20
+ * `useSharedContext()`, and that context is provided far up the tree by the
21
+ * layout — so an administration page that provides nothing of its own silently
22
+ * inherits whatever the *previously rendered* page put there (a company name, a
23
+ * "Notifications" title). Wrapping in this provider replaces that value, which
24
+ * is why every administration container mounts inside it.
25
+ *
26
+ * Mirrors CommonProvider (contexts/CommonContext.tsx), which does the same job
27
+ * for the ordinary application shell.
28
+ */
29
+ export const AdministrationProvider = ({ children }: AdministrationProviderProps) => {
30
+ const t = useTranslations();
31
+
32
+ const breadcrumbs: BreadcrumbItemData[] = [];
33
+
34
+ return (
35
+ <SharedProvider value={{ breadcrumbs, title: { type: t(`administration.title`) } }}>
36
+ <AdministrationContext.Provider value={{}}>{children}</AdministrationContext.Provider>
37
+ </SharedProvider>
38
+ );
39
+ };
40
+
41
+ export const useAdministrationContext = (): AdministrationContextType => {
42
+ const context = useContext(AdministrationContext);
43
+ if (context === undefined) {
44
+ throw new Error("useAdministrationContext must be used within an AdministrationProvider");
45
+ }
46
+ return context;
47
+ };
@@ -0,0 +1 @@
1
+ export * from "./AdministrationContext";
@@ -0,0 +1,30 @@
1
+ import { LucideIcon } from "lucide-react";
2
+
3
+ /**
4
+ * One row of the administration index: an icon, a translated label and
5
+ * description, and the route it opens.
6
+ *
7
+ * Labels and descriptions are i18n *keys*, never resolved strings, so
8
+ * AdminIndexGrid stays the single place that calls useTranslations().
9
+ * `labelValues` / `descriptionValues` carry ICU arguments — `{ count: 2 }` for
10
+ * the `entities.*` plural keys, or `{ type: "..." }` for an app reusing its own
11
+ * parameterised heading key.
12
+ */
13
+ export type AdminSection = {
14
+ /** Stable React key, and the `admin-index-<key>` test id on the rendered link. */
15
+ key: string;
16
+ icon: LucideIcon;
17
+ labelKey: string;
18
+ labelValues?: Record<string, string | number>;
19
+ descriptionKey: string;
20
+ descriptionValues?: Record<string, string | number>;
21
+ href: string;
22
+ };
23
+
24
+ /** A titled block of sections. The built-in "platform" group always renders first. */
25
+ export type AdminGroup = {
26
+ key: string;
27
+ labelKey: string;
28
+ labelValues?: Record<string, string | number>;
29
+ sections: AdminSection[];
30
+ };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The fixed namespace of i18n keys the administration index reads via
3
+ * useTranslations. Consuming apps must define each entry in their
4
+ * messages/<locale>.json — this list is the contract between the package and
5
+ * the app, and the names are frozen: an app that wants different wording
6
+ * changes its own translation, never the key.
7
+ *
8
+ * Section LABELS are deliberately absent: they reuse keys every NJA app already
9
+ * defines — `entities.companies`, `entities.users`, `entities.rbac` (all with
10
+ * `{ count: 2 }`), `token_usage.admin.title`, and
11
+ * `billing.admin.products.title` — so section names stay in each app's own
12
+ * vocabulary.
13
+ *
14
+ * Mirrors the contract shipped by the token-usage feature
15
+ * (features/tokenusage/i18n-keys.ts).
16
+ */
17
+ export const ADMINISTRATION_I18N_KEYS = [
18
+ "administration.title",
19
+ "administration.subtitle",
20
+ "administration.group.platform",
21
+ "administration.companies.description",
22
+ "administration.users.description",
23
+ "administration.token_usage.description",
24
+ "administration.rbac.description",
25
+ "administration.billing.description",
26
+ ] as const;
@@ -0,0 +1,3 @@
1
+ export * from "./components";
2
+ export * from "./data/admin-section.types";
3
+ export { ADMINISTRATION_I18N_KEYS } from "./i18n-keys";