kupos-ui-components-lib 10.1.6 → 10.1.7

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.
@@ -177,7 +177,7 @@ const renderSummaryDetailsCard = ({ serviceName, date, source, dest, boardingSta
177
177
  DateService.formatDuration(duration),
178
178
  " horas")))))));
179
179
  };
180
- const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData, currencySign, dateOnward, dateReturn, sourceOnward, sourceReturn, destinationOnward, destinationReturn, boardingStageOnward, boardingStageReturn, droppingStageOnward, droppingStageReturn, boardingTimeOnward, boardingTimeReturn, droppingTimeOnward, droppingTimeReturn, durationOnward, durationReturn, selectSeatOnward, selectSeatReturn, journeyTypeActive, setJourneyTypeActive, translation, trainTypeOnward, trainTypeReturn, colors, trainType, icons, selectedOnward, selectedReturn, conexionChecked, conexionPassengers, returnConexionFare, conexionFare, loginData, checkWhatsappEligibility, removeDiscountAtomValue, netFare, promoCode, onPromoRemove, isAgency, agencyFee, walletMoney, virtualMoney, virtualLimit, showUsd, netFareInUsd, renderDiscount, discountAmount, walletLabel, creditosLabel, currency, customSideBarwidth, isLinatal, insuranceData, isPeru, serviceFeeDataStateValue, }) => {
180
+ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData, currencySign, dateOnward, dateReturn, sourceOnward, sourceReturn, destinationOnward, destinationReturn, boardingStageOnward, boardingStageReturn, droppingStageOnward, droppingStageReturn, boardingTimeOnward, boardingTimeReturn, droppingTimeOnward, droppingTimeReturn, durationOnward, durationReturn, selectSeatOnward, selectSeatReturn, journeyTypeActive, setJourneyTypeActive, translation, trainTypeOnward, trainTypeReturn, colors, trainType, icons, selectedOnward, selectedReturn, conexionChecked, conexionPassengers, returnConexionFare, conexionFare, loginData, checkWhatsappEligibility, removeDiscountAtomValue, netFare, promoCode, onPromoRemove, isAgency, agencyFee, walletMoney, virtualMoney, virtualLimit, showUsd, netFareInUsd, renderDiscount, discountAmount, walletLabel, creditosLabel, currency, customSideBarwidth, isLinatal, insuranceData, isPeru, serviceFeeDataStateValue, isOpsite, }) => {
181
181
  var _a, _b, _c, _d, _e;
182
182
  // REMOVED AM/PM DUPLICATION AND ADDED 24 HOUR TIME FORMAT IN BOARDING STAGE
183
183
  const depTime = droppingTimeOnward || "";
@@ -408,6 +408,7 @@ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData,
408
408
  ? returnConexionFare * conexionPassengers
409
409
  : conexionFare, currencySign), className: "subtotal-row font10", customStyle: { color: colors === null || colors === void 0 ? void 0 : colors.seatPriceColor } })) : null,
410
410
  metaData &&
411
+ !isOpsite &&
411
412
  metaData.whatsapp_delivery_charges &&
412
413
  !loginData &&
413
414
  !checkWhatsappEligibility ? (React.createElement(PaymentItem, { label: React.createElement("div", { style: { display: "flex", alignItems: "center" } },
@@ -420,6 +421,20 @@ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData,
420
421
  } }),
421
422
  React.createElement("div", { className: "duration-mouseover font9", style: { lineHeight: "1.3" } },
422
423
  React.createElement("span", null, translation === null || translation === void 0 ? void 0 : translation.whatsappInfoIcon)))), amount: metaData.whatsapp_delivery_charges, className: "font10", customStyle: { color: colors === null || colors === void 0 ? void 0 : colors.whatsappDeliveryChargesColor } })) : null,
