@carlonicora/nextjs-jsonapi 1.34.0 → 1.35.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-TS5AN6W2.js → BlockNoteEditor-3NFHRHR5.js} +13 -13
- package/dist/{BlockNoteEditor-TS5AN6W2.js.map → BlockNoteEditor-3NFHRHR5.js.map} +1 -1
- package/dist/{BlockNoteEditor-DFHJWZZB.mjs → BlockNoteEditor-O2GEMLA5.mjs} +3 -3
- package/dist/BlockNoteEditor-YOAJRPWU.css +29 -0
- package/dist/BlockNoteEditor-YOAJRPWU.css.map +1 -0
- package/dist/billing/index.css +29 -0
- package/dist/billing/index.css.map +1 -0
- package/dist/billing/index.d.mts +1 -1
- package/dist/billing/index.d.ts +1 -1
- package/dist/billing/index.js +374 -358
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +22 -6
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-HWQBSVBT.mjs → chunk-FJUMCH77.mjs} +9 -1
- package/dist/chunk-FJUMCH77.mjs.map +1 -0
- package/dist/{chunk-TZRAOUAR.js → chunk-IZKIM7U5.js} +9 -1
- package/dist/chunk-IZKIM7U5.js.map +1 -0
- package/dist/{chunk-GFRODCD7.mjs → chunk-NJXGCB7Q.mjs} +1111 -922
- package/dist/chunk-NJXGCB7Q.mjs.map +1 -0
- package/dist/{chunk-UPA67DQF.js → chunk-T4UAULVP.js} +741 -552
- package/dist/chunk-T4UAULVP.js.map +1 -0
- package/dist/client/index.css +29 -0
- package/dist/client/index.css.map +1 -0
- package/dist/client/index.js +3 -3
- package/dist/client/index.mjs +2 -2
- package/dist/components/index.css +29 -0
- package/dist/components/index.css.map +1 -0
- package/dist/components/index.d.mts +4 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.js +5 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +4 -2
- package/dist/contexts/index.css +29 -0
- package/dist/contexts/index.css.map +1 -0
- package/dist/contexts/index.d.mts +6 -1
- package/dist/contexts/index.d.ts +6 -1
- package/dist/contexts/index.js +9 -3
- package/dist/contexts/index.js.map +1 -1
- package/dist/contexts/index.mjs +8 -2
- package/dist/core/index.d.mts +4 -2
- package/dist/core/index.d.ts +4 -2
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/onboarding.interface-Djyl9qYu.d.mts +71 -0
- package/dist/onboarding.interface-Djyl9qYu.d.ts +71 -0
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/dist/{stripe-subscription.interface-_VWPY2AA.d.mts → stripe-subscription.interface-C8uhCYIZ.d.mts} +2 -0
- package/dist/{stripe-subscription.interface-Dm__xmvE.d.ts → stripe-subscription.interface-DK7BJaNd.d.ts} +2 -0
- package/package.json +3 -1
- package/src/components/index.ts +1 -0
- package/src/components/navigations/Header.tsx +2 -32
- package/src/contexts/index.ts +1 -0
- package/src/features/billing/stripe-price/components/forms/PriceEditor.tsx +22 -6
- package/src/features/billing/stripe-price/data/stripe-price.interface.ts +2 -0
- package/src/features/billing/stripe-price/data/stripe-price.ts +9 -0
- package/src/features/billing/stripe-subscription/components/widgets/ProductPricingList.tsx +3 -0
- package/src/features/onboarding/components/OnboardingCard.tsx +45 -0
- package/src/features/onboarding/components/index.ts +1 -0
- package/src/features/onboarding/contexts/OnboardingContext.tsx +213 -0
- package/src/features/onboarding/contexts/index.ts +2 -0
- package/src/features/onboarding/index.ts +3 -0
- package/src/features/onboarding/interfaces/index.ts +1 -0
- package/src/features/onboarding/interfaces/onboarding.interface.ts +93 -0
- package/src/features/onboarding/styles/onboarding.css +38 -0
- package/src/features/user/contexts/CurrentUserContext.tsx +16 -7
- package/src/shadcnui/ui/card.tsx +22 -47
- package/dist/chunk-GFRODCD7.mjs.map +0 -1
- package/dist/chunk-HWQBSVBT.mjs.map +0 -1
- package/dist/chunk-TZRAOUAR.js.map +0 -1
- package/dist/chunk-UPA67DQF.js.map +0 -1
- /package/dist/{BlockNoteEditor-DFHJWZZB.mjs.map → BlockNoteEditor-O2GEMLA5.mjs.map} +0 -0
package/dist/core/index.d.ts
CHANGED
|
@@ -18,8 +18,8 @@ import { PartialBlock } from '@blocknote/core';
|
|
|
18
18
|
import { LucideIcon } from 'lucide-react';
|
|
19
19
|
import { ExternalToast } from 'sonner';
|
|
20
20
|
export { A as AuthComponent } from '../AuthComponent-hxOPs9o8.js';
|
|
21
|
-
import { M as MeterInterface, o as MeterSummaryInterface, P as PaymentMethodInterface, S as StripeCustomerInterface, a as StripeInvoiceInterface, j as StripeSubscriptionInterface, I as InvoiceStatus, g as StripeProductInterface, d as StripePriceInterface, h as StripeProductInput, e as PriceRecurring, f as StripePriceInput, i as SubscriptionStatus, k as StripeSubscriptionInput, m as StripeSubscriptionCreateResponse, b as ProrationPreviewInterface, n as StripeUsageInterface, R as ReportUsageInput, U as UsageSummaryInterface } from '../stripe-subscription.interface-
|
|
22
|
-
export { c as ProrationLineItem, l as StripeSubscriptionCreateMeta, p as UsageRecordInterface } from '../stripe-subscription.interface-
|
|
21
|
+
import { M as MeterInterface, o as MeterSummaryInterface, P as PaymentMethodInterface, S as StripeCustomerInterface, a as StripeInvoiceInterface, j as StripeSubscriptionInterface, I as InvoiceStatus, g as StripeProductInterface, d as StripePriceInterface, h as StripeProductInput, e as PriceRecurring, f as StripePriceInput, i as SubscriptionStatus, k as StripeSubscriptionInput, m as StripeSubscriptionCreateResponse, b as ProrationPreviewInterface, n as StripeUsageInterface, R as ReportUsageInput, U as UsageSummaryInterface } from '../stripe-subscription.interface-DK7BJaNd.js';
|
|
22
|
+
export { c as ProrationLineItem, l as StripeSubscriptionCreateMeta, p as UsageRecordInterface } from '../stripe-subscription.interface-DK7BJaNd.js';
|
|
23
23
|
import { M as ModuleInterface, F as FeatureInterface } from '../feature.interface-CIWxo8NP.js';
|
|
24
24
|
import { a as ContentInterface, C as ContentInput } from '../content.interface-CgUu4771.js';
|
|
25
25
|
import { O as OAuthClientInterface, a as OAuthClientInput, b as OAuthClientCreateRequest, c as OAuthClientCreateResponse, d as OAuthConsentRequest, f as OAuthConsentInfo } from '../oauth.interface-vL7za9Bz.js';
|
|
@@ -1005,6 +1005,7 @@ declare class StripePrice extends AbstractApiData implements StripePriceInterfac
|
|
|
1005
1005
|
private _description?;
|
|
1006
1006
|
private _features?;
|
|
1007
1007
|
private _token?;
|
|
1008
|
+
private _isTrial?;
|
|
1008
1009
|
private _priceFeatures;
|
|
1009
1010
|
get stripePriceId(): string;
|
|
1010
1011
|
get productId(): string;
|
|
@@ -1020,6 +1021,7 @@ declare class StripePrice extends AbstractApiData implements StripePriceInterfac
|
|
|
1020
1021
|
get description(): string | undefined;
|
|
1021
1022
|
get features(): string[] | undefined;
|
|
1022
1023
|
get token(): number | undefined;
|
|
1024
|
+
get isTrial(): boolean | undefined;
|
|
1023
1025
|
get priceFeatures(): FeatureInterface[];
|
|
1024
1026
|
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
1025
1027
|
createJsonApi(data: StripePriceInput): any;
|
package/dist/core/index.js
CHANGED
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
|
|
115
|
-
var
|
|
115
|
+
var _chunkIZKIM7U5js = require('../chunk-IZKIM7U5.js');
|
|
116
116
|
require('../chunk-LXKSUWAV.js');
|
|
117
117
|
require('../chunk-IBS6NI7D.js');
|
|
118
118
|
|
|
@@ -251,5 +251,5 @@ require('../chunk-7QVYU63E.js');
|
|
|
251
251
|
|
|
252
252
|
|
|
253
253
|
|
|
254
|
-
exports.AVAILABLE_OAUTH_SCOPES =
|
|
254
|
+
exports.AVAILABLE_OAUTH_SCOPES = _chunkIZKIM7U5js.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunkIZKIM7U5js.AbstractApiData; exports.AbstractService = _chunkIZKIM7U5js.AbstractService; exports.Action = _chunkIZKIM7U5js.Action; exports.Auth = _chunkIZKIM7U5js.Auth; exports.AuthComponent = _chunkIZKIM7U5js.AuthComponent; exports.AuthModule = _chunkIZKIM7U5js.AuthModule; exports.AuthService = _chunkIZKIM7U5js.AuthService; exports.AuthorModule = _chunkIZKIM7U5js.AuthorModule; exports.Billing = _chunkIZKIM7U5js.Billing; exports.BillingModule = _chunkIZKIM7U5js.BillingModule; exports.BillingService = _chunkIZKIM7U5js.BillingService; exports.BlockNoteDiffUtil = _chunkIZKIM7U5js.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunkIZKIM7U5js.BlockNoteWordDiffRendererUtil; exports.ClientAbstractService = _chunkIZKIM7U5js.ClientAbstractService; exports.ClientHttpMethod = _chunkIZKIM7U5js.ClientHttpMethod; exports.Company = _chunkIZKIM7U5js.Company; exports.CompanyFields = _chunkIZKIM7U5js.CompanyFields; exports.CompanyModule = _chunkIZKIM7U5js.CompanyModule; exports.CompanyService = _chunkIZKIM7U5js.CompanyService; exports.Content = _chunkIZKIM7U5js.Content; exports.ContentFields = _chunkIZKIM7U5js.ContentFields; exports.ContentModule = _chunkIZKIM7U5js.ContentModule; exports.ContentService = _chunkIZKIM7U5js.ContentService; exports.DEFAULT_GRANT_TYPES = _chunkIZKIM7U5js.DEFAULT_GRANT_TYPES; exports.DataClass = _chunkFM6WRAN5js.DataClassRegistry; exports.DataClassRegistry = _chunkFM6WRAN5js.DataClassRegistry; exports.EndpointCreator = _chunkIZKIM7U5js.EndpointCreator; exports.Feature = _chunkIZKIM7U5js.Feature; exports.FeatureModule = _chunkIZKIM7U5js.FeatureModule; exports.FeatureService = _chunkIZKIM7U5js.FeatureService; exports.HttpMethod = _chunkIZKIM7U5js.HttpMethod; exports.InvoiceStatus = _chunkIZKIM7U5js.InvoiceStatus; exports.JsonApiDataFactory = _chunkFM6WRAN5js.JsonApiDataFactory; exports.Module = _chunkIZKIM7U5js.Module; exports.ModuleModule = _chunkIZKIM7U5js.ModuleModule; exports.ModuleRegistrar = _chunkIZKIM7U5js.ModuleRegistrar; exports.ModuleRegistry = _chunkIZKIM7U5js.ModuleRegistry; exports.Modules = _chunkIZKIM7U5js.Modules; exports.Notification = _chunkIZKIM7U5js.Notification; exports.NotificationFields = _chunkIZKIM7U5js.NotificationFields; exports.NotificationModule = _chunkIZKIM7U5js.NotificationModule; exports.NotificationService = _chunkIZKIM7U5js.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunkIZKIM7U5js.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunkIZKIM7U5js.OAuthClient; exports.OAuthModule = _chunkIZKIM7U5js.OAuthModule; exports.OAuthService = _chunkIZKIM7U5js.OAuthService; exports.PaymentMethod = _chunkIZKIM7U5js.PaymentMethod; exports.Push = _chunkIZKIM7U5js.Push; exports.PushModule = _chunkIZKIM7U5js.PushModule; exports.PushService = _chunkIZKIM7U5js.PushService; exports.RehydrationFactory = _chunkIZKIM7U5js.RehydrationFactory; exports.Role = _chunkIZKIM7U5js.Role; exports.RoleFields = _chunkIZKIM7U5js.RoleFields; exports.RoleModule = _chunkIZKIM7U5js.RoleModule; exports.RoleService = _chunkIZKIM7U5js.RoleService; exports.S3 = _chunkIZKIM7U5js.S3; exports.S3Module = _chunkIZKIM7U5js.S3Module; exports.S3Service = _chunkIZKIM7U5js.S3Service; exports.StripeCustomer = _chunkIZKIM7U5js.StripeCustomer; exports.StripeCustomerModule = _chunkIZKIM7U5js.StripeCustomerModule; exports.StripeCustomerService = _chunkIZKIM7U5js.StripeCustomerService; exports.StripeInvoice = _chunkIZKIM7U5js.StripeInvoice; exports.StripeInvoiceModule = _chunkIZKIM7U5js.StripeInvoiceModule; exports.StripeInvoiceService = _chunkIZKIM7U5js.StripeInvoiceService; exports.StripePaymentMethodModule = _chunkIZKIM7U5js.StripePaymentMethodModule; exports.StripePrice = _chunkIZKIM7U5js.StripePrice; exports.StripePriceModule = _chunkIZKIM7U5js.StripePriceModule; exports.StripePriceService = _chunkIZKIM7U5js.StripePriceService; exports.StripeProduct = _chunkIZKIM7U5js.StripeProduct; exports.StripeProductModule = _chunkIZKIM7U5js.StripeProductModule; exports.StripeProductService = _chunkIZKIM7U5js.StripeProductService; exports.StripeSubscription = _chunkIZKIM7U5js.StripeSubscription; exports.StripeSubscriptionModule = _chunkIZKIM7U5js.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunkIZKIM7U5js.StripeSubscriptionService; exports.StripeUsage = _chunkIZKIM7U5js.StripeUsage; exports.StripeUsageModule = _chunkIZKIM7U5js.StripeUsageModule; exports.StripeUsageService = _chunkIZKIM7U5js.StripeUsageService; exports.SubscriptionStatus = _chunkIZKIM7U5js.SubscriptionStatus; exports.TableOptions = _chunkIZKIM7U5js.TableOptions; exports.User = _chunkIZKIM7U5js.User; exports.UserFields = _chunkIZKIM7U5js.UserFields; exports.UserModule = _chunkIZKIM7U5js.UserModule; exports.UserService = _chunkIZKIM7U5js.UserService; exports.checkPermissions = _chunkIZKIM7U5js.checkPermissions; exports.checkPermissionsFromServer = _chunkIZKIM7U5js.checkPermissionsFromServer; exports.clearLastApiTotal = _chunkIZKIM7U5js.clearLastApiTotal; exports.cn = _chunkIZKIM7U5js.cn; exports.composeRefs = _chunkIZKIM7U5js.composeRefs; exports.createJsonApiInclusion = _chunkIZKIM7U5js.createJsonApiInclusion; exports.dismissToast = _chunkIZKIM7U5js.dismissToast; exports.entityObjectSchema = _chunkIZKIM7U5js.entityObjectSchema; exports.exists = _chunkIZKIM7U5js.exists; exports.formatDate = _chunkIZKIM7U5js.formatDate; exports.getBootstrapper = _chunkFM6WRAN5js.getBootstrapper; exports.getClientGlobalErrorHandler = _chunkIZKIM7U5js.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunkIZKIM7U5js.getGlobalErrorHandler; exports.getIcon = _chunkIZKIM7U5js.getIcon; exports.getIconByModule = _chunkIZKIM7U5js.getIconByModule; exports.getIconByModuleName = _chunkIZKIM7U5js.getIconByModuleName; exports.getLastApiTotal = _chunkIZKIM7U5js.getLastApiTotal; exports.getLucideIcon = _chunkIZKIM7U5js.getLucideIcon; exports.getLucideIconByModule = _chunkIZKIM7U5js.getLucideIconByModule; exports.getLucideIconByModuleName = _chunkIZKIM7U5js.getLucideIconByModuleName; exports.getTableComponents = _chunkIZKIM7U5js.getTableComponents; exports.getTableOptions = _chunkIZKIM7U5js.getTableOptions; exports.getValueFromPath = _chunkIZKIM7U5js.getValueFromPath; exports.hasBootstrapper = _chunkFM6WRAN5js.hasBootstrapper; exports.rehydrate = _chunkIZKIM7U5js.rehydrate; exports.rehydrateList = _chunkIZKIM7U5js.rehydrateList; exports.resetBootstrapStore = _chunkFM6WRAN5js.resetBootstrapStore; exports.setBootstrapper = _chunkFM6WRAN5js.setBootstrapper; exports.setClientGlobalErrorHandler = _chunkIZKIM7U5js.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunkIZKIM7U5js.setGlobalErrorHandler; exports.showCustomToast = _chunkIZKIM7U5js.showCustomToast; exports.showError = _chunkIZKIM7U5js.showError; exports.showToast = _chunkIZKIM7U5js.showToast; exports.translateData = _chunkFM6WRAN5js.translateData; exports.translateResponse = _chunkFM6WRAN5js.translateResponse; exports.tryBootstrap = _chunkFM6WRAN5js.tryBootstrap; exports.useComposedRefs = _chunkIZKIM7U5js.useComposedRefs; exports.useIsMobile = _chunkIZKIM7U5js.useIsMobile; exports.userObjectSchema = _chunkIZKIM7U5js.userObjectSchema;
|
|
255
255
|
//# sourceMappingURL=index.js.map
|
package/dist/core/index.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ export { C as ContentFields, D as D3Link, a as D3Node, R as RoleFields, U as Use
|
|
|
9
9
|
export { ClassValue } from 'clsx';
|
|
10
10
|
export { A as Action, C as CompanyInput, h as CompanyInterface, c as ModuleDefinition, g as ModuleFactory, b as ModulePermissionDefinition, M as ModuleWithPermissions, i as NotificationInput, N as NotificationInterface, a as PageUrl, P as PermissionCheck, d as PermissionConfig, e as PermissionModule, f as PermissionUser, R as RoleInput, j as RoleInterface, k as UserInput, U as UserInterface } from './notification.interface-DIln2r7X.mjs';
|
|
11
11
|
export { A as AuthComponent } from './AuthComponent-hxOPs9o8.mjs';
|
|
12
|
-
export { I as InvoiceStatus, M as MeterInterface, o as MeterSummaryInterface, P as PaymentMethodInterface, e as PriceRecurring, c as ProrationLineItem, b as ProrationPreviewInterface, R as ReportUsageInput, S as StripeCustomerInterface, a as StripeInvoiceInterface, f as StripePriceInput, d as StripePriceInterface, h as StripeProductInput, g as StripeProductInterface, l as StripeSubscriptionCreateMeta, m as StripeSubscriptionCreateResponse, k as StripeSubscriptionInput, j as StripeSubscriptionInterface, n as StripeUsageInterface, i as SubscriptionStatus, p as UsageRecordInterface, U as UsageSummaryInterface } from './stripe-subscription.interface-
|
|
12
|
+
export { I as InvoiceStatus, M as MeterInterface, o as MeterSummaryInterface, P as PaymentMethodInterface, e as PriceRecurring, c as ProrationLineItem, b as ProrationPreviewInterface, R as ReportUsageInput, S as StripeCustomerInterface, a as StripeInvoiceInterface, f as StripePriceInput, d as StripePriceInterface, h as StripeProductInput, g as StripeProductInterface, l as StripeSubscriptionCreateMeta, m as StripeSubscriptionCreateResponse, k as StripeSubscriptionInput, j as StripeSubscriptionInterface, n as StripeUsageInterface, i as SubscriptionStatus, p as UsageRecordInterface, U as UsageSummaryInterface } from './stripe-subscription.interface-C8uhCYIZ.mjs';
|
|
13
13
|
export { C as ContentInput, a as ContentInterface } from './content.interface-CWV0q4lZ.mjs';
|
|
14
14
|
export { F as FeatureInterface, M as ModuleInterface } from './feature.interface-BxFFOPNq.mjs';
|
|
15
15
|
export { A as AVAILABLE_OAUTH_SCOPES, D as DEFAULT_GRANT_TYPES, g as OAUTH_SCOPE_DISPLAY, b as OAuthClientCreateRequest, c as OAuthClientCreateResponse, a as OAuthClientInput, O as OAuthClientInterface, f as OAuthConsentInfo, d as OAuthConsentRequest, e as OAuthScopeInfo } from './oauth.interface-DsZ5ecSX.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { C as ContentFields, D as D3Link, a as D3Node, R as RoleFields, U as Use
|
|
|
9
9
|
export { ClassValue } from 'clsx';
|
|
10
10
|
export { A as Action, C as CompanyInput, h as CompanyInterface, c as ModuleDefinition, g as ModuleFactory, b as ModulePermissionDefinition, M as ModuleWithPermissions, i as NotificationInput, N as NotificationInterface, a as PageUrl, P as PermissionCheck, d as PermissionConfig, e as PermissionModule, f as PermissionUser, R as RoleInput, j as RoleInterface, k as UserInput, U as UserInterface } from './notification.interface-XARGKJAq.js';
|
|
11
11
|
export { A as AuthComponent } from './AuthComponent-hxOPs9o8.js';
|
|
12
|
-
export { I as InvoiceStatus, M as MeterInterface, o as MeterSummaryInterface, P as PaymentMethodInterface, e as PriceRecurring, c as ProrationLineItem, b as ProrationPreviewInterface, R as ReportUsageInput, S as StripeCustomerInterface, a as StripeInvoiceInterface, f as StripePriceInput, d as StripePriceInterface, h as StripeProductInput, g as StripeProductInterface, l as StripeSubscriptionCreateMeta, m as StripeSubscriptionCreateResponse, k as StripeSubscriptionInput, j as StripeSubscriptionInterface, n as StripeUsageInterface, i as SubscriptionStatus, p as UsageRecordInterface, U as UsageSummaryInterface } from './stripe-subscription.interface-
|
|
12
|
+
export { I as InvoiceStatus, M as MeterInterface, o as MeterSummaryInterface, P as PaymentMethodInterface, e as PriceRecurring, c as ProrationLineItem, b as ProrationPreviewInterface, R as ReportUsageInput, S as StripeCustomerInterface, a as StripeInvoiceInterface, f as StripePriceInput, d as StripePriceInterface, h as StripeProductInput, g as StripeProductInterface, l as StripeSubscriptionCreateMeta, m as StripeSubscriptionCreateResponse, k as StripeSubscriptionInput, j as StripeSubscriptionInterface, n as StripeUsageInterface, i as SubscriptionStatus, p as UsageRecordInterface, U as UsageSummaryInterface } from './stripe-subscription.interface-DK7BJaNd.js';
|
|
13
13
|
export { C as ContentInput, a as ContentInterface } from './content.interface-CgUu4771.js';
|
|
14
14
|
export { F as FeatureInterface, M as ModuleInterface } from './feature.interface-CIWxo8NP.js';
|
|
15
15
|
export { A as AVAILABLE_OAUTH_SCOPES, D as DEFAULT_GRANT_TYPES, g as OAUTH_SCOPE_DISPLAY, b as OAuthClientCreateRequest, c as OAuthClientCreateResponse, a as OAuthClientInput, O as OAuthClientInterface, f as OAuthConsentInfo, d as OAuthConsentRequest, e as OAuthScopeInfo } from './oauth.interface-vL7za9Bz.js';
|
package/dist/index.js
CHANGED
|
@@ -126,7 +126,7 @@ var _chunk2PHWAL6Qjs = require('./chunk-2PHWAL6Q.js');
|
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
var
|
|
129
|
+
var _chunkIZKIM7U5js = require('./chunk-IZKIM7U5.js');
|
|
130
130
|
require('./chunk-LXKSUWAV.js');
|
|
131
131
|
require('./chunk-IBS6NI7D.js');
|
|
132
132
|
|
|
@@ -277,5 +277,5 @@ require('./chunk-7QVYU63E.js');
|
|
|
277
277
|
|
|
278
278
|
|
|
279
279
|
|
|
280
|
-
exports.AVAILABLE_OAUTH_SCOPES =
|
|
280
|
+
exports.AVAILABLE_OAUTH_SCOPES = _chunkIZKIM7U5js.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunkIZKIM7U5js.AbstractApiData; exports.AbstractService = _chunkIZKIM7U5js.AbstractService; exports.Action = _chunkIZKIM7U5js.Action; exports.Auth = _chunkIZKIM7U5js.Auth; exports.AuthComponent = _chunkIZKIM7U5js.AuthComponent; exports.AuthModule = _chunkIZKIM7U5js.AuthModule; exports.AuthService = _chunkIZKIM7U5js.AuthService; exports.AuthorModule = _chunkIZKIM7U5js.AuthorModule; exports.Billing = _chunkIZKIM7U5js.Billing; exports.BillingModule = _chunkIZKIM7U5js.BillingModule; exports.BillingService = _chunkIZKIM7U5js.BillingService; exports.BlockNoteDiffUtil = _chunkIZKIM7U5js.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunkIZKIM7U5js.BlockNoteWordDiffRendererUtil; exports.ClientAbstractService = _chunkIZKIM7U5js.ClientAbstractService; exports.ClientHttpMethod = _chunkIZKIM7U5js.ClientHttpMethod; exports.Company = _chunkIZKIM7U5js.Company; exports.CompanyFields = _chunkIZKIM7U5js.CompanyFields; exports.CompanyModule = _chunkIZKIM7U5js.CompanyModule; exports.CompanyService = _chunkIZKIM7U5js.CompanyService; exports.Content = _chunkIZKIM7U5js.Content; exports.ContentFields = _chunkIZKIM7U5js.ContentFields; exports.ContentModule = _chunkIZKIM7U5js.ContentModule; exports.ContentService = _chunkIZKIM7U5js.ContentService; exports.DEFAULT_GRANT_TYPES = _chunkIZKIM7U5js.DEFAULT_GRANT_TYPES; exports.DataClass = _chunkFM6WRAN5js.DataClassRegistry; exports.DataClassRegistry = _chunkFM6WRAN5js.DataClassRegistry; exports.EndpointCreator = _chunkIZKIM7U5js.EndpointCreator; exports.Feature = _chunkIZKIM7U5js.Feature; exports.FeatureModule = _chunkIZKIM7U5js.FeatureModule; exports.FeatureService = _chunkIZKIM7U5js.FeatureService; exports.HttpMethod = _chunkIZKIM7U5js.HttpMethod; exports.InvoiceStatus = _chunkIZKIM7U5js.InvoiceStatus; exports.JsonApiDataFactory = _chunkFM6WRAN5js.JsonApiDataFactory; exports.Module = _chunkIZKIM7U5js.Module; exports.ModuleModule = _chunkIZKIM7U5js.ModuleModule; exports.ModuleRegistrar = _chunkIZKIM7U5js.ModuleRegistrar; exports.ModuleRegistry = _chunkIZKIM7U5js.ModuleRegistry; exports.Modules = _chunkIZKIM7U5js.Modules; exports.Notification = _chunkIZKIM7U5js.Notification; exports.NotificationFields = _chunkIZKIM7U5js.NotificationFields; exports.NotificationModule = _chunkIZKIM7U5js.NotificationModule; exports.NotificationService = _chunkIZKIM7U5js.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunkIZKIM7U5js.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunkIZKIM7U5js.OAuthClient; exports.OAuthModule = _chunkIZKIM7U5js.OAuthModule; exports.OAuthService = _chunkIZKIM7U5js.OAuthService; exports.PaymentMethod = _chunkIZKIM7U5js.PaymentMethod; exports.Push = _chunkIZKIM7U5js.Push; exports.PushModule = _chunkIZKIM7U5js.PushModule; exports.PushService = _chunkIZKIM7U5js.PushService; exports.RehydrationFactory = _chunkIZKIM7U5js.RehydrationFactory; exports.Role = _chunkIZKIM7U5js.Role; exports.RoleFields = _chunkIZKIM7U5js.RoleFields; exports.RoleModule = _chunkIZKIM7U5js.RoleModule; exports.RoleService = _chunkIZKIM7U5js.RoleService; exports.S3 = _chunkIZKIM7U5js.S3; exports.S3Module = _chunkIZKIM7U5js.S3Module; exports.S3Service = _chunkIZKIM7U5js.S3Service; exports.StripeCustomer = _chunkIZKIM7U5js.StripeCustomer; exports.StripeCustomerModule = _chunkIZKIM7U5js.StripeCustomerModule; exports.StripeCustomerService = _chunkIZKIM7U5js.StripeCustomerService; exports.StripeInvoice = _chunkIZKIM7U5js.StripeInvoice; exports.StripeInvoiceModule = _chunkIZKIM7U5js.StripeInvoiceModule; exports.StripeInvoiceService = _chunkIZKIM7U5js.StripeInvoiceService; exports.StripePaymentMethodModule = _chunkIZKIM7U5js.StripePaymentMethodModule; exports.StripePrice = _chunkIZKIM7U5js.StripePrice; exports.StripePriceModule = _chunkIZKIM7U5js.StripePriceModule; exports.StripePriceService = _chunkIZKIM7U5js.StripePriceService; exports.StripeProduct = _chunkIZKIM7U5js.StripeProduct; exports.StripeProductModule = _chunkIZKIM7U5js.StripeProductModule; exports.StripeProductService = _chunkIZKIM7U5js.StripeProductService; exports.StripeSubscription = _chunkIZKIM7U5js.StripeSubscription; exports.StripeSubscriptionModule = _chunkIZKIM7U5js.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunkIZKIM7U5js.StripeSubscriptionService; exports.StripeUsage = _chunkIZKIM7U5js.StripeUsage; exports.StripeUsageModule = _chunkIZKIM7U5js.StripeUsageModule; exports.StripeUsageService = _chunkIZKIM7U5js.StripeUsageService; exports.SubscriptionStatus = _chunkIZKIM7U5js.SubscriptionStatus; exports.TableOptions = _chunkIZKIM7U5js.TableOptions; exports.User = _chunkIZKIM7U5js.User; exports.UserFields = _chunkIZKIM7U5js.UserFields; exports.UserModule = _chunkIZKIM7U5js.UserModule; exports.UserService = _chunkIZKIM7U5js.UserService; exports.checkPermissions = _chunkIZKIM7U5js.checkPermissions; exports.checkPermissionsFromServer = _chunkIZKIM7U5js.checkPermissionsFromServer; exports.clearLastApiTotal = _chunkIZKIM7U5js.clearLastApiTotal; exports.cn = _chunkIZKIM7U5js.cn; exports.composeRefs = _chunkIZKIM7U5js.composeRefs; exports.configureAuth = _chunkIZKIM7U5js.configureAuth; exports.configureI18n = _chunk2PHWAL6Qjs.configureI18n; exports.configureJsonApi = _chunk2PHWAL6Qjs.configureJsonApi; exports.configureLogin = _chunk2PHWAL6Qjs.configureLogin; exports.configureRoles = _chunk2PHWAL6Qjs.configureRoles; exports.createJsonApiInclusion = _chunkIZKIM7U5js.createJsonApiInclusion; exports.dismissToast = _chunkIZKIM7U5js.dismissToast; exports.entityObjectSchema = _chunkIZKIM7U5js.entityObjectSchema; exports.exists = _chunkIZKIM7U5js.exists; exports.formatDate = _chunkIZKIM7U5js.formatDate; exports.getApiUrl = _chunk2PHWAL6Qjs.getApiUrl; exports.getAppUrl = _chunk2PHWAL6Qjs.getAppUrl; exports.getBootstrapper = _chunkFM6WRAN5js.getBootstrapper; exports.getClientGlobalErrorHandler = _chunkIZKIM7U5js.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunkIZKIM7U5js.getGlobalErrorHandler; exports.getIcon = _chunkIZKIM7U5js.getIcon; exports.getIconByModule = _chunkIZKIM7U5js.getIconByModule; exports.getIconByModuleName = _chunkIZKIM7U5js.getIconByModuleName; exports.getLastApiTotal = _chunkIZKIM7U5js.getLastApiTotal; exports.getLucideIcon = _chunkIZKIM7U5js.getLucideIcon; exports.getLucideIconByModule = _chunkIZKIM7U5js.getLucideIconByModule; exports.getLucideIconByModuleName = _chunkIZKIM7U5js.getLucideIconByModuleName; exports.getRoleId = _chunk2PHWAL6Qjs.getRoleId; exports.getStripePublishableKey = _chunk2PHWAL6Qjs.getStripePublishableKey; exports.getTableComponents = _chunkIZKIM7U5js.getTableComponents; exports.getTableOptions = _chunkIZKIM7U5js.getTableOptions; exports.getTokenHandler = _chunkIZKIM7U5js.getTokenHandler; exports.getTrackablePages = _chunk2PHWAL6Qjs.getTrackablePages; exports.getValueFromPath = _chunkIZKIM7U5js.getValueFromPath; exports.hasBootstrapper = _chunkFM6WRAN5js.hasBootstrapper; exports.isRolesConfigured = _chunk2PHWAL6Qjs.isRolesConfigured; exports.rehydrate = _chunkIZKIM7U5js.rehydrate; exports.rehydrateList = _chunkIZKIM7U5js.rehydrateList; exports.resetBootstrapStore = _chunkFM6WRAN5js.resetBootstrapStore; exports.setBootstrapper = _chunkFM6WRAN5js.setBootstrapper; exports.setClientGlobalErrorHandler = _chunkIZKIM7U5js.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunkIZKIM7U5js.setGlobalErrorHandler; exports.showCustomToast = _chunkIZKIM7U5js.showCustomToast; exports.showError = _chunkIZKIM7U5js.showError; exports.showToast = _chunkIZKIM7U5js.showToast; exports.translateData = _chunkFM6WRAN5js.translateData; exports.translateResponse = _chunkFM6WRAN5js.translateResponse; exports.tryBootstrap = _chunkFM6WRAN5js.tryBootstrap; exports.useComposedRefs = _chunkIZKIM7U5js.useComposedRefs; exports.useIsMobile = _chunkIZKIM7U5js.useIsMobile; exports.userObjectSchema = _chunkIZKIM7U5js.userObjectSchema;
|
|
281
281
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type OnboardingStepSide = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
4
|
+
interface OnboardingStepConfig {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
content: ReactNode;
|
|
8
|
+
selector?: string;
|
|
9
|
+
side?: OnboardingStepSide;
|
|
10
|
+
onShow?: () => void;
|
|
11
|
+
onHide?: () => void;
|
|
12
|
+
action?: {
|
|
13
|
+
label: string;
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
};
|
|
16
|
+
showDelay?: number;
|
|
17
|
+
canClickTarget?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
interface OnboardingTourConfig {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
steps: OnboardingStepConfig[];
|
|
25
|
+
routes?: string[];
|
|
26
|
+
}
|
|
27
|
+
interface OnboardingTourPaths {
|
|
28
|
+
[routePattern: string]: string;
|
|
29
|
+
}
|
|
30
|
+
interface OnboardingLabels {
|
|
31
|
+
next: string;
|
|
32
|
+
previous: string;
|
|
33
|
+
finish: string;
|
|
34
|
+
skip: string;
|
|
35
|
+
close: string;
|
|
36
|
+
stepCounter: (current: number, total: number) => string;
|
|
37
|
+
}
|
|
38
|
+
declare const DEFAULT_ONBOARDING_LABELS: OnboardingLabels;
|
|
39
|
+
interface OnboardingContextValue {
|
|
40
|
+
startTour: (tourId: string, steps?: OnboardingStepConfig[]) => void;
|
|
41
|
+
closeTour: () => void;
|
|
42
|
+
nextStep: () => void;
|
|
43
|
+
previousStep: () => void;
|
|
44
|
+
goToStep: (index: number) => void;
|
|
45
|
+
isTourActive: boolean;
|
|
46
|
+
activeTourId: string | null;
|
|
47
|
+
currentStepIndex: number;
|
|
48
|
+
totalSteps: number;
|
|
49
|
+
}
|
|
50
|
+
interface OnboardingProviderProps {
|
|
51
|
+
children: React.ReactNode;
|
|
52
|
+
tours?: OnboardingTourConfig[];
|
|
53
|
+
tourPaths?: OnboardingTourPaths;
|
|
54
|
+
labels?: OnboardingLabels;
|
|
55
|
+
renderCard?: (props: OnboardingCardRenderProps) => ReactNode;
|
|
56
|
+
zIndex?: number;
|
|
57
|
+
}
|
|
58
|
+
interface OnboardingCardRenderProps {
|
|
59
|
+
step: OnboardingStepConfig;
|
|
60
|
+
currentIndex: number;
|
|
61
|
+
totalSteps: number;
|
|
62
|
+
labels: OnboardingLabels;
|
|
63
|
+
onNext: () => void;
|
|
64
|
+
onPrevious: () => void;
|
|
65
|
+
onClose: () => void;
|
|
66
|
+
onSkip: () => void;
|
|
67
|
+
isFirst: boolean;
|
|
68
|
+
isLast: boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { DEFAULT_ONBOARDING_LABELS as D, type OnboardingProviderProps as O, type OnboardingContextValue as a, type OnboardingStepSide as b, type OnboardingStepConfig as c, type OnboardingTourConfig as d, type OnboardingTourPaths as e, type OnboardingLabels as f, type OnboardingCardRenderProps as g };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type OnboardingStepSide = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
|
|
4
|
+
interface OnboardingStepConfig {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
content: ReactNode;
|
|
8
|
+
selector?: string;
|
|
9
|
+
side?: OnboardingStepSide;
|
|
10
|
+
onShow?: () => void;
|
|
11
|
+
onHide?: () => void;
|
|
12
|
+
action?: {
|
|
13
|
+
label: string;
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
};
|
|
16
|
+
showDelay?: number;
|
|
17
|
+
canClickTarget?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
interface OnboardingTourConfig {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
steps: OnboardingStepConfig[];
|
|
25
|
+
routes?: string[];
|
|
26
|
+
}
|
|
27
|
+
interface OnboardingTourPaths {
|
|
28
|
+
[routePattern: string]: string;
|
|
29
|
+
}
|
|
30
|
+
interface OnboardingLabels {
|
|
31
|
+
next: string;
|
|
32
|
+
previous: string;
|
|
33
|
+
finish: string;
|
|
34
|
+
skip: string;
|
|
35
|
+
close: string;
|
|
36
|
+
stepCounter: (current: number, total: number) => string;
|
|
37
|
+
}
|
|
38
|
+
declare const DEFAULT_ONBOARDING_LABELS: OnboardingLabels;
|
|
39
|
+
interface OnboardingContextValue {
|
|
40
|
+
startTour: (tourId: string, steps?: OnboardingStepConfig[]) => void;
|
|
41
|
+
closeTour: () => void;
|
|
42
|
+
nextStep: () => void;
|
|
43
|
+
previousStep: () => void;
|
|
44
|
+
goToStep: (index: number) => void;
|
|
45
|
+
isTourActive: boolean;
|
|
46
|
+
activeTourId: string | null;
|
|
47
|
+
currentStepIndex: number;
|
|
48
|
+
totalSteps: number;
|
|
49
|
+
}
|
|
50
|
+
interface OnboardingProviderProps {
|
|
51
|
+
children: React.ReactNode;
|
|
52
|
+
tours?: OnboardingTourConfig[];
|
|
53
|
+
tourPaths?: OnboardingTourPaths;
|
|
54
|
+
labels?: OnboardingLabels;
|
|
55
|
+
renderCard?: (props: OnboardingCardRenderProps) => ReactNode;
|
|
56
|
+
zIndex?: number;
|
|
57
|
+
}
|
|
58
|
+
interface OnboardingCardRenderProps {
|
|
59
|
+
step: OnboardingStepConfig;
|
|
60
|
+
currentIndex: number;
|
|
61
|
+
totalSteps: number;
|
|
62
|
+
labels: OnboardingLabels;
|
|
63
|
+
onNext: () => void;
|
|
64
|
+
onPrevious: () => void;
|
|
65
|
+
onClose: () => void;
|
|
66
|
+
onSkip: () => void;
|
|
67
|
+
isFirst: boolean;
|
|
68
|
+
isLast: boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { DEFAULT_ONBOARDING_LABELS as D, type OnboardingProviderProps as O, type OnboardingContextValue as a, type OnboardingStepSide as b, type OnboardingStepConfig as c, type OnboardingTourConfig as d, type OnboardingTourPaths as e, type OnboardingLabels as f, type OnboardingCardRenderProps as g };
|
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 _chunkIZKIM7U5js = require('../chunk-IZKIM7U5.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 _chunkIZKIM7U5js.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 = _chunkIZKIM7U5js.AuthService; exports.ServerCompanyService = _chunkIZKIM7U5js.CompanyService; exports.ServerContentService = _chunkIZKIM7U5js.ContentService; exports.ServerFeatureService = _chunkIZKIM7U5js.FeatureService; exports.ServerJsonApiDelete = ServerJsonApiDelete; exports.ServerJsonApiGet = ServerJsonApiGet; exports.ServerJsonApiPatch = ServerJsonApiPatch; exports.ServerJsonApiPost = ServerJsonApiPost; exports.ServerJsonApiPut = ServerJsonApiPut; exports.ServerNotificationService = _chunkIZKIM7U5js.NotificationService; exports.ServerPushService = _chunkIZKIM7U5js.PushService; exports.ServerRoleService = _chunkIZKIM7U5js.RoleService; exports.ServerS3Service = _chunkIZKIM7U5js.S3Service; exports.ServerSession = ServerSession; exports.ServerUserService = _chunkIZKIM7U5js.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
|
@@ -152,6 +152,7 @@ interface StripePriceInterface extends ApiDataInterface {
|
|
|
152
152
|
get description(): string | undefined;
|
|
153
153
|
get features(): string[] | undefined;
|
|
154
154
|
get token(): number | undefined;
|
|
155
|
+
get isTrial(): boolean | undefined;
|
|
155
156
|
get priceFeatures(): FeatureInterface[];
|
|
156
157
|
}
|
|
157
158
|
interface PriceRecurring {
|
|
@@ -174,6 +175,7 @@ type StripePriceInput = {
|
|
|
174
175
|
description?: string;
|
|
175
176
|
features?: string[];
|
|
176
177
|
token?: number;
|
|
178
|
+
isTrial?: boolean;
|
|
177
179
|
featureIds?: string[];
|
|
178
180
|
};
|
|
179
181
|
|
|
@@ -152,6 +152,7 @@ interface StripePriceInterface extends ApiDataInterface {
|
|
|
152
152
|
get description(): string | undefined;
|
|
153
153
|
get features(): string[] | undefined;
|
|
154
154
|
get token(): number | undefined;
|
|
155
|
+
get isTrial(): boolean | undefined;
|
|
155
156
|
get priceFeatures(): FeatureInterface[];
|
|
156
157
|
}
|
|
157
158
|
interface PriceRecurring {
|
|
@@ -174,6 +175,7 @@ type StripePriceInput = {
|
|
|
174
175
|
description?: string;
|
|
175
176
|
features?: string[];
|
|
176
177
|
token?: number;
|
|
178
|
+
isTrial?: boolean;
|
|
177
179
|
featureIds?: string[];
|
|
178
180
|
};
|
|
179
181
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carlonicora/nextjs-jsonapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.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",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"import": "./dist/contexts/index.mjs",
|
|
43
43
|
"require": "./dist/contexts/index.js"
|
|
44
44
|
},
|
|
45
|
+
"./contexts/styles.css": "./dist/contexts/index.css",
|
|
45
46
|
"./testing": {
|
|
46
47
|
"types": "./dist/testing/index.d.ts",
|
|
47
48
|
"import": "./dist/testing/index.mjs",
|
|
@@ -132,6 +133,7 @@
|
|
|
132
133
|
"recharts": "^3.6.0",
|
|
133
134
|
"remark-gfm": "^4.0.1",
|
|
134
135
|
"shadcn": "^3.6.3",
|
|
136
|
+
"shepherd.js": "^14.5.1",
|
|
135
137
|
"socket.io-client": "^4.8.3",
|
|
136
138
|
"sonner": "^2.0.7",
|
|
137
139
|
"tailwind-merge": "^3.4.0",
|
package/src/components/index.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from "../features/company/components";
|
|
|
15
15
|
export * from "../features/content/components";
|
|
16
16
|
export * from "../features/feature/components";
|
|
17
17
|
export * from "../features/notification/components";
|
|
18
|
+
export * from "../features/onboarding/components";
|
|
18
19
|
export * from "../features/role/components";
|
|
19
20
|
export * from "../features/user/components";
|
|
20
21
|
export * from "../features/oauth/components";
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { getRoleId } from "@/roles";
|
|
4
|
-
import { RefreshCwIcon } from "lucide-react";
|
|
5
|
-
import { useTranslations } from "next-intl";
|
|
6
3
|
import { useSharedContext } from "../../contexts/SharedContext";
|
|
7
|
-
import {
|
|
8
|
-
import { useCurrentUserContext } from "../../features/user/contexts";
|
|
9
|
-
import { Button, SidebarTrigger, Tooltip, TooltipContent, TooltipTrigger } from "../../shadcnui";
|
|
4
|
+
import { SidebarTrigger } from "../../shadcnui";
|
|
10
5
|
import { BreadcrumbNavigation } from "./Breadcrumb";
|
|
11
6
|
|
|
12
7
|
type HeaderProps = {
|
|
@@ -14,42 +9,17 @@ type HeaderProps = {
|
|
|
14
9
|
};
|
|
15
10
|
|
|
16
11
|
export function Header({ children }: HeaderProps) {
|
|
17
|
-
const t = useTranslations();
|
|
18
12
|
const { breadcrumbs } = useSharedContext();
|
|
19
|
-
const { company, hasRole, refreshUser, isRefreshing } = useCurrentUserContext();
|
|
20
|
-
const showTokenStatus = !hasRole(getRoleId().Administrator) && company;
|
|
21
13
|
|
|
22
14
|
return (
|
|
23
15
|
<header className={`sticky top-0 z-10 flex h-12 flex-col items-center justify-start gap-x-4 border-b`}>
|
|
24
16
|
<div className="bg-sidebar flex h-12 w-full flex-row items-center justify-between pl-2 pr-4">
|
|
25
|
-
<SidebarTrigger aria-label="Toggle sidebar" />
|
|
17
|
+
<SidebarTrigger aria-label="Toggle sidebar" id="sidebar-trigger" />
|
|
26
18
|
<div className="flex w-full flex-row items-center justify-start">
|
|
27
19
|
<BreadcrumbNavigation items={breadcrumbs} />
|
|
28
20
|
</div>
|
|
29
21
|
<div className="flex w-64 flex-row items-center justify-end gap-x-4 whitespace-nowrap">
|
|
30
22
|
<div className="flex flex-row items-center justify-end gap-x-4 whitespace-nowrap">
|
|
31
|
-
{showTokenStatus && (
|
|
32
|
-
<div className="flex items-center gap-x-2">
|
|
33
|
-
<TokenStatusIndicator size="sm" showExtraPages={true} />
|
|
34
|
-
<Tooltip>
|
|
35
|
-
<TooltipTrigger
|
|
36
|
-
render={
|
|
37
|
-
<Button
|
|
38
|
-
variant="ghost"
|
|
39
|
-
size="icon"
|
|
40
|
-
className="h-6 w-6"
|
|
41
|
-
onClick={() => refreshUser()}
|
|
42
|
-
disabled={isRefreshing}
|
|
43
|
-
aria-label={t("common.refresh", { defaultValue: "Refresh" })}
|
|
44
|
-
/>
|
|
45
|
-
}
|
|
46
|
-
>
|
|
47
|
-
<RefreshCwIcon className={`h-3.5 w-3.5 ${isRefreshing ? "animate-spin" : ""}`} />
|
|
48
|
-
</TooltipTrigger>
|
|
49
|
-
<TooltipContent side="bottom">{t("common.refresh", { defaultValue: "Refresh" })}</TooltipContent>
|
|
50
|
-
</Tooltip>
|
|
51
|
-
</div>
|
|
52
|
-
)}
|
|
53
23
|
{children ? children : null}
|
|
54
24
|
</div>
|
|
55
25
|
</div>
|
package/src/contexts/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "../features/company/contexts/CompanyContext";
|
|
2
2
|
export * from "../features/notification/contexts/NotificationContext";
|
|
3
|
+
export * from "../features/onboarding/contexts";
|
|
3
4
|
export * from "../features/role/contexts/RoleContext";
|
|
4
5
|
export * from "../features/user/contexts";
|
|
5
6
|
export * from "./CommonContext";
|
|
@@ -38,6 +38,7 @@ type PriceFormValues = {
|
|
|
38
38
|
usageType?: "licensed" | "metered";
|
|
39
39
|
nickname?: string;
|
|
40
40
|
active: boolean;
|
|
41
|
+
isTrial: boolean;
|
|
41
42
|
description?: string;
|
|
42
43
|
features: string[];
|
|
43
44
|
token: string;
|
|
@@ -75,6 +76,7 @@ export function PriceEditor({ productId, price, open, onOpenChange, onSuccess }:
|
|
|
75
76
|
usageType: z.enum(["licensed", "metered"]).optional(),
|
|
76
77
|
nickname: z.string().optional(),
|
|
77
78
|
active: z.boolean(),
|
|
79
|
+
isTrial: z.boolean(),
|
|
78
80
|
description: z.string().optional(),
|
|
79
81
|
features: z.array(z.string()),
|
|
80
82
|
token: z.string(),
|
|
@@ -102,6 +104,7 @@ export function PriceEditor({ productId, price, open, onOpenChange, onSuccess }:
|
|
|
102
104
|
usageType: price?.recurring?.usageType || "licensed",
|
|
103
105
|
nickname: price?.nickname || "",
|
|
104
106
|
active: price?.active ?? true,
|
|
107
|
+
isTrial: price?.isTrial ?? false,
|
|
105
108
|
description: price?.description || "",
|
|
106
109
|
features: price?.features || [],
|
|
107
110
|
token: price?.token?.toString() ?? "",
|
|
@@ -126,6 +129,7 @@ export function PriceEditor({ productId, price, open, onOpenChange, onSuccess }:
|
|
|
126
129
|
usageType: price?.recurring?.usageType || "licensed",
|
|
127
130
|
nickname: price?.nickname || "",
|
|
128
131
|
active: price?.active ?? true,
|
|
132
|
+
isTrial: price?.isTrial ?? false,
|
|
129
133
|
description: price?.description || "",
|
|
130
134
|
features: price?.features || [],
|
|
131
135
|
token: price?.token?.toString() ?? "",
|
|
@@ -145,15 +149,15 @@ export function PriceEditor({ productId, price, open, onOpenChange, onSuccess }:
|
|
|
145
149
|
const unitAmountInCents = Math.round(values.unitAmount * 100);
|
|
146
150
|
|
|
147
151
|
if (isEditMode) {
|
|
148
|
-
// Update existing price (nickname, description, features, token can be updated - Stripe fields are limited)
|
|
152
|
+
// Update existing price (nickname, description, features, token, isTrial can be updated - Stripe fields are limited)
|
|
149
153
|
await StripePriceService.updatePrice({
|
|
150
154
|
id: price.id,
|
|
151
155
|
nickname: values.nickname || undefined,
|
|
152
156
|
description: values.description || undefined,
|
|
153
157
|
features: values.features.filter((f) => f.trim()) || undefined,
|
|
154
158
|
token: values.token ? parseInt(values.token, 10) : undefined,
|
|
155
|
-
// Only include featureIds for recurring prices
|
|
156
|
-
...(price?.priceType === "recurring" ? { featureIds: values.featureIds } : {}),
|
|
159
|
+
// Only include isTrial and featureIds for recurring prices
|
|
160
|
+
...(price?.priceType === "recurring" ? { isTrial: values.isTrial, featureIds: values.featureIds } : {}),
|
|
157
161
|
});
|
|
158
162
|
} else {
|
|
159
163
|
// Create new price
|
|
@@ -190,9 +194,12 @@ export function PriceEditor({ productId, price, open, onOpenChange, onSuccess }:
|
|
|
190
194
|
createInput.token = parseInt(values.token, 10);
|
|
191
195
|
}
|
|
192
196
|
|
|
193
|
-
// Add platform feature IDs only for recurring prices (Neo4j only, not sent to Stripe)
|
|
194
|
-
if (isRecurring
|
|
195
|
-
createInput.
|
|
197
|
+
// Add isTrial and platform feature IDs only for recurring prices (Neo4j only, not sent to Stripe)
|
|
198
|
+
if (isRecurring) {
|
|
199
|
+
createInput.isTrial = values.isTrial;
|
|
200
|
+
if (values.featureIds.length > 0) {
|
|
201
|
+
createInput.featureIds = values.featureIds;
|
|
202
|
+
}
|
|
196
203
|
}
|
|
197
204
|
|
|
198
205
|
await StripePriceService.createPrice(createInput);
|
|
@@ -403,6 +410,15 @@ export function PriceEditor({ productId, price, open, onOpenChange, onSuccess }:
|
|
|
403
410
|
|
|
404
411
|
<FormCheckbox form={form} id="active" name="Active" />
|
|
405
412
|
|
|
413
|
+
{isRecurring && (
|
|
414
|
+
<FormCheckbox
|
|
415
|
+
form={form}
|
|
416
|
+
id="isTrial"
|
|
417
|
+
name="Trial Price"
|
|
418
|
+
description="Mark this as the trial subscription plan (only one price should be marked as trial)"
|
|
419
|
+
/>
|
|
420
|
+
)}
|
|
421
|
+
|
|
406
422
|
<CommonEditorButtons isEdit={isEditMode} form={form} disabled={isSubmitting} setOpen={onOpenChange} />
|
|
407
423
|
</form>
|
|
408
424
|
</Form>
|
|
@@ -21,6 +21,7 @@ export interface StripePriceInterface extends ApiDataInterface {
|
|
|
21
21
|
get description(): string | undefined;
|
|
22
22
|
get features(): string[] | undefined;
|
|
23
23
|
get token(): number | undefined;
|
|
24
|
+
get isTrial(): boolean | undefined;
|
|
24
25
|
get priceFeatures(): FeatureInterface[]; // Platform Feature entities linked to this price
|
|
25
26
|
}
|
|
26
27
|
|
|
@@ -49,5 +50,6 @@ export type StripePriceInput = {
|
|
|
49
50
|
description?: string;
|
|
50
51
|
features?: string[];
|
|
51
52
|
token?: number;
|
|
53
|
+
isTrial?: boolean;
|
|
52
54
|
featureIds?: string[]; // Feature entity IDs to link (Neo4j only, NOT sent to Stripe)
|
|
53
55
|
};
|
|
@@ -18,6 +18,7 @@ export class StripePrice extends AbstractApiData implements StripePriceInterface
|
|
|
18
18
|
private _description?: string;
|
|
19
19
|
private _features?: string[];
|
|
20
20
|
private _token?: number;
|
|
21
|
+
private _isTrial?: boolean;
|
|
21
22
|
private _priceFeatures: FeatureInterface[] = []; // Platform Feature entities
|
|
22
23
|
|
|
23
24
|
get stripePriceId(): string {
|
|
@@ -80,6 +81,10 @@ export class StripePrice extends AbstractApiData implements StripePriceInterface
|
|
|
80
81
|
return this._token;
|
|
81
82
|
}
|
|
82
83
|
|
|
84
|
+
get isTrial(): boolean | undefined {
|
|
85
|
+
return this._isTrial;
|
|
86
|
+
}
|
|
87
|
+
|
|
83
88
|
get priceFeatures(): FeatureInterface[] {
|
|
84
89
|
return this._priceFeatures;
|
|
85
90
|
}
|
|
@@ -120,6 +125,7 @@ export class StripePrice extends AbstractApiData implements StripePriceInterface
|
|
|
120
125
|
: undefined;
|
|
121
126
|
|
|
122
127
|
this._token = data.jsonApi.attributes.token;
|
|
128
|
+
this._isTrial = data.jsonApi.attributes.isTrial;
|
|
123
129
|
|
|
124
130
|
// Hydrate product relationship
|
|
125
131
|
this._product = this._readIncluded(data, "product", Modules.StripeProduct) as StripeProductInterface;
|
|
@@ -169,6 +175,9 @@ export class StripePrice extends AbstractApiData implements StripePriceInterface
|
|
|
169
175
|
if ("token" in data && data.token !== undefined) {
|
|
170
176
|
response.data.attributes.token = data.token;
|
|
171
177
|
}
|
|
178
|
+
if ("isTrial" in data && data.isTrial !== undefined) {
|
|
179
|
+
response.data.attributes.isTrial = data.isTrial;
|
|
180
|
+
}
|
|
172
181
|
|
|
173
182
|
// Convert featureIds to JSON:API relationships format
|
|
174
183
|
if (data.featureIds && data.featureIds.length > 0) {
|