@pelcro/react-pelcro-js 3.26.0-sandbox.2 → 3.26.0-sandbox.8

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
@@ -4125,7 +4125,8 @@ var labels$N = {
4125
4125
  emails: "Enter emails",
4126
4126
  status: "Status",
4127
4127
  actions: "Actions",
4128
- email: "Email"
4128
+ email: "Email",
4129
+ listNote: "Comma-separated list e.g."
4129
4130
  };
4130
4131
  var subscriptionManageMembers_en = {
4131
4132
  labels: labels$N
@@ -4139,7 +4140,8 @@ var labels$M = {
4139
4140
  emails: "Saisir les e-mails",
4140
4141
  status: "Statut",
4141
4142
  actions: "Actions",
4142
- email: "E-mail"
4143
+ email: "E-mail",
4144
+ listNote: "Liste séparée par des virgules, par ex."
4143
4145
  };
4144
4146
  var subscriptionManageMembers_fr = {
4145
4147
  labels: labels$M
@@ -4153,7 +4155,8 @@ var labels$L = {
4153
4155
  emails: "이메일 입력",
4154
4156
  status: "상태",
4155
4157
  actions: "행위",
4156
- email: "이메일"
4158
+ email: "이메일",
4159
+ listNote: "쉼표로 구분된 목록입니다."
4157
4160
  };
4158
4161
  var subscriptionManageMembers_ko = {
4159
4162
  labels: labels$L
@@ -14651,7 +14654,6 @@ class SelectModal extends React.Component {
14651
14654
  });
14652
14655
  });
14653
14656
  });
14654
- console.log("bugsnag Triggered");
14655
14657
  }
14656
14658
  });
14657
14659
  _defineProperty$3(this, "componentWillUnmount", () => {
@@ -17216,7 +17218,6 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17216
17218
  };
17217
17219
  const submitUsingCybersource = (state, dispatch) => {
17218
17220
  var _cybersourceInstanceR;
17219
- console.log("State", state);
17220
17221
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
17221
17222
  if (isUsingExistingPaymentMethod) {
17222
17223
  // no need to create a new source using cybersrce
@@ -18528,7 +18529,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18528
18529
  onSuccess(res);
18529
18530
  });
18530
18531
  };
