@carlonicora/nextjs-jsonapi 1.63.0 → 1.64.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.
- package/dist/{BlockNoteEditor-QQ4XFT4G.js → BlockNoteEditor-JF757BHH.js} +14 -14
- package/dist/{BlockNoteEditor-QQ4XFT4G.js.map → BlockNoteEditor-JF757BHH.js.map} +1 -1
- package/dist/{BlockNoteEditor-TS62AHRY.mjs → BlockNoteEditor-ZO3ZAPXU.mjs} +4 -4
- package/dist/billing/index.js +346 -346
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-BQSMP4NU.js → chunk-2DFE325P.js} +11 -11
- package/dist/{chunk-BQSMP4NU.js.map → chunk-2DFE325P.js.map} +1 -1
- package/dist/{chunk-K3DKXOEU.mjs → chunk-55FJ5WKS.mjs} +1172 -1224
- package/dist/chunk-55FJ5WKS.mjs.map +1 -0
- package/dist/{chunk-ZRKQQLYI.js → chunk-5LZGQXBD.js} +769 -821
- package/dist/chunk-5LZGQXBD.js.map +1 -0
- package/dist/{chunk-NAST4OSM.js → chunk-6YKYRKVU.js} +8 -2
- package/dist/chunk-6YKYRKVU.js.map +1 -0
- package/dist/{chunk-HRG4EAOG.mjs → chunk-PBD6ZH46.mjs} +2 -2
- package/dist/{chunk-YHNDD34Z.mjs → chunk-REWN5GZP.mjs} +8 -2
- package/dist/{chunk-YHNDD34Z.mjs.map → chunk-REWN5GZP.mjs.map} +1 -1
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +11 -8
- package/dist/components/index.d.ts +11 -8
- package/dist/components/index.js +4 -6
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -5
- package/dist/contexts/index.d.mts +2 -1
- package/dist/contexts/index.d.ts +2 -1
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
- package/src/features/company/company.module.ts +3 -1
- package/src/features/company/components/containers/CompanyContainer.tsx +7 -2
- package/src/features/company/components/details/CompanyDetails.tsx +16 -1
- package/src/features/company/components/forms/CompanyConfigurationEditor.tsx +19 -51
- package/src/features/company/components/forms/index.ts +0 -1
- package/src/features/company/contexts/CompanyContext.tsx +5 -3
- package/src/features/user/user.module.ts +3 -1
- package/dist/chunk-K3DKXOEU.mjs.map +0 -1
- package/dist/chunk-NAST4OSM.js.map +0 -1
- package/dist/chunk-ZRKQQLYI.js.map +0 -1
- package/src/features/company/components/forms/CompanyConfigurationSecurityForm.tsx +0 -83
- /package/dist/{BlockNoteEditor-TS62AHRY.mjs.map → BlockNoteEditor-ZO3ZAPXU.mjs.map} +0 -0
- /package/dist/{chunk-HRG4EAOG.mjs.map → chunk-PBD6ZH46.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunk2DFE325Pjs = require('./chunk-2DFE325P.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -180,7 +180,7 @@ var _chunkBQSMP4NUjs = require('./chunk-BQSMP4NU.js');
|
|
|
180
180
|
|
|
181
181
|
|
|
182
182
|
|
|
183
|
-
var
|
|
183
|
+
var _chunk6YKYRKVUjs = require('./chunk-6YKYRKVU.js');
|
|
184
184
|
require('./chunk-LXKSUWAV.js');
|
|
185
185
|
require('./chunk-IBS6NI7D.js');
|
|
186
186
|
|
|
@@ -385,5 +385,5 @@ require('./chunk-7QVYU63E.js');
|
|
|
385
385
|
|
|
386
386
|
|
|
387
387
|
|
|
388
|
-
exports.ACTION_TYPES = _chunkBQSMP4NUjs.ACTION_TYPES; exports.AVAILABLE_OAUTH_SCOPES = _chunkNAST4OSMjs.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunkNAST4OSMjs.AbstractApiData; exports.AbstractService = _chunkNAST4OSMjs.AbstractService; exports.Action = _chunkNAST4OSMjs.Action; exports.Auth = _chunkNAST4OSMjs.Auth; exports.AuthComponent = _chunkNAST4OSMjs.AuthComponent; exports.AuthModule = _chunkNAST4OSMjs.AuthModule; exports.AuthService = _chunkNAST4OSMjs.AuthService; exports.AuthorModule = _chunkNAST4OSMjs.AuthorModule; exports.BackupCodeVerify = _chunkNAST4OSMjs.BackupCodeVerify; exports.BackupCodeVerifyModule = _chunkNAST4OSMjs.BackupCodeVerifyModule; exports.Billing = _chunkNAST4OSMjs.Billing; exports.BillingModule = _chunkNAST4OSMjs.BillingModule; exports.BillingService = _chunkNAST4OSMjs.BillingService; exports.BlockNoteDiffUtil = _chunkNAST4OSMjs.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunkNAST4OSMjs.BlockNoteWordDiffRendererUtil; exports.COMPANY_ADMINISTRATOR_ROLE_ID = _chunkBQSMP4NUjs.COMPANY_ADMINISTRATOR_ROLE_ID; exports.ClientAbstractService = _chunkNAST4OSMjs.ClientAbstractService; exports.ClientHttpMethod = _chunkNAST4OSMjs.ClientHttpMethod; exports.Company = _chunkNAST4OSMjs.Company; exports.CompanyFields = _chunkNAST4OSMjs.CompanyFields; exports.CompanyModule = _chunkNAST4OSMjs.CompanyModule; exports.CompanyService = _chunkNAST4OSMjs.CompanyService; exports.Content = _chunkNAST4OSMjs.Content; exports.ContentFields = _chunkNAST4OSMjs.ContentFields; exports.ContentModule = _chunkNAST4OSMjs.ContentModule; exports.ContentService = _chunkNAST4OSMjs.ContentService; exports.DEFAULT_GRANT_TYPES = _chunkNAST4OSMjs.DEFAULT_GRANT_TYPES; exports.DataClass = _chunk4MN547K7js.DataClassRegistry; exports.DataClassRegistry = _chunk4MN547K7js.DataClassRegistry; exports.EndpointCreator = _chunkNAST4OSMjs.EndpointCreator; exports.Feature = _chunkNAST4OSMjs.Feature; exports.FeatureModule = _chunkNAST4OSMjs.FeatureModule; exports.FeatureService = _chunkNAST4OSMjs.FeatureService; exports.HttpMethod = _chunkNAST4OSMjs.HttpMethod; exports.InvoiceStatus = _chunkNAST4OSMjs.InvoiceStatus; exports.JsonApiDataFactory = _chunk4MN547K7js.JsonApiDataFactory; exports.Module = _chunkNAST4OSMjs.Module; exports.ModuleModule = _chunkNAST4OSMjs.ModuleModule; exports.ModulePaths = _chunkNAST4OSMjs.ModulePaths; exports.ModulePathsModule = _chunkNAST4OSMjs.ModulePathsModule; exports.ModuleRegistrar = _chunkNAST4OSMjs.ModuleRegistrar; exports.ModuleRegistry = _chunkNAST4OSMjs.ModuleRegistry; exports.Modules = _chunkNAST4OSMjs.Modules; exports.Notification = _chunkNAST4OSMjs.Notification; exports.NotificationFields = _chunkNAST4OSMjs.NotificationFields; exports.NotificationModule = _chunkNAST4OSMjs.NotificationModule; exports.NotificationService = _chunkNAST4OSMjs.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunkNAST4OSMjs.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunkNAST4OSMjs.OAuthClient; exports.OAuthModule = _chunkNAST4OSMjs.OAuthModule; exports.OAuthService = _chunkNAST4OSMjs.OAuthService; exports.Passkey = _chunkNAST4OSMjs.Passkey; exports.PasskeyAuthenticationOptions = _chunkNAST4OSMjs.PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = _chunkNAST4OSMjs.PasskeyAuthenticationOptionsModule; exports.PasskeyModule = _chunkNAST4OSMjs.PasskeyModule; exports.PasskeyRegistrationOptions = _chunkNAST4OSMjs.PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = _chunkNAST4OSMjs.PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = _chunkNAST4OSMjs.PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = _chunkNAST4OSMjs.PasskeyRegistrationVerifyModule; exports.PasskeyRename = _chunkNAST4OSMjs.PasskeyRename; exports.PasskeyRenameModule = _chunkNAST4OSMjs.PasskeyRenameModule; exports.PasskeyVerifyLogin = _chunkNAST4OSMjs.PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = _chunkNAST4OSMjs.PasskeyVerifyLoginModule; exports.PaymentMethod = _chunkNAST4OSMjs.PaymentMethod; exports.PermissionMapping = _chunkNAST4OSMjs.PermissionMapping; exports.PermissionMappingModule = _chunkNAST4OSMjs.PermissionMappingModule; exports.Push = _chunkNAST4OSMjs.Push; exports.PushModule = _chunkNAST4OSMjs.PushModule; exports.PushService = _chunkNAST4OSMjs.PushService; exports.RbacService = _chunkBQSMP4NUjs.RbacService; exports.ReferralModule = _chunkNAST4OSMjs.ReferralModule; exports.ReferralService = _chunkNAST4OSMjs.ReferralService; exports.ReferralStats = _chunkNAST4OSMjs.ReferralStats; exports.ReferralStatsModule = _chunkNAST4OSMjs.ReferralStatsModule; exports.RehydrationFactory = _chunkNAST4OSMjs.RehydrationFactory; exports.Role = _chunkNAST4OSMjs.Role; exports.RoleFields = _chunkNAST4OSMjs.RoleFields; exports.RoleModule = _chunkNAST4OSMjs.RoleModule; exports.RoleService = _chunkNAST4OSMjs.RoleService; exports.S3 = _chunkNAST4OSMjs.S3; exports.S3Module = _chunkNAST4OSMjs.S3Module; exports.S3Service = _chunkNAST4OSMjs.S3Service; exports.StripeCustomer = _chunkNAST4OSMjs.StripeCustomer; exports.StripeCustomerModule = _chunkNAST4OSMjs.StripeCustomerModule; exports.StripeCustomerService = _chunkNAST4OSMjs.StripeCustomerService; exports.StripeInvoice = _chunkNAST4OSMjs.StripeInvoice; exports.StripeInvoiceModule = _chunkNAST4OSMjs.StripeInvoiceModule; exports.StripeInvoiceService = _chunkNAST4OSMjs.StripeInvoiceService; exports.StripePaymentMethodModule = _chunkNAST4OSMjs.StripePaymentMethodModule; exports.StripePrice = _chunkNAST4OSMjs.StripePrice; exports.StripePriceModule = _chunkNAST4OSMjs.StripePriceModule; exports.StripePriceService = _chunkNAST4OSMjs.StripePriceService; exports.StripeProduct = _chunkNAST4OSMjs.StripeProduct; exports.StripeProductModule = _chunkNAST4OSMjs.StripeProductModule; exports.StripeProductService = _chunkNAST4OSMjs.StripeProductService; exports.StripePromotionCode = _chunkNAST4OSMjs.StripePromotionCode; exports.StripePromotionCodeModule = _chunkNAST4OSMjs.StripePromotionCodeModule; exports.StripePromotionCodeService = _chunkNAST4OSMjs.StripePromotionCodeService; exports.StripeSubscription = _chunkNAST4OSMjs.StripeSubscription; exports.StripeSubscriptionModule = _chunkNAST4OSMjs.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunkNAST4OSMjs.StripeSubscriptionService; exports.StripeUsage = _chunkNAST4OSMjs.StripeUsage; exports.StripeUsageModule = _chunkNAST4OSMjs.StripeUsageModule; exports.StripeUsageService = _chunkNAST4OSMjs.StripeUsageService; exports.SubscriptionStatus = _chunkNAST4OSMjs.SubscriptionStatus; exports.TableOptions = _chunkNAST4OSMjs.TableOptions; exports.TotpAuthenticator = _chunkNAST4OSMjs.TotpAuthenticator; exports.TotpAuthenticatorModule = _chunkNAST4OSMjs.TotpAuthenticatorModule; exports.TotpSetup = _chunkNAST4OSMjs.TotpSetup; exports.TotpSetupModule = _chunkNAST4OSMjs.TotpSetupModule; exports.TotpVerify = _chunkNAST4OSMjs.TotpVerify; exports.TotpVerifyLogin = _chunkNAST4OSMjs.TotpVerifyLogin; exports.TotpVerifyLoginModule = _chunkNAST4OSMjs.TotpVerifyLoginModule; exports.TotpVerifyModule = _chunkNAST4OSMjs.TotpVerifyModule; exports.TwoFactorChallenge = _chunkNAST4OSMjs.TwoFactorChallenge; exports.TwoFactorChallengeModule = _chunkNAST4OSMjs.TwoFactorChallengeModule; exports.TwoFactorEnable = _chunkNAST4OSMjs.TwoFactorEnable; exports.TwoFactorEnableModule = _chunkNAST4OSMjs.TwoFactorEnableModule; exports.TwoFactorService = _chunkNAST4OSMjs.TwoFactorService; exports.TwoFactorStatus = _chunkNAST4OSMjs.TwoFactorStatus; exports.TwoFactorStatusModule = _chunkNAST4OSMjs.TwoFactorStatusModule; exports.User = _chunkNAST4OSMjs.User; exports.UserFields = _chunkNAST4OSMjs.UserFields; exports.UserModule = _chunkNAST4OSMjs.UserModule; exports.UserService = _chunkNAST4OSMjs.UserService; exports.Waitlist = _chunkNAST4OSMjs.Waitlist; exports.WaitlistModule = _chunkNAST4OSMjs.WaitlistModule; exports.WaitlistService = _chunkNAST4OSMjs.WaitlistService; exports.WaitlistStats = _chunkNAST4OSMjs.WaitlistStats; exports.WaitlistStatsModule = _chunkNAST4OSMjs.WaitlistStatsModule; exports.checkPermissions = _chunkNAST4OSMjs.checkPermissions; exports.checkPermissionsFromServer = _chunkNAST4OSMjs.checkPermissionsFromServer; exports.clearLastApiTotal = _chunkNAST4OSMjs.clearLastApiTotal; exports.cn = _chunkNAST4OSMjs.cn; exports.composeRefs = _chunkNAST4OSMjs.composeRefs; exports.configureAuth = _chunkNAST4OSMjs.configureAuth; exports.configureI18n = _chunkBQSMP4NUjs.configureI18n; exports.configureJsonApi = _chunkBQSMP4NUjs.configureJsonApi; exports.configureLogin = _chunkBQSMP4NUjs.configureLogin; exports.configureReferral = _chunkBQSMP4NUjs.configureReferral; exports.configureRoles = _chunkBQSMP4NUjs.configureRoles; exports.configureWaitlist = _chunkBQSMP4NUjs.configureWaitlist; exports.createJsonApiInclusion = _chunkNAST4OSMjs.createJsonApiInclusion; exports.dismissToast = _chunkNAST4OSMjs.dismissToast; exports.entityObjectSchema = _chunkNAST4OSMjs.entityObjectSchema; exports.exists = _chunkNAST4OSMjs.exists; exports.formatDate = _chunkNAST4OSMjs.formatDate; exports.getApiUrl = _chunkBQSMP4NUjs.getApiUrl; exports.getAppUrl = _chunkBQSMP4NUjs.getAppUrl; exports.getBootstrapper = _chunk4MN547K7js.getBootstrapper; exports.getClientGlobalErrorHandler = _chunkNAST4OSMjs.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunkNAST4OSMjs.getGlobalErrorHandler; exports.getIcon = _chunkNAST4OSMjs.getIcon; exports.getIconByModule = _chunkNAST4OSMjs.getIconByModule; exports.getIconByModuleName = _chunkNAST4OSMjs.getIconByModuleName; exports.getInitials = _chunkNAST4OSMjs.getInitials; exports.getLastApiTotal = _chunkNAST4OSMjs.getLastApiTotal; exports.getLucideIcon = _chunkNAST4OSMjs.getLucideIcon; exports.getLucideIconByModule = _chunkNAST4OSMjs.getLucideIconByModule; exports.getLucideIconByModuleName = _chunkNAST4OSMjs.getLucideIconByModuleName; exports.getReferralConfig = _chunkBQSMP4NUjs.getReferralConfig; exports.getRoleId = _chunkBQSMP4NUjs.getRoleId; exports.getStripePublishableKey = _chunkBQSMP4NUjs.getStripePublishableKey; exports.getTableComponents = _chunkNAST4OSMjs.getTableComponents; exports.getTableOptions = _chunkNAST4OSMjs.getTableOptions; exports.getTokenHandler = _chunkNAST4OSMjs.getTokenHandler; exports.getTrackablePages = _chunkBQSMP4NUjs.getTrackablePages; exports.getValueFromPath = _chunkNAST4OSMjs.getValueFromPath; exports.getWaitlistConfig = _chunkBQSMP4NUjs.getWaitlistConfig; exports.hasBootstrapper = _chunk4MN547K7js.hasBootstrapper; exports.isReferralEnabled = _chunkBQSMP4NUjs.isReferralEnabled; exports.isRolesConfigured = _chunkBQSMP4NUjs.isRolesConfigured; exports.rehydrate = _chunkNAST4OSMjs.rehydrate; exports.rehydrateList = _chunkNAST4OSMjs.rehydrateList; exports.resetBootstrapStore = _chunk4MN547K7js.resetBootstrapStore; exports.setBootstrapper = _chunk4MN547K7js.setBootstrapper; exports.setClientGlobalErrorHandler = _chunkNAST4OSMjs.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunkNAST4OSMjs.setGlobalErrorHandler; exports.showCustomToast = _chunkNAST4OSMjs.showCustomToast; exports.showError = _chunkNAST4OSMjs.showError; exports.showToast = _chunkNAST4OSMjs.showToast; exports.translateData = _chunk4MN547K7js.translateData; exports.translateResponse = _chunk4MN547K7js.translateResponse; exports.tryBootstrap = _chunk4MN547K7js.tryBootstrap; exports.useComposedRefs = _chunkNAST4OSMjs.useComposedRefs; exports.useIsMobile = _chunkNAST4OSMjs.useIsMobile; exports.userObjectSchema = _chunkNAST4OSMjs.userObjectSchema;
|
|
388
|
+
exports.ACTION_TYPES = _chunk2DFE325Pjs.ACTION_TYPES; exports.AVAILABLE_OAUTH_SCOPES = _chunk6YKYRKVUjs.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunk6YKYRKVUjs.AbstractApiData; exports.AbstractService = _chunk6YKYRKVUjs.AbstractService; exports.Action = _chunk6YKYRKVUjs.Action; exports.Auth = _chunk6YKYRKVUjs.Auth; exports.AuthComponent = _chunk6YKYRKVUjs.AuthComponent; exports.AuthModule = _chunk6YKYRKVUjs.AuthModule; exports.AuthService = _chunk6YKYRKVUjs.AuthService; exports.AuthorModule = _chunk6YKYRKVUjs.AuthorModule; exports.BackupCodeVerify = _chunk6YKYRKVUjs.BackupCodeVerify; exports.BackupCodeVerifyModule = _chunk6YKYRKVUjs.BackupCodeVerifyModule; exports.Billing = _chunk6YKYRKVUjs.Billing; exports.BillingModule = _chunk6YKYRKVUjs.BillingModule; exports.BillingService = _chunk6YKYRKVUjs.BillingService; exports.BlockNoteDiffUtil = _chunk6YKYRKVUjs.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunk6YKYRKVUjs.BlockNoteWordDiffRendererUtil; exports.COMPANY_ADMINISTRATOR_ROLE_ID = _chunk2DFE325Pjs.COMPANY_ADMINISTRATOR_ROLE_ID; exports.ClientAbstractService = _chunk6YKYRKVUjs.ClientAbstractService; exports.ClientHttpMethod = _chunk6YKYRKVUjs.ClientHttpMethod; exports.Company = _chunk6YKYRKVUjs.Company; exports.CompanyFields = _chunk6YKYRKVUjs.CompanyFields; exports.CompanyModule = _chunk6YKYRKVUjs.CompanyModule; exports.CompanyService = _chunk6YKYRKVUjs.CompanyService; exports.Content = _chunk6YKYRKVUjs.Content; exports.ContentFields = _chunk6YKYRKVUjs.ContentFields; exports.ContentModule = _chunk6YKYRKVUjs.ContentModule; exports.ContentService = _chunk6YKYRKVUjs.ContentService; exports.DEFAULT_GRANT_TYPES = _chunk6YKYRKVUjs.DEFAULT_GRANT_TYPES; exports.DataClass = _chunk4MN547K7js.DataClassRegistry; exports.DataClassRegistry = _chunk4MN547K7js.DataClassRegistry; exports.EndpointCreator = _chunk6YKYRKVUjs.EndpointCreator; exports.Feature = _chunk6YKYRKVUjs.Feature; exports.FeatureModule = _chunk6YKYRKVUjs.FeatureModule; exports.FeatureService = _chunk6YKYRKVUjs.FeatureService; exports.HttpMethod = _chunk6YKYRKVUjs.HttpMethod; exports.InvoiceStatus = _chunk6YKYRKVUjs.InvoiceStatus; exports.JsonApiDataFactory = _chunk4MN547K7js.JsonApiDataFactory; exports.Module = _chunk6YKYRKVUjs.Module; exports.ModuleModule = _chunk6YKYRKVUjs.ModuleModule; exports.ModulePaths = _chunk6YKYRKVUjs.ModulePaths; exports.ModulePathsModule = _chunk6YKYRKVUjs.ModulePathsModule; exports.ModuleRegistrar = _chunk6YKYRKVUjs.ModuleRegistrar; exports.ModuleRegistry = _chunk6YKYRKVUjs.ModuleRegistry; exports.Modules = _chunk6YKYRKVUjs.Modules; exports.Notification = _chunk6YKYRKVUjs.Notification; exports.NotificationFields = _chunk6YKYRKVUjs.NotificationFields; exports.NotificationModule = _chunk6YKYRKVUjs.NotificationModule; exports.NotificationService = _chunk6YKYRKVUjs.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunk6YKYRKVUjs.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunk6YKYRKVUjs.OAuthClient; exports.OAuthModule = _chunk6YKYRKVUjs.OAuthModule; exports.OAuthService = _chunk6YKYRKVUjs.OAuthService; exports.Passkey = _chunk6YKYRKVUjs.Passkey; exports.PasskeyAuthenticationOptions = _chunk6YKYRKVUjs.PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = _chunk6YKYRKVUjs.PasskeyAuthenticationOptionsModule; exports.PasskeyModule = _chunk6YKYRKVUjs.PasskeyModule; exports.PasskeyRegistrationOptions = _chunk6YKYRKVUjs.PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = _chunk6YKYRKVUjs.PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = _chunk6YKYRKVUjs.PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = _chunk6YKYRKVUjs.PasskeyRegistrationVerifyModule; exports.PasskeyRename = _chunk6YKYRKVUjs.PasskeyRename; exports.PasskeyRenameModule = _chunk6YKYRKVUjs.PasskeyRenameModule; exports.PasskeyVerifyLogin = _chunk6YKYRKVUjs.PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = _chunk6YKYRKVUjs.PasskeyVerifyLoginModule; exports.PaymentMethod = _chunk6YKYRKVUjs.PaymentMethod; exports.PermissionMapping = _chunk6YKYRKVUjs.PermissionMapping; exports.PermissionMappingModule = _chunk6YKYRKVUjs.PermissionMappingModule; exports.Push = _chunk6YKYRKVUjs.Push; exports.PushModule = _chunk6YKYRKVUjs.PushModule; exports.PushService = _chunk6YKYRKVUjs.PushService; exports.RbacService = _chunk2DFE325Pjs.RbacService; exports.ReferralModule = _chunk6YKYRKVUjs.ReferralModule; exports.ReferralService = _chunk6YKYRKVUjs.ReferralService; exports.ReferralStats = _chunk6YKYRKVUjs.ReferralStats; exports.ReferralStatsModule = _chunk6YKYRKVUjs.ReferralStatsModule; exports.RehydrationFactory = _chunk6YKYRKVUjs.RehydrationFactory; exports.Role = _chunk6YKYRKVUjs.Role; exports.RoleFields = _chunk6YKYRKVUjs.RoleFields; exports.RoleModule = _chunk6YKYRKVUjs.RoleModule; exports.RoleService = _chunk6YKYRKVUjs.RoleService; exports.S3 = _chunk6YKYRKVUjs.S3; exports.S3Module = _chunk6YKYRKVUjs.S3Module; exports.S3Service = _chunk6YKYRKVUjs.S3Service; exports.StripeCustomer = _chunk6YKYRKVUjs.StripeCustomer; exports.StripeCustomerModule = _chunk6YKYRKVUjs.StripeCustomerModule; exports.StripeCustomerService = _chunk6YKYRKVUjs.StripeCustomerService; exports.StripeInvoice = _chunk6YKYRKVUjs.StripeInvoice; exports.StripeInvoiceModule = _chunk6YKYRKVUjs.StripeInvoiceModule; exports.StripeInvoiceService = _chunk6YKYRKVUjs.StripeInvoiceService; exports.StripePaymentMethodModule = _chunk6YKYRKVUjs.StripePaymentMethodModule; exports.StripePrice = _chunk6YKYRKVUjs.StripePrice; exports.StripePriceModule = _chunk6YKYRKVUjs.StripePriceModule; exports.StripePriceService = _chunk6YKYRKVUjs.StripePriceService; exports.StripeProduct = _chunk6YKYRKVUjs.StripeProduct; exports.StripeProductModule = _chunk6YKYRKVUjs.StripeProductModule; exports.StripeProductService = _chunk6YKYRKVUjs.StripeProductService; exports.StripePromotionCode = _chunk6YKYRKVUjs.StripePromotionCode; exports.StripePromotionCodeModule = _chunk6YKYRKVUjs.StripePromotionCodeModule; exports.StripePromotionCodeService = _chunk6YKYRKVUjs.StripePromotionCodeService; exports.StripeSubscription = _chunk6YKYRKVUjs.StripeSubscription; exports.StripeSubscriptionModule = _chunk6YKYRKVUjs.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunk6YKYRKVUjs.StripeSubscriptionService; exports.StripeUsage = _chunk6YKYRKVUjs.StripeUsage; exports.StripeUsageModule = _chunk6YKYRKVUjs.StripeUsageModule; exports.StripeUsageService = _chunk6YKYRKVUjs.StripeUsageService; exports.SubscriptionStatus = _chunk6YKYRKVUjs.SubscriptionStatus; exports.TableOptions = _chunk6YKYRKVUjs.TableOptions; exports.TotpAuthenticator = _chunk6YKYRKVUjs.TotpAuthenticator; exports.TotpAuthenticatorModule = _chunk6YKYRKVUjs.TotpAuthenticatorModule; exports.TotpSetup = _chunk6YKYRKVUjs.TotpSetup; exports.TotpSetupModule = _chunk6YKYRKVUjs.TotpSetupModule; exports.TotpVerify = _chunk6YKYRKVUjs.TotpVerify; exports.TotpVerifyLogin = _chunk6YKYRKVUjs.TotpVerifyLogin; exports.TotpVerifyLoginModule = _chunk6YKYRKVUjs.TotpVerifyLoginModule; exports.TotpVerifyModule = _chunk6YKYRKVUjs.TotpVerifyModule; exports.TwoFactorChallenge = _chunk6YKYRKVUjs.TwoFactorChallenge; exports.TwoFactorChallengeModule = _chunk6YKYRKVUjs.TwoFactorChallengeModule; exports.TwoFactorEnable = _chunk6YKYRKVUjs.TwoFactorEnable; exports.TwoFactorEnableModule = _chunk6YKYRKVUjs.TwoFactorEnableModule; exports.TwoFactorService = _chunk6YKYRKVUjs.TwoFactorService; exports.TwoFactorStatus = _chunk6YKYRKVUjs.TwoFactorStatus; exports.TwoFactorStatusModule = _chunk6YKYRKVUjs.TwoFactorStatusModule; exports.User = _chunk6YKYRKVUjs.User; exports.UserFields = _chunk6YKYRKVUjs.UserFields; exports.UserModule = _chunk6YKYRKVUjs.UserModule; exports.UserService = _chunk6YKYRKVUjs.UserService; exports.Waitlist = _chunk6YKYRKVUjs.Waitlist; exports.WaitlistModule = _chunk6YKYRKVUjs.WaitlistModule; exports.WaitlistService = _chunk6YKYRKVUjs.WaitlistService; exports.WaitlistStats = _chunk6YKYRKVUjs.WaitlistStats; exports.WaitlistStatsModule = _chunk6YKYRKVUjs.WaitlistStatsModule; exports.checkPermissions = _chunk6YKYRKVUjs.checkPermissions; exports.checkPermissionsFromServer = _chunk6YKYRKVUjs.checkPermissionsFromServer; exports.clearLastApiTotal = _chunk6YKYRKVUjs.clearLastApiTotal; exports.cn = _chunk6YKYRKVUjs.cn; exports.composeRefs = _chunk6YKYRKVUjs.composeRefs; exports.configureAuth = _chunk6YKYRKVUjs.configureAuth; exports.configureI18n = _chunk2DFE325Pjs.configureI18n; exports.configureJsonApi = _chunk2DFE325Pjs.configureJsonApi; exports.configureLogin = _chunk2DFE325Pjs.configureLogin; exports.configureReferral = _chunk2DFE325Pjs.configureReferral; exports.configureRoles = _chunk2DFE325Pjs.configureRoles; exports.configureWaitlist = _chunk2DFE325Pjs.configureWaitlist; exports.createJsonApiInclusion = _chunk6YKYRKVUjs.createJsonApiInclusion; exports.dismissToast = _chunk6YKYRKVUjs.dismissToast; exports.entityObjectSchema = _chunk6YKYRKVUjs.entityObjectSchema; exports.exists = _chunk6YKYRKVUjs.exists; exports.formatDate = _chunk6YKYRKVUjs.formatDate; exports.getApiUrl = _chunk2DFE325Pjs.getApiUrl; exports.getAppUrl = _chunk2DFE325Pjs.getAppUrl; exports.getBootstrapper = _chunk4MN547K7js.getBootstrapper; exports.getClientGlobalErrorHandler = _chunk6YKYRKVUjs.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunk6YKYRKVUjs.getGlobalErrorHandler; exports.getIcon = _chunk6YKYRKVUjs.getIcon; exports.getIconByModule = _chunk6YKYRKVUjs.getIconByModule; exports.getIconByModuleName = _chunk6YKYRKVUjs.getIconByModuleName; exports.getInitials = _chunk6YKYRKVUjs.getInitials; exports.getLastApiTotal = _chunk6YKYRKVUjs.getLastApiTotal; exports.getLucideIcon = _chunk6YKYRKVUjs.getLucideIcon; exports.getLucideIconByModule = _chunk6YKYRKVUjs.getLucideIconByModule; exports.getLucideIconByModuleName = _chunk6YKYRKVUjs.getLucideIconByModuleName; exports.getReferralConfig = _chunk2DFE325Pjs.getReferralConfig; exports.getRoleId = _chunk2DFE325Pjs.getRoleId; exports.getStripePublishableKey = _chunk2DFE325Pjs.getStripePublishableKey; exports.getTableComponents = _chunk6YKYRKVUjs.getTableComponents; exports.getTableOptions = _chunk6YKYRKVUjs.getTableOptions; exports.getTokenHandler = _chunk6YKYRKVUjs.getTokenHandler; exports.getTrackablePages = _chunk2DFE325Pjs.getTrackablePages; exports.getValueFromPath = _chunk6YKYRKVUjs.getValueFromPath; exports.getWaitlistConfig = _chunk2DFE325Pjs.getWaitlistConfig; exports.hasBootstrapper = _chunk4MN547K7js.hasBootstrapper; exports.isReferralEnabled = _chunk2DFE325Pjs.isReferralEnabled; exports.isRolesConfigured = _chunk2DFE325Pjs.isRolesConfigured; exports.rehydrate = _chunk6YKYRKVUjs.rehydrate; exports.rehydrateList = _chunk6YKYRKVUjs.rehydrateList; exports.resetBootstrapStore = _chunk4MN547K7js.resetBootstrapStore; exports.setBootstrapper = _chunk4MN547K7js.setBootstrapper; exports.setClientGlobalErrorHandler = _chunk6YKYRKVUjs.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunk6YKYRKVUjs.setGlobalErrorHandler; exports.showCustomToast = _chunk6YKYRKVUjs.showCustomToast; exports.showError = _chunk6YKYRKVUjs.showError; exports.showToast = _chunk6YKYRKVUjs.showToast; exports.translateData = _chunk4MN547K7js.translateData; exports.translateResponse = _chunk4MN547K7js.translateResponse; exports.tryBootstrap = _chunk4MN547K7js.tryBootstrap; exports.useComposedRefs = _chunk6YKYRKVUjs.useComposedRefs; exports.useIsMobile = _chunk6YKYRKVUjs.useIsMobile; exports.userObjectSchema = _chunk6YKYRKVUjs.userObjectSchema;
|
|
389
389
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
getWaitlistConfig,
|
|
18
18
|
isReferralEnabled,
|
|
19
19
|
isRolesConfigured
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-PBD6ZH46.mjs";
|
|
21
21
|
import {
|
|
22
22
|
AVAILABLE_OAUTH_SCOPES,
|
|
23
23
|
AbstractApiData,
|
|
@@ -180,7 +180,7 @@ import {
|
|
|
180
180
|
useComposedRefs,
|
|
181
181
|
useIsMobile,
|
|
182
182
|
userObjectSchema
|
|
183
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-REWN5GZP.mjs";
|
|
184
184
|
import "./chunk-AUXK7QSA.mjs";
|
|
185
185
|
import "./chunk-C7C7VY4F.mjs";
|
|
186
186
|
import {
|
package/dist/server/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var _chunk3ZPK4QOBjs = require('../chunk-3ZPK4QOB.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunk6YKYRKVUjs = require('../chunk-6YKYRKVU.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(_pako2.default.ungzip(Buffer.from(rawModules, "base64"), { to: "string" }));
|
|
88
88
|
const selectedModule = modules.find((module) => module.id === params.module.moduleId);
|
|
89
|
-
return
|
|
89
|
+
return _chunk6YKYRKVUjs.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 =
|
|
299
|
+
exports.ServerAuthService = _chunk6YKYRKVUjs.AuthService; exports.ServerCompanyService = _chunk6YKYRKVUjs.CompanyService; exports.ServerContentService = _chunk6YKYRKVUjs.ContentService; exports.ServerFeatureService = _chunk6YKYRKVUjs.FeatureService; exports.ServerJsonApiDelete = ServerJsonApiDelete; exports.ServerJsonApiGet = ServerJsonApiGet; exports.ServerJsonApiPatch = ServerJsonApiPatch; exports.ServerJsonApiPost = ServerJsonApiPost; exports.ServerJsonApiPut = ServerJsonApiPut; exports.ServerNotificationService = _chunk6YKYRKVUjs.NotificationService; exports.ServerPushService = _chunk6YKYRKVUjs.PushService; exports.ServerRoleService = _chunk6YKYRKVUjs.RoleService; exports.ServerS3Service = _chunk6YKYRKVUjs.S3Service; exports.ServerSession = ServerSession; exports.ServerUserService = _chunk6YKYRKVUjs.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 = _chunk3ZPK4QOBjs.serverRequest;
|
|
300
300
|
//# sourceMappingURL=index.js.map
|
package/dist/server/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Building2Icon } from "lucide-react";
|
|
2
2
|
import { Company } from ".";
|
|
3
|
+
import { ModuleFactory } from "../../permissions";
|
|
3
4
|
|
|
4
5
|
export const CompanyModule = (factory: ModuleFactory) =>
|
|
5
6
|
factory({
|
|
@@ -7,4 +8,5 @@ export const CompanyModule = (factory: ModuleFactory) =>
|
|
|
7
8
|
name: "companies",
|
|
8
9
|
model: Company,
|
|
9
10
|
moduleId: "f9e77c8f-bfd1-4fd4-80b0-e1d891ab7113",
|
|
11
|
+
icon: Building2Icon,
|
|
10
12
|
});
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import { ReactNode } from "react";
|
|
3
4
|
import { UserInterface } from "../../../user";
|
|
4
5
|
import { useCurrentUserContext } from "../../../user/contexts";
|
|
5
6
|
import { CompanyProvider } from "../../contexts/CompanyContext";
|
|
6
7
|
import { CompanyDetails } from "../details/CompanyDetails";
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
type CompanyContainerProps = {
|
|
10
|
+
configurationEditorSlot?: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export function CompanyContainer({ configurationEditorSlot }: CompanyContainerProps) {
|
|
9
14
|
const { currentUser } = useCurrentUserContext<UserInterface>();
|
|
10
15
|
if (!currentUser) return null;
|
|
11
16
|
|
|
12
17
|
return (
|
|
13
|
-
<CompanyProvider dehydratedCompany={currentUser.company}>
|
|
18
|
+
<CompanyProvider dehydratedCompany={currentUser.company} configurationEditorSlot={configurationEditorSlot}>
|
|
14
19
|
<CompanyDetails />
|
|
15
20
|
</CompanyProvider>
|
|
16
21
|
);
|
|
@@ -7,9 +7,10 @@ import { ContentTitle } from "../../../../components";
|
|
|
7
7
|
import { useSharedContext } from "../../../../contexts";
|
|
8
8
|
import { usePageUrlGenerator } from "../../../../hooks";
|
|
9
9
|
import { useCompanyContext } from "../../contexts/CompanyContext";
|
|
10
|
+
import { TokenStatusIndicator } from "./TokenStatusIndicator";
|
|
10
11
|
|
|
11
12
|
export function CompanyDetails() {
|
|
12
|
-
const
|
|
13
|
+
const t = useTranslations();
|
|
13
14
|
const { title } = useSharedContext();
|
|
14
15
|
const _generateUrl = usePageUrlGenerator();
|
|
15
16
|
|
|
@@ -22,6 +23,20 @@ export function CompanyDetails() {
|
|
|
22
23
|
{company.logo && (
|
|
23
24
|
<Image src={company.logo} alt={company.name} width={150} height={150} className="mb-4 rounded-md" />
|
|
24
25
|
)}
|
|
26
|
+
<TokenStatusIndicator size="md" />
|
|
27
|
+
<div className="flex flex-col gap-y-1">
|
|
28
|
+
{company.configurations?.country && (
|
|
29
|
+
<div className="text-muted-foreground text-sm">
|
|
30
|
+
<span className="font-medium">{t("features.configuration.country")}:</span> {company.configurations.country}
|
|
31
|
+
</div>
|
|
32
|
+
)}
|
|
33
|
+
{company.configurations?.currency && (
|
|
34
|
+
<div className="text-muted-foreground text-sm">
|
|
35
|
+
<span className="font-medium">{t("features.configuration.currency")}:</span>{" "}
|
|
36
|
+
{company.configurations.currency}
|
|
37
|
+
</div>
|
|
38
|
+
)}
|
|
39
|
+
</div>
|
|
25
40
|
</div>
|
|
26
41
|
);
|
|
27
42
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
4
4
|
import { Settings2Icon } from "lucide-react";
|
|
5
5
|
import { useTranslations } from "next-intl";
|
|
6
|
-
import {
|
|
7
|
-
import { SubmitHandler, useForm } from "react-hook-form";
|
|
6
|
+
import { ReactNode, useEffect, useState } from "react";
|
|
7
|
+
import { SubmitHandler, UseFormReturn, useForm } from "react-hook-form";
|
|
8
8
|
import { showToast } from "../../../../utils/toast";
|
|
9
9
|
import z from "zod";
|
|
10
10
|
import { CommonEditorButtons, errorToast } from "../../../../components";
|
|
@@ -18,44 +18,37 @@ import {
|
|
|
18
18
|
DialogTitle,
|
|
19
19
|
DialogTrigger,
|
|
20
20
|
Form,
|
|
21
|
-
Tabs,
|
|
22
|
-
TabsContent,
|
|
23
|
-
TabsList,
|
|
24
|
-
TabsTrigger,
|
|
25
21
|
} from "../../../../shadcnui";
|
|
26
22
|
import { UserInterface } from "../../../user";
|
|
27
23
|
import { useCurrentUserContext } from "../../../user/contexts";
|
|
28
24
|
import { UserService } from "../../../user/data/user.service";
|
|
29
25
|
import { CompanyInput, CompanyInterface } from "../../data";
|
|
30
26
|
import { CompanyService } from "../../data/company.service";
|
|
31
|
-
import { CompanyConfigurationSecurityForm } from "./CompanyConfigurationSecurityForm";
|
|
32
27
|
|
|
33
28
|
type CompanyConfigurationEditorProps = {
|
|
34
29
|
company: CompanyInterface;
|
|
30
|
+
formSchema: z.ZodObject<any>;
|
|
31
|
+
defaultValues: Record<string, any>;
|
|
32
|
+
buildPayload: (values: Record<string, any>) => Partial<CompanyInput["configurations"]>;
|
|
33
|
+
children: (form: UseFormReturn<any>) => ReactNode;
|
|
35
34
|
};
|
|
36
35
|
|
|
37
|
-
function CompanyConfigurationEditorInternal({
|
|
36
|
+
function CompanyConfigurationEditorInternal({
|
|
37
|
+
company,
|
|
38
|
+
formSchema,
|
|
39
|
+
defaultValues,
|
|
40
|
+
buildPayload,
|
|
41
|
+
children,
|
|
42
|
+
}: CompanyConfigurationEditorProps) {
|
|
38
43
|
const [open, setOpen] = useState<boolean>(false);
|
|
39
44
|
const t = useTranslations();
|
|
40
45
|
const { setUser } = useCurrentUserContext<UserInterface>();
|
|
41
46
|
|
|
42
|
-
const defaultValues = useMemo(() => {
|
|
43
|
-
return {
|
|
44
|
-
isManagedKnowledge: company.configurations?.isManagedKnowledge ?? false,
|
|
45
|
-
allowPublicBot: company.configurations?.allowPublicBot ?? false,
|
|
46
|
-
};
|
|
47
|
-
}, [company.configurations]);
|
|
48
|
-
|
|
49
47
|
const close = () => {
|
|
50
48
|
setOpen(false);
|
|
51
49
|
form.reset();
|
|
52
50
|
};
|
|
53
51
|
|
|
54
|
-
const formSchema = z.object({
|
|
55
|
-
isManagedKnowledge: z.boolean().optional(),
|
|
56
|
-
allowPublicBot: z.boolean().optional(),
|
|
57
|
-
});
|
|
58
|
-
|
|
59
52
|
const form = useForm<z.infer<typeof formSchema>>({
|
|
60
53
|
resolver: zodResolver(formSchema),
|
|
61
54
|
defaultValues: defaultValues,
|
|
@@ -64,33 +57,26 @@ function CompanyConfigurationEditorInternal({ company }: CompanyConfigurationEdi
|
|
|
64
57
|
|
|
65
58
|
useEffect(() => {
|
|
66
59
|
if (open) {
|
|
67
|
-
form.reset(
|
|
68
|
-
isManagedKnowledge: company.configurations?.isManagedKnowledge ?? false,
|
|
69
|
-
allowPublicBot: company.configurations?.allowPublicBot ?? false,
|
|
70
|
-
});
|
|
60
|
+
form.reset(defaultValues);
|
|
71
61
|
}
|
|
72
62
|
}, [company, open]);
|
|
73
63
|
|
|
74
64
|
const onSubmit: SubmitHandler<z.infer<typeof formSchema>> = async (values) => {
|
|
75
65
|
const payload: CompanyInput = {
|
|
76
66
|
id: company.id,
|
|
77
|
-
configurations:
|
|
78
|
-
isManagedKnowledge: values.isManagedKnowledge ?? false,
|
|
79
|
-
allowPublicBot: values.allowPublicBot ?? false,
|
|
80
|
-
},
|
|
67
|
+
configurations: buildPayload(values),
|
|
81
68
|
};
|
|
82
69
|
|
|
83
70
|
try {
|
|
84
71
|
await CompanyService.updateConfigurations(payload);
|
|
85
72
|
|
|
86
|
-
// Refresh user data to update localStorage with new company configurations
|
|
87
73
|
const fullUser = await UserService.findFullUser();
|
|
88
74
|
if (fullUser) {
|
|
89
75
|
setUser(fullUser);
|
|
90
76
|
}
|
|
91
77
|
|
|
92
|
-
showToast("
|
|
93
|
-
description:
|
|
78
|
+
showToast(t("features.configuration.updated_title"), {
|
|
79
|
+
description: t("features.configuration.updated_description"),
|
|
94
80
|
});
|
|
95
81
|
close();
|
|
96
82
|
} catch (error) {
|
|
@@ -104,7 +90,7 @@ function CompanyConfigurationEditorInternal({ company }: CompanyConfigurationEdi
|
|
|
104
90
|
return (
|
|
105
91
|
<Dialog open={open} onOpenChange={setOpen}>
|
|
106
92
|
<DialogTrigger>
|
|
107
|
-
<Button size="sm" variant={`ghost`} className="cursor-pointer">
|
|
93
|
+
<Button render={<div />} nativeButton={false} size="sm" variant={`ghost`} className="cursor-pointer">
|
|
108
94
|
<Settings2Icon className="h-3.5 w-3.5" />
|
|
109
95
|
</Button>
|
|
110
96
|
</DialogTrigger>
|
|
@@ -117,25 +103,7 @@ function CompanyConfigurationEditorInternal({ company }: CompanyConfigurationEdi
|
|
|
117
103
|
</DialogHeader>
|
|
118
104
|
<Form {...form}>
|
|
119
105
|
<form onSubmit={form.handleSubmit(onSubmit)} className={`flex w-full flex-col gap-y-4`}>
|
|
120
|
-
|
|
121
|
-
<div className={`flex w-full flex-col justify-start gap-y-4`}>
|
|
122
|
-
<Tabs defaultValue={process.env.NEXT_PUBLIC_PRIVATE_INSTALLATION ? "security" : "ai"}>
|
|
123
|
-
<TabsList>
|
|
124
|
-
<TabsTrigger value="security">Privacy & Security</TabsTrigger>
|
|
125
|
-
</TabsList>
|
|
126
|
-
<TabsContent value="features">
|
|
127
|
-
<div className="space-y-4">
|
|
128
|
-
<p className="text-muted-foreground text-sm">
|
|
129
|
-
Feature configuration will be implemented in future updates.
|
|
130
|
-
</p>
|
|
131
|
-
</div>
|
|
132
|
-
</TabsContent>
|
|
133
|
-
<TabsContent value="security">
|
|
134
|
-
<CompanyConfigurationSecurityForm form={form} />
|
|
135
|
-
</TabsContent>
|
|
136
|
-
</Tabs>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
106
|
+
{children(form)}
|
|
139
107
|
<CommonEditorButtons form={form} setOpen={setOpen} isEdit={true} />
|
|
140
108
|
</form>
|
|
141
109
|
</Form>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useTranslations } from "next-intl";
|
|
4
|
-
import { createContext, ReactNode, useContext, useState } from "react";
|
|
4
|
+
import { Fragment, createContext, ReactNode, useContext, useState } from "react";
|
|
5
5
|
import { SharedProvider } from "../../../contexts";
|
|
6
6
|
import { JsonApiHydratedDataInterface, Modules, rehydrate } from "../../../core";
|
|
7
7
|
import { usePageUrlGenerator } from "../../../hooks";
|
|
@@ -23,6 +23,7 @@ const CompanyContext = createContext<CompanyContextType | undefined>(undefined);
|
|
|
23
23
|
type CompanyProviderProps = {
|
|
24
24
|
children: ReactNode;
|
|
25
25
|
dehydratedCompany?: JsonApiHydratedDataInterface;
|
|
26
|
+
configurationEditorSlot?: ReactNode;
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
const defaultContextValue: CompanyContextType = {
|
|
@@ -30,7 +31,7 @@ const defaultContextValue: CompanyContextType = {
|
|
|
30
31
|
setCompany: () => {},
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
export const CompanyProvider = ({ children, dehydratedCompany }: CompanyProviderProps) => {
|
|
34
|
+
export const CompanyProvider = ({ children, dehydratedCompany, configurationEditorSlot }: CompanyProviderProps) => {
|
|
34
35
|
const generateUrl = usePageUrlGenerator();
|
|
35
36
|
const t = useTranslations();
|
|
36
37
|
const { hasPermissionToModule, hasRole } = useCurrentUserContext<UserInterface>();
|
|
@@ -71,7 +72,8 @@ export const CompanyProvider = ({ children, dehydratedCompany }: CompanyProvider
|
|
|
71
72
|
hasRole(getRoleId().Administrator) ||
|
|
72
73
|
hasPermissionToModule({ module: Modules.Company, action: Action.Update })
|
|
73
74
|
) {
|
|
74
|
-
|
|
75
|
+
if (company && configurationEditorSlot)
|
|
76
|
+
functions.push(<Fragment key="configurationEditorSlot">{configurationEditorSlot}</Fragment>);
|
|
75
77
|
functions.push(<CompanyEditor key="companyEditor" company={company} propagateChanges={setCompany} />);
|
|
76
78
|
}
|
|
77
79
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UsersIcon } from "lucide-react";
|
|
2
2
|
import { createJsonApiInclusion } from "../../core";
|
|
3
3
|
import { ModuleFactory } from "../../permissions";
|
|
4
|
+
import { User } from "./data/user";
|
|
4
5
|
|
|
5
6
|
export const UserModule = (factory: ModuleFactory) =>
|
|
6
7
|
factory({
|
|
@@ -8,6 +9,7 @@ export const UserModule = (factory: ModuleFactory) =>
|
|
|
8
9
|
name: "users",
|
|
9
10
|
model: User,
|
|
10
11
|
moduleId: "04cfc677-0fd2-4f5e-adf4-2483a00c0277",
|
|
12
|
+
icon: UsersIcon,
|
|
11
13
|
inclusions: {
|
|
12
14
|
lists: {
|
|
13
15
|
fields: [
|