kupos-ui-components-lib 9.5.7 → 9.5.10
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/assets/images/anims/service_list/succes_anim.json +1 -0
- package/dist/components/PaymentSideBar/PaymentSideBarDesktop.js +0 -1
- package/dist/components/ServiceItem/PeruServiceItemDesktop.js +4 -3
- package/dist/components/Survey/ResponsiveSurvey.d.ts +3 -0
- package/dist/components/Survey/ResponsiveSurvey.js +10 -0
- package/dist/components/Survey/SurveyDesktop.d.ts +4 -0
- package/dist/components/Survey/SurveyDesktop.js +36 -0
- package/dist/components/Survey/SurveyMobile.d.ts +4 -0
- package/dist/components/Survey/SurveyMobile.js +39 -0
- package/dist/components/Survey/index.d.ts +5 -0
- package/dist/components/Survey/index.js +4 -0
- package/dist/components/Survey/types.d.ts +18 -0
- package/dist/components/Survey/types.js +1 -0
- package/dist/ui/BottomSheet/BottomSheet.d.ts +17 -0
- package/dist/ui/BottomSheet/BottomSheet.js +77 -0
- package/dist/ui/BottomSheet/index.d.ts +2 -0
- package/dist/ui/BottomSheet/index.js +1 -0
- package/dist/ui/Modal/Modal.d.ts +17 -0
- package/dist/ui/Modal/Modal.js +46 -0
- package/dist/ui/Modal/ModalHeader.d.ts +8 -0
- package/dist/ui/Modal/ModalHeader.js +30 -0
- package/dist/ui/Modal/index.d.ts +4 -0
- package/dist/ui/Modal/index.js +2 -0
- package/dist/ui/SeatSection/SeatSection.js +50 -1
- package/dist/ui/Survey/FeedbackBanner.d.ts +7 -0
- package/dist/ui/Survey/FeedbackBanner.js +21 -0
- package/dist/ui/Survey/FeedbackTextarea.d.ts +9 -0
- package/dist/ui/Survey/FeedbackTextarea.js +53 -0
- package/dist/ui/Survey/HeartIcon.d.ts +3 -0
- package/dist/ui/Survey/HeartIcon.js +4 -0
- package/dist/ui/Survey/ScoreButtons.d.ts +10 -0
- package/dist/ui/Survey/ScoreButtons.js +45 -0
- package/dist/ui/Survey/SurveyFooter.d.ts +14 -0
- package/dist/ui/Survey/SurveyFooter.js +88 -0
- package/dist/ui/Survey/SurveyHeader.d.ts +6 -0
- package/dist/ui/Survey/SurveyHeader.js +44 -0
- package/dist/ui/Survey/ThankYouCard.d.ts +7 -0
- package/dist/ui/Survey/ThankYouCard.js +57 -0
- package/dist/ui/Survey/constants.d.ts +13 -0
- package/dist/ui/Survey/constants.js +46 -0
- package/dist/ui/Survey/index.d.ts +9 -0
- package/dist/ui/Survey/index.js +8 -0
- package/dist/ui/mobileweb/SeatSectionMobile.js +46 -3
- package/package.json +1 -1
- package/src/components/PaymentSideBar/PaymentSideBarDesktop.tsx +0 -1
- package/src/components/ServiceItem/PeruServiceItemDesktop.tsx +6 -5
- package/src/ui/SeatSection/SeatSection.tsx +98 -1
- package/src/ui/mobileweb/SeatSectionMobile.tsx +95 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"v":"5.7.6","fr":30,"ip":0,"op":60,"w":512,"h":512,"nm":"Checkmark-final","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Capa de formas 6","sr":1,"ks":{"o":{"a":0,"k":67,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[173.75,411.25,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":25,"s":[0,0,100]},{"t":39,"s":[3.598,3.598,100]}],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[187.68,187.68],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Trazado elíptico 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Trazo 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"gf","o":{"a":0,"k":67,"ix":10},"r":1,"bm":0,"g":{"p":3,"k":{"a":0,"k":[0,0.969,0.576,0.118,0.5,0.957,0.465,0.129,1,0.945,0.353,0.141],"ix":9}},"s":{"a":0,"k":[0,0],"ix":5},"e":{"a":0,"k":[100,0],"ix":6},"t":2,"h":{"a":0,"k":0,"ix":7},"a":{"a":0,"k":0,"ix":8},"nm":"Relleno de degradado 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[1.988,-0.426],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[131.424,131.424],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Elipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Capa de formas 5","sr":1,"ks":{"o":{"a":0,"k":67,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[423.5,238.5,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":36,"s":[0,0,100]},{"t":50,"s":[4.406,4.406,100]}],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[187.68,187.68],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Trazado elíptico 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Trazo 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"gf","o":{"a":0,"k":67,"ix":10},"r":1,"bm":0,"g":{"p":3,"k":{"a":0,"k":[0,0.969,0.576,0.118,0.5,0.957,0.465,0.129,1,0.945,0.353,0.141],"ix":9}},"s":{"a":0,"k":[0,0],"ix":5},"e":{"a":0,"k":[100,0],"ix":6},"t":2,"h":{"a":0,"k":0,"ix":7},"a":{"a":0,"k":0,"ix":8},"nm":"Relleno de degradado 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[1.988,-0.426],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[131.424,131.424],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Elipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Capa de formas 4","sr":1,"ks":{"o":{"a":0,"k":67,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[100,140,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":46,"s":[0,0,100]},{"t":60,"s":[5.219,5.219,100]}],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[187.68,187.68],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Trazado elíptico 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Trazo 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"gf","o":{"a":0,"k":67,"ix":10},"r":1,"bm":0,"g":{"p":3,"k":{"a":0,"k":[0,0.969,0.576,0.118,0.5,0.957,0.465,0.129,1,0.945,0.353,0.141],"ix":9}},"s":{"a":0,"k":[0,0],"ix":5},"e":{"a":0,"k":[100,0],"ix":6},"t":2,"h":{"a":0,"k":0,"ix":7},"a":{"a":0,"k":0,"ix":8},"nm":"Relleno de degradado 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[1.988,-0.426],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[131.424,131.424],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Elipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Capa 1/Check-Mark-Animation2 contornos","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[256,256,0],"ix":2,"l":2},"a":{"a":0,"k":[256,256,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-54.205,3.498],[-19.88,36.986],[54.205,-36.986]],"c":false},"ix":2},"nm":"Trazado 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":14.2,"ix":5},"lc":2,"lj":1,"ml":10,"bm":0,"nm":"Trazo 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[262.249,261.506],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Grupo 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":21,"s":[0]},{"t":40,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Recortar trazados 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"CirculoNaranja","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[254,256,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":7,"s":[0,0,100]},{"t":25,"s":[100,100,100]}],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[187.68,187.68],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Trazado elíptico 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Trazo 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"gf","o":{"a":0,"k":100,"ix":10},"r":1,"bm":0,"g":{"p":3,"k":{"a":0,"k":[0,1,0.655,0.212,0.5,1,0.608,0.241,1,1,0.561,0.271],"ix":9}},"s":{"a":0,"k":[-29,-62],"ix":5},"e":{"a":0,"k":[100,0],"ix":6},"t":2,"h":{"a":0,"k":21,"ix":7},"a":{"a":0,"k":0,"ix":8},"nm":"Relleno de degradado 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[1.988,-0.426],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[131.424,131.424],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Elipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"CirculoBlanco","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[254,256,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":7,"s":[0,0,100]},{"t":25,"s":[109,109,100]}],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[187.68,187.68],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Trazado elíptico 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Trazo 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[1.988,-0.426],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[131.424,131.424],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Elipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"CirculoAnaranjadoFondo","sr":1,"ks":{"o":{"a":0,"k":14,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[256,256,0],"ix":2,"l":2},"a":{"a":0,"k":[256,256,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":0,"s":[0,0,100]},{"t":20,"s":[100,100,100]}],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-141.385,0],[0,-141.385],[141.385,0],[0,141.385]],"o":[[141.385,0],[0,141.385],[-141.385,0],[0,-141.385]],"v":[[0,-256],[256,0],[0,256],[-256,0]],"c":true},"ix":2},"nm":"Trazado 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.944999964097,0.352999997606,0.141000007181,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Relleno 2","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Relleno 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[256,256],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Grupo 1","np":5,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Capa de formas 7","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,252,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[518.633,518.633],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Trazado de rectángulo 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Trazo 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Relleno 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[3.316,3.316],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectángulo 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0}],"markers":[]}
|
|
@@ -351,7 +351,6 @@ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData,
|
|
|
351
351
|
React.createElement("div", { className: "mt-3 text-[13.33px]", style: { margin: checkWhatsappEligibility ? "0" : "6px 0" } },
|
|
352
352
|
selectSeatOnward && selectedOnward && selectedOnward[0]
|
|
353
353
|
? selectedOnward[0].map((val, key) => {
|
|
354
|
-
console.log("🚀 ~ PaymentSideBarDesktop ~ val:", val);
|
|
355
354
|
return (React.createElement("div", { key: key, className: "flex justify-between items-center w-[100%]" },
|
|
356
355
|
React.createElement("div", null,
|
|
357
356
|
React.createElement("span", null,
|
|
@@ -369,14 +369,14 @@ function PeruServiceItemDesktop({ serviceItem, onBookButtonPress, colors, metaDa
|
|
|
369
369
|
React.createElement("div", { className: "flex flex-col gap-[10px]" },
|
|
370
370
|
React.createElement(StageTooltip, { stageData: serviceItem.boarding_stages, direction: 1, terminals: busStage, serviceItem: serviceItem, metaData: metaData, colors: colors },
|
|
371
371
|
React.createElement("span", { className: "cursor-pointer bold-text capitalize" }, DateService.getServiceItemDate(serviceItem.travel_date))),
|
|
372
|
-
!isCiva && (React.createElement(StageTooltip, { stageData: serviceItem.
|
|
372
|
+
!isCiva && (React.createElement(StageTooltip, { stageData: serviceItem.dropoff_stages, direction: 2, terminals: busStage, serviceItem: serviceItem, metaData: metaData, colors: colors },
|
|
373
373
|
React.createElement("span", { className: "cursor-pointer bold-text capitalize" }, DateService.getServiceItemDate(serviceItem.arrival_date))))),
|
|
374
374
|
React.createElement("div", { className: "flex flex-col gap-[10px] items-center" },
|
|
375
375
|
React.createElement("div", { className: "h-[20px] flex items-center justify-center" },
|
|
376
376
|
React.createElement("div", null, "\u2022")),
|
|
377
377
|
!isCiva && (React.createElement("div", { className: "h-[20px] flex items-center justify-center" }, removeArrivalTime ? null : serviceItem.arr_time ? (React.createElement("div", null, "\u2022")) : null))),
|
|
378
378
|
React.createElement("div", { className: "flex flex-col gap-[10px]" },
|
|
379
|
-
React.createElement(StageTooltip, { stageData: serviceItem.
|
|
379
|
+
React.createElement(StageTooltip, { stageData: serviceItem.boarding_stages, direction: 1, terminals: busStage, serviceItem: serviceItem, metaData: metaData, colors: colors },
|
|
380
380
|
React.createElement("div", { className: "font-[900] bold-text" }, DateService.formatTime(serviceItem.dep_time))),
|
|
381
381
|
!isCiva && (React.createElement(StageTooltip, { stageData: serviceItem.dropoff_stages, direction: 2, terminals: busStage, serviceItem: serviceItem, metaData: metaData, colors: colors },
|
|
382
382
|
React.createElement("div", { className: "font-[900] bold-text" }, removeArrivalTime
|
|
@@ -402,10 +402,11 @@ function PeruServiceItemDesktop({ serviceItem, onBookButtonPress, colors, metaDa
|
|
|
402
402
|
left: "68%",
|
|
403
403
|
right: 0,
|
|
404
404
|
justifyContent: getNumberOfSeats() < 2 ? "center" : "center",
|
|
405
|
+
gap: "5px",
|
|
405
406
|
} },
|
|
406
407
|
React.createElement("span", { style: {
|
|
407
408
|
position: "absolute",
|
|
408
|
-
top: -5,
|
|
409
|
+
top: getNumberOfSeats() > 1 ? -10 : -5,
|
|
409
410
|
fontWeight: "initial",
|
|
410
411
|
fontSize: "12px",
|
|
411
412
|
left: 0,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import SurveyDesktop from "./SurveyDesktop";
|
|
3
|
+
import SurveyMobile from "./SurveyMobile";
|
|
4
|
+
export default function ResponsiveSurvey(props) {
|
|
5
|
+
const { variant } = props;
|
|
6
|
+
if (variant === "mobile") {
|
|
7
|
+
return React.createElement(SurveyMobile, Object.assign({}, props));
|
|
8
|
+
}
|
|
9
|
+
return React.createElement(SurveyDesktop, Object.assign({}, props));
|
|
10
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SurveyProps } from "./types";
|
|
3
|
+
declare const SurveyDesktop: ({ isOpen, isSubmitted, selectedScore, onScoreChange, feedback, onFeedbackChange, onClose, onSkip, onSubmit, colors, }: SurveyProps) => React.JSX.Element;
|
|
4
|
+
export default SurveyDesktop;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Modal } from "../../ui/Modal";
|
|
3
|
+
import { ThankYouCard, SurveyHeader, ScoreButtons, FeedbackBanner, FeedbackTextarea, SurveyFooter, getFeedbackConfig, } from "../../ui/Survey";
|
|
4
|
+
const SurveyDesktop = ({ isOpen, isSubmitted, selectedScore, onScoreChange, feedback = "", onFeedbackChange, onClose, onSkip, onSubmit, colors, }) => {
|
|
5
|
+
if (!isOpen)
|
|
6
|
+
return null;
|
|
7
|
+
const config = getFeedbackConfig(selectedScore);
|
|
8
|
+
const handleSubmit = () => {
|
|
9
|
+
if (selectedScore != null) {
|
|
10
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(selectedScore, feedback);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
return (React.createElement(Modal, { isOpen: isOpen, onClose: onClose, variant: "center", size: "lg", maxWidth: 640, padding: isSubmitted ? 0 : "32px 36px 28px", borderRadius: 24, closeOnBackdrop: false }, isSubmitted ? (React.createElement(ThankYouCard, { onClose: onClose })) : (React.createElement(React.Fragment, null,
|
|
14
|
+
React.createElement(SurveyHeader, { onClose: onClose }),
|
|
15
|
+
React.createElement("h2", { style: {
|
|
16
|
+
fontSize: "22px",
|
|
17
|
+
lineHeight: 1.25,
|
|
18
|
+
color: colors === null || colors === void 0 ? void 0 : colors.primaryColor,
|
|
19
|
+
} },
|
|
20
|
+
"\u00BFQu\u00E9 tan probable es que",
|
|
21
|
+
" ",
|
|
22
|
+
React.createElement("em", { style: {
|
|
23
|
+
color: colors === null || colors === void 0 ? void 0 : colors.secondaryColor,
|
|
24
|
+
} }, "recomiendes"),
|
|
25
|
+
" ",
|
|
26
|
+
"a un amigo?"),
|
|
27
|
+
React.createElement("p", { className: "text-[13.33px]", style: {
|
|
28
|
+
color: colors === null || colors === void 0 ? void 0 : colors.primaryColor,
|
|
29
|
+
marginBottom: 20,
|
|
30
|
+
} }, "Pulsa un n\u00FAmero: 1 significa en absoluto, 10 significa absolutamente."),
|
|
31
|
+
React.createElement(ScoreButtons, { selectedScore: selectedScore, onScoreChange: onScoreChange, buttonHeight: 54, fontSize: 15 }),
|
|
32
|
+
React.createElement(FeedbackBanner, { config: config }),
|
|
33
|
+
React.createElement(FeedbackTextarea, { config: config, feedback: feedback, onFeedbackChange: onFeedbackChange }),
|
|
34
|
+
React.createElement(SurveyFooter, { selectedScore: selectedScore, onSkip: onSkip, onSubmit: handleSubmit, colors: colors })))));
|
|
35
|
+
};
|
|
36
|
+
export default SurveyDesktop;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SurveyProps } from "./types";
|
|
3
|
+
declare const SurveyMobile: ({ isOpen, isSubmitted, selectedScore, onScoreChange, feedback, onFeedbackChange, onClose, onSkip, onSubmit, colors, }: SurveyProps) => React.JSX.Element;
|
|
4
|
+
export default SurveyMobile;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BottomSheet } from "../../ui/BottomSheet";
|
|
3
|
+
import { ThankYouCard, SurveyHeader, ScoreButtons, FeedbackBanner, FeedbackTextarea, SurveyFooter, getFeedbackConfig, } from "../../ui/Survey";
|
|
4
|
+
const SurveyMobile = ({ isOpen, isSubmitted, selectedScore, onScoreChange, feedback = "", onFeedbackChange, onClose, onSkip, onSubmit, colors, }) => {
|
|
5
|
+
if (!isOpen)
|
|
6
|
+
return null;
|
|
7
|
+
const config = getFeedbackConfig(selectedScore);
|
|
8
|
+
const handleSubmit = () => {
|
|
9
|
+
if (selectedScore != null) {
|
|
10
|
+
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(selectedScore, feedback);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
return (React.createElement(BottomSheet, { isOpen: isOpen !== null && isOpen !== void 0 ? isOpen : false, onClose: onClose, showHandle: true, showBackdrop: false, blurBackground: true, blurAmount: "2px", padding: isSubmitted ? 0 : "0 20px 32px" }, isSubmitted ? (React.createElement(ThankYouCard, { onClose: onClose, titleFontSize: "1.35rem" })) : (React.createElement(React.Fragment, null,
|
|
14
|
+
React.createElement(SurveyHeader, { onClose: onClose }),
|
|
15
|
+
React.createElement("h2", { style: {
|
|
16
|
+
fontSize: "1.35rem",
|
|
17
|
+
fontWeight: 800,
|
|
18
|
+
lineHeight: 1.3,
|
|
19
|
+
color: colors === null || colors === void 0 ? void 0 : colors.primaryColor,
|
|
20
|
+
marginBottom: 12,
|
|
21
|
+
} },
|
|
22
|
+
"\u00BFQu\u00E9 tan probable es que",
|
|
23
|
+
" ",
|
|
24
|
+
React.createElement("em", { style: {
|
|
25
|
+
color: colors === null || colors === void 0 ? void 0 : colors.secondaryColor,
|
|
26
|
+
} }, "recomiendes"),
|
|
27
|
+
" ",
|
|
28
|
+
"a un amigo?"),
|
|
29
|
+
React.createElement("p", { style: {
|
|
30
|
+
fontSize: "13.33px",
|
|
31
|
+
color: colors === null || colors === void 0 ? void 0 : colors.primaryColor,
|
|
32
|
+
marginBottom: 16,
|
|
33
|
+
} }, "Pulsa un n\u00FAmero: 1 significa en absoluto, 10 significa absolutamente."),
|
|
34
|
+
React.createElement(ScoreButtons, { selectedScore: selectedScore, onScoreChange: onScoreChange, buttonHeight: 44, fontSize: 13, gap: 6 }),
|
|
35
|
+
React.createElement(FeedbackBanner, { config: config }),
|
|
36
|
+
React.createElement(FeedbackTextarea, { config: config, feedback: feedback, onFeedbackChange: onFeedbackChange }),
|
|
37
|
+
React.createElement(SurveyFooter, { selectedScore: selectedScore, onSkip: onSkip, onSubmit: handleSubmit, colors: colors, layout: "stacked" })))));
|
|
38
|
+
};
|
|
39
|
+
export default SurveyMobile;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface SurveyProps {
|
|
2
|
+
variant?: "mobile" | "desktop";
|
|
3
|
+
isOpen?: boolean;
|
|
4
|
+
selectedScore?: number | null;
|
|
5
|
+
onScoreChange?: (score: number) => void;
|
|
6
|
+
feedback?: string;
|
|
7
|
+
onFeedbackChange?: (text: string) => void;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
onSkip?: () => void;
|
|
10
|
+
onSubmit?: (score: number, feedback: string) => void;
|
|
11
|
+
isSubmitted?: boolean;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
colors?: {
|
|
14
|
+
secondaryColor?: string;
|
|
15
|
+
tertiaryColor?: string;
|
|
16
|
+
primaryColor?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface BottomSheetProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
showHandle?: boolean;
|
|
7
|
+
showBackdrop?: boolean;
|
|
8
|
+
backdropColor?: string;
|
|
9
|
+
blurBackground?: boolean;
|
|
10
|
+
blurAmount?: string;
|
|
11
|
+
closeOnBackdrop?: boolean;
|
|
12
|
+
padding?: string | number;
|
|
13
|
+
maxHeight?: string;
|
|
14
|
+
borderRadius?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const BottomSheet: ({ isOpen, onClose, children, showHandle, showBackdrop, backdropColor, blurBackground, blurAmount, closeOnBackdrop, padding, maxHeight, borderRadius, }: BottomSheetProps) => React.JSX.Element;
|
|
17
|
+
export default BottomSheet;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ReactDOM from "react-dom";
|
|
3
|
+
const STYLE_ID = "__kupos_bottom_sheet_style__";
|
|
4
|
+
const injectStyle = () => {
|
|
5
|
+
if (typeof document === "undefined")
|
|
6
|
+
return;
|
|
7
|
+
if (document.getElementById(STYLE_ID))
|
|
8
|
+
return;
|
|
9
|
+
const style = document.createElement("style");
|
|
10
|
+
style.id = STYLE_ID;
|
|
11
|
+
style.textContent = `
|
|
12
|
+
@keyframes __ks_slideUp {
|
|
13
|
+
from { transform: translateY(100%); }
|
|
14
|
+
to { transform: translateY(0); }
|
|
15
|
+
}
|
|
16
|
+
@keyframes __ks_fadeIn {
|
|
17
|
+
from { opacity: 0; }
|
|
18
|
+
to { opacity: 1; }
|
|
19
|
+
}
|
|
20
|
+
.__ks_sheet {
|
|
21
|
+
animation: __ks_slideUp 0.38s cubic-bezier(0.32, 0.72, 0, 1) both;
|
|
22
|
+
}
|
|
23
|
+
.__ks_backdrop {
|
|
24
|
+
animation: __ks_fadeIn 0.3s ease both;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
document.head.appendChild(style);
|
|
28
|
+
};
|
|
29
|
+
const BottomSheet = ({ isOpen, onClose, children, showHandle = true, showBackdrop = false, backdropColor = "rgba(0,0,0,0.45)", blurBackground = false, blurAmount = "6px", closeOnBackdrop = true, padding = "20px 20px 32px", maxHeight = "92vh", borderRadius = "24px 24px 0 0", }) => {
|
|
30
|
+
if (!isOpen)
|
|
31
|
+
return null;
|
|
32
|
+
injectStyle();
|
|
33
|
+
const sheet = (React.createElement(React.Fragment, null,
|
|
34
|
+
(showBackdrop || blurBackground) && (React.createElement("div", { className: "__ks_backdrop", onClick: closeOnBackdrop ? onClose : undefined, style: {
|
|
35
|
+
position: "fixed",
|
|
36
|
+
top: 0,
|
|
37
|
+
left: 0,
|
|
38
|
+
right: 0,
|
|
39
|
+
bottom: 0,
|
|
40
|
+
zIndex: 9998,
|
|
41
|
+
backgroundColor: showBackdrop ? backdropColor : "rgba(0,0,0,0.4)",
|
|
42
|
+
backdropFilter: blurBackground ? `blur(${blurAmount})` : undefined,
|
|
43
|
+
WebkitBackdropFilter: blurBackground
|
|
44
|
+
? `blur(${blurAmount})`
|
|
45
|
+
: undefined,
|
|
46
|
+
} })),
|
|
47
|
+
React.createElement("div", { className: "__ks_sheet", style: {
|
|
48
|
+
position: "fixed",
|
|
49
|
+
left: 0,
|
|
50
|
+
right: 0,
|
|
51
|
+
bottom: 0,
|
|
52
|
+
zIndex: 9999,
|
|
53
|
+
background: "#FFFFFF",
|
|
54
|
+
maxHeight,
|
|
55
|
+
borderRadius,
|
|
56
|
+
overflowY: "auto",
|
|
57
|
+
boxSizing: "border-box",
|
|
58
|
+
boxShadow: "0 -8px 40px rgba(0,0,0,0.15)",
|
|
59
|
+
} },
|
|
60
|
+
showHandle && (React.createElement("div", { style: {
|
|
61
|
+
display: "flex",
|
|
62
|
+
justifyContent: "center",
|
|
63
|
+
padding: "12px 0 4px",
|
|
64
|
+
} },
|
|
65
|
+
React.createElement("div", { style: {
|
|
66
|
+
width: 40,
|
|
67
|
+
height: 4,
|
|
68
|
+
borderRadius: 999,
|
|
69
|
+
backgroundColor: "#E5E7EB",
|
|
70
|
+
} }))),
|
|
71
|
+
React.createElement("div", { style: { padding } }, children))));
|
|
72
|
+
if (typeof document !== "undefined") {
|
|
73
|
+
return ReactDOM.createPortal(sheet, document.body);
|
|
74
|
+
}
|
|
75
|
+
return sheet;
|
|
76
|
+
};
|
|
77
|
+
export default BottomSheet;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BottomSheet } from "./BottomSheet";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ModalVariant = "center" | "bottom-sheet";
|
|
3
|
+
export type ModalSize = "sm" | "md" | "lg" | "xl" | "full";
|
|
4
|
+
export interface ModalProps {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
variant?: ModalVariant;
|
|
9
|
+
size?: ModalSize;
|
|
10
|
+
closeOnBackdrop?: boolean;
|
|
11
|
+
padding?: string | number;
|
|
12
|
+
borderRadius?: string | number;
|
|
13
|
+
backdropColor?: string;
|
|
14
|
+
maxWidth?: number | string;
|
|
15
|
+
}
|
|
16
|
+
declare const Modal: ({ isOpen, onClose, children, variant, size, closeOnBackdrop, padding, borderRadius, backdropColor, maxWidth, }: ModalProps) => React.JSX.Element;
|
|
17
|
+
export default Modal;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ReactDOM from "react-dom";
|
|
3
|
+
const SIZE_MAP = {
|
|
4
|
+
sm: 400,
|
|
5
|
+
md: 520,
|
|
6
|
+
lg: 640,
|
|
7
|
+
xl: 800,
|
|
8
|
+
full: "100%",
|
|
9
|
+
};
|
|
10
|
+
const Modal = ({ isOpen, onClose, children, variant = "center", size = "md", closeOnBackdrop = true, padding = "28px 32px 24px", borderRadius, backdropColor = "rgba(0,0,0,0.45)", maxWidth, }) => {
|
|
11
|
+
if (!isOpen)
|
|
12
|
+
return null;
|
|
13
|
+
const resolvedMaxWidth = maxWidth !== null && maxWidth !== void 0 ? maxWidth : SIZE_MAP[size];
|
|
14
|
+
const resolvedRadius = borderRadius !== null && borderRadius !== void 0 ? borderRadius : (variant === "bottom-sheet" ? "24px 24px 0 0" : 24);
|
|
15
|
+
const overlayStyle = {
|
|
16
|
+
position: "fixed",
|
|
17
|
+
top: 0,
|
|
18
|
+
left: 0,
|
|
19
|
+
right: 0,
|
|
20
|
+
bottom: 0,
|
|
21
|
+
zIndex: 9999,
|
|
22
|
+
display: "flex",
|
|
23
|
+
alignItems: variant === "bottom-sheet" ? "flex-end" : "center",
|
|
24
|
+
justifyContent: "center",
|
|
25
|
+
padding: variant === "bottom-sheet" ? 0 : 16,
|
|
26
|
+
backgroundColor: backdropColor,
|
|
27
|
+
};
|
|
28
|
+
const cardStyle = {
|
|
29
|
+
background: "#FFFFFF",
|
|
30
|
+
width: "100%",
|
|
31
|
+
maxWidth: resolvedMaxWidth,
|
|
32
|
+
maxHeight: variant === "bottom-sheet" ? "92vh" : undefined,
|
|
33
|
+
borderRadius: resolvedRadius,
|
|
34
|
+
padding,
|
|
35
|
+
position: "relative",
|
|
36
|
+
boxSizing: "border-box",
|
|
37
|
+
overflowY: variant === "bottom-sheet" ? "auto" : undefined,
|
|
38
|
+
};
|
|
39
|
+
const modal = (React.createElement("div", { style: overlayStyle, onClick: closeOnBackdrop ? onClose : undefined },
|
|
40
|
+
React.createElement("div", { style: cardStyle, onClick: (e) => e.stopPropagation() }, children)));
|
|
41
|
+
if (typeof document !== "undefined") {
|
|
42
|
+
return ReactDOM.createPortal(modal, document.body);
|
|
43
|
+
}
|
|
44
|
+
return modal;
|
|
45
|
+
};
|
|
46
|
+
export default Modal;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ModalHeaderProps {
|
|
3
|
+
title?: React.ReactNode;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const ModalHeader: ({ title, onClose, children }: ModalHeaderProps) => React.JSX.Element;
|
|
8
|
+
export default ModalHeader;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
const ModalHeader = ({ title, onClose, children }) => (React.createElement("div", { style: {
|
|
3
|
+
display: "flex",
|
|
4
|
+
alignItems: "center",
|
|
5
|
+
justifyContent: "space-between",
|
|
6
|
+
marginBottom: 20,
|
|
7
|
+
} },
|
|
8
|
+
React.createElement("div", { style: { flex: 1 } },
|
|
9
|
+
title && (React.createElement("span", { style: {
|
|
10
|
+
fontSize: "1rem",
|
|
11
|
+
fontWeight: 700,
|
|
12
|
+
color: "#111827",
|
|
13
|
+
} }, title)),
|
|
14
|
+
children),
|
|
15
|
+
onClose && (React.createElement("button", { onClick: onClose, style: {
|
|
16
|
+
width: 36,
|
|
17
|
+
height: 36,
|
|
18
|
+
borderRadius: "50%",
|
|
19
|
+
background: "#F3F4F6",
|
|
20
|
+
border: "none",
|
|
21
|
+
cursor: "pointer",
|
|
22
|
+
fontSize: 14,
|
|
23
|
+
color: "#6B7280",
|
|
24
|
+
display: "flex",
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
justifyContent: "center",
|
|
27
|
+
flexShrink: 0,
|
|
28
|
+
marginLeft: 12,
|
|
29
|
+
} }, "\u2715"))));
|
|
30
|
+
export default ModalHeader;
|
|
@@ -55,6 +55,7 @@ function getNumberOfSeats(seatTypes) {
|
|
|
55
55
|
return seatTypes.filter((val) => !SEAT_EXCEPTIONS.includes(val.label)).length;
|
|
56
56
|
}
|
|
57
57
|
function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, isPeru, serviceItem, renderIcon, dpSeatColor, }) {
|
|
58
|
+
var _a, _b;
|
|
58
59
|
const uniqueSeats = getUniqueSeats(seatTypes);
|
|
59
60
|
const sortedSeatTypes = getSortedSeatTypes(seatTypes);
|
|
60
61
|
const numberOfSeats = getNumberOfSeats(seatTypes);
|
|
@@ -116,7 +117,13 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
|
|
|
116
117
|
}
|
|
117
118
|
return renderSeatNames();
|
|
118
119
|
};
|
|
119
|
-
|
|
120
|
+
const _dpSeatsFirstVal = Array.isArray(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discounted_seats)
|
|
121
|
+
? serviceItem.dp_discounted_seats[0]
|
|
122
|
+
: Object.values((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discounted_seats) || {})[0];
|
|
123
|
+
const _dpPercentsFirstVal = Array.isArray(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discount_percents)
|
|
124
|
+
? serviceItem.dp_discount_percents[0]
|
|
125
|
+
: Object.values((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.dp_discount_percents) || {})[0];
|
|
126
|
+
if ((serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) && !_dpSeatsFirstVal && !_dpPercentsFirstVal) {
|
|
120
127
|
const dpSeats = (removeDuplicateSeats ? uniqueSeats : sortedSeatTypes).filter((s) => !SEAT_EXCEPTIONS.includes(s.label));
|
|
121
128
|
const lowestFare = dpSeats.length > 0 ? Math.min(...dpSeats.map((s) => Number(s.price))) : 0;
|
|
122
129
|
return (React.createElement("div", { className: "flex items-center justify-between text-[13.33px] ", style: {
|
|
@@ -141,6 +148,48 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
|
|
|
141
148
|
? CommonService.currency(0, currencySign)
|
|
142
149
|
: CommonService.discountedCurrency(lowestFare, currencySign))))));
|
|
143
150
|
}
|
|
151
|
+
if (_dpSeatsFirstVal && _dpPercentsFirstVal) {
|
|
152
|
+
const originalDpPrice = Array.isArray(serviceItem.original_dp_price)
|
|
153
|
+
? serviceItem.original_dp_price[0]
|
|
154
|
+
: Object.values(serviceItem.original_dp_price || {})[0];
|
|
155
|
+
const dpDiscountPercent = Array.isArray(serviceItem.dp_discount_percents)
|
|
156
|
+
? serviceItem.dp_discount_percents[0]
|
|
157
|
+
: Object.values(serviceItem.dp_discount_percents || {})[0];
|
|
158
|
+
const seatTypeFare = (_b = (_a = serviceItem.seat_types) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.fare;
|
|
159
|
+
if (originalDpPrice && seatTypeFare) {
|
|
160
|
+
return (React.createElement("div", { className: "grid grid-cols-2 items-center text-[13.33px] relative" },
|
|
161
|
+
React.createElement("div", { className: "col-start-1 row-start-2 flex items-center" },
|
|
162
|
+
React.createElement("span", { className: "text-[13.33px] font-normal leading-[22px] text-[#ccc]" }, "Antes")),
|
|
163
|
+
React.createElement("div", { className: "col-start-1 row-start-3 flex h-[20px] items-end" },
|
|
164
|
+
React.createElement("span", { className: "text-[13.33px] font-normal leading-[20px] text-[#464647]" }, "Desde")),
|
|
165
|
+
React.createElement("div", { className: "col-start-2 row-start-1 flex items-center justify-center absolute", style: { top: "-22px", left: "50%", transform: "translateX(-50%)" } }, !isNaN(Number(dpDiscountPercent)) &&
|
|
166
|
+
Number(dpDiscountPercent) > 0 && (React.createElement("span", { className: "rounded-[100px] bg-[#ff5964] px-[6px] text-[12px] bold-text leading-[20px] text-white", style: {
|
|
167
|
+
animation: "pulse-zoom 2s ease-in-out infinite",
|
|
168
|
+
whiteSpace: "nowrap",
|
|
169
|
+
} },
|
|
170
|
+
Math.round(Number(dpDiscountPercent)),
|
|
171
|
+
"% OFF"))),
|
|
172
|
+
React.createElement("div", { className: "col-start-2 row-start-2 flex items-center justify-center", style: { textAlign: "center" } },
|
|
173
|
+
React.createElement("span", { className: "text-[13.33px] font-normal leading-[20px] text-[#9f9f9f] relative", style: { position: "relative" } },
|
|
174
|
+
formatPrice(Number(originalDpPrice)),
|
|
175
|
+
React.createElement("span", { style: {
|
|
176
|
+
position: "absolute",
|
|
177
|
+
left: "-2px",
|
|
178
|
+
top: "50%",
|
|
179
|
+
width: "calc(100% + 4px)",
|
|
180
|
+
height: "1px",
|
|
181
|
+
backgroundColor: "#9f9f9f",
|
|
182
|
+
transform: "rotate(-10deg)",
|
|
183
|
+
transformOrigin: "center",
|
|
184
|
+
} }))),
|
|
185
|
+
React.createElement("div", { className: "col-start-2 row-start-3 flex h-[30px] items-end justify-center relative" },
|
|
186
|
+
React.createElement("span", { className: "flex items-center gap-[6px] text-[22px] bold-text leading-[30px]", style: { color: isSoldOut ? "#c0c0c0" : "#ff5964" } },
|
|
187
|
+
React.createElement("div", { className: "absolute", style: { left: isPeru ? "-1px" : "-8px" } }, renderIcon("fireIcon", "16px")),
|
|
188
|
+
availableSeats <= 0
|
|
189
|
+
? CommonService.currency(0, currencySign)
|
|
190
|
+
: CommonService.discountedCurrency(Number(seatTypeFare), currencySign)))));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
144
193
|
if (hasDiscount && discountSeat) {
|
|
145
194
|
return (React.createElement("div", { className: "grid grid-cols-2 items-center text-[13.33px] relative" },
|
|
146
195
|
React.createElement("div", { className: "col-start-1 row-start-2 flex items-center" },
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
const FeedbackBanner = ({ config }) => {
|
|
3
|
+
if (!config)
|
|
4
|
+
return null;
|
|
5
|
+
return (React.createElement("div", { style: {
|
|
6
|
+
display: "flex",
|
|
7
|
+
alignItems: "center",
|
|
8
|
+
gap: 12,
|
|
9
|
+
borderRadius: 20,
|
|
10
|
+
padding: "12px 16px",
|
|
11
|
+
marginTop: 16,
|
|
12
|
+
backgroundColor: config.bannerBg,
|
|
13
|
+
} },
|
|
14
|
+
React.createElement("span", { style: { fontSize: 22 } }, config.emoji),
|
|
15
|
+
React.createElement("span", { style: {
|
|
16
|
+
fontWeight: 600,
|
|
17
|
+
fontSize: "13.33px",
|
|
18
|
+
color: config.bannerText,
|
|
19
|
+
} }, config.message)));
|
|
20
|
+
};
|
|
21
|
+
export default FeedbackBanner;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FeedbackConfig } from "./constants";
|
|
3
|
+
interface FeedbackTextareaProps {
|
|
4
|
+
config: FeedbackConfig | null;
|
|
5
|
+
feedback: string;
|
|
6
|
+
onFeedbackChange?: (text: string) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const FeedbackTextarea: ({ config, feedback, onFeedbackChange, }: FeedbackTextareaProps) => React.JSX.Element;
|
|
9
|
+
export default FeedbackTextarea;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MAX_CHARS } from "./constants";
|
|
3
|
+
const FeedbackTextarea = ({ config, feedback, onFeedbackChange, }) => {
|
|
4
|
+
if (!config)
|
|
5
|
+
return null;
|
|
6
|
+
return (React.createElement("div", { style: { marginTop: 16 } },
|
|
7
|
+
React.createElement("div", { style: {
|
|
8
|
+
display: "flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
gap: 8,
|
|
11
|
+
marginBottom: 8,
|
|
12
|
+
} },
|
|
13
|
+
React.createElement("span", { style: { fontWeight: 700, color: "#111827", fontSize: "13.33px" } }, config.question),
|
|
14
|
+
React.createElement("span", { style: {
|
|
15
|
+
fontSize: 12,
|
|
16
|
+
color: "#6B7280",
|
|
17
|
+
background: "#F3F4F6",
|
|
18
|
+
borderRadius: 6,
|
|
19
|
+
padding: "2px 8px",
|
|
20
|
+
} }, "Opcional")),
|
|
21
|
+
React.createElement("div", { style: {
|
|
22
|
+
border: "1.5px solid #E5E7EB",
|
|
23
|
+
borderRadius: 14,
|
|
24
|
+
overflow: "hidden",
|
|
25
|
+
position: "relative",
|
|
26
|
+
} },
|
|
27
|
+
React.createElement("textarea", { value: feedback, onChange: (e) => {
|
|
28
|
+
if (e.target.value.length <= MAX_CHARS)
|
|
29
|
+
onFeedbackChange === null || onFeedbackChange === void 0 ? void 0 : onFeedbackChange(e.target.value);
|
|
30
|
+
}, placeholder: config.placeholder, rows: 4, style: {
|
|
31
|
+
width: "100%",
|
|
32
|
+
padding: "12px 12px 28px",
|
|
33
|
+
background: "transparent",
|
|
34
|
+
color: "#374151",
|
|
35
|
+
fontSize: "13.33px",
|
|
36
|
+
resize: "none",
|
|
37
|
+
outline: "none",
|
|
38
|
+
border: "none",
|
|
39
|
+
boxSizing: "border-box",
|
|
40
|
+
fontFamily: "inherit",
|
|
41
|
+
} }),
|
|
42
|
+
React.createElement("div", { style: {
|
|
43
|
+
position: "absolute",
|
|
44
|
+
bottom: 8,
|
|
45
|
+
right: 12,
|
|
46
|
+
fontSize: 12,
|
|
47
|
+
color: "#9CA3AF",
|
|
48
|
+
} },
|
|
49
|
+
feedback.length,
|
|
50
|
+
" / ",
|
|
51
|
+
MAX_CHARS))));
|
|
52
|
+
};
|
|
53
|
+
export default FeedbackTextarea;
|