@delopay/sdk 0.122.0 → 0.123.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/{chunk-TNZHQGX7.js → chunk-JQXBXZ2L.js} +35 -10
- package/dist/{chunk-TNZHQGX7.js.map → chunk-JQXBXZ2L.js.map} +1 -1
- package/dist/index.cjs +36 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -2
- package/dist/index.d.ts +24 -2
- package/dist/index.js +5 -1
- package/dist/internal.cjs +36 -9
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +5 -1
- package/dist/internal.js.map +1 -1
- package/package.json +18 -17
|
@@ -5214,7 +5214,26 @@ var SURCHARGE_FIGURE_MODES = [
|
|
|
5214
5214
|
"amountThenPercent",
|
|
5215
5215
|
"percentThenAmount"
|
|
5216
5216
|
];
|
|
5217
|
-
var CHECKOUT_LOCALES = [
|
|
5217
|
+
var CHECKOUT_LOCALES = [
|
|
5218
|
+
"en",
|
|
5219
|
+
"de",
|
|
5220
|
+
"fr",
|
|
5221
|
+
"es",
|
|
5222
|
+
"it",
|
|
5223
|
+
"nl",
|
|
5224
|
+
// Simplified and traditional are separate dictionaries in the checkout,
|
|
5225
|
+
// not region variants: they use different characters, so a merchant who
|
|
5226
|
+
// writes one has not written the other.
|
|
5227
|
+
"zh",
|
|
5228
|
+
"zh-Hant",
|
|
5229
|
+
"hi",
|
|
5230
|
+
"ar"
|
|
5231
|
+
];
|
|
5232
|
+
var RTL_CHECKOUT_LOCALES = ["ar"];
|
|
5233
|
+
function checkoutLocaleDir(locale) {
|
|
5234
|
+
const base = String(locale ?? "").toLowerCase().split("-")[0];
|
|
5235
|
+
return RTL_CHECKOUT_LOCALES.includes(base) ? "rtl" : "ltr";
|
|
5236
|
+
}
|
|
5218
5237
|
var LOCALIZABLE_COPY_FIELDS = [
|
|
5219
5238
|
"headerText",
|
|
5220
5239
|
"payButtonLabel",
|
|
@@ -5938,14 +5957,18 @@ function visibleCustomFields(fields, ctx) {
|
|
|
5938
5957
|
}
|
|
5939
5958
|
function translationFor(map, locale) {
|
|
5940
5959
|
if (!locale) return null;
|
|
5941
|
-
const
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
const
|
|
5948
|
-
|
|
5960
|
+
const folded = /* @__PURE__ */ new Map();
|
|
5961
|
+
for (const [k, v] of Object.entries(map)) {
|
|
5962
|
+
if (typeof v === "string" && v.length > 0 && !folded.has(k.toLowerCase())) {
|
|
5963
|
+
folded.set(k.toLowerCase(), v);
|
|
5964
|
+
}
|
|
5965
|
+
}
|
|
5966
|
+
const parts = locale.toLowerCase().split("-");
|
|
5967
|
+
for (let i = parts.length; i > 0; i -= 1) {
|
|
5968
|
+
const hit = folded.get(parts.slice(0, i).join("-"));
|
|
5969
|
+
if (hit) return hit;
|
|
5970
|
+
}
|
|
5971
|
+
return null;
|
|
5949
5972
|
}
|
|
5950
5973
|
function customFieldText(field, part, locale) {
|
|
5951
5974
|
const map = part === "label" ? field.labelTranslations : part === "placeholder" ? field.placeholderTranslations : field.helpTextTranslations;
|
|
@@ -7246,6 +7269,8 @@ export {
|
|
|
7246
7269
|
SURCHARGE_LABEL_MODES,
|
|
7247
7270
|
SURCHARGE_FIGURE_MODES,
|
|
7248
7271
|
CHECKOUT_LOCALES,
|
|
7272
|
+
RTL_CHECKOUT_LOCALES,
|
|
7273
|
+
checkoutLocaleDir,
|
|
7249
7274
|
LOCALIZABLE_COPY_FIELDS,
|
|
7250
7275
|
copyTranslationsKey,
|
|
7251
7276
|
checkoutCopy,
|
|
@@ -7336,4 +7361,4 @@ export {
|
|
|
7336
7361
|
decodeNativePanes,
|
|
7337
7362
|
encodeNativePanes
|
|
7338
7363
|
};
|
|
7339
|
-
//# sourceMappingURL=chunk-
|
|
7364
|
+
//# sourceMappingURL=chunk-JQXBXZ2L.js.map
|