@pelcro/react-pelcro-js 3.26.0-beta.23 → 3.26.0-beta.25
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.js +9 -38
- package/dist/index.esm.js +9 -38
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3459,6 +3459,8 @@ var labels$15 = {
|
|
|
3459
3459
|
lastName: "Last name",
|
|
3460
3460
|
phone: "Phone",
|
|
3461
3461
|
freeItems: "Free Items",
|
|
3462
|
+
order: "Order",
|
|
3463
|
+
amount: "Amount",
|
|
3462
3464
|
email: "Email",
|
|
3463
3465
|
password: "Password"
|
|
3464
3466
|
};
|
|
@@ -4385,6 +4387,8 @@ var labels$P = {
|
|
|
4385
4387
|
lastName: "Nom de famille",
|
|
4386
4388
|
phone: "Téléphoner",
|
|
4387
4389
|
freeItems: "Articles gratuits",
|
|
4390
|
+
order: "Commande",
|
|
4391
|
+
amount: "Montant",
|
|
4388
4392
|
email: "Courriel",
|
|
4389
4393
|
password: "Créer un mot de passe"
|
|
4390
4394
|
};
|
|
@@ -5310,6 +5314,8 @@ var labels$x = {
|
|
|
5310
5314
|
lastName: "성",
|
|
5311
5315
|
phone: "핸드폰",
|
|
5312
5316
|
freeItems: "무료 아이템",
|
|
5317
|
+
order: "주문",
|
|
5318
|
+
amount: "금액",
|
|
5313
5319
|
email: "이메일",
|
|
5314
5320
|
password: "비밀번호"
|
|
5315
5321
|
};
|
|
@@ -6340,6 +6346,8 @@ var labels$f = {
|
|
|
6340
6346
|
lastName: "Apellido",
|
|
6341
6347
|
phone: "Teléfono",
|
|
6342
6348
|
freeItems: "Artículos gratis",
|
|
6349
|
+
order: "Pida",
|
|
6350
|
+
amount: "Importe",
|
|
6343
6351
|
email: "Correo",
|
|
6344
6352
|
password: "Contraseña"
|
|
6345
6353
|
};
|
|
@@ -9517,43 +9525,6 @@ const calcAndFormatItemsTotal = (items, currency) => {
|
|
|
9517
9525
|
}
|
|
9518
9526
|
return getFormattedPriceByLocal(totalWithoutDividingBy100, currency, getPageOrDefaultLanguage());
|
|
9519
9527
|
};
|
|
9520
|
-
const getOrderInfo = order => {
|
|
9521
|
-
if (!order) {
|
|
9522
|
-
return {
|
|
9523
|
-
price: null,
|
|
9524
|
-
currency: null,
|
|
9525
|
-
label: null
|
|
9526
|
-
};
|
|
9527
|
-
}
|
|
9528
|
-
const isQuickPurchase = !Array.isArray(order);
|
|
9529
|
-
if (isQuickPurchase) {
|
|
9530
|
-
return {
|
|
9531
|
-
price: order.price * order.quantity,
|
|
9532
|
-
currency: order.currency,
|
|
9533
|
-
label: order.name
|
|
9534
|
-
};
|
|
9535
|
-
}
|
|
9536
|
-
if (order.length === 0) {
|
|
9537
|
-
return {
|
|
9538
|
-
price: null,
|
|
9539
|
-
currency: null,
|
|
9540
|
-
label: null
|
|
9541
|
-
};
|
|
9542
|
-
}
|
|
9543
|
-
if (order.length === 1) {
|
|
9544
|
-
return {
|
|
9545
|
-
price: order[0].price * order[0].quantity,
|
|
9546
|
-
currency: order[0].currency,
|
|
9547
|
-
label: order[0].name
|
|
9548
|
-
};
|
|
9549
|
-
}
|
|
9550
|
-
const price = order.reduce((total, item) => total + item.price * item.quantity, 0);
|
|
9551
|
-
return {
|
|
9552
|
-
price,
|
|
9553
|
-
currency: order[0].currency,
|
|
9554
|
-
label: price === 0 ? "Free Items" : "Order"
|
|
9555
|
-
};
|
|
9556
|
-
};
|
|
9557
9528
|
|
|
9558
9529
|
/**
|
|
9559
9530
|
* returns true if the URL contains a supported view trigger URL
|
|
@@ -21586,7 +21557,7 @@ function PaymentMethodView(_ref) {
|
|
|
21586
21557
|
className: "plc-text-gray-600"
|
|
21587
21558
|
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
21588
21559
|
className: "plc-tracking-wider plc-uppercase"
|
|
21589
|
-
},
|
|
21560
|
+
}, t("labels.amount")), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
21590
21561
|
className: "plc-text-xl plc-font-semibold plc-text-primary-600"
|
|
21591
21562
|
}, (_calcAndFormatItemsTo = calcAndFormatItemsTotal(order, (_order$ = order[0]) === null || _order$ === void 0 ? void 0 : _order$.currency)) !== null && _calcAndFormatItemsTo !== void 0 ? _calcAndFormatItemsTo : getFormattedPriceByLocal(order === null || order === void 0 ? void 0 : order.price, order === null || order === void 0 ? void 0 : order.currency, getPageOrDefaultLanguage())))), cardProcessor === "stripe" && !showSubscriptionButton && !showOrderButton && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21592
21563
|
className: "plc-flex plc-items-center plc-w-full plc-px-4 plc-py-2 plc-text-center plc-text-green-600 plc-border plc-border-green-400 plc-rounded plc-bg-green-50"
|
package/dist/index.esm.js
CHANGED
|
@@ -3429,6 +3429,8 @@ var labels$15 = {
|
|
|
3429
3429
|
lastName: "Last name",
|
|
3430
3430
|
phone: "Phone",
|
|
3431
3431
|
freeItems: "Free Items",
|
|
3432
|
+
order: "Order",
|
|
3433
|
+
amount: "Amount",
|
|
3432
3434
|
email: "Email",
|
|
3433
3435
|
password: "Password"
|
|
3434
3436
|
};
|
|
@@ -4355,6 +4357,8 @@ var labels$P = {
|
|
|
4355
4357
|
lastName: "Nom de famille",
|
|
4356
4358
|
phone: "Téléphoner",
|
|
4357
4359
|
freeItems: "Articles gratuits",
|
|
4360
|
+
order: "Commande",
|
|
4361
|
+
amount: "Montant",
|
|
4358
4362
|
email: "Courriel",
|
|
4359
4363
|
password: "Créer un mot de passe"
|
|
4360
4364
|
};
|
|
@@ -5280,6 +5284,8 @@ var labels$x = {
|
|
|
5280
5284
|
lastName: "성",
|
|
5281
5285
|
phone: "핸드폰",
|
|
5282
5286
|
freeItems: "무료 아이템",
|
|
5287
|
+
order: "주문",
|
|
5288
|
+
amount: "금액",
|
|
5283
5289
|
email: "이메일",
|
|
5284
5290
|
password: "비밀번호"
|
|
5285
5291
|
};
|
|
@@ -6310,6 +6316,8 @@ var labels$f = {
|
|
|
6310
6316
|
lastName: "Apellido",
|
|
6311
6317
|
phone: "Teléfono",
|
|
6312
6318
|
freeItems: "Artículos gratis",
|
|
6319
|
+
order: "Pida",
|
|
6320
|
+
amount: "Importe",
|
|
6313
6321
|
email: "Correo",
|
|
6314
6322
|
password: "Contraseña"
|
|
6315
6323
|
};
|
|
@@ -9487,43 +9495,6 @@ const calcAndFormatItemsTotal = (items, currency) => {
|
|
|
9487
9495
|
}
|
|
9488
9496
|
return getFormattedPriceByLocal(totalWithoutDividingBy100, currency, getPageOrDefaultLanguage());
|
|
9489
9497
|
};
|
|
9490
|
-
const getOrderInfo = order => {
|
|
9491
|
-
if (!order) {
|
|
9492
|
-
return {
|
|
9493
|
-
price: null,
|
|
9494
|
-
currency: null,
|
|
9495
|
-
label: null
|
|
9496
|
-
};
|
|
9497
|
-
}
|
|
9498
|
-
const isQuickPurchase = !Array.isArray(order);
|
|
9499
|
-
if (isQuickPurchase) {
|
|
9500
|
-
return {
|
|
9501
|
-
price: order.price * order.quantity,
|
|
9502
|
-
currency: order.currency,
|
|
9503
|
-
label: order.name
|
|
9504
|
-
};
|
|
9505
|
-
}
|
|
9506
|
-
if (order.length === 0) {
|
|
9507
|
-
return {
|
|
9508
|
-
price: null,
|
|
9509
|
-
currency: null,
|
|
9510
|
-
label: null
|
|
9511
|
-
};
|
|
9512
|
-
}
|
|
9513
|
-
if (order.length === 1) {
|
|
9514
|
-
return {
|
|
9515
|
-
price: order[0].price * order[0].quantity,
|
|
9516
|
-
currency: order[0].currency,
|
|
9517
|
-
label: order[0].name
|
|
9518
|
-
};
|
|
9519
|
-
}
|
|
9520
|
-
const price = order.reduce((total, item) => total + item.price * item.quantity, 0);
|
|
9521
|
-
return {
|
|
9522
|
-
price,
|
|
9523
|
-
currency: order[0].currency,
|
|
9524
|
-
label: price === 0 ? "Free Items" : "Order"
|
|
9525
|
-
};
|
|
9526
|
-
};
|
|
9527
9498
|
|
|
9528
9499
|
/**
|
|
9529
9500
|
* returns true if the URL contains a supported view trigger URL
|
|
@@ -21556,7 +21527,7 @@ function PaymentMethodView(_ref) {
|
|
|
21556
21527
|
className: "plc-text-gray-600"
|
|
21557
21528
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
21558
21529
|
className: "plc-tracking-wider plc-uppercase"
|
|
21559
|
-
},
|
|
21530
|
+
}, t("labels.amount")), /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
|
|
21560
21531
|
className: "plc-text-xl plc-font-semibold plc-text-primary-600"
|
|
21561
21532
|
}, (_calcAndFormatItemsTo = calcAndFormatItemsTotal(order, (_order$ = order[0]) === null || _order$ === void 0 ? void 0 : _order$.currency)) !== null && _calcAndFormatItemsTo !== void 0 ? _calcAndFormatItemsTo : getFormattedPriceByLocal(order === null || order === void 0 ? void 0 : order.price, order === null || order === void 0 ? void 0 : order.currency, getPageOrDefaultLanguage())))), cardProcessor === "stripe" && !showSubscriptionButton && !showOrderButton && /*#__PURE__*/React__default.createElement("div", {
|
|
21562
21533
|
className: "plc-flex plc-items-center plc-w-full plc-px-4 plc-py-2 plc-text-center plc-text-green-600 plc-border plc-border-green-400 plc-rounded plc-bg-green-50"
|