@pelcro/react-pelcro-js 4.0.0-alpha.82 → 4.0.0-alpha.83
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 +8 -8
- package/dist/index.esm.js +8 -8
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -14404,6 +14404,7 @@ function Modal({
|
|
|
14404
14404
|
const ModalHeader = ({
|
|
14405
14405
|
id,
|
|
14406
14406
|
onDisplay,
|
|
14407
|
+
onCloseModal,
|
|
14407
14408
|
className = "",
|
|
14408
14409
|
hideCloseButton,
|
|
14409
14410
|
children,
|
|
@@ -14414,9 +14415,7 @@ const ModalHeader = ({
|
|
|
14414
14415
|
const resetView = usePelcro(state => state.resetView);
|
|
14415
14416
|
|
|
14416
14417
|
const onClose = () => {
|
|
14417
|
-
|
|
14418
|
-
|
|
14419
|
-
props === null || props === void 0 ? void 0 : (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
|
|
14418
|
+
onCloseModal === null || onCloseModal === void 0 ? void 0 : onCloseModal();
|
|
14420
14419
|
resetView();
|
|
14421
14420
|
};
|
|
14422
14421
|
|
|
@@ -33051,7 +33050,7 @@ const OrderCreateSummary = ({
|
|
|
33051
33050
|
}) => {
|
|
33052
33051
|
var _calcAndFormatItemsTo, _order$;
|
|
33053
33052
|
|
|
33054
|
-
const items = (order === null || order === void 0 ? void 0 : order.length) >
|
|
33053
|
+
const items = (order === null || order === void 0 ? void 0 : order.length) > 0 ? order : [];
|
|
33055
33054
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
33056
33055
|
className: "plc-px-8 md:plc-px-0"
|
|
33057
33056
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -33085,7 +33084,7 @@ const OrderCreateSummary = ({
|
|
|
33085
33084
|
className: "plc-flex plc-flex-none plc-space-x-4"
|
|
33086
33085
|
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
33087
33086
|
className: "plc-text-gray-900"
|
|
33088
|
-
}, item && calcAndFormatItemsTotal([item], item === null || item === void 0 ? void 0 : item.currency))))));
|
|
33087
|
+
}, item && item.currency && calcAndFormatItemsTotal([item], item === null || item === void 0 ? void 0 : item.currency))))));
|
|
33089
33088
|
})))), /*#__PURE__*/React__default['default'].createElement("dl", {
|
|
33090
33089
|
className: "plc-mt-6 plc-space-y-6 plc-text-sm plc-font-medium plc-text-gray-500"
|
|
33091
33090
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -33180,9 +33179,10 @@ const OrderCreateModal = ({
|
|
|
33180
33179
|
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
33181
33180
|
id: "pelcro-order-create-modal",
|
|
33182
33181
|
className: "plc-max-w-7xl",
|
|
33183
|
-
onDisplay: onDisplay
|
|
33184
|
-
|
|
33185
|
-
|
|
33182
|
+
onDisplay: onDisplay
|
|
33183
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalHeader, {
|
|
33184
|
+
onCloseModal: onClose
|
|
33185
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
33186
33186
|
className: "plc-text-left plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
33187
33187
|
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
33188
33188
|
className: "plc-text-xl plc-font-bold "
|
package/dist/index.esm.js
CHANGED
|
@@ -14374,6 +14374,7 @@ function Modal({
|
|
|
14374
14374
|
const ModalHeader = ({
|
|
14375
14375
|
id,
|
|
14376
14376
|
onDisplay,
|
|
14377
|
+
onCloseModal,
|
|
14377
14378
|
className = "",
|
|
14378
14379
|
hideCloseButton,
|
|
14379
14380
|
children,
|
|
@@ -14384,9 +14385,7 @@ const ModalHeader = ({
|
|
|
14384
14385
|
const resetView = usePelcro(state => state.resetView);
|
|
14385
14386
|
|
|
14386
14387
|
const onClose = () => {
|
|
14387
|
-
|
|
14388
|
-
|
|
14389
|
-
props === null || props === void 0 ? void 0 : (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
|
|
14388
|
+
onCloseModal === null || onCloseModal === void 0 ? void 0 : onCloseModal();
|
|
14390
14389
|
resetView();
|
|
14391
14390
|
};
|
|
14392
14391
|
|
|
@@ -33021,7 +33020,7 @@ const OrderCreateSummary = ({
|
|
|
33021
33020
|
}) => {
|
|
33022
33021
|
var _calcAndFormatItemsTo, _order$;
|
|
33023
33022
|
|
|
33024
|
-
const items = (order === null || order === void 0 ? void 0 : order.length) >
|
|
33023
|
+
const items = (order === null || order === void 0 ? void 0 : order.length) > 0 ? order : [];
|
|
33025
33024
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
33026
33025
|
className: "plc-px-8 md:plc-px-0"
|
|
33027
33026
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -33055,7 +33054,7 @@ const OrderCreateSummary = ({
|
|
|
33055
33054
|
className: "plc-flex plc-flex-none plc-space-x-4"
|
|
33056
33055
|
}, /*#__PURE__*/React__default.createElement("p", {
|
|
33057
33056
|
className: "plc-text-gray-900"
|
|
33058
|
-
}, item && calcAndFormatItemsTotal([item], item === null || item === void 0 ? void 0 : item.currency))))));
|
|
33057
|
+
}, item && item.currency && calcAndFormatItemsTotal([item], item === null || item === void 0 ? void 0 : item.currency))))));
|
|
33059
33058
|
})))), /*#__PURE__*/React__default.createElement("dl", {
|
|
33060
33059
|
className: "plc-mt-6 plc-space-y-6 plc-text-sm plc-font-medium plc-text-gray-500"
|
|
33061
33060
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -33150,9 +33149,10 @@ const OrderCreateModal = ({
|
|
|
33150
33149
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
33151
33150
|
id: "pelcro-order-create-modal",
|
|
33152
33151
|
className: "plc-max-w-7xl",
|
|
33153
|
-
onDisplay: onDisplay
|
|
33154
|
-
|
|
33155
|
-
|
|
33152
|
+
onDisplay: onDisplay
|
|
33153
|
+
}, /*#__PURE__*/React__default.createElement(ModalHeader, {
|
|
33154
|
+
onCloseModal: onClose
|
|
33155
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
33156
33156
|
className: "plc-text-left plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
|
|
33157
33157
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
33158
33158
|
className: "plc-text-xl plc-font-bold "
|