18531
- const purchase = (gatewayService, gatewayToken, state, dispatch) => {
18532
+ const purchase = (gatewayService, backendSource, state, dispatch) => {
18532
18533
  const isQuickPurchase = !Array.isArray(order);
18533
18534
  const mappedOrderItems = isQuickPurchase ? [{
18534
18535
  sku_id: order.id,
@@ -18543,8 +18544,8 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18543
18544
  const payment = new Payment(gatewayService);
18544
18545
  payment.execute({
18545
18546
  type: PAYMENT_TYPES.PURCHASE_ECOMMERCE_ORDER,
18546
- token: gatewayToken,
18547
- isExistingSource: Boolean(selectedPaymentMethodId),
18547
+ token: backendSource,
18548
+ isExistingSource: true,
18548
18549
  items: mappedOrderItems,
18549
18550
  addressId: selectedAddressId,
18550
18551
  couponCode
@@ -18610,12 +18611,12 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18610
18611
  }
18611
18612
  });
18612
18613
  };
18613
- const payInvoice = (gatewayService, gatewayToken, dispatch) => {
18614
+ const payInvoice = (gatewayService, backendSource, dispatch) => {
18614
18615
  const payment = new Payment(gatewayService);
18615
18616
  return payment.execute({
18616
18617
  type: PAYMENT_TYPES.PAY_INVOICE,
18617
- token: gatewayToken,
18618
- isExistingSource: Boolean(selectedPaymentMethodId),
18618
+ token: backendSource,
18619
+ isExistingSource: true,
18619
18620
  invoiceId: invoice.id
18620
18621
  }, (err, res) => {
18621
18622
  var _res$data5, _res$data5$payment_in;
@@ -18644,6 +18645,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18644
18645
  }
18645
18646
  });
18646
18647
  };
18648
+ console.log("trigger release");
18647
18649
  const updatePaymentSource = (state, dispatch) => {
18648
18650
  return stripe.createSource({
18649
18651
  type: "card"
@@ -18864,13 +18866,13 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18864
18866
  }
18865
18867
  });
18866
18868
  };
18867
- const handlePayment = stripeSource => {
18868
- if (stripeSource && type === "createPayment") {
18869
- subscribe(stripeSource, state, dispatch);
18870
- } else if (stripeSource && type === "orderCreate") {
18871
- purchase(new StripeGateway(), stripeSource.id, state, dispatch);
18872
- } else if (stripeSource && type === "invoicePayment") {
18873
- payInvoice(new StripeGateway(), stripeSource.id, dispatch);
18869
+ const handlePayment = backendSource => {
18870
+ if (backendSource && type === "createPayment") {
18871
+ subscribe(backendSource, state, dispatch);
18872
+ } else if (backendSource && type === "orderCreate") {
18873
+ purchase(new StripeGateway(), backendSource.id, state, dispatch);
18874
+ } else if (backendSource && type === "invoicePayment") {
18875
+ payInvoice(new StripeGateway(), backendSource.id, dispatch);
18874
18876
  }
18875
18877
  };
18876
18878
  const handlePaymentError = error => {
@@ -22042,7 +22044,7 @@ function SubscriptionManageMembersView(props) {
22042
22044
  className: "plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
22043
22045
  }, /*#__PURE__*/React__default['default'].createElement("h4", {
22044
22046
  className: "plc-text-2xl"
22045
- }, t("labels.inviteMembers")), /*#__PURE__*/React__default['default'].createElement("p", null, "Comma-separated list e.g. 'john@example.com,jane@example.com'")), /*#__PURE__*/React__default['default'].createElement("form", {
22047
+ }, t("labels.inviteMembers")), /*#__PURE__*/React__default['default'].createElement("p", null, t("labels.listNote"), " 'john@example.com,jane@example.com'")), /*#__PURE__*/React__default['default'].createElement("form", {
22046
22048
  action: "javascript:void(0);",
22047
22049
  className: "plc-mt-2 pelcro-form"
22048
22050
  }, /*#__PURE__*/React__default['default'].createElement(SubscriptionManageMembersContainer, props, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, null), /*#__PURE__*/React__default['default'].createElement(SubscriptionManageMembersEmails, {
package/dist/index.esm.js CHANGED
@@ -4095,7 +4095,8 @@ var labels$N = {
4095
4095
  emails: "Enter emails",
4096
4096
  status: "Status",
4097
4097
  actions: "Actions",
4098
- email: "Email"
4098
+ email: "Email",
4099
+ listNote: "Comma-separated list e.g."
4099
4100
  };
4100
4101
  var subscriptionManageMembers_en = {
4101
4102
  labels: labels$N
@@ -4109,7 +4110,8 @@ var labels$M = {
4109
4110
  emails: "Saisir les e-mails",
4110
4111
  status: "Statut",
4111
4112
  actions: "Actions",
4112
- email: "E-mail"
4113
+ email: "E-mail",
4114
+ listNote: "Liste séparée par des virgules, par ex."
4113
4115
  };
4114
4116
  var subscriptionManageMembers_fr = {
4115
4117
  labels: labels$M
@@ -4123,7 +4125,8 @@ var labels$L = {
4123
4125
  emails: "이메일 입력",
4124
4126
  status: "상태",
4125
4127
  actions: "행위",
4126
- email: "이메일"
4128
+ email: "이메일",
4129
+ listNote: "쉼표로 구분된 목록입니다."
4127
4130
  };
4128
4131
  var subscriptionManageMembers_ko = {
4129
4132
  labels: labels$L
@@ -14621,7 +14624,6 @@ class SelectModal extends Component {
14621
14624
  });
14622
14625
  });
14623
14626
  });
14624
- console.log("bugsnag Triggered");
14625
14627
  }
14626
14628
  });
14627
14629
  _defineProperty$3(this, "componentWillUnmount", () => {
@@ -17186,7 +17188,6 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17186
17188
  };
17187
17189
  const submitUsingCybersource = (state, dispatch) => {
17188
17190
  var _cybersourceInstanceR;
17189
- console.log("State", state);
17190
17191
  const isUsingExistingPaymentMethod = Boolean(selectedPaymentMethodId);
17191
17192
  if (isUsingExistingPaymentMethod) {
17192
17193
  // no need to create a new source using cybersrce
@@ -18498,7 +18499,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18498
18499
  onSuccess(res);
18499
18500
  });
18500
18501
  };
