ui.shipaid.com 0.3.148 → 0.3.150

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.
@@ -68,7 +68,9 @@ export declare class ShipAidWidget extends LitElement {
68
68
  private _sellingPlanId?;
69
69
  private _isUpdatingShipAid;
70
70
  private _lastCartEventAt;
71
- private _isReplacingCartSections;
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,48 @@ 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
+ * Restore the original checkout button styles/attributes if we modified them
199
+ * @private
200
+ */
201
+ private _restoreCheckoutButtonState;
202
+ /**
203
+ * Calculate cart totals for checkoutButtonTemplate
204
+ * @private
205
+ */
206
+ private _calculateCheckoutCartTotals;
207
+ /**
208
+ * Get impact features for checkoutButtonTemplate
209
+ * @private
210
+ */
211
+ private _getCheckoutImpactFeatures;
212
+ /**
213
+ * Render Get Mechanism theme checkout button
214
+ * Modern UI based on the mechanism theme design
215
+ * @private
216
+ */
217
+ private _renderGetMechanismCheckoutButton;
218
+ /**
219
+ * Render default/original checkout button UI
220
+ * @private
221
+ */
222
+ private _renderDefaultCheckoutButton;
165
223
  checkoutButtonTemplate(): import("lit").TemplateResult<1> | undefined;
166
224
  renderPopups(): import("lit").TemplateResult<1> | null;
167
225
  promptTemplate(): import("lit").TemplateResult<1> | undefined;
168
226
  connectedCallback(): Promise<void>;
169
227
  disconnectedCallback(): void;
228
+ updated(changedProperties: PropertyValues): void;
170
229
  updateProtection(force?: boolean): Promise<void>;
171
230
  protected render(): import("lit").TemplateResult<1>;
172
231
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ui.shipaid.com",
3
3
  "private": false,
4
- "version": "0.3.148",
4
+ "version": "0.3.150",
5
5
  "type": "module",
6
6
  "main": "dist/widget.umd.js",
7
7
  "unpkg": "dist/widget.iife.js",