@carlonicora/nextjs-jsonapi 1.62.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/scripts/generate-web-module/templates/components/selector.template.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/selector.template.js +52 -48
- package/dist/scripts/generate-web-module/templates/components/selector.template.js.map +1 -1
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
- package/scripts/generate-web-module/templates/components/selector.template.ts +52 -48
- 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 {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selector.template.d.ts","sourceRoot":"","sources":["../../../../../scripts/generate-web-module/templates/components/selector.template.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"selector.template.d.ts","sourceRoot":"","sources":["../../../../../scripts/generate-web-module/templates/components/selector.template.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM,CA4K3E"}
|
|
@@ -20,14 +20,11 @@ function generateSelectorTemplate(data) {
|
|
|
20
20
|
return `"use client";
|
|
21
21
|
|
|
22
22
|
import {
|
|
23
|
-
Button,
|
|
24
23
|
Command,
|
|
25
|
-
CommandEmpty,
|
|
26
|
-
CommandGroup,
|
|
27
|
-
CommandInput,
|
|
28
24
|
CommandItem,
|
|
29
25
|
CommandList,
|
|
30
26
|
FormFieldWrapper,
|
|
27
|
+
Input,
|
|
31
28
|
Popover,
|
|
32
29
|
PopoverContent,
|
|
33
30
|
PopoverTrigger,
|
|
@@ -38,7 +35,7 @@ import { DataListRetriever, useDataListRetriever } from "@carlonicora/nextjs-jso
|
|
|
38
35
|
import { useDebounce } from "@carlonicora/nextjs-jsonapi/client";
|
|
39
36
|
import { Modules } from "@carlonicora/nextjs-jsonapi/core";
|
|
40
37
|
|
|
41
|
-
import {
|
|
38
|
+
import { CircleX, RefreshCwIcon, SearchIcon, XIcon } from "lucide-react";
|
|
42
39
|
import { useTranslations } from "next-intl";
|
|
43
40
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
44
41
|
|
|
@@ -100,12 +97,12 @@ export default function ${names.pascalCase}Selector({
|
|
|
100
97
|
const set${names.pascalCase} = (${names.camelCase}?: ${names.pascalCase}Interface) => {
|
|
101
98
|
if (onChange) onChange(${names.camelCase});
|
|
102
99
|
if (!${names.camelCase}) {
|
|
103
|
-
form.setValue(id, undefined);
|
|
100
|
+
form.setValue(id, undefined, { shouldDirty: true });
|
|
104
101
|
setOpen(false);
|
|
105
102
|
return;
|
|
106
103
|
}
|
|
107
104
|
|
|
108
|
-
form.setValue(id, { id: ${names.camelCase}.id, name: ${names.camelCase}.${displayProp} });
|
|
105
|
+
form.setValue(id, { id: ${names.camelCase}.id, name: ${names.camelCase}.${displayProp} }, { shouldDirty: true });
|
|
109
106
|
setOpen(false);
|
|
110
107
|
|
|
111
108
|
setTimeout(() => {
|
|
@@ -120,55 +117,62 @@ export default function ${names.pascalCase}Selector({
|
|
|
120
117
|
<Popover open={open} onOpenChange={setOpen} modal={true}>
|
|
121
118
|
<div className="flex w-full flex-row items-center justify-between">
|
|
122
119
|
<PopoverTrigger className="w-full">
|
|
123
|
-
<
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
</
|
|
120
|
+
<div className="flex w-full flex-row items-center justify-start rounded-md">
|
|
121
|
+
{field.value ? (
|
|
122
|
+
<div className="bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed">
|
|
123
|
+
<span>{field.value?.name ?? ""}</span>
|
|
124
|
+
</div>
|
|
125
|
+
) : (
|
|
126
|
+
<div className="bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed">
|
|
127
|
+
{placeholder ?? t(\`generic.search.placeholder\`, { type: t(\`entities.${i18nKey}\`, { count: 1 }) })}
|
|
128
|
+
</div>
|
|
129
|
+
)}
|
|
130
|
+
</div>
|
|
134
131
|
</PopoverTrigger>
|
|
135
132
|
{field.value && (
|
|
136
|
-
<
|
|
137
|
-
className="text-muted
|
|
133
|
+
<CircleX
|
|
134
|
+
className="text-muted hover:text-destructive ml-2 h-4 w-4 shrink-0 cursor-pointer"
|
|
138
135
|
onClick={() => set${names.pascalCase}()}
|
|
139
136
|
/>
|
|
140
137
|
)}
|
|
141
138
|
</div>
|
|
142
|
-
<PopoverContent className="w-(--
|
|
139
|
+
<PopoverContent align="start" className="w-(--anchor-width)">
|
|
143
140
|
<Command shouldFilter={false}>
|
|
144
|
-
<
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
<
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
className="hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent cursor-pointer"
|
|
166
|
-
>
|
|
167
|
-
{${names.camelCase}.${displayProp}}
|
|
168
|
-
</CommandItem>
|
|
169
|
-
))}
|
|
170
|
-
</CommandGroup>
|
|
141
|
+
<div className="relative mb-2 w-full">
|
|
142
|
+
<SearchIcon className="text-muted-foreground absolute top-2.5 left-2.5 h-4 w-4" />
|
|
143
|
+
<Input
|
|
144
|
+
placeholder={t(\`generic.search.placeholder\`, { type: t(\`entities.${i18nKey}\`, { count: 1 }) })}
|
|
145
|
+
type="text"
|
|
146
|
+
className="w-full pr-8 pl-8"
|
|
147
|
+
onChange={(e) => setSearchTerm(e.target.value)}
|
|
148
|
+
value={searchTerm}
|
|
149
|
+
/>
|
|
150
|
+
{isSearching ? (
|
|
151
|
+
<RefreshCwIcon className="text-muted-foreground absolute top-2.5 right-2.5 h-4 w-4 animate-spin" />
|
|
152
|
+
) : searchTermRef.current ? (
|
|
153
|
+
<XIcon
|
|
154
|
+
className={\`absolute top-2.5 right-2.5 h-4 w-4 \${searchTermRef.current ? "cursor-pointer" : "text-muted-foreground"}\`}
|
|
155
|
+
onClick={() => {
|
|
156
|
+
setSearchTerm("");
|
|
157
|
+
search("");
|
|
158
|
+
}}
|
|
159
|
+
/>
|
|
160
|
+
) : (
|
|
161
|
+
<></>
|
|
171
162
|
)}
|
|
163
|
+
</div>
|
|
164
|
+
<CommandList>
|
|
165
|
+
{data.data &&
|
|
166
|
+
data.data.length > 0 &&
|
|
167
|
+
(data.data as ${names.pascalCase}Interface[]).map((${names.camelCase}: ${names.pascalCase}Interface) => (
|
|
168
|
+
<CommandItem
|
|
169
|
+
className="cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent"
|
|
170
|
+
key={${names.camelCase}.id}
|
|
171
|
+
onSelect={() => set${names.pascalCase}(${names.camelCase})}
|
|
172
|
+
>
|
|
173
|
+
{${names.camelCase}.${displayProp}}
|
|
174
|
+
</CommandItem>
|
|
175
|
+
))}
|
|
172
176
|
</CommandList>
|
|
173
177
|
</Command>
|
|
174
178
|
</PopoverContent>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selector.template.js","sourceRoot":"","sources":["../../../../../scripts/generate-web-module/templates/components/selector.template.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAUH,
|
|
1
|
+
{"version":3,"file":"selector.template.js","sourceRoot":"","sources":["../../../../../scripts/generate-web-module/templates/components/selector.template.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAUH,4DA4KC;AAlLD;;;;;GAKG;AACH,SAAgB,wBAAwB,CAAC,IAA0B;IACjE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;IAC/C,MAAM,YAAY,GAAG,cAAc,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;IAC7E,MAAM,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;IAChD,MAAM,WAAW,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAEjD,OAAO;;;;;;;;;;;;WAYE,KAAK,CAAC,UAAU,gCAAgC,IAAI,CAAC,eAAe,IAAI,KAAK,CAAC,SAAS,SAAS,KAAK,CAAC,UAAU;WAChH,KAAK,CAAC,UAAU,8BAA8B,IAAI,CAAC,eAAe,IAAI,KAAK,CAAC,SAAS,SAAS,KAAK,CAAC,UAAU;;;;;;;;;OASlH,KAAK,CAAC,UAAU;;;;;gBAKP,KAAK,CAAC,SAAS,MAAM,KAAK,CAAC,UAAU;;;;0BAI3B,KAAK,CAAC,UAAU;;;;;;;KAOrC,KAAK,CAAC,UAAU;;;;;;;;;;kCAUa,KAAK,CAAC,UAAU;;eAEnC,KAAK,CAAC,UAAU;;;sBAGT,KAAK,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;aAwBzB,KAAK,CAAC,UAAU,OAAO,KAAK,CAAC,SAAS,MAAM,KAAK,CAAC,UAAU;6BAC5C,KAAK,CAAC,SAAS;WACjC,KAAK,CAAC,SAAS;;;;;;8BAMI,KAAK,CAAC,SAAS,cAAc,KAAK,CAAC,SAAS,IAAI,WAAW;;;;;;;;;;;;;;;;;;;;;;+FAsBM,OAAO;;;;;;;;sCAQhE,KAAK,CAAC,UAAU;;;;;;;;;0FASoC,OAAO;;;;;;;;;;;;;;;;;;;;;;;oCAuB7D,KAAK,CAAC,UAAU,qBAAqB,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,UAAU;;;+BAG9E,KAAK,CAAC,SAAS;6CACD,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,SAAS;;2BAErD,KAAK,CAAC,SAAS,IAAI,WAAW;;;;;;;;;;;;CAYxD,CAAC;AACF,CAAC"}
|
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
|
@@ -21,14 +21,11 @@ export function generateSelectorTemplate(data: FrontendTemplateData): string {
|
|
|
21
21
|
return `"use client";
|
|
22
22
|
|
|
23
23
|
import {
|
|
24
|
-
Button,
|
|
25
24
|
Command,
|
|
26
|
-
CommandEmpty,
|
|
27
|
-
CommandGroup,
|
|
28
|
-
CommandInput,
|
|
29
25
|
CommandItem,
|
|
30
26
|
CommandList,
|
|
31
27
|
FormFieldWrapper,
|
|
28
|
+
Input,
|
|
32
29
|
Popover,
|
|
33
30
|
PopoverContent,
|
|
34
31
|
PopoverTrigger,
|
|
@@ -39,7 +36,7 @@ import { DataListRetriever, useDataListRetriever } from "@carlonicora/nextjs-jso
|
|
|
39
36
|
import { useDebounce } from "@carlonicora/nextjs-jsonapi/client";
|
|
40
37
|
import { Modules } from "@carlonicora/nextjs-jsonapi/core";
|
|
41
38
|
|
|
42
|
-
import {
|
|
39
|
+
import { CircleX, RefreshCwIcon, SearchIcon, XIcon } from "lucide-react";
|
|
43
40
|
import { useTranslations } from "next-intl";
|
|
44
41
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
45
42
|
|
|
@@ -101,12 +98,12 @@ export default function ${names.pascalCase}Selector({
|
|
|
101
98
|
const set${names.pascalCase} = (${names.camelCase}?: ${names.pascalCase}Interface) => {
|
|
102
99
|
if (onChange) onChange(${names.camelCase});
|
|
103
100
|
if (!${names.camelCase}) {
|
|
104
|
-
form.setValue(id, undefined);
|
|
101
|
+
form.setValue(id, undefined, { shouldDirty: true });
|
|
105
102
|
setOpen(false);
|
|
106
103
|
return;
|
|
107
104
|
}
|
|
108
105
|
|
|
109
|
-
form.setValue(id, { id: ${names.camelCase}.id, name: ${names.camelCase}.${displayProp} });
|
|
106
|
+
form.setValue(id, { id: ${names.camelCase}.id, name: ${names.camelCase}.${displayProp} }, { shouldDirty: true });
|
|
110
107
|
setOpen(false);
|
|
111
108
|
|
|
112
109
|
setTimeout(() => {
|
|
@@ -121,55 +118,62 @@ export default function ${names.pascalCase}Selector({
|
|
|
121
118
|
<Popover open={open} onOpenChange={setOpen} modal={true}>
|
|
122
119
|
<div className="flex w-full flex-row items-center justify-between">
|
|
123
120
|
<PopoverTrigger className="w-full">
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
</
|
|
121
|
+
<div className="flex w-full flex-row items-center justify-start rounded-md">
|
|
122
|
+
{field.value ? (
|
|
123
|
+
<div className="bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed">
|
|
124
|
+
<span>{field.value?.name ?? ""}</span>
|
|
125
|
+
</div>
|
|
126
|
+
) : (
|
|
127
|
+
<div className="bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed">
|
|
128
|
+
{placeholder ?? t(\`generic.search.placeholder\`, { type: t(\`entities.${i18nKey}\`, { count: 1 }) })}
|
|
129
|
+
</div>
|
|
130
|
+
)}
|
|
131
|
+
</div>
|
|
135
132
|
</PopoverTrigger>
|
|
136
133
|
{field.value && (
|
|
137
|
-
<
|
|
138
|
-
className="text-muted
|
|
134
|
+
<CircleX
|
|
135
|
+
className="text-muted hover:text-destructive ml-2 h-4 w-4 shrink-0 cursor-pointer"
|
|
139
136
|
onClick={() => set${names.pascalCase}()}
|
|
140
137
|
/>
|
|
141
138
|
)}
|
|
142
139
|
</div>
|
|
143
|
-
<PopoverContent className="w-(--
|
|
140
|
+
<PopoverContent align="start" className="w-(--anchor-width)">
|
|
144
141
|
<Command shouldFilter={false}>
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
<
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
className="hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent cursor-pointer"
|
|
167
|
-
>
|
|
168
|
-
{${names.camelCase}.${displayProp}}
|
|
169
|
-
</CommandItem>
|
|
170
|
-
))}
|
|
171
|
-
</CommandGroup>
|
|
142
|
+
<div className="relative mb-2 w-full">
|
|
143
|
+
<SearchIcon className="text-muted-foreground absolute top-2.5 left-2.5 h-4 w-4" />
|
|
144
|
+
<Input
|
|
145
|
+
placeholder={t(\`generic.search.placeholder\`, { type: t(\`entities.${i18nKey}\`, { count: 1 }) })}
|
|
146
|
+
type="text"
|
|
147
|
+
className="w-full pr-8 pl-8"
|
|
148
|
+
onChange={(e) => setSearchTerm(e.target.value)}
|
|
149
|
+
value={searchTerm}
|
|
150
|
+
/>
|
|
151
|
+
{isSearching ? (
|
|
152
|
+
<RefreshCwIcon className="text-muted-foreground absolute top-2.5 right-2.5 h-4 w-4 animate-spin" />
|
|
153
|
+
) : searchTermRef.current ? (
|
|
154
|
+
<XIcon
|
|
155
|
+
className={\`absolute top-2.5 right-2.5 h-4 w-4 \${searchTermRef.current ? "cursor-pointer" : "text-muted-foreground"}\`}
|
|
156
|
+
onClick={() => {
|
|
157
|
+
setSearchTerm("");
|
|
158
|
+
search("");
|
|
159
|
+
}}
|
|
160
|
+
/>
|
|
161
|
+
) : (
|
|
162
|
+
<></>
|
|
172
163
|
)}
|
|
164
|
+
</div>
|
|
165
|
+
<CommandList>
|
|
166
|
+
{data.data &&
|
|
167
|
+
data.data.length > 0 &&
|
|
168
|
+
(data.data as ${names.pascalCase}Interface[]).map((${names.camelCase}: ${names.pascalCase}Interface) => (
|
|
169
|
+
<CommandItem
|
|
170
|
+
className="cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent"
|
|
171
|
+
key={${names.camelCase}.id}
|
|
172
|
+
onSelect={() => set${names.pascalCase}(${names.camelCase})}
|
|
173
|
+
>
|
|
174
|
+
{${names.camelCase}.${displayProp}}
|
|
175
|
+
</CommandItem>
|
|
176
|
+
))}
|
|
173
177
|
</CommandList>
|
|
174
178
|
</Command>
|
|
175
179
|
</PopoverContent>
|
|
@@ -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
|
}
|