ui.shipaid.com 0.3.52 → 0.3.54

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,4 +1,9 @@
1
1
  export interface ShopifyProduct {
2
+ id?: string;
3
+ image?: {
4
+ src: string;
5
+ };
6
+ title?: string;
2
7
  variants?: ShopifyProductVariant[];
3
8
  }
4
9
  export interface ShopifyProductVariant {
@@ -1,15 +1,15 @@
1
- import { LitElement } from 'lit'
1
+ import { LitElement } from 'lit';
2
2
  declare class ShipAidCartConfirmation extends LitElement {
3
- static styles: import('lit').CSSResult
4
- open: boolean
5
- product: null
6
- imageUrl: null
7
- priceOfVariant: null
8
- quantity: number
9
- handleDismiss(): void
10
- handleDontShowAgain(ev: any): void
11
- handleConfirm(): void
12
- private dontShowAgain
13
- render(): import('lit-html').TemplateResult<1>
3
+ static styles: import("lit").CSSResult;
4
+ open: boolean;
5
+ product: null;
6
+ imageUrl: null;
7
+ priceOfVariant: null;
8
+ quantity: number;
9
+ handleDismiss(): void;
10
+ handleDontShowAgain(ev: any): void;
11
+ handleConfirm(): void;
12
+ dontShowAgain: boolean;
13
+ render(): import("lit").TemplateResult<1>;
14
14
  }
15
- export default ShipAidCartConfirmation
15
+ export default ShipAidCartConfirmation;
@@ -2,6 +2,7 @@
2
2
  import { LitElement, PropertyValues } from 'lit';
3
3
  import './components/learn-more-popup';
4
4
  import './components/confirmation-popup';
5
+ import './components/shipaid-cart-confirmation';
5
6
  import type { ShopifyCart, ShopifyCartItem } from '../types/shopify';
6
7
  /**
7
8
  * ShipAid Widget.
@@ -44,6 +45,8 @@ export declare class ShipAidWidget extends LitElement {
44
45
  private _hasFinishedSetup;
45
46
  /** Can be used to hide all widget content */
46
47
  private _shouldShowWidget;
48
+ /** Can be used to check if page is on Cart */
49
+ private _isCartVisibleOnScreen;
47
50
  /** Whether the ShipAid protection product is currently added to the cart */
48
51
  private _hasProtectionInCart;
49
52
  /** The protection item from the Shopify cart */
@@ -123,11 +126,14 @@ export declare class ShipAidWidget extends LitElement {
123
126
  /** Templates */
124
127
  learnMorePopupTemplate(): import("lit").TemplateResult<1>;
125
128
  confirmationPopupTemplate(): import("lit").TemplateResult<1>;
129
+ confirmShipAidCart(): import("lit").TemplateResult<1>;
126
130
  renderPopups(): import("lit").TemplateResult<1> | null;
127
131
  promptTemplate(): import("lit").TemplateResult<1>;
128
132
  connectedCallback(): Promise<void>;
129
133
  disconnectedCallback(): void;
130
134
  updateProtection(): Promise<void>;
135
+ protected runCartPageDetection(): void;
136
+ protected triggerShipAidAddToCartConfirm(): boolean;
131
137
  protected render(): import("lit").TemplateResult<1>;
132
138
  }
133
139
  declare global {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ui.shipaid.com",
3
3
  "private": false,
4
- "version": "0.3.52",
4
+ "version": "0.3.54",
5
5
  "type": "module",
6
6
  "main": "dist/widget.umd.js",
7
7
  "unpkg": "dist/widget.iife.js",