@namiml/web-sdk 1.7.7 → 1.7.8

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.
@@ -9,6 +9,7 @@ export type TImageComponent = TBaseComponent & {
9
9
  };
10
10
  export type TSegmentPicker = TBaseComponent & {
11
11
  component: "segmentPicker" | "formSegmentPicker";
12
+ formId?: string;
12
13
  components: TSegmentPickerItem[];
13
14
  };
14
15
  export type TSegmentPickerItem = TBaseComponent & {
@@ -24,6 +25,7 @@ export type TSegmentPickerItem = TBaseComponent & {
24
25
  activeFontSize?: number;
25
26
  activeFontColor?: string;
26
27
  activeFontName?: string;
28
+ activeDropShadow?: string;
27
29
  inactiveBorderRadius?: number;
28
30
  inactiveBorderColor?: string;
29
31
  inactiveBorderWidth?: number;
@@ -31,10 +33,13 @@ export type TSegmentPickerItem = TBaseComponent & {
31
33
  inactiveFontSize?: number;
32
34
  inactiveFontName?: string;
33
35
  inactiveFontColor?: string;
36
+ inactiveDropShadow?: string;
34
37
  leftPadding?: number;
35
38
  rightPadding?: number;
36
39
  topPadding?: number;
37
40
  bottomPadding?: number;
41
+ formId?: string;
42
+ checked?: boolean;
38
43
  };
39
44
  export type TSpacerComponent = TBaseComponent & {
40
45
  component: "spacer";
@@ -110,6 +115,24 @@ export type TProgressIndicatorComponent = TBaseComponent & {
110
115
  activeDropShadow?: string;
111
116
  inactiveDropShadow?: string;
112
117
  };
118
+ export type TProgressBarComponent = TBaseComponent & {
119
+ component: "progressBar";
120
+ mode: "determinate" | "indeterminate";
121
+ activeBorderRadius?: number;
122
+ activeFillColor?: string;
123
+ activeFillColorFallback?: string;
124
+ inactiveBorderRadius?: number;
125
+ inactiveFillColor?: string;
126
+ inactiveFillColorFallback?: string;
127
+ percentage?: "auto" | number;
128
+ innerPadding?: number;
129
+ activeDropShadow?: string;
130
+ inactiveDropShadow?: string;
131
+ duration?: "auto" | number;
132
+ delay?: number;
133
+ activeWidth?: number | string;
134
+ screenreaderText?: string;
135
+ };
113
136
  export type TToggleButtonComponent = TBaseComponent & {
114
137
  component: "toggleButton";
115
138
  components: TComponent[];
@@ -130,3 +153,36 @@ export type TToggleButtonComponent = TBaseComponent & {
130
153
  mode?: "radio" | "toggle";
131
154
  value?: string;
132
155
  };
156
+ export type TCountdownTimerTextComponent = TBaseComponent & {
157
+ component: "countdownTimerText";
158
+ mode?: "duration" | "targetDateTime";
159
+ durationSeconds?: number;
160
+ resetOnRemount?: boolean;
161
+ targetDateTime?: string;
162
+ separator?: string;
163
+ zeroPad?: boolean;
164
+ direction?: "horizontal" | "vertical";
165
+ labelPosition?: "none" | "top" | "bottom" | "below" | "above";
166
+ units?: {
167
+ days?: boolean;
168
+ hours?: boolean;
169
+ minutes?: boolean;
170
+ seconds?: boolean;
171
+ };
172
+ labels?: {
173
+ days?: string;
174
+ hours?: string;
175
+ minutes?: string;
176
+ seconds?: string;
177
+ };
178
+ fontSize?: number;
179
+ fontColor?: string;
180
+ fontName?: string;
181
+ labelFontSize?: number;
182
+ labelFontColor?: string;
183
+ labelFontName?: string;
184
+ labelSpacing?: number;
185
+ showWhenCompleted?: "zero" | "hidden";
186
+ screenreaderText?: string;
187
+ screenreaderHint?: string;
188
+ };
@@ -1,6 +1,6 @@
1
1
  import { NamiAnimationSpec } from "./animation";
2
2
  import { TButtonContainer, TCarouselContainer, TCarouselSlide, TCollapseContainer, TFlexProductContainer, TPlayPauseButton, TProductContainer, TRadioButton, TResponsiveGrid, TStack, TToggleSwitch, TVolumeButton, UserAction } from "./containers";
3
- import { TConditionalComponent, TImageComponent, TProgressIndicatorComponent, TQRCodeComponent, TSegmentPicker, TSegmentPickerItem, TSpacerComponent, TSvgImageComponent, TSymbolComponent, TTextComponent, TTextListComponent, TToggleButtonComponent, TVideoComponent } from "./elements";
3
+ import { TConditionalComponent, TCountdownTimerTextComponent, TImageComponent, TProgressIndicatorComponent, TProgressBarComponent, TQRCodeComponent, TSegmentPicker, TSegmentPickerItem, TSpacerComponent, TSvgImageComponent, TSymbolComponent, TTextComponent, TTextListComponent, TToggleButtonComponent, TVideoComponent } from "./elements";
4
4
  export interface TBaseComponent {
5
5
  id?: string;
6
6
  title?: string;
@@ -71,7 +71,7 @@ export interface TBaseComponent {
71
71
  hidden?: boolean;
72
72
  animation?: NamiAnimationSpec;
73
73
  }
74
- export type TComponent = TButtonContainer | TContainer | TTextListComponent | TTextComponent | TSpacerComponent | TImageComponent | TSvgImageComponent | TSymbolComponent | TCarouselContainer | TProductContainer | TFlexProductContainer | TStack | TConditionalComponent | TSegmentPicker | TSegmentPickerItem | TVideoComponent | TCollapseContainer | TResponsiveGrid | TVolumeButton | TPlayPauseButton | TQRCodeComponent | TToggleSwitch | TRadioButton | TProgressIndicatorComponent | TToggleButtonComponent;
74
+ export type TComponent = TButtonContainer | TContainer | TTextListComponent | TTextComponent | TSpacerComponent | TImageComponent | TSvgImageComponent | TSymbolComponent | TCarouselContainer | TProductContainer | TFlexProductContainer | TStack | TConditionalComponent | TSegmentPicker | TSegmentPickerItem | TVideoComponent | TCollapseContainer | TResponsiveGrid | TVolumeButton | TPlayPauseButton | TQRCodeComponent | TToggleSwitch | TRadioButton | TProgressIndicatorComponent | TToggleButtonComponent | TCountdownTimerTextComponent | TProgressBarComponent;
75
75
  export type DirectionType = "vertical" | "horizontal";
76
76
  export type AlignmentType = "center" | "right" | "left" | "top" | "bottom";
77
77
  export type BorderLocationType = "upperLeft" | "upperRight" | "lowerLeft" | "lowerRight";
@@ -11,6 +11,8 @@ export declare const FilterOperator: {
11
11
  readonly NOT_EQUALS: "not_equals";
12
12
  readonly NOT_I_EQUALS: "not_i_equals";
13
13
  readonly NOT_CONTAINS: "not_contains";
14
+ readonly SET: "set";
15
+ readonly NOT_SET: "notSet";
14
16
  };
15
17
  export type FilterOperator = (typeof FilterOperator)[keyof typeof FilterOperator];
16
18
  export interface NamiConditionFilter {
@@ -32,6 +32,7 @@ export declare enum NamiPaywallAction {
32
32
  VIDEO_CHANGED = "VIDEO_CHANGED",
33
33
  VIDEO_MUTED = "VIDEO_MUTED",
34
34
  VIDEO_UNMUTED = "VIDEO_UNMUTED",
35
+ COUNTDOWN_TIMER_COMPLETED = "COUNTDOWN_TIMER_COMPLETED",
35
36
  UNKNOWN = "UNKNOWN"
36
37
  }
37
38
  /**
@@ -84,6 +85,7 @@ export type NamiPaywallLaunchContext = {
84
85
  customObject?: {
85
86
  [key: string]: any;
86
87
  };
88
+ currentGroup?: string;
87
89
  };
88
90
  /**
89
91
  * @type NamiPaywallComponentChange
@@ -23,6 +23,7 @@ export declare enum NamiFlowActionFunction {
23
23
  BLOCK_BACK = "blockBackToStep",
24
24
  FLOW_ENABLED = "flowInteractionEnabled",
25
25
  FLOW_DISABLED = "flowInteractionDisabled",
26
+ SET_TAGS = "setTags",
26
27
  PAUSE = "flowPause",
27
28
  RESUME = "flowResume"
28
29
  }
@@ -97,5 +98,6 @@ export declare const NamiReservedActions: {
97
98
  readonly PURCHASE_FAILURE: "__purchase_failure__";
98
99
  readonly RESUME: "__resume__";
99
100
  readonly REMOTE_BACK: "__remoteback__";
101
+ readonly TAG_UPDATE: "__tag_update__";
100
102
  };
101
103
  export {};
@@ -43,6 +43,9 @@ export type TPaywallContext = TInitialState & {
43
43
  formStates: {
44
44
  [formId: string]: boolean | string;
45
45
  };
46
+ timerStates: {
47
+ [timerId: string]: TimerState;
48
+ };
46
49
  selectedProducts: {
47
50
  [currentGroupId: string]: string | null;
48
51
  };
@@ -55,6 +58,11 @@ export type TPaywallContext = TInitialState & {
55
58
  timeSpentOnPaywall?: number;
56
59
  userInteractionEnabled?: boolean;
57
60
  };
61
+ export type TimerState = {
62
+ remainingSeconds: number;
63
+ savedAt: number;
64
+ hasEmittedCompletion: boolean;
65
+ };
58
66
  export type TPaywallLaunchContext = Required<NamiPaywallLaunchContext>;
59
67
  export type ProductGroup = {
60
68
  id: string;
@@ -1 +1 @@
1
- export declare const NAMI_SDK_VERSION: string, PRODUCTION: string, DEVELOPMENT: string, PLATFORM_ID_REQUIRED: string, DEVICE_ID_REQUIRED: string, EXTERNAL_ID_REQUIRED: string, SDK_NOT_INITIALIZED: string, CAMPAIGN_NOT_AVAILABLE: string, FLOW_SCREENS_NOT_AVAILABLE: string, UNABLE_TO_UPDATE_CDP_ID: string, ANONYMOUS_MODE_ALREADY_ON: string, ANONYMOUS_MODE_ALREADY_OFF: string, ANONYMOUS_MODE_LOGIN_NOT_ALLOWED: string, SESSION_REQUIRED: string, DEVICE_ID_NOT_SET: string, AUTH_DEVICE: string, NAMI_CONFIGURATION: string, NAMI_PROFILE: string, API_CONFIG: string, API_CAMPAIGN_RULES: string, API_PAYWALLS: string, API_PRODUCTS: string, API_ACTIVE_ENTITLEMENTS: string, SERVER_NAMI_ENTITLEMENTS: string, INITIAL_APP_CONFIG: string, INITIAL_CAMPAIGN_RULES: string, INITIAL_PAYWALLS: string, INITIAL_PRODUCTS: string, LOCAL_NAMI_ENTITLEMENTS: string, CUSTOMER_ATTRIBUTES_KEY_PREFIX: string, NAMI_CUSTOMER_JOURNEY_STATE: string, ANONYMOUS_MODE: string, ANONYMOUS_UUID: string, KEY_SESSION_COUNTER: string, INITIAL_SESSION_COUNTER_VALUE: number, NAMI_LAST_IMPRESSION_ID: string, NAMI_PURCHASE_IMPRESSION_ID: string, NAMI_LAUNCH_ID: string, NAMI_SESSION_ID: string, NAMI_LANGUAGE_CODE: string, NAMI_PURCHASE_CHANNEL: string, API_VERSION: any, BASE_URL_PATH: string, BASE_URL: string, BASE_STAGING_URL: string, CUSTOM_HOST_PREFIX: string, USE_STAGING_API: string, EXTENDED_CLIENT_INFO_PREFIX: string, EXTENDED_CLIENT_INFO_DELIMITER: string, VALIDATE_PRODUCT_GROUPS: string, EXTENDED_PLATFORM: string, EXTENDED_PLATFORM_VERSION: string, API_MAX_CALLS_LIMIT: number, API_RETRY_DELAY_SEC: number, API_TIMEOUT_LIMIT: number, DEVICE_API_TIMEOUT_LIMIT: number, STATUS_SUCCESS: number, STATUS_BAD_REQUEST: number, STATUS_NOT_FOUND: number, STATUS_CONFLICT: number, STATUS_INTERNAL_SERVER_ERROR: number, INITIAL_SUCCESS: string, RECONFIG_SUCCESS: string, ALREADY_CONFIGURED: string, AVAILABLE_CAMPAIGNS_CHANGED: string, PAYWALL_ACTION_EVENT: string, AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED: string, CUSTOMER_JOURNEY_STATE_CHANGED: string, SKU_TEXT_REGEX: RegExp, VAR_REGEX: RegExp, HTML_REGEX: RegExp, SMART_TEXT_PATTERN: string;
1
+ export declare const NAMI_SDK_VERSION: string, PRODUCTION: string, DEVELOPMENT: string, PLATFORM_ID_REQUIRED: string, DEVICE_ID_REQUIRED: string, EXTERNAL_ID_REQUIRED: string, SDK_NOT_INITIALIZED: string, CAMPAIGN_NOT_AVAILABLE: string, FLOW_SCREENS_NOT_AVAILABLE: string, UNABLE_TO_UPDATE_CDP_ID: string, ANONYMOUS_MODE_ALREADY_ON: string, ANONYMOUS_MODE_ALREADY_OFF: string, ANONYMOUS_MODE_LOGIN_NOT_ALLOWED: string, SESSION_REQUIRED: string, DEVICE_ID_NOT_SET: string, AUTH_DEVICE: string, NAMI_CONFIGURATION: string, NAMI_PROFILE: string, API_CONFIG: string, API_CAMPAIGN_RULES: string, API_PAYWALLS: string, API_PRODUCTS: string, API_ACTIVE_ENTITLEMENTS: string, SERVER_NAMI_ENTITLEMENTS: string, INITIAL_APP_CONFIG: string, INITIAL_CAMPAIGN_RULES: string, INITIAL_PAYWALLS: string, INITIAL_PRODUCTS: string, LOCAL_NAMI_ENTITLEMENTS: string, CUSTOMER_ATTRIBUTES_KEY_PREFIX: string, NAMI_CUSTOMER_JOURNEY_STATE: string, ANONYMOUS_MODE: string, ANONYMOUS_UUID: string, KEY_SESSION_COUNTER: string, INITIAL_SESSION_COUNTER_VALUE: number, NAMI_LAST_IMPRESSION_ID: string, NAMI_PURCHASE_IMPRESSION_ID: string, NAMI_LAUNCH_ID: string, NAMI_SESSION_ID: string, NAMI_LANGUAGE_CODE: string, NAMI_PURCHASE_CHANNEL: string, API_VERSION: any, BASE_URL_PATH: string, BASE_URL: string, BASE_STAGING_URL: string, CUSTOM_HOST_PREFIX: string, USE_STAGING_API: string, EXTENDED_CLIENT_INFO_PREFIX: string, EXTENDED_CLIENT_INFO_DELIMITER: string, VALIDATE_PRODUCT_GROUPS: string, EXTENDED_PLATFORM: string, EXTENDED_PLATFORM_VERSION: string, API_MAX_CALLS_LIMIT: number, API_RETRY_DELAY_SEC: number, API_TIMEOUT_LIMIT: number, DEVICE_API_TIMEOUT_LIMIT: number, STATUS_SUCCESS: number, STATUS_BAD_REQUEST: number, STATUS_NOT_FOUND: number, STATUS_CONFLICT: number, STATUS_INTERNAL_SERVER_ERROR: number, INITIAL_SUCCESS: string, RECONFIG_SUCCESS: string, ALREADY_CONFIGURED: string, AVAILABLE_CAMPAIGNS_CHANGED: string, PAYWALL_ACTION_EVENT: string, AVAILABLE_ACTIVE_ENTITLEMENTS_CHANGED: string, CUSTOMER_JOURNEY_STATE_CHANGED: string, SKU_TEXT_REGEX: RegExp, VAR_REGEX: RegExp, HTML_REGEX: RegExp, SMART_TEXT_PATTERN: string, LIQUID_VARIABLE_REGEX: RegExp;
@@ -0,0 +1,2 @@
1
+ export declare function attachVizioTtsEventListeners(): void;
2
+ export declare function speak(text: string): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@namiml/web-sdk",
3
3
  "type": "module",
4
- "version": "1.7.7",
4
+ "version": "1.7.8",
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": {