ui.shipaid.com 0.3.40 → 0.3.41
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 +262 -14
- package/dist/widget.iife.js +207 -33
- package/dist/widget.umd.js +207 -33
- package/dist-types/common/types/ShipAid.d.ts +28 -0
- package/dist-types/widget/src/assets/confirmation-styles.d.ts +2 -0
- package/dist-types/widget/src/components/confirmation-popup.d.ts +9 -0
- package/dist-types/widget/src/shipaid-widget.d.ts +5 -0
- package/package.json +1 -1
|
@@ -38,6 +38,31 @@ export interface ProtectionSettingsFixed {
|
|
|
38
38
|
rangeUpper?: number;
|
|
39
39
|
}>;
|
|
40
40
|
}
|
|
41
|
+
declare enum Deadline {
|
|
42
|
+
THIRTY_MIN = "THIRTY_MIN",
|
|
43
|
+
SIXTY_MIN = "SIXTY_MIN",
|
|
44
|
+
NINETY_MIN = "NINETY_MIN",
|
|
45
|
+
TWO_HOURS = "TWO_HOURS",
|
|
46
|
+
THREE_HOURS = "THREE_HOURS",
|
|
47
|
+
SIX_HOURS = "SIX_HOURS",
|
|
48
|
+
TWELVE_HOURS = "TWELVE_HOURS",
|
|
49
|
+
ONE_DAY = "ONE_DAY",
|
|
50
|
+
TWO_DAYS = "TWO_DAYS",
|
|
51
|
+
THREE_DAYS = "THREE_DAYS",
|
|
52
|
+
FIVE_DAYS = "FIVE_DAYS",
|
|
53
|
+
TEN_DAYS = "TEN_DAYS"
|
|
54
|
+
}
|
|
55
|
+
interface OrderSettings {
|
|
56
|
+
deadline: {
|
|
57
|
+
timing: Deadline;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
shipping: {
|
|
61
|
+
allow_customer_to_use_po_boxes: boolean;
|
|
62
|
+
allow_customer_to_edit_shipping: boolean;
|
|
63
|
+
allow_gmaps_to_verify_addresses: boolean;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
41
66
|
export interface ShipAidStore {
|
|
42
67
|
store: string;
|
|
43
68
|
currency: string;
|
|
@@ -50,4 +75,7 @@ export interface ShipAidStore {
|
|
|
50
75
|
planActive: boolean;
|
|
51
76
|
protectionSettings: ProtectionSettingsFixed | ProtectionSettingsPercentage;
|
|
52
77
|
widgetConfigurations: any;
|
|
78
|
+
orderSettings: OrderSettings;
|
|
79
|
+
autoOptInProbability: any;
|
|
53
80
|
}
|
|
81
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
declare class ConfirmationPopup extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult;
|
|
4
|
+
active: boolean;
|
|
5
|
+
handleClosePopup(): void;
|
|
6
|
+
handleRemoveProtection(): void;
|
|
7
|
+
render(): import("lit").TemplateResult<1>;
|
|
8
|
+
}
|
|
9
|
+
export default ConfirmationPopup;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from 'lit';
|
|
2
2
|
import './components/learn-more-popup';
|
|
3
|
+
import './components/confirmation-popup';
|
|
3
4
|
import type { ShopifyCart } from '../types/shopify';
|
|
4
5
|
/**
|
|
5
6
|
* ShipAid Widget.
|
|
@@ -75,6 +76,8 @@ export declare class ShipAidWidget extends LitElement {
|
|
|
75
76
|
private _findProtectionVariant;
|
|
76
77
|
/** Update State */
|
|
77
78
|
private _setState;
|
|
79
|
+
/** Trigger confirmation popup */
|
|
80
|
+
private _handleConfirmationPopup;
|
|
78
81
|
/** Updates the current protection status, calling the relevant add/remove function. */
|
|
79
82
|
private _updateProtection;
|
|
80
83
|
/** General fetch function, which handles error responses, and returns JSON responses. */
|
|
@@ -101,6 +104,8 @@ export declare class ShipAidWidget extends LitElement {
|
|
|
101
104
|
handleMultipleProtectionVariants(): Promise<void>;
|
|
102
105
|
/** Templates */
|
|
103
106
|
learnMorePopupTemplate(): import("lit").TemplateResult<1>;
|
|
107
|
+
confirmationPopupTemplate(): import("lit").TemplateResult<1>;
|
|
108
|
+
renderPopups(): import("lit").TemplateResult<1> | null;
|
|
104
109
|
promptTemplate(): import("lit").TemplateResult<1>;
|
|
105
110
|
connectedCallback(): Promise<void>;
|
|
106
111
|
protected render(): import("lit").TemplateResult<1>;
|