ui.shipaid.com 0.3.148 → 0.3.149
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 +369 -93
- package/dist/widget.iife.js +223 -60
- package/dist/widget.umd.js +222 -59
- package/dist-types/widget/src/widgets/shipaid-widget-element.d.ts +55 -1
- package/package.json +1 -1
|
@@ -68,7 +68,9 @@ export declare class ShipAidWidget extends LitElement {
|
|
|
68
68
|
private _sellingPlanId?;
|
|
69
69
|
private _isUpdatingShipAid;
|
|
70
70
|
private _lastCartEventAt;
|
|
71
|
-
private
|
|
71
|
+
private _checkoutButtonStylesInjected;
|
|
72
|
+
private _cachedCheckoutButton;
|
|
73
|
+
private _cachedCheckoutButtonClasses;
|
|
72
74
|
private _onShipAidCartEvent;
|
|
73
75
|
private _onShipAidInternalCartUpdated;
|
|
74
76
|
protected shouldUpdate(props: PropertyValues): boolean;
|
|
@@ -79,6 +81,26 @@ export declare class ShipAidWidget extends LitElement {
|
|
|
79
81
|
private _handleHelpClick;
|
|
80
82
|
private _handleHelpKeydown;
|
|
81
83
|
private _handleSeeDetails;
|
|
84
|
+
/**
|
|
85
|
+
* Get the contactless checkout selector from DB or sessionStorage
|
|
86
|
+
* @private
|
|
87
|
+
*/
|
|
88
|
+
private _getContactlessCheckoutSelector;
|
|
89
|
+
/**
|
|
90
|
+
* Check if we should use contactless checkout template
|
|
91
|
+
* @private
|
|
92
|
+
*/
|
|
93
|
+
private _shouldUseContactlessCheckout;
|
|
94
|
+
/**
|
|
95
|
+
* Check if widget should be shown based on config
|
|
96
|
+
* @private
|
|
97
|
+
*/
|
|
98
|
+
private _shouldShowWidgetContent;
|
|
99
|
+
/**
|
|
100
|
+
* Determine which template to render
|
|
101
|
+
* @private
|
|
102
|
+
*/
|
|
103
|
+
private _getTemplateToRender;
|
|
82
104
|
/**
|
|
83
105
|
* Internal state
|
|
84
106
|
*/
|
|
@@ -162,11 +184,43 @@ export declare class ShipAidWidget extends LitElement {
|
|
|
162
184
|
getSubscription(_cart: ShopifyCart | undefined): Promise<string | null | undefined>;
|
|
163
185
|
renderImpactTitle: (isGreenProtectionEnabled: boolean, isFreeGiftEnabled: boolean) => import("lit").TemplateResult<1>;
|
|
164
186
|
private _renderBenefitsSection;
|
|
187
|
+
/**
|
|
188
|
+
* Inject global styles for checkoutButtonTemplate (only once)
|
|
189
|
+
* @private
|
|
190
|
+
*/
|
|
191
|
+
private _injectCheckoutButtonGlobalStyles;
|
|
192
|
+
/**
|
|
193
|
+
* Find and cache the original checkout button for checkoutButtonTemplate
|
|
194
|
+
* @private
|
|
195
|
+
*/
|
|
196
|
+
private _findAndCacheCheckoutButton;
|
|
197
|
+
/**
|
|
198
|
+
* Calculate cart totals for checkoutButtonTemplate
|
|
199
|
+
* @private
|
|
200
|
+
*/
|
|
201
|
+
private _calculateCheckoutCartTotals;
|
|
202
|
+
/**
|
|
203
|
+
* Get impact features for checkoutButtonTemplate
|
|
204
|
+
* @private
|
|
205
|
+
*/
|
|
206
|
+
private _getCheckoutImpactFeatures;
|
|
207
|
+
/**
|
|
208
|
+
* Render Get Mechanism theme checkout button
|
|
209
|
+
* Modern UI based on the mechanism theme design
|
|
210
|
+
* @private
|
|
211
|
+
*/
|
|
212
|
+
private _renderGetMechanismCheckoutButton;
|
|
213
|
+
/**
|
|
214
|
+
* Render default/original checkout button UI
|
|
215
|
+
* @private
|
|
216
|
+
*/
|
|
217
|
+
private _renderDefaultCheckoutButton;
|
|
165
218
|
checkoutButtonTemplate(): import("lit").TemplateResult<1> | undefined;
|
|
166
219
|
renderPopups(): import("lit").TemplateResult<1> | null;
|
|
167
220
|
promptTemplate(): import("lit").TemplateResult<1> | undefined;
|
|
168
221
|
connectedCallback(): Promise<void>;
|
|
169
222
|
disconnectedCallback(): void;
|
|
223
|
+
updated(changedProperties: PropertyValues): void;
|
|
170
224
|
updateProtection(force?: boolean): Promise<void>;
|
|
171
225
|
protected render(): import("lit").TemplateResult<1>;
|
|
172
226
|
}
|