18501
- const purchase = (gatewayService, gatewayToken, state, dispatch) => {
18502
+ const purchase = (gatewayService, backendSource, state, dispatch) => {
18502
18503
  const isQuickPurchase = !Array.isArray(order);
18503
18504
  const mappedOrderItems = isQuickPurchase ? [{
18504
18505
  sku_id: order.id,
@@ -18513,8 +18514,8 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18513
18514
  const payment = new Payment(gatewayService);
18514
18515
  payment.execute({
18515
18516
  type: PAYMENT_TYPES.PURCHASE_ECOMMERCE_ORDER,
18516
- token: gatewayToken,
18517
- isExistingSource: Boolean(selectedPaymentMethodId),
18517
+ token: backendSource,
18518
+ isExistingSource: true,
18518
18519
  items: mappedOrderItems,
18519
18520
  addressId: selectedAddressId,
18520
18521
  couponCode
@@ -18580,12 +18581,12 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18580
18581
  }
18581
18582
  });
18582
18583
  };
18583
- const payInvoice = (gatewayService, gatewayToken, dispatch) => {
18584
+ const payInvoice = (gatewayService, backendSource, dispatch) => {
18584
18585
  const payment = new Payment(gatewayService);
18585
18586
  return payment.execute({
18586
18587
  type: PAYMENT_TYPES.PAY_INVOICE,
18587
- token: gatewayToken,
18588
- isExistingSource: Boolean(selectedPaymentMethodId),
18588
+ token: backendSource,
18589
+ isExistingSource: true,
18589
18590
  invoiceId: invoice.id
18590
18591
  }, (err, res) => {
18591
18592
  var _res$data5, _res$data5$payment_in;
@@ -18614,6 +18615,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18614
18615
  }
18615
18616
  });
18616
18617
  };
18618
+ console.log("trigger release");
18617
18619
  const updatePaymentSource = (state, dispatch) => {
18618
18620
  return stripe.createSource({
18619
18621
  type: "card"
@@ -18834,13 +18836,13 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18834
18836
  }
18835
18837
  });
18836
18838
  };
18837
- const handlePayment = stripeSource => {
18838
- if (stripeSource && type === "createPayment") {
18839
- subscribe(stripeSource, state, dispatch);
18840
- } else if (stripeSource && type === "orderCreate") {
18841
- purchase(new StripeGateway(), stripeSource.id, state, dispatch);
18842
- } else if (stripeSource && type === "invoicePayment") {
18843
- payInvoice(new StripeGateway(), stripeSource.id, dispatch);
18839
+ const handlePayment = backendSource => {
18840
+ if (backendSource && type === "createPayment") {
18841
+ subscribe(backendSource, state, dispatch);
18842
+ } else if (backendSource && type === "orderCreate") {
18843
+ purchase(new StripeGateway(), backendSource.id, state, dispatch);
18844
+ } else if (backendSource && type === "invoicePayment") {
18845
+ payInvoice(new StripeGateway(), backendSource.id, dispatch);
18844
18846
  }
18845
18847
  };
18846
18848
  const handlePaymentError = error => {
@@ -22012,7 +22014,7 @@ function SubscriptionManageMembersView(props) {
22012
22014
  className: "plc-font-semibold plc-text-center plc-text-gray-900 pelcro-title-wrapper"
22013
22015
  }, /*#__PURE__*/React__default.createElement("h4", {
22014
22016
  className: "plc-text-2xl"
22015
- }, t("labels.inviteMembers")), /*#__PURE__*/React__default.createElement("p", null, "Comma-separated list e.g. 'john@example.com,jane@example.com'")), /*#__PURE__*/React__default.createElement("form", {
22017
+ }, t("labels.inviteMembers")), /*#__PURE__*/React__default.createElement("p", null, t("labels.listNote"), " 'john@example.com,jane@example.com'")), /*#__PURE__*/React__default.createElement("form", {
22016
22018
  action: "javascript:void(0);",
22017
22019
  className: "plc-mt-2 pelcro-form"
22018
22020
  }, /*#__PURE__*/React__default.createElement(SubscriptionManageMembersContainer, props, /*#__PURE__*/React__default.createElement(AlertWithContext, null), /*#__PURE__*/React__default.createElement(SubscriptionManageMembersEmails, {
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": "3.26.0-sandbox.2",
4
+ "version": "3.26.0-sandbox.8",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",