@namiml/web-sdk 1.5.0 → 1.5.2
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/CHANGELOG.md +21 -0
- package/dist/components/ContextProvider.d.ts +2 -1
- package/dist/components/containers/CarouselContainer.d.ts +7 -0
- package/dist/components/containers/Container.d.ts +2 -0
- package/dist/components/containers/Content.d.ts +1 -0
- package/dist/components/containers/ProductContainer.d.ts +0 -1
- package/dist/components/elements/Stack.d.ts +8 -0
- package/dist/components/elements/Video.d.ts +1 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/components/utils/actionTap.d.ts +4 -1
- package/dist/components/utils/helpers.d.ts +3 -1
- package/dist/components/utils/products.d.ts +3 -3
- package/dist/components/utils/state.d.ts +4 -0
- package/dist/components/utils/styles.d.ts +2 -0
- package/dist/nami/api.d.ts +1 -1
- package/dist/nami/index.d.ts +2 -1
- package/dist/nami/namiRefs.d.ts +1 -1
- package/dist/nami-web.cjs +13 -13
- package/dist/nami-web.js +13 -13
- package/dist/nami-web.mjs +13 -13
- package/dist/nami-web.umd.js +14 -14
- package/dist/services/storage.service.d.ts +8 -7
- package/dist/services/video.service.d.ts +4 -1
- package/dist/types/components/containers.d.ts +6 -2
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/config.d.ts +0 -11
- package/dist/types/externals/campaign.d.ts +2 -2
- package/dist/types/externals/config.d.ts +2 -3
- package/dist/types/sku.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Device } from "
|
|
2
|
-
import { IConfig
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { Device } from "../types/device";
|
|
2
|
+
import { IConfig } from "../types/config";
|
|
3
|
+
import { NamiConfiguration } from "../types/externals/config";
|
|
4
|
+
import { IPaywall } from "../types/paywall";
|
|
5
|
+
import { NamiCampaign } from "../types/externals/campaign";
|
|
6
|
+
import { NamiProfile } from "../types/profile";
|
|
6
7
|
import { IEntitlements, NamiEntitlement } from "../types/entitlements";
|
|
7
|
-
import { SKU } from "
|
|
8
|
-
import { CustomerJourneyState } from "
|
|
8
|
+
import { SKU } from "../types/sku";
|
|
9
|
+
import { CustomerJourneyState } from "../types/externals/customer";
|
|
9
10
|
declare class StorageService {
|
|
10
11
|
setDevice(device: Device): void;
|
|
11
12
|
getDevice(): Device | null;
|
|
@@ -8,8 +8,11 @@ export declare class VideoService {
|
|
|
8
8
|
autoplayVideo: boolean;
|
|
9
9
|
videoComponentName: string;
|
|
10
10
|
videoComponentId: string;
|
|
11
|
+
videoSrc: string;
|
|
12
|
+
toggling: boolean;
|
|
11
13
|
static instance: VideoService;
|
|
12
|
-
constructor(video: HTMLVideoElement,
|
|
14
|
+
constructor(video: HTMLVideoElement, name?: string, id?: string);
|
|
15
|
+
handleVideoEvents: () => void;
|
|
13
16
|
togglePlayVideo(): void;
|
|
14
17
|
toggleMuteVideo(): void;
|
|
15
18
|
videoPlayingAction(): NamiPaywallAction.VIDEO_STARTED | NamiPaywallAction.VIDEO_PAUSED | NamiPaywallAction.VIDEO_RESUMED | NamiPaywallAction.VIDEO_ENDED | NamiPaywallAction.UNKNOWN;
|
|
@@ -47,10 +47,14 @@ export type TCarouselContainer = Omit<TContainer, "component"> & {
|
|
|
47
47
|
activeIndicatorColor: string;
|
|
48
48
|
autoplay: boolean;
|
|
49
49
|
autoplaySeconds: number;
|
|
50
|
-
loopSource?:
|
|
50
|
+
loopSource?: TCarouselSlide[] | string;
|
|
51
51
|
loopVariable?: string;
|
|
52
52
|
loopSourceConditions: TTestObject[];
|
|
53
53
|
showIndicators?: boolean;
|
|
54
|
+
inactiveSlideScale?: number;
|
|
55
|
+
nextSlidePadding?: number;
|
|
56
|
+
previousSlidePadding?: number;
|
|
57
|
+
slideSpacing?: number;
|
|
54
58
|
};
|
|
55
59
|
export type TCarouselSlidesState = {
|
|
56
60
|
[groupId: string]: {
|
|
@@ -96,7 +100,7 @@ export type TResponsiveGrid = TBaseComponent & {
|
|
|
96
100
|
component: "responsiveGrid";
|
|
97
101
|
components: any;
|
|
98
102
|
loopVariable?: string;
|
|
99
|
-
loopSource?:
|
|
103
|
+
loopSource?: string;
|
|
100
104
|
loopSourceConditions: TTestObject[];
|
|
101
105
|
};
|
|
102
106
|
export {};
|
|
@@ -85,6 +85,8 @@ type TransformToString<T> = {
|
|
|
85
85
|
export type TConditionalAttributes = Array<Omit<TConditionalComponent, "components"> & {
|
|
86
86
|
attributes: Partial<TransformToString<TBaseComponent>> & {
|
|
87
87
|
text?: string;
|
|
88
|
+
url?: string;
|
|
89
|
+
screenreaderText?: string;
|
|
88
90
|
};
|
|
89
91
|
}>;
|
|
90
92
|
export type TField = "image" | "listContainerComponent" | "text" | "url" | "textArea" | "fontSelect" | "splitTextArea" | "color" | "colorGradient" | "number" | "alignment" | "carouselSlides" | "option" | "iconSelect" | "toggle";
|
package/dist/types/config.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { NamiCampaign } from "../types/externals/campaign";
|
|
2
|
-
import { TDevice } from "./device";
|
|
3
|
-
import { NamiLanguageCodes } from "./externals/languages";
|
|
4
|
-
import { NamiLogLevel } from "./externals/loglevel";
|
|
5
2
|
import { IPaywall } from "./paywall";
|
|
6
3
|
import { PaywallSKU } from "./sku";
|
|
7
4
|
export interface IConfig {
|
|
@@ -9,14 +6,6 @@ export interface IConfig {
|
|
|
9
6
|
capabilities: string[];
|
|
10
7
|
marketplace_app_id?: string | null;
|
|
11
8
|
}
|
|
12
|
-
export type NamiConfiguration = {
|
|
13
|
-
appPlatformID: string;
|
|
14
|
-
logLevel?: NamiLogLevel;
|
|
15
|
-
namiLanguageCode?: NamiLanguageCodes;
|
|
16
|
-
namiCommands?: string[];
|
|
17
|
-
initialConfig?: string | InitialConfig;
|
|
18
|
-
formFactor?: TDevice;
|
|
19
|
-
};
|
|
20
9
|
export type InitialConfig = {
|
|
21
10
|
appConfig?: IConfig;
|
|
22
11
|
platform_config?: IConfig;
|
|
@@ -12,8 +12,8 @@ export interface NamiCampaign {
|
|
|
12
12
|
value?: string | null;
|
|
13
13
|
form_factors: FormFactor[];
|
|
14
14
|
external_segment: string | null;
|
|
15
|
-
conversion_event_type?: CampaignRuleConversionEventType;
|
|
16
|
-
conversion_event_url?: string;
|
|
15
|
+
conversion_event_type?: CampaignRuleConversionEventType | null;
|
|
16
|
+
conversion_event_url?: string | null;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* @enum NamiCampaignRuleType
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IConfig } from "../config";
|
|
2
|
-
import { TDevice } from "../device";
|
|
3
2
|
import { NamiLanguageCodes } from "./languages";
|
|
4
3
|
import { NamiLogLevel } from "./loglevel";
|
|
5
4
|
import { IPaywall } from "../paywall";
|
|
@@ -40,9 +39,9 @@ export type NamiInitialConfig = {
|
|
|
40
39
|
*/
|
|
41
40
|
export type NamiConfiguration = {
|
|
42
41
|
appPlatformID: string;
|
|
43
|
-
logLevel
|
|
42
|
+
logLevel?: NamiLogLevel;
|
|
44
43
|
namiCommands?: string[];
|
|
45
44
|
namiLanguageCode?: NamiLanguageCodes;
|
|
46
45
|
initialConfig?: string | NamiInitialConfig;
|
|
47
|
-
formFactor?:
|
|
46
|
+
formFactor?: string;
|
|
48
47
|
};
|
package/dist/types/sku.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@namiml/web-sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.2",
|
|
5
5
|
"source": "src/nami-web.ts",
|
|
6
6
|
"description": "Nami Web SDK makes subscriptions & in-app purchases easy, with powerful built-in paywalls and A/B testing",
|
|
7
7
|
"scripts": {
|