424
+ metaData &&
425
+ isOpsite &&
426
+ metaData.opsite_whatsapp_delivery_charges &&
427
+ !loginData &&
428
+ !checkWhatsappEligibility ? (React.createElement(PaymentItem, { label: React.createElement("div", { style: { display: "flex", alignItems: "center" } },
429
+ React.createElement("div", { className: "font10" }, translation === null || translation === void 0 ? void 0 : translation.whatsappDeliveryCharges),
430
+ React.createElement("div", { className: "img-hover" },
431
+ React.createElement("img", { src: icons === null || icons === void 0 ? void 0 : icons.whatsappInfoIcon, alt: "", style: {
432
+ marginLeft: "5px",
433
+ marginBottom: "3px",
434
+ width: "15px",
435
+ } }),
436
+ React.createElement("div", { className: "duration-mouseover font9", style: { lineHeight: "1.3" } },
437
+ React.createElement("span", null, translation === null || translation === void 0 ? void 0 : translation.whatsappInfoIcon)))), amount: metaData.opsite_whatsapp_delivery_charges, className: "font10", customStyle: { color: colors === null || colors === void 0 ? void 0 : colors.whatsappDeliveryChargesColor } })) : null,
423
438
  removeDiscountAtomValue && (React.createElement(PaymentItem, { label: "Cup\u00F3n", amount: CommonService.currency(netFare, currencySign), isNegative: true, currency: "" })),
424
439
  React.createElement("div", { style: { margin: "6px 0" } }, renderDiscount(discountAmount)),
425
440
  (promoCode === null || promoCode === void 0 ? void 0 : promoCode.promoCodeApplied) && (React.createElement(React.Fragment, null,
@@ -73,7 +73,7 @@ const renderSummaryDetailsCard = ({ serviceName, date, source, dest, boardingSta
73
73
  ? `${getRoundedHour(duration)}hrs aprox`
74
74
  : `${DateService.formatDuration(duration)} horas`)))))));
75
75
  };
76
- const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData, currencySign, dateOnward, dateReturn, sourceOnward, sourceReturn, destinationOnward, destinationReturn, boardingStageOnward, boardingStageReturn, droppingStageOnward, droppingStageReturn, boardingTimeOnward, boardingTimeReturn, droppingTimeOnward, droppingTimeReturn, durationOnward, durationReturn, selectSeatOnward, selectSeatReturn, journeyTypeActive, setJourneyTypeActive, translation, trainTypeOnward, trainTypeReturn, colors, trainType, icons, selectedOnward, selectedReturn, conexionChecked, conexionPassengers, returnConexionFare, conexionFare, loginData, checkWhatsappEligibility, removeDiscountAtomValue, netFare, promoCode, onPromoRemove, isAgency, agencyFee, walletMoney, virtualMoney, virtualLimit, showUsd, netFareInUsd, renderDiscount, discountAmount, currency, showWhatsappChargesInfo, setShowWhatsappChargesInfo, t, countdown, walletLabel, creditosLabel, isTacna, isLinatal, insuranceData, isPeru, setShowServicefeeModal, serviceFeeDataStateValue, }) => {
76
+ const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData, currencySign, dateOnward, dateReturn, sourceOnward, sourceReturn, destinationOnward, destinationReturn, boardingStageOnward, boardingStageReturn, droppingStageOnward, droppingStageReturn, boardingTimeOnward, boardingTimeReturn, droppingTimeOnward, droppingTimeReturn, durationOnward, durationReturn, selectSeatOnward, selectSeatReturn, journeyTypeActive, setJourneyTypeActive, translation, trainTypeOnward, trainTypeReturn, colors, trainType, icons, selectedOnward, selectedReturn, conexionChecked, conexionPassengers, returnConexionFare, conexionFare, loginData, checkWhatsappEligibility, removeDiscountAtomValue, netFare, promoCode, onPromoRemove, isAgency, agencyFee, walletMoney, virtualMoney, virtualLimit, showUsd, netFareInUsd, renderDiscount, discountAmount, currency, showWhatsappChargesInfo, setShowWhatsappChargesInfo, t, countdown, walletLabel, creditosLabel, isTacna, isLinatal, insuranceData, isPeru, setShowServicefeeModal, serviceFeeDataStateValue, isOpsite }) => {
77
77
  var _a, _b, _c, _d, _e;
78
78
  return (React.createElement("div", { className: "pb-[15px]" },
79
79
  React.createElement("div", { className: "border border-[#ccc] m-[20px] rounded-[20px] relative" },
@@ -192,6 +192,7 @@ const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData,
192
192
  React.createElement("div", { className: "bold-text", style: { color: colors === null || colors === void 0 ? void 0 : colors.seatPriceColor } }, CommonService.currency((_e = insuranceData === null || insuranceData === void 0 ? void 0 : insuranceData.insurance_total) !== null && _e !== void 0 ? _e : 0, currencySign)))) : null),
193
193
  React.createElement("div", { style: { margin: "6px 0" } }, renderDiscount(discountAmount)),
194
194
  metaData &&
195
+ !isOpsite &&
195
196
  metaData.whatsapp_delivery_charges &&
196
197
  !loginData &&
197
198
  !checkWhatsappEligibility ? (React.createElement(PaymentItem, { label: React.createElement("div", { style: { display: "flex" } },
@@ -206,6 +207,22 @@ const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData,
206
207
  backgroundColor: colors === null || colors === void 0 ? void 0 : colors.whatsappDeliveryChargesBgColor,
207
208
  color: colors === null || colors === void 0 ? void 0 : colors.whatsappDeliveryChargesTextColor,
208
209
  } }, translation === null || translation === void 0 ? void 0 : translation.whatsappInfoIcon)))), amount: metaData.whatsapp_delivery_charges, className: "text-[14px]", customStyle: { color: colors === null || colors === void 0 ? void 0 : colors.whatsappDeliveryChargesColor } })) : null,
