@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.2 (October 24, 2024)
|
|
4
|
+
|
|
5
|
+
## Bugfixes
|
|
6
|
+
- Fix an issue where the wrong campaign rule was being used for a given placement label
|
|
7
|
+
- Fix issue where the wrong initial config campaign rule was being used
|
|
8
|
+
- Fix an issue where background video on mobile goes into full screen player
|
|
9
|
+
- Fix an issue with focus events on connected TV platforms
|
|
10
|
+
- Fix an issue with login / logout state handling
|
|
11
|
+
- Fix an issue with free trial and promotional offer display
|
|
12
|
+
- Fix several UI issues with carousel and stack components
|
|
13
|
+
|
|
14
|
+
## 1.5.1 (October 2, 2024)
|
|
15
|
+
|
|
16
|
+
## Enhancements
|
|
17
|
+
- Add `TOGGLE_CHANGE` and `PAGE_CHANGE` paywall events
|
|
18
|
+
|
|
19
|
+
## Bugfixes
|
|
20
|
+
- Fix carousel component swiper
|
|
21
|
+
- Fix flex alignment
|
|
22
|
+
- Fix hero video not redenering correctly in Safari
|
|
23
|
+
|
|
3
24
|
## 1.5.0 (September 26, 2024)
|
|
4
25
|
|
|
5
26
|
## New Features
|
|
@@ -19,8 +19,9 @@ declare class ContextProvider implements ReactiveController {
|
|
|
19
19
|
private setState;
|
|
20
20
|
setProductDetails(details: NamiProductDetails[]): void;
|
|
21
21
|
getProductDetails(): NamiProductDetails[];
|
|
22
|
-
|
|
22
|
+
setCurrentGroupData(currentGroupId: string, currentGroupName: string): void;
|
|
23
23
|
getCurrentGroupId(): string;
|
|
24
|
+
getCurrentGroupName(): string;
|
|
24
25
|
setSelectedProdcuts(products: {
|
|
25
26
|
[currentGroupId: string]: string;
|
|
26
27
|
}): void;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { CSSResult } from 'lit';
|
|
2
|
+
import Swiper from 'swiper';
|
|
2
3
|
import { TCarouselContainer } from '../../types/components/containers';
|
|
3
4
|
import { NamiElement } from '../NamiElement';
|
|
4
5
|
export declare class NamiCarouselContainer extends NamiElement {
|
|
5
6
|
component: TCarouselContainer;
|
|
6
7
|
inFocusedState: boolean;
|
|
8
|
+
swiperInstance: Swiper;
|
|
9
|
+
slideSpacing: number;
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
disconnectedCallback(): void;
|
|
12
|
+
updateSpacing: (e: CustomEvent) => void;
|
|
7
13
|
protected styles(): CSSResult;
|
|
14
|
+
protected updated(): void;
|
|
8
15
|
render(): import("lit-html").TemplateResult<1>;
|
|
9
16
|
}
|
|
@@ -6,6 +6,8 @@ export declare class NamiContainer extends NamiElement {
|
|
|
6
6
|
component: TContainer | TProductContainer;
|
|
7
7
|
inFocusedState: boolean;
|
|
8
8
|
constructor();
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
disconnectedCallback(): void;
|
|
9
11
|
private _handleFocusChanged;
|
|
10
12
|
private _handleFocus;
|
|
11
13
|
private _handleBlur;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NamiElement } from "../NamiElement";
|
|
2
|
+
import { TStack } from "../../types/components/containers";
|
|
3
|
+
export declare class NamiStack extends NamiElement {
|
|
4
|
+
component: TStack;
|
|
5
|
+
inFocusedState: boolean;
|
|
6
|
+
protected styles(): import("lit").CSSResult;
|
|
7
|
+
protected render(): any[];
|
|
8
|
+
}
|
|
@@ -4,6 +4,7 @@ import { CSSResult, TemplateResult } from "lit";
|
|
|
4
4
|
export declare class NamiVideo extends NamiElement {
|
|
5
5
|
component: TVideoComponent;
|
|
6
6
|
inFocusedState: boolean;
|
|
7
|
+
private bgVideo;
|
|
7
8
|
protected styles(): CSSResult;
|
|
8
9
|
loadMediaSrc(video: HTMLVideoElement): void;
|
|
9
10
|
updated(): void;
|
|
@@ -16,6 +16,7 @@ import { NamiResponsiveGrid } from "./containers/ResponsiveGrid";
|
|
|
16
16
|
import { NamiCarouselContainer } from "./containers/CarouselContainer";
|
|
17
17
|
import { NamiVolumeButton } from "./elements/VolumeButton";
|
|
18
18
|
import { NamiPlayPauseButton } from "./elements/PlayPauseButton";
|
|
19
|
+
import { NamiStack } from "./elements/Stack";
|
|
19
20
|
declare global {
|
|
20
21
|
interface HTMLElementTagNameMap {
|
|
21
22
|
"nami-spacer": NamiSpacer;
|
|
@@ -37,6 +38,7 @@ declare global {
|
|
|
37
38
|
"nami-carousel-container": NamiCarouselContainer;
|
|
38
39
|
"nami-volume-button": NamiVolumeButton;
|
|
39
40
|
"nami-play-pause-button": NamiPlayPauseButton;
|
|
41
|
+
"nami-stack": NamiStack;
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
|
-
export { NamiSpacer, NamiButton, NamiHeader, NamiFooter, NamiText, NamiSegmentPicker, NamiSegmentPickerItem, NamiContainer, NamiProductContainer, NamiImage, NamiBackgroundContainer, NamiContentContainer, NamiSymbol, NamiVideo, NamiCollapseContainer, NamiResponsiveGrid, NamiCarouselContainer, NamiPlayPauseButton, NamiVolumeButton };
|
|
44
|
+
export { NamiSpacer, NamiButton, NamiHeader, NamiFooter, NamiText, NamiSegmentPicker, NamiSegmentPickerItem, NamiContainer, NamiProductContainer, NamiImage, NamiBackgroundContainer, NamiContentContainer, NamiSymbol, NamiVideo, NamiCollapseContainer, NamiResponsiveGrid, NamiCarouselContainer, NamiPlayPauseButton, NamiVolumeButton, NamiStack };
|
|
@@ -7,7 +7,10 @@ export declare const signIn: () => void;
|
|
|
7
7
|
export declare const deepLink: (url?: string) => void;
|
|
8
8
|
export declare const buySKU: (onTap: UserAction, sku: NamiSKU) => NamiSKU;
|
|
9
9
|
export declare const navigateToScreen: (screen?: string) => void;
|
|
10
|
-
export declare const setState: () =>
|
|
10
|
+
export declare const setState: () => {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
};
|
|
11
14
|
export declare const selectSKU: (sku: NamiSKU) => void;
|
|
12
15
|
export declare const purchaseSelectedSKU: (sku: NamiSKU) => void;
|
|
13
16
|
export declare const reloadProducts: () => void;
|
|
@@ -10,11 +10,13 @@ export declare function interpolate<T>(value: T, replacements: ReplacementsType)
|
|
|
10
10
|
export declare function getInterpolatedButtonComponents(component: TButtonContainer): TComponent[];
|
|
11
11
|
export declare function getSkuButtonComponents(items: PaywallSKU[], component: TProductContainer, mediaList?: {
|
|
12
12
|
[mediaName: string]: Pick<TPaywallMedia, 'content'>;
|
|
13
|
-
}
|
|
13
|
+
}): [boolean, TComponent[]][];
|
|
14
14
|
export declare function getRepeatingListBlocks(component: TResponsiveGrid): TComponent[][];
|
|
15
15
|
export declare function getCarouselSlides(component: TCarouselContainer): TComponent[][];
|
|
16
16
|
export declare function conditionComponentMatches(condition: TConditionalComponent): boolean;
|
|
17
17
|
export declare function withOverrides<T extends TBaseComponent>({ conditionAttributes, ...component }: T): T;
|
|
18
18
|
export declare function valueFromSmartText<T>(value: T, sku?: PaywallSKU, block?: any): T;
|
|
19
19
|
export declare const totalTimeSpentOnPaywall: () => number | undefined;
|
|
20
|
+
export declare const rgbaToHex: (rgba?: string) => string | null;
|
|
21
|
+
export declare const sameColors: (color1?: string, color2?: string) => boolean;
|
|
20
22
|
export {};
|
|
@@ -2,12 +2,12 @@ import { NamiProductDetails, NamiProductOffer, NamiSubscriptionPeriod } from "..
|
|
|
2
2
|
import { PricingPhase } from "../../types/products";
|
|
3
3
|
import { PaywallSKU } from "../../types/sku";
|
|
4
4
|
export declare const isSubscription: (productType?: string) => productType is "subscription";
|
|
5
|
-
export declare function getStandardBillingPeriod(product: NamiProductDetails): string |
|
|
6
|
-
export declare function getFreeTrialPeriod(product: NamiProductDetails): string |
|
|
5
|
+
export declare function getStandardBillingPeriod(product: NamiProductDetails): string | null;
|
|
6
|
+
export declare function getFreeTrialPeriod(product: NamiProductDetails): string | null;
|
|
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
|
|
10
|
+
export declare function convertISO8601PeriodToText(iso8601Period: string | null, singular?: boolean, justPeriod?: boolean, justNumber?: boolean): string | null;
|
|
11
11
|
export declare function getCurrencyFormat(priceCurrencyCode: string): Intl.NumberFormat;
|
|
12
12
|
export declare const getPriceDifference: (currentSkuPricePerMonth?: number, referencedSkuPricePerMonth?: number, currencyFormat?: Intl.NumberFormat) => string | null;
|
|
13
13
|
export declare const getPercentagePriceDifference: (currentSkuPrice?: number, currentSkuDurationInMonths?: number, referencedSkuPrice?: number, referencedSkuPeriodInMonths?: number) => string | null;
|
|
@@ -2,6 +2,7 @@ import { InitiateStateGroup, ISkuMenu, TInitialState } from "../../types/paywall
|
|
|
2
2
|
import { NamiProductDetails } from "../../types/externals/product";
|
|
3
3
|
import { PaywallSKU } from "../../types/sku";
|
|
4
4
|
import { NamiPaywallLaunchContext } from "../../nami-web";
|
|
5
|
+
import { TCarouselSlide } from "src/types/components/containers";
|
|
5
6
|
export declare function currentSku(productDetails: NamiProductDetails[], initialState: TInitialState, skuMenus: ISkuMenu[], skus: PaywallSKU[]): {
|
|
6
7
|
[key: string]: any;
|
|
7
8
|
};
|
|
@@ -9,6 +10,9 @@ export declare function skuItems(productDetails: NamiProductDetails[], skuMenus:
|
|
|
9
10
|
export declare function getSkuSmartTextValue(productDetail?: NamiProductDetails | null, sku?: PaywallSKU, skus?: PaywallSKU[]): {
|
|
10
11
|
[key: string]: any;
|
|
11
12
|
};
|
|
13
|
+
export declare function getSlideSmartTextValue(productDetail?: NamiProductDetails | null, slide?: TCarouselSlide, skus?: PaywallSKU[]): {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
12
16
|
export declare function checkAnySkuHasTrialOffer(productDetails: NamiProductDetails[], skuMenus: ISkuMenu[], productGroups: string[]): boolean;
|
|
13
17
|
export declare function checkAnySkuHasPromoOffer(productDetails: NamiProductDetails[], skuMenus: ISkuMenu[], productGroups: string[]): boolean;
|
|
14
18
|
export declare function productDetail(details: NamiProductDetails[] | undefined, refId: string): NamiProductDetails | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TCarouselContainer } from "src/types/components/containers";
|
|
1
2
|
import { TBaseComponent, TContainerPosition } from "../../types/components";
|
|
2
3
|
import { TSegmentPickerItem, TTextLikeComponent } from "../../types/components/elements";
|
|
3
4
|
export declare function parseSize(value: string | number): string;
|
|
@@ -9,6 +10,7 @@ export declare function applyTextOverflow(component: TTextLikeComponent): string
|
|
|
9
10
|
export declare function transition(): string;
|
|
10
11
|
export declare function grow({ grow }: TBaseComponent): string;
|
|
11
12
|
export declare function paddingAndMargin(component: TBaseComponent): string;
|
|
13
|
+
export declare function slidePaddingAndMargin(component: TCarouselContainer): string;
|
|
12
14
|
export declare function transform({ moveX, moveY, }: TBaseComponent): string;
|
|
13
15
|
export declare function borders(component: TBaseComponent, inFocusedState?: boolean): string;
|
|
14
16
|
export declare function alignItems({ alignment, }: TBaseComponent): string;
|
package/dist/nami/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NamiConfiguration } from "../types/config";
|
|
1
|
+
import { NamiConfiguration } from "../types/externals/config";
|
|
2
2
|
import { Impression, LoginResponse } from "../types/api";
|
|
3
3
|
import { PurchaseValidationRequest, TransactionRequest } from "../types/purchase";
|
|
4
4
|
export declare class NamiAPI {
|
package/dist/nami/index.d.ts
CHANGED
package/dist/nami/namiRefs.d.ts
CHANGED