@namiml/web-sdk 1.5.1 → 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 CHANGED
@@ -1,5 +1,16 @@
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
+
3
14
  ## 1.5.1 (October 2, 2024)
4
15
 
5
16
  ## Enhancements
@@ -6,6 +6,10 @@ export declare class NamiCarouselContainer extends NamiElement {
6
6
  component: TCarouselContainer;
7
7
  inFocusedState: boolean;
8
8
  swiperInstance: Swiper;
9
+ slideSpacing: number;
10
+ connectedCallback(): void;
11
+ disconnectedCallback(): void;
12
+ updateSpacing: (e: CustomEvent) => void;
9
13
  protected styles(): CSSResult;
10
14
  protected updated(): void;
11
15
  render(): import("lit-html").TemplateResult<1>;
@@ -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;
@@ -6,5 +6,6 @@ export declare class NamiContentContainer extends NamiElement {
6
6
  zIndex: number;
7
7
  inFocusedState: boolean;
8
8
  protected styles(): CSSResult;
9
+ firstUpdated(): void;
9
10
  render(): any[];
10
11
  }
@@ -7,6 +7,5 @@ export declare class NamiProductContainer extends NamiElement {
7
7
  private currentGroupId;
8
8
  protected styles(): CSSResult;
9
9
  updated(): void;
10
- private _offerState;
11
10
  render(): any[][];
12
11
  }
@@ -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 };
@@ -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
- }, additionalVariableStates?: object): [boolean, TComponent[]][];
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 | undefined;
6
- export declare function getFreeTrialPeriod(product: NamiProductDetails): string | undefined;
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?: string, singular?: boolean, justPeriod?: boolean, justNumber?: boolean): string | null;
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;