210
+ metaData &&
211
+ isOpsite &&
212
+ metaData.opsite_whatsapp_delivery_charges &&
213
+ !loginData &&
214
+ !checkWhatsappEligibility ? (React.createElement(PaymentItem, { label: React.createElement("div", { style: { display: "flex" } },
215
+ React.createElement("div", { className: "font-[14px]" }, translation === null || translation === void 0 ? void 0 : translation.whatsappDeliveryCharges),
216
+ React.createElement("div", { className: "img-hover" },
217
+ React.createElement("img", { src: icons === null || icons === void 0 ? void 0 : icons.whatsappInfoIcon, alt: "", style: {
218
+ marginLeft: "5px",
219
+ width: "15px",
220
+ }, onClick: () => setShowWhatsappChargesInfo(!showWhatsappChargesInfo) }),
221
+ showWhatsappChargesInfo && (React.createElement("div", { className: " absolute shadow-xl z-[1] w-[250px] p-[6px_20px] text-[11px] top-[88%] left-[11%] rounded-[10px]", style: {
222
+ lineHeight: "1.3",
223
+ backgroundColor: colors === null || colors === void 0 ? void 0 : colors.whatsappDeliveryChargesBgColor,
224
+ color: colors === null || colors === void 0 ? void 0 : colors.whatsappDeliveryChargesTextColor,
225
+ } }, translation === null || translation === void 0 ? void 0 : translation.whatsappInfoIcon)))), amount: metaData.opsite_whatsapp_delivery_charges, className: "text-[14px]", customStyle: { color: colors === null || colors === void 0 ? void 0 : colors.whatsappDeliveryChargesColor } })) : null,
209
226
  (promoCode === null || promoCode === void 0 ? void 0 : promoCode.promoCodeApplied) && (React.createElement(React.Fragment, null,
210
227
  React.createElement(PaymentItem, { label: `${translation === null || translation === void 0 ? void 0 : translation.promotionalCode}:`, amount: CommonService.currency((promoCode === null || promoCode === void 0 ? void 0 : promoCode.promoCouponAmount)
211
228
  ? promoCode === null || promoCode === void 0 ? void 0 : promoCode.promoCouponAmount
@@ -105,4 +105,5 @@ export interface PaymentSideBarProps {
105
105
  insuranceData?: any;
106
106
  isPeru?: boolean;
107
107
  serviceFeeDataStateValue?: any;
108
+ isOpsite?: boolean;
108
109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "10.1.6",
3
+ "version": "10.1.7",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -335,6 +335,7 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
335
335
  insuranceData,
336
336
  isPeru,
337
337
  serviceFeeDataStateValue,
338
+ isOpsite,
338
339
  }) => {
339
340
  // REMOVED AM/PM DUPLICATION AND ADDED 24 HOUR TIME FORMAT IN BOARDING STAGE
340
341
  const depTime = droppingTimeOnward || "";
@@ -689,6 +690,7 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
689
690
  ) : null}
690
691
 
691
692
  {metaData &&
693
+ !isOpsite &&
692
694
  metaData.whatsapp_delivery_charges &&
693
695
  !loginData &&
694
696
  !checkWhatsappEligibility ? (
@@ -723,6 +725,42 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
723
725
  />
724
726
  ) : null}
725
727
 
728
+ {metaData &&
729
+ isOpsite &&
730
+ metaData.opsite_whatsapp_delivery_charges &&
731
+ !loginData &&
732
+ !checkWhatsappEligibility ? (
733
+ <PaymentItem
734
+ label={
735
+ <div style={{ display: "flex", alignItems: "center" }}>
736
+ <div className="font10">
737
+ {translation?.whatsappDeliveryCharges}
738
+ </div>
739
+ <div className="img-hover">
740
+ <img
741
+ src={icons?.whatsappInfoIcon}
742
+ alt=""
743
+ style={{
744
+ marginLeft: "5px",
745
+ marginBottom: "3px",
746
+ width: "15px",
747
+ }}
748
+ />
749
+ <div
750
+ className="duration-mouseover font9"
751
+ style={{ lineHeight: "1.3" }}
752
+ >
753
+ <span>{translation?.whatsappInfoIcon}</span>
754
+ </div>
755
+ </div>
756
+ </div>
757
+ }
758
+ amount={metaData.opsite_whatsapp_delivery_charges}
759
+ className="font10"
760
+ customStyle={{ color: colors?.whatsappDeliveryChargesColor }}
761
+ />
762
+ ) : null}
763
+
726
764
  {removeDiscountAtomValue && (
727
765
  <PaymentItem
728
766
  label="Cupón"
@@ -242,6 +242,7 @@ const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = ({
242
242
  isPeru,
243
243
  setShowServicefeeModal,
244
244
  serviceFeeDataStateValue,
245
+ isOpsite
245
246
  }) => {
246
247
  return (
247
248
  <div className="pb-[15px]">
@@ -461,6 +462,7 @@ const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = ({
461
462
  </div>
462
463
 
463
464
  {metaData &&
465
+ !isOpsite &&
464
466
  metaData.whatsapp_delivery_charges &&
465
467
  !loginData &&
466
468
  !checkWhatsappEligibility ? (
@@ -504,6 +506,51 @@ const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = ({
504
506
  />
505
507
  ) : null}
506
508
 
509
+ {metaData &&
510
+ isOpsite &&
511
+ metaData.opsite_whatsapp_delivery_charges &&
512
+ !loginData &&
513
+ !checkWhatsappEligibility ? (
514
+ <PaymentItem
515
+ label={
516
+ <div style={{ display: "flex" }}>
517
+ <div className="font-[14px]">
518
+ {translation?.whatsappDeliveryCharges}
519
+ </div>
520
+ <div className="img-hover">
521
+ <img
522
+ src={icons?.whatsappInfoIcon}
523
+ alt=""
524
+ style={{
525
+ marginLeft: "5px",
526
+ width: "15px",
527
+ }}
528
+ onClick={() =>
529
+ setShowWhatsappChargesInfo(!showWhatsappChargesInfo)
530
+ }
531
+ />
532
+ {showWhatsappChargesInfo && (
533
+ <div
534
+ className=" absolute shadow-xl z-[1] w-[250px] p-[6px_20px] text-[11px] top-[88%] left-[11%] rounded-[10px]"
535
+ style={{
536
+ lineHeight: "1.3",
537
+ backgroundColor:
538
+ colors?.whatsappDeliveryChargesBgColor,
539
+ color: colors?.whatsappDeliveryChargesTextColor,
540
+ }}
541
+ >
542
+ {translation?.whatsappInfoIcon}
543
+ </div>
544
+ )}
545
+ </div>
546
+ </div>
547
+ }
548
+ amount={metaData.opsite_whatsapp_delivery_charges}
549
+ className="text-[14px]"
550
+ customStyle={{ color: colors?.whatsappDeliveryChargesColor }}
551
+ />
552
+ ) : null}
553
+
507
554
  {promoCode?.promoCodeApplied && (
508
555
  <>
509
556
  <PaymentItem
@@ -104,4 +104,5 @@ export interface PaymentSideBarProps {
104
104
  insuranceData?: any;
105
105
  isPeru?: boolean;
106
106
  serviceFeeDataStateValue?: any;
107
+ isOpsite?: boolean;
107
108
  }