@namiml/web-sdk 3.3.9-dev.202603120528 → 3.3.9-dev.202603120556
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/components/utils/products.d.ts +8 -1
- package/dist/nami/flow/NamiFlow.d.ts +9 -0
- package/dist/nami/flow/NamiFlowManager.d.ts +1 -0
- package/dist/nami-web.cjs +22 -22
- package/dist/nami-web.mjs +22 -22
- package/dist/nami-web.umd.js +30 -30
- package/dist/translations/translate.d.ts +6 -0
- package/dist/types/components/containers.d.ts +1 -0
- package/dist/types/flow.d.ts +3 -0
- package/package.json +2 -1
|
@@ -7,7 +7,14 @@ export declare function getFreeTrialPeriod(product: NamiProductDetails): string
|
|
|
7
7
|
export declare function getFreeTrialOffer(product: NamiProductDetails): NamiProductOffer | undefined;
|
|
8
8
|
export declare function extractStandardPricingPhases(product: NamiProductDetails): PricingPhase[];
|
|
9
9
|
export declare function convertOfferToPricingPhase(offer: NamiProductOffer | null, subPeriod?: NamiSubscriptionPeriod): PricingPhase;
|
|
10
|
-
export declare function convertISO8601PeriodToText(iso8601Period: string | null, singular?: boolean, justPeriod?: boolean, justNumber?: boolean): string | null;
|
|
10
|
+
export declare function convertISO8601PeriodToText(iso8601Period: string | null, singular?: boolean, justPeriod?: boolean, justNumber?: boolean, useAbbrev?: boolean): string | null;
|
|
11
|
+
/** True if the billing period is month- or year-based (e.g. P1M, P12M, P1Y). Used to return n/a for durationInMonths when period is days/weeks. */
|
|
12
|
+
export declare function isMonthOrYearBillingPeriod(period: string | null): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the localized frequency adverb for a period (e.g. "weekly", "monthly", "bi-annually", "yearly").
|
|
15
|
+
* Returns null for day-based periods (n/a). Uses nami_weekly, nami_monthly, nami_biannually, nami_yearly, etc.
|
|
16
|
+
*/
|
|
17
|
+
export declare function convertISO8601PeriodToPeriodly(iso8601Period: string | null): string | null;
|
|
11
18
|
export declare function getCurrencyFormat(priceCurrencyCode: string): Intl.NumberFormat;
|
|
12
19
|
export declare const getPriceDifference: (currentSkuPricePerMonth?: number, referencedSkuPricePerMonth?: number, currencyFormat?: Intl.NumberFormat) => string | null;
|
|
13
20
|
export declare const getPercentagePriceDifference: (currentSkuPrice?: number, currentSkuDurationInMonths?: number, referencedSkuPrice?: number, referencedSkuPeriodInMonths?: number) => string | null;
|
|
@@ -4,6 +4,7 @@ import type { NamiPaywallLaunchContext } from '../../types/externals/paywall';
|
|
|
4
4
|
import type { PaywallComponent } from "../../components/Paywall";
|
|
5
5
|
import type { NamiFlowManager } from "./NamiFlowManager";
|
|
6
6
|
import type { NamiButton } from "../../components";
|
|
7
|
+
import { type TPaywallContext } from "../../types/paywall";
|
|
7
8
|
import { TimerState } from "../../types/paywall";
|
|
8
9
|
export declare class BasicNamiFlow implements NamiFlowObjectDTO {
|
|
9
10
|
id: string;
|
|
@@ -30,6 +31,11 @@ export declare class NamiFlow extends BasicNamiFlow {
|
|
|
30
31
|
component: PaywallComponent;
|
|
31
32
|
manager: NamiFlowManager;
|
|
32
33
|
currentButton?: NamiButton;
|
|
34
|
+
activeHandoffSequence: {
|
|
35
|
+
formStates: Record<string, boolean | string>;
|
|
36
|
+
remainingKeys: string[];
|
|
37
|
+
} | null;
|
|
38
|
+
currentScreenState: TPaywallContext | null;
|
|
33
39
|
isPaused: boolean;
|
|
34
40
|
pausedStepID?: string;
|
|
35
41
|
timerStates: {
|
|
@@ -64,4 +70,7 @@ export declare class NamiFlow extends BasicNamiFlow {
|
|
|
64
70
|
private nextStep;
|
|
65
71
|
private handleScreenStep;
|
|
66
72
|
private handleBranchStep;
|
|
73
|
+
getFormData(): Record<string, boolean | string>;
|
|
74
|
+
flowHandoffFormSequence(): void;
|
|
75
|
+
resumeNextHandoff(): void;
|
|
67
76
|
}
|
|
@@ -16,6 +16,7 @@ export declare class NamiFlowManager {
|
|
|
16
16
|
eventHandler?: NamiFlowEventHandler;
|
|
17
17
|
static registerEventHandler(eventHandler: NamiFlowEventHandler): void;
|
|
18
18
|
static resume(): void;
|
|
19
|
+
resume(): void;
|
|
19
20
|
static finish(): void;
|
|
20
21
|
static pause(): void;
|
|
21
22
|
static isFlowOpen(): boolean;
|