ui.shipaid.com 0.3.113 → 0.3.114

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 CHANGED
@@ -3845,7 +3845,7 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
3845
3845
  )}
3846
3846
  <div class="protection-value">
3847
3847
  <slot name="checkout-plus-heading">
3848
- ${n(
3848
+ ${n(
3849
3849
  this.widgetTitle,
3850
3850
  () => o$4(this.widgetTitle),
3851
3851
  () => translate(
@@ -4040,48 +4040,27 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
4040
4040
  <p class="prompt-product-actions-price">
4041
4041
  ${((_f = this._protectionVariant) == null ? void 0 : _f.price) && this._currencyFormat(this._protectionVariant.price)}
4042
4042
  </p>
4043
- ${!useToggle && !this.defaultToggleButton ? n(
4043
+ ${!leftCheckbox && n(
4044
4044
  !this.disableActions,
4045
4045
  () => x`
4046
- <label
4047
- class="shipaid-${useToggle ? "toggle" : "checkbox"} ${isGreenProtectionEnabled ? "green" : ""}"
4048
- >
4049
- ${this._hasProtectionInCart || !this._hasFinishedSetup ? x`<input
4050
- type="checkbox"
4051
- checked
4052
- @click=${this._updateProtection}
4053
- ?disabled=${this._state.loading}
4054
- />` : x`<input
4055
- type="checkbox"
4056
- @click=${this._updateProtection}
4057
- ?disabled=${this._state.loading}
4058
- />`}
4059
- <span
4060
- class="shipaid-${useToggle ? "slider" : "checkMark"}"
4061
- ></span>
4062
- </label>
4063
- `
4064
- ) : n(
4065
- !this.disableActions && !leftCheckbox,
4066
- () => x`
4067
- <label
4068
- class="shipaid-${useToggle ? "toggle" : "checkbox"} ${isGreenProtectionEnabled ? "green" : ""}"
4069
- >
4070
- ${this._hasProtectionInCart || !this._hasFinishedSetup ? x`<input
4071
- type="checkbox"
4072
- checked
4073
- @click=${this._updateProtection}
4074
- ?disabled=${this._state.loading}
4075
- />` : x`<input
4076
- type="checkbox"
4077
- @click=${this._updateProtection}
4078
- ?disabled=${this._state.loading}
4079
- />`}
4080
- <span
4081
- class="shipaid-${useToggle ? "slider" : "checkMark"}"
4082
- ></span>
4083
- </label>
4084
- `
4046
+ <label
4047
+ class="shipaid-${useToggle ? "toggle" : "checkbox"} ${isGreenProtectionEnabled ? "green" : ""}"
4048
+ >
4049
+ ${this._hasProtectionInCart || !this._hasFinishedSetup ? x`<input
4050
+ type="checkbox"
4051
+ checked
4052
+ @click=${this._updateProtection}
4053
+ ?disabled=${this._state.loading}
4054
+ />` : x`<input
4055
+ type="checkbox"
4056
+ @click=${this._updateProtection}
4057
+ ?disabled=${this._state.loading}
4058
+ />`}
4059
+ <span
4060
+ class="shipaid-${useToggle ? "slider" : "checkMark"}"
4061
+ ></span>
4062
+ </label>
4063
+ `
4085
4064
  )}
4086
4065
  </div>
4087
4066
  </div>
@@ -1017,7 +1017,7 @@ function Te(e,t,o){return e?t():null==o?void 0:o()}const He=ie`
1017
1017
  >`))}
1018
1018
  <div class="protection-value">
1019
1019
  <slot name="checkout-plus-heading">
1020
- ${Te(this.widgetTitle,(()=>X(this.widgetTitle)),(()=>Ke(C?"green-protection.title-checkout-plus":"checkout-plus.title")))}
1020
+ ${Te(this.widgetTitle,(()=>X(this.widgetTitle)),(()=>Ke(C?"green-protection.title-checkout-plus":"checkout-plus.title")))}
1021
1021
  </slot>
1022
1022
  -
1023
1023
  ${p?this._currencyFormat(p):E}
@@ -1136,43 +1136,25 @@ function Te(e,t,o){return e?t():null==o?void 0:o()}const He=ie`
1136
1136
  <p class="prompt-product-actions-price">
1137
1137
  ${(null==(r=this._protectionVariant)?void 0:r.price)&&this._currencyFormat(this._protectionVariant.price)}
1138
1138
  </p>
1139
- ${s||this.defaultToggleButton?Te(!this.disableActions&&!l,(()=>y`
1140
- <label
1141
- class="shipaid-${s?"toggle":"checkbox"} ${d?"green":""}"
1142
- >
1143
- ${this._hasProtectionInCart||!this._hasFinishedSetup?y`<input
1144
- type="checkbox"
1145
- checked
1146
- @click=${this._updateProtection}
1147
- ?disabled=${this._state.loading}
1148
- />`:y`<input
1149
- type="checkbox"
1150
- @click=${this._updateProtection}
1151
- ?disabled=${this._state.loading}
1152
- />`}
1153
- <span
1154
- class="shipaid-${s?"slider":"checkMark"}"
1155
- ></span>
1156
- </label>
1157
- `)):Te(!this.disableActions,(()=>y`
1158
- <label
1159
- class="shipaid-${s?"toggle":"checkbox"} ${d?"green":""}"
1160
- >
1161
- ${this._hasProtectionInCart||!this._hasFinishedSetup?y`<input
1162
- type="checkbox"
1163
- checked
1164
- @click=${this._updateProtection}
1165
- ?disabled=${this._state.loading}
1166
- />`:y`<input
1167
- type="checkbox"
1168
- @click=${this._updateProtection}
1169
- ?disabled=${this._state.loading}
1170
- />`}
1171
- <span
1172
- class="shipaid-${s?"slider":"checkMark"}"
1173
- ></span>
1174
- </label>
1175
- `))}
1139
+ ${!l&&Te(!this.disableActions,(()=>y`
1140
+ <label
1141
+ class="shipaid-${s?"toggle":"checkbox"} ${d?"green":""}"
1142
+ >
1143
+ ${this._hasProtectionInCart||!this._hasFinishedSetup?y`<input
1144
+ type="checkbox"
1145
+ checked
1146
+ @click=${this._updateProtection}
1147
+ ?disabled=${this._state.loading}
1148
+ />`:y`<input
1149
+ type="checkbox"
1150
+ @click=${this._updateProtection}
1151
+ ?disabled=${this._state.loading}
1152
+ />`}
1153
+ <span
1154
+ class="shipaid-${s?"slider":"checkMark"}"
1155
+ ></span>
1156
+ </label>
1157
+ `))}
1176
1158
  </div>
1177
1159
  </div>
1178
1160
  ${Te(this._state.error,(()=>y`<p class="error">${this._state.error}</p>`))}
@@ -1017,7 +1017,7 @@ function Te(e,t,o){return e?t():null==o?void 0:o()}const He=ie`
1017
1017
  >`))}
1018
1018
  <div class="protection-value">
1019
1019
  <slot name="checkout-plus-heading">
1020
- ${Te(this.widgetTitle,(()=>X(this.widgetTitle)),(()=>Ke(C?"green-protection.title-checkout-plus":"checkout-plus.title")))}
1020
+ ${Te(this.widgetTitle,(()=>X(this.widgetTitle)),(()=>Ke(C?"green-protection.title-checkout-plus":"checkout-plus.title")))}
1021
1021
  </slot>
1022
1022
  -
1023
1023
  ${p?this._currencyFormat(p):E}
@@ -1136,43 +1136,25 @@ function Te(e,t,o){return e?t():null==o?void 0:o()}const He=ie`
1136
1136
  <p class="prompt-product-actions-price">
1137
1137
  ${(null==(r=this._protectionVariant)?void 0:r.price)&&this._currencyFormat(this._protectionVariant.price)}
1138
1138
  </p>
1139
- ${s||this.defaultToggleButton?Te(!this.disableActions&&!l,(()=>y`
1140
- <label
1141
- class="shipaid-${s?"toggle":"checkbox"} ${d?"green":""}"
1142
- >
1143
- ${this._hasProtectionInCart||!this._hasFinishedSetup?y`<input
1144
- type="checkbox"
1145
- checked
1146
- @click=${this._updateProtection}
1147
- ?disabled=${this._state.loading}
1148
- />`:y`<input
1149
- type="checkbox"
1150
- @click=${this._updateProtection}
1151
- ?disabled=${this._state.loading}
1152
- />`}
1153
- <span
1154
- class="shipaid-${s?"slider":"checkMark"}"
1155
- ></span>
1156
- </label>
1157
- `)):Te(!this.disableActions,(()=>y`
1158
- <label
1159
- class="shipaid-${s?"toggle":"checkbox"} ${d?"green":""}"
1160
- >
1161
- ${this._hasProtectionInCart||!this._hasFinishedSetup?y`<input
1162
- type="checkbox"
1163
- checked
1164
- @click=${this._updateProtection}
1165
- ?disabled=${this._state.loading}
1166
- />`:y`<input
1167
- type="checkbox"
1168
- @click=${this._updateProtection}
1169
- ?disabled=${this._state.loading}
1170
- />`}
1171
- <span
1172
- class="shipaid-${s?"slider":"checkMark"}"
1173
- ></span>
1174
- </label>
1175
- `))}
1139
+ ${!l&&Te(!this.disableActions,(()=>y`
1140
+ <label
1141
+ class="shipaid-${s?"toggle":"checkbox"} ${d?"green":""}"
1142
+ >
1143
+ ${this._hasProtectionInCart||!this._hasFinishedSetup?y`<input
1144
+ type="checkbox"
1145
+ checked
1146
+ @click=${this._updateProtection}
1147
+ ?disabled=${this._state.loading}
1148
+ />`:y`<input
1149
+ type="checkbox"
1150
+ @click=${this._updateProtection}
1151
+ ?disabled=${this._state.loading}
1152
+ />`}
1153
+ <span
1154
+ class="shipaid-${s?"slider":"checkMark"}"
1155
+ ></span>
1156
+ </label>
1157
+ `))}
1176
1158
  </div>
1177
1159
  </div>
1178
1160
  ${Te(this._state.error,(()=>y`<p class="error">${this._state.error}</p>`))}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ui.shipaid.com",
3
3
  "private": false,
4
- "version": "0.3.113",
4
+ "version": "0.3.114",
5
5
  "type": "module",
6
6
  "main": "dist/widget.umd.js",
7
7
  "unpkg": "dist/widget.iife.js",
@@ -14,6 +14,12 @@
14
14
  "dist-types",
15
15
  "dist"
16
16
  ],
17
+ "scripts": {
18
+ "develop": "vite",
19
+ "build": "tsc && node build",
20
+ "lint": "eslint . --ext=ts --fix",
21
+ "test": "vitest"
22
+ },
17
23
  "dependencies": {
18
24
  "@lit-labs/task": "^2.0.0",
19
25
  "lit": "^2.6.1",
@@ -39,11 +45,5 @@
39
45
  "typescript": "^4.9.4",
40
46
  "vite": "^5.4.10",
41
47
  "vitest": "^2.1.4"
42
- },
43
- "scripts": {
44
- "develop": "vite",
45
- "build": "tsc && node build",
46
- "lint": "eslint . --ext=ts --fix",
47
- "test": "vitest"
48
48
  }
49
49
  }