ui.shipaid.com 0.3.122 → 0.3.124
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/dist/widget.es.js +310 -2
- package/dist/widget.iife.js +349 -49
- package/dist/widget.umd.js +365 -65
- package/dist-types/widget/src/components/learn-more-popup.d.ts +3 -4
- package/dist-types/widget/src/components/shipaid-leanr-more-carousel.d.ts +30 -0
- package/dist-types/widget/src/entry-bootstrap.d.ts +1 -0
- package/dist-types/widget/src/entry-v2.d.ts +1 -0
- package/dist-types/widget/src/shipaid-widget-v2.d.ts +59 -0
- package/package.json +1 -1
- package/dist-types/widget/src/components/product-add-confirmation.d.ts +0 -13
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { LitElement
|
|
2
|
-
import './shipaid-learn-more-carousel';
|
|
1
|
+
import { LitElement } from 'lit';
|
|
3
2
|
declare class LearnMorePopup extends LitElement {
|
|
4
3
|
static styles: import("lit").CSSResult;
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
active: boolean;
|
|
5
|
+
handleClosePopup(): void;
|
|
7
6
|
render(): import("lit").TemplateResult<1>;
|
|
8
7
|
}
|
|
9
8
|
export default LearnMorePopup;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class ShipAidCarousel extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
slideImages: string[];
|
|
5
|
+
currentSlide: number;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
private isDragging;
|
|
8
|
+
private startX;
|
|
9
|
+
private initialOffset;
|
|
10
|
+
private cardWidth;
|
|
11
|
+
private gap;
|
|
12
|
+
private wrapper;
|
|
13
|
+
private container;
|
|
14
|
+
firstUpdated(): void;
|
|
15
|
+
closeModal(): void;
|
|
16
|
+
private onDragStart;
|
|
17
|
+
private onDragMove;
|
|
18
|
+
private onDragEnd;
|
|
19
|
+
private onOverlayClick;
|
|
20
|
+
private onCloseKeyDown;
|
|
21
|
+
updatePosition(): void;
|
|
22
|
+
private prevSlide;
|
|
23
|
+
private nextSlide;
|
|
24
|
+
render(): import("lit").TemplateResult<1> | null;
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
'shipaid-learn-more-carousel': ShipAidCarousel;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './shipaid-widget';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './shipaid-widget-v2';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { LitElement, nothing } from 'lit';
|
|
2
|
+
import type { ShopifyCart, ShopifyProductVariant } from '../types/shopify';
|
|
3
|
+
import './components/shipaid-learn-more-carousel';
|
|
4
|
+
export declare class ShipAidWidgetV2 extends LitElement {
|
|
5
|
+
env: string;
|
|
6
|
+
lang: string;
|
|
7
|
+
previewGreenShipAid: boolean;
|
|
8
|
+
dataSelector: string;
|
|
9
|
+
isClone: boolean;
|
|
10
|
+
private _store?;
|
|
11
|
+
private _cart?;
|
|
12
|
+
private _protectionProduct?;
|
|
13
|
+
private _protectionVariant?;
|
|
14
|
+
private _hasFinishedSetup;
|
|
15
|
+
private _hasProtectionInCart;
|
|
16
|
+
private _originalCheckoutButton;
|
|
17
|
+
private _observer;
|
|
18
|
+
private _remountTimer;
|
|
19
|
+
private _aboutToUnload;
|
|
20
|
+
itemsSelector: string;
|
|
21
|
+
private _itemsObserver;
|
|
22
|
+
private _itemsTargetEl;
|
|
23
|
+
private _itemsDebounceTimer;
|
|
24
|
+
private _onShipAidCartEvent;
|
|
25
|
+
private _apiEndpoint;
|
|
26
|
+
private _fetch;
|
|
27
|
+
connectedCallback(): Promise<void>;
|
|
28
|
+
private _ensureLearnMoreCarousel;
|
|
29
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
30
|
+
private _ensureBaseStyles;
|
|
31
|
+
private _applyButtonStylesFrom;
|
|
32
|
+
private _hideProtectionRowsByHref;
|
|
33
|
+
private _mountNearCheckoutButton;
|
|
34
|
+
private _startObserver;
|
|
35
|
+
disconnectedCallback(): void;
|
|
36
|
+
private _observeCartItems;
|
|
37
|
+
private _fetchShipAidData;
|
|
38
|
+
private _fetchCart;
|
|
39
|
+
private _fetchProduct;
|
|
40
|
+
hasProtection(): boolean;
|
|
41
|
+
updateCart(cart?: ShopifyCart): Promise<void>;
|
|
42
|
+
calculateProtectionTotal(cart?: ShopifyCart): Promise<number>;
|
|
43
|
+
getProtectionVariantForFee(protectionFee: number): ShopifyProductVariant | undefined;
|
|
44
|
+
calculateProtectionFeeForCartPlusAmountCents(amountCents: number): Promise<{
|
|
45
|
+
fee: number;
|
|
46
|
+
variant: ShopifyProductVariant | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
addProtection(): Promise<void>;
|
|
49
|
+
removeProtection(): Promise<void>;
|
|
50
|
+
private _currencyFormat;
|
|
51
|
+
updateProtection(): Promise<void>;
|
|
52
|
+
private proceedToCheckout;
|
|
53
|
+
render(): import("lit").TemplateResult<1> | typeof nothing;
|
|
54
|
+
}
|
|
55
|
+
declare global {
|
|
56
|
+
interface HTMLElementTagNameMap {
|
|
57
|
+
'shipaid-widget-v2': ShipAidWidgetV2;
|
|
58
|
+
}
|
|
59
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit'
|
|
2
|
-
declare class ProductAddConfirmation 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
|
-
handleConfirm(): void
|
|
11
|
-
render(): import('lit-html').TemplateResult<1>
|
|
12
|
-
}
|
|
13
|
-
export default ProductAddConfirmation
|