@delopay/sdk 0.175.0 → 0.176.0

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/index.cjs CHANGED
@@ -7787,6 +7787,9 @@ var DEFAULT_BRANDING_BASE = {
7787
7787
  totalLabel: "Total",
7788
7788
  showCurrencyCode: false,
7789
7789
  showOrderItems: true,
7790
+ cancelLinkEnabled: true,
7791
+ cancelLinkPosition: "top",
7792
+ cancelLinkStyle: "link",
7790
7793
  // Each flat field keeps its meaning: what the merchant wrote, used in every
7791
7794
  // locale that carries no override. Empty maps therefore change nothing for a
7792
7795
  // profile saved before translations existed.
@@ -8605,6 +8608,17 @@ function decodeBranding(source) {
8605
8608
  totalLabel: s(extras["totalLabel"]) || DEFAULT_BRANDING.totalLabel,
8606
8609
  showCurrencyCode: parseBool(extras["showCurrencyCode"], DEFAULT_BRANDING.showCurrencyCode),
8607
8610
  showOrderItems: parseBool(extras["showOrderItems"], DEFAULT_BRANDING.showOrderItems),
8611
+ cancelLinkEnabled: parseBool(extras["cancelLinkEnabled"], DEFAULT_BRANDING.cancelLinkEnabled),
8612
+ cancelLinkPosition: pickEnum(
8613
+ extras["cancelLinkPosition"],
8614
+ ["top", "bottom"],
8615
+ DEFAULT_BRANDING.cancelLinkPosition
8616
+ ),
8617
+ cancelLinkStyle: pickEnum(
8618
+ extras["cancelLinkStyle"],
8619
+ ["link", "button"],
8620
+ DEFAULT_BRANDING.cancelLinkStyle
8621
+ ),
8608
8622
  trustBadges: trustRow.trustBadges,
8609
8623
  notices: trustRow.notices,
8610
8624
  customFields: decodedCustomFields ?? [],
@@ -8844,6 +8858,9 @@ function encodeBranding(branding, base) {
8844
8858
  totalLabel: branding.totalLabel,
8845
8859
  showCurrencyCode: String(branding.showCurrencyCode),
8846
8860
  showOrderItems: String(branding.showOrderItems),
8861
+ cancelLinkEnabled: String(branding.cancelLinkEnabled),
8862
+ cancelLinkPosition: branding.cancelLinkPosition,
8863
+ cancelLinkStyle: branding.cancelLinkStyle,
8847
8864
  showLogo: String(branding.showLogo),
8848
8865
  logoShape: branding.logoShape,
8849
8866
  logoSize: branding.logoSize,
@@ -9111,6 +9128,17 @@ function parseImportedBranding(raw) {
9111
9128
  trustBadges,
9112
9129
  notices,
9113
9130
  customFields,
9131
+ cancelLinkEnabled: parseBool(root["cancelLinkEnabled"], dflt.cancelLinkEnabled),
9132
+ cancelLinkPosition: pickEnum(
9133
+ root["cancelLinkPosition"],
9134
+ ["top", "bottom"],
9135
+ dflt.cancelLinkPosition
9136
+ ),
9137
+ cancelLinkStyle: pickEnum(
9138
+ root["cancelLinkStyle"],
9139
+ ["link", "button"],
9140
+ dflt.cancelLinkStyle
9141
+ ),
9114
9142
  // An export writes the decoded maps; a hand-written file may carry the
9115
9143
  // JSON strings the bag uses. Both are accepted, and neither is required.
9116
9144
  methodSectionOrder: parseSectionOrderLoose(root[METHOD_SECTION_ORDER_KEY]),
@@ -10240,7 +10268,8 @@ var CHECKOUT_EVENT_KINDS = [
10240
10268
  "native_pane_tab_opened",
10241
10269
  "native_pane_tab_blocked",
10242
10270
  "native_pane_abandoned",
10243
- "native_pane_returned"
10271
+ "native_pane_returned",
10272
+ "checkout_cancelled"
10244
10273
  ];
10245
10274
  var STRIPE_NATIVE_PANE_METHODS = STRIPE_FALLBACK_PANE_METHODS;
10246
10275
  var NATIVE_PANE_ICON_KEYS = PANE_ICON_KEYS;