@pelcro/react-pelcro-js 4.0.0-alpha.83 → 4.0.0-alpha.85
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 +17 -8
- package/dist/index.esm.js +17 -8
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -28460,10 +28460,11 @@ const SubscriptionCreateSummary = () => {
|
|
|
28460
28460
|
const autoRenewed = plan.auto_renew;
|
|
28461
28461
|
const {
|
|
28462
28462
|
interval_translated: intervalTranslated,
|
|
28463
|
-
interval_count: intervalCount
|
|
28463
|
+
interval_count: intervalCount,
|
|
28464
|
+
interval
|
|
28464
28465
|
} = plan;
|
|
28465
28466
|
const intervalText = t("labels.interval", {
|
|
28466
|
-
interval: intervalTranslated,
|
|
28467
|
+
interval: intervalTranslated !== null && intervalTranslated !== void 0 ? intervalTranslated : interval,
|
|
28467
28468
|
count: intervalCount
|
|
28468
28469
|
});
|
|
28469
28470
|
const priceFormatted = getFormattedPriceByLocal((plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -28604,9 +28605,10 @@ function SubscriptionCreateModal({
|
|
|
28604
28605
|
|
|
28605
28606
|
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
28606
28607
|
id: "pelcro-subscription-create-modal",
|
|
28607
|
-
onDisplay: onDisplay
|
|
28608
|
-
|
|
28609
|
-
|
|
28608
|
+
onDisplay: onDisplay
|
|
28609
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalHeader, {
|
|
28610
|
+
onCloseModal: onClose
|
|
28611
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28610
28612
|
className: "plc-text-left plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
28611
28613
|
}, showBackButton && /*#__PURE__*/React__default['default'].createElement("button", {
|
|
28612
28614
|
type: "button",
|
|
@@ -33048,9 +33050,16 @@ const OrderCreateContainer = props => /*#__PURE__*/React__default['default'].cre
|
|
|
33048
33050
|
const OrderCreateSummary = ({
|
|
33049
33051
|
order
|
|
33050
33052
|
}) => {
|
|
33051
|
-
|
|
33053
|
+
const [items, setItems] = React.useState([]);
|
|
33054
|
+
const [orderTotal, setOrderTotal] = React.useState("");
|
|
33055
|
+
React.useEffect(() => {
|
|
33056
|
+
if ((order === null || order === void 0 ? void 0 : order.length) > 0) {
|
|
33057
|
+
var _calcAndFormatItemsTo, _order$;
|
|
33052
33058
|
|
|
33053
|
-
|
|
33059
|
+
setItems(order);
|
|
33060
|
+
setOrderTotal((_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()));
|
|
33061
|
+
}
|
|
33062
|
+
}, []);
|
|
33054
33063
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
33055
33064
|
className: "plc-px-8 md:plc-px-0"
|
|
33056
33065
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -33093,7 +33102,7 @@ const OrderCreateSummary = ({
|
|
|
33093
33102
|
className: "plc-text-base"
|
|
33094
33103
|
}, "Total"), /*#__PURE__*/React__default['default'].createElement("dd", {
|
|
33095
33104
|
className: "plc-text-base"
|
|
33096
|
-
},
|
|
33105
|
+
}, orderTotal))));
|
|
33097
33106
|
};
|
|
33098
33107
|
|
|
33099
33108
|
const OrderCreateView = props => {
|
package/dist/index.esm.js
CHANGED
|
@@ -28430,10 +28430,11 @@ const SubscriptionCreateSummary = () => {
|
|
|
28430
28430
|
const autoRenewed = plan.auto_renew;
|
|
28431
28431
|
const {
|
|
28432
28432
|
interval_translated: intervalTranslated,
|
|
28433
|
-
interval_count: intervalCount
|
|
28433
|
+
interval_count: intervalCount,
|
|
28434
|
+
interval
|
|
28434
28435
|
} = plan;
|
|
28435
28436
|
const intervalText = t("labels.interval", {
|
|
28436
|
-
interval: intervalTranslated,
|
|
28437
|
+
interval: intervalTranslated !== null && intervalTranslated !== void 0 ? intervalTranslated : interval,
|
|
28437
28438
|
count: intervalCount
|
|
28438
28439
|
});
|
|
28439
28440
|
const priceFormatted = getFormattedPriceByLocal((plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -28574,9 +28575,10 @@ function SubscriptionCreateModal({
|
|
|
28574
28575
|
|
|
28575
28576
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
28576
28577
|
id: "pelcro-subscription-create-modal",
|
|
28577
|
-
onDisplay: onDisplay
|
|
28578
|
-
|
|
28579
|
-
|
|
28578
|
+
onDisplay: onDisplay
|
|
28579
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, {
|
|
28580
|
+
onCloseModal: onClose
|
|
28581
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
28580
28582
|
className: "plc-text-left plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
28581
28583
|
}, showBackButton && /*#__PURE__*/React__default.createElement("button", {
|
|
28582
28584
|
type: "button",
|
|
@@ -33018,9 +33020,16 @@ const OrderCreateContainer = props => /*#__PURE__*/React__default.createElement(
|
|
|
33018
33020
|
const OrderCreateSummary = ({
|
|
33019
33021
|
order
|
|
33020
33022
|
}) => {
|
|
33021
|
-
|
|
33023
|
+
const [items, setItems] = useState([]);
|
|
33024
|
+
const [orderTotal, setOrderTotal] = useState("");
|
|
33025
|
+
useEffect(() => {
|
|
33026
|
+
if ((order === null || order === void 0 ? void 0 : order.length) > 0) {
|
|
33027
|
+
var _calcAndFormatItemsTo, _order$;
|
|
33022
33028
|
|
|
33023
|
-
|
|
33029
|
+
setItems(order);
|
|
33030
|
+
setOrderTotal((_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()));
|
|
33031
|
+
}
|
|
33032
|
+
}, []);
|
|
33024
33033
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
33025
33034
|
className: "plc-px-8 md:plc-px-0"
|
|
33026
33035
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -33063,7 +33072,7 @@ const OrderCreateSummary = ({
|
|
|
33063
33072
|
className: "plc-text-base"
|
|
33064
33073
|
}, "Total"), /*#__PURE__*/React__default.createElement("dd", {
|
|
33065
33074
|
className: "plc-text-base"
|
|
33066
|
-
},
|
|
33075
|
+
}, orderTotal))));
|
|
33067
33076
|
};
|
|
33068
33077
|
|
|
33069
33078
|
const OrderCreateView = props => {
|