@pelcro/react-pelcro-js 4.0.0-alpha.82 → 4.0.0-alpha.84

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 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
- var _props$onClose;
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
 
@@ -28605,9 +28604,10 @@ function SubscriptionCreateModal({
28605
28604
 
28606
28605
  return /*#__PURE__*/React__default['default'].createElement(Modal, {
28607
28606
  id: "pelcro-subscription-create-modal",
28608
- onDisplay: onDisplay,
28609
- onClose: onClose
28610
- }, /*#__PURE__*/React__default['default'].createElement(ModalHeader, null, /*#__PURE__*/React__default['default'].createElement("div", {
28607
+ onDisplay: onDisplay
28608
+ }, /*#__PURE__*/React__default['default'].createElement(ModalHeader, {
28609
+ onCloseModal: onClose
28610
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
28611
28611
  className: "plc-text-left plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
28612
28612
  }, showBackButton && /*#__PURE__*/React__default['default'].createElement("button", {
28613
28613
  type: "button",
@@ -33051,7 +33051,7 @@ const OrderCreateSummary = ({
33051
33051
  }) => {
33052
33052
  var _calcAndFormatItemsTo, _order$;
33053
33053
 
33054
- const items = (order === null || order === void 0 ? void 0 : order.length) > 1 ? order : [order];
33054
+ const items = (order === null || order === void 0 ? void 0 : order.length) > 0 ? order : [];
33055
33055
  return /*#__PURE__*/React__default['default'].createElement("div", {
33056
33056
  className: "plc-px-8 md:plc-px-0"
33057
33057
  }, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -33085,7 +33085,7 @@ const OrderCreateSummary = ({
33085
33085
  className: "plc-flex plc-flex-none plc-space-x-4"
33086
33086
  }, /*#__PURE__*/React__default['default'].createElement("p", {
33087
33087
  className: "plc-text-gray-900"
33088
- }, item && calcAndFormatItemsTotal([item], item === null || item === void 0 ? void 0 : item.currency))))));
33088
+ }, item && item.currency && calcAndFormatItemsTotal([item], item === null || item === void 0 ? void 0 : item.currency))))));
33089
33089
  })))), /*#__PURE__*/React__default['default'].createElement("dl", {
33090
33090
  className: "plc-mt-6 plc-space-y-6 plc-text-sm plc-font-medium plc-text-gray-500"
33091
33091
  }, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -33180,9 +33180,10 @@ const OrderCreateModal = ({
33180
33180
  return /*#__PURE__*/React__default['default'].createElement(Modal, {
33181
33181
  id: "pelcro-order-create-modal",
33182
33182
  className: "plc-max-w-7xl",
33183
- onDisplay: onDisplay,
33184
- onClose: onClose
33185
- }, /*#__PURE__*/React__default['default'].createElement(ModalHeader, null, /*#__PURE__*/React__default['default'].createElement("div", {
33183
+ onDisplay: onDisplay
33184
+ }, /*#__PURE__*/React__default['default'].createElement(ModalHeader, {
33185
+ onCloseModal: onClose
33186
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
33186
33187
  className: "plc-text-left plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
33187
33188
  }, /*#__PURE__*/React__default['default'].createElement("h4", {
33188
33189
  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
- var _props$onClose;
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
 
@@ -28575,9 +28574,10 @@ function SubscriptionCreateModal({
28575
28574
 
28576
28575
  return /*#__PURE__*/React__default.createElement(Modal, {
28577
28576
  id: "pelcro-subscription-create-modal",
28578
- onDisplay: onDisplay,
28579
- onClose: onClose
28580
- }, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
28577
+ onDisplay: onDisplay
28578
+ }, /*#__PURE__*/React__default.createElement(ModalHeader, {
28579
+ onCloseModal: onClose
28580
+ }, /*#__PURE__*/React__default.createElement("div", {
28581
28581
  className: "plc-text-left plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
28582
28582
  }, showBackButton && /*#__PURE__*/React__default.createElement("button", {
28583
28583
  type: "button",
@@ -33021,7 +33021,7 @@ const OrderCreateSummary = ({
33021
33021
  }) => {
33022
33022
  var _calcAndFormatItemsTo, _order$;
33023
33023
 
33024
- const items = (order === null || order === void 0 ? void 0 : order.length) > 1 ? order : [order];
33024
+ const items = (order === null || order === void 0 ? void 0 : order.length) > 0 ? order : [];
33025
33025
  return /*#__PURE__*/React__default.createElement("div", {
33026
33026
  className: "plc-px-8 md:plc-px-0"
33027
33027
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -33055,7 +33055,7 @@ const OrderCreateSummary = ({
33055
33055
  className: "plc-flex plc-flex-none plc-space-x-4"
33056
33056
  }, /*#__PURE__*/React__default.createElement("p", {
33057
33057
  className: "plc-text-gray-900"
33058
- }, item && calcAndFormatItemsTotal([item], item === null || item === void 0 ? void 0 : item.currency))))));
33058
+ }, item && item.currency && calcAndFormatItemsTotal([item], item === null || item === void 0 ? void 0 : item.currency))))));
33059
33059
  })))), /*#__PURE__*/React__default.createElement("dl", {
33060
33060
  className: "plc-mt-6 plc-space-y-6 plc-text-sm plc-font-medium plc-text-gray-500"
33061
33061
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -33150,9 +33150,10 @@ const OrderCreateModal = ({
33150
33150
  return /*#__PURE__*/React__default.createElement(Modal, {
33151
33151
  id: "pelcro-order-create-modal",
33152
33152
  className: "plc-max-w-7xl",
33153
- onDisplay: onDisplay,
33154
- onClose: onClose
33155
- }, /*#__PURE__*/React__default.createElement(ModalHeader, null, /*#__PURE__*/React__default.createElement("div", {
33153
+ onDisplay: onDisplay
33154
+ }, /*#__PURE__*/React__default.createElement(ModalHeader, {
33155
+ onCloseModal: onClose
33156
+ }, /*#__PURE__*/React__default.createElement("div", {
33156
33157
  className: "plc-text-left plc-text-gray-900 pelcro-title-wrapper plc-flex-1 plc-flex plc-flex-col plc-justify-center"
33157
33158
  }, /*#__PURE__*/React__default.createElement("h4", {
33158
33159
  className: "plc-text-xl plc-font-bold "
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "4.0.0-alpha.82",
4
+ "version": "4.0.0-alpha.84",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",