@namiml/web-sdk 1.5.5 → 1.5.7

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.
@@ -1,11 +1,12 @@
1
1
  import { NamiSKU } from "../../types/externals/sku";
2
2
  import { TBaseComponent, TComponent, TContainer, TTestObject } from ".";
3
- import { TImageComponent, TSpacerComponent, TTextComponent, TTextListComponent } from "./elements";
3
+ import { TConditionalComponent, TImageComponent, TSpacerComponent, TTextComponent, TTextListComponent } from "./elements";
4
4
  export type THeaderFooter = (TContainer | TButtonContainer | TSpacerComponent | TTextComponent)[];
5
5
  type Button = TBaseComponent & {
6
6
  id?: string;
7
7
  sku?: NamiSKU;
8
- components: Array<TTextComponent | TTextListComponent | TSpacerComponent | TImageComponent>;
8
+ url?: string;
9
+ components: Array<TTextComponent | TTextListComponent | TSpacerComponent | TImageComponent | TContainer | TConditionalComponent>;
9
10
  screenreaderText?: string;
10
11
  };
11
12
  export type TButtonContainer = Button & {
@@ -17,14 +17,14 @@ export interface TBaseComponent {
17
17
  alignment?: AlignmentType;
18
18
  horizontalAlignment?: AlignmentType;
19
19
  verticalAlignment?: AlignmentType;
20
- leftPadding?: number;
21
- rightPadding?: number;
22
- topPadding?: number;
23
- bottomPadding?: number;
24
- leftMargin?: number;
25
- rightMargin?: number;
26
- topMargin?: number;
27
- bottomMargin?: number;
20
+ leftPadding?: number | string;
21
+ rightPadding?: number | string;
22
+ topPadding?: number | string;
23
+ bottomPadding?: number | string;
24
+ leftMargin?: number | string;
25
+ rightMargin?: number | string;
26
+ topMargin?: number | string;
27
+ bottomMargin?: number | string;
28
28
  fillColor?: string;
29
29
  borderWidth?: number;
30
30
  borderRadius?: number;
@@ -38,6 +38,8 @@ export interface TBaseComponent {
38
38
  focusedBorderRadius?: number;
39
39
  roundBorders?: Array<BorderLocationType>;
40
40
  focusedRoundBorders?: Array<BorderLocationType>;
41
+ fillColorFallback?: string;
42
+ focusedFillColorFallback?: string;
41
43
  zIndex?: number;
42
44
  conditionAttributes?: TConditionalAttributes;
43
45
  height?: number | string;
@@ -84,8 +86,11 @@ type TransformToString<T> = {
84
86
  };
85
87
  export type TConditionalAttributes = Array<Omit<TConditionalComponent, "components"> & {
86
88
  attributes: Partial<TransformToString<TBaseComponent>> & {
89
+ name?: string;
87
90
  text?: string;
91
+ texts?: string[];
88
92
  url?: string;
93
+ fontSize?: number;
89
94
  screenreaderText?: string;
90
95
  };
91
96
  }>;
@@ -95,7 +100,7 @@ export type TContainer = TBaseComponent & {
95
100
  position?: TContainerPosition;
96
101
  fillColor?: string;
97
102
  fillImage?: string | null;
98
- components: TComponent[];
103
+ components?: TComponent[];
99
104
  loopVariable?: string;
100
105
  loopSource?: any[];
101
106
  };
@@ -42,7 +42,7 @@ export type TPaywallContext = TInitialState & {
42
42
  }[];
43
43
  currentGroupId: string;
44
44
  selectedProducts: {
45
- [currentGroupId: string]: string;
45
+ [currentGroupId: string]: string | null;
46
46
  };
47
47
  launch: TPaywallLaunchContext;
48
48
  sku: {
@@ -133,7 +133,7 @@ export type TInitialState = {
133
133
  groups: InitiateStateGroup[];
134
134
  currentGroupId: string;
135
135
  selectedProducts: {
136
- [currentGroupId: string]: string;
136
+ [currentGroupId: string]: string | null;
137
137
  };
138
138
  };
139
139
  export type InitiateStateGroup = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@namiml/web-sdk",
3
3
  "type": "module",
4
- "version": "1.5.5",
4
+ "version": "1.5.7",
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": {