@cleartrip/ct-platform-recent-search-widget 1.0.1-beta.0

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.
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { RecentSearchWidgetCardProps } from './RecentSearchWidget.types';
3
+ declare const RecentSearchCard: React.FC<RecentSearchWidgetCardProps>;
4
+ export default RecentSearchCard;
5
+ //# sourceMappingURL=RecentSearchCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecentSearchCard.d.ts","sourceRoot":"","sources":["../packages/components/RecentSearchWidget/src/RecentSearchCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAEzE,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAoF3D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { RecentSearchWidgetProps } from './RecentSearchWidget.types';
3
+ declare const RecentSearchWidget: React.FC<RecentSearchWidgetProps>;
4
+ export default RecentSearchWidget;
5
+ //# sourceMappingURL=RecentSearchWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecentSearchWidget.d.ts","sourceRoot":"","sources":["../packages/components/RecentSearchWidget/src/RecentSearchWidget.tsx"],"names":[],"mappings":";AAKA,OAAO,EAEH,uBAAuB,EAE1B,MAAM,4BAA4B,CAAC;AAiCpC,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAkMzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,41 @@
1
+ export interface RecentSearchWidgetProps {
2
+ deviceType?: DeviceType;
3
+ animationType?: AnimationType;
4
+ pageName: string;
5
+ platform: string;
6
+ deviceWidth: number;
7
+ }
8
+ export type LobType = 'Hotel' | 'Flight' | 'Bus';
9
+ export type DeviceType = 'pwa' | 'desktop';
10
+ export type AnimationType = 'expand' | 'fade' | 'slide';
11
+ export interface CardItem {
12
+ id: string;
13
+ title: string;
14
+ subtitle?: string;
15
+ lobType: LobType;
16
+ icon?: string;
17
+ cityName?: string;
18
+ hotelName?: string;
19
+ onwardFlight?: string;
20
+ returnFlight?: string;
21
+ checkInDate?: string;
22
+ checkOutDate?: string;
23
+ onwardDate?: string;
24
+ returnDate?: string;
25
+ }
26
+ export interface RecentSearchWidgetApiResponse {
27
+ data?: CardItem[];
28
+ }
29
+ export interface RecentSearchWidgetCardProps {
30
+ card: CardItem;
31
+ deviceType: DeviceType;
32
+ isRemoving: boolean;
33
+ onRemove: (cardId: string) => void;
34
+ onClick: (card: CardItem) => void;
35
+ }
36
+ export interface CrossIconProps {
37
+ color?: string;
38
+ width?: string;
39
+ height?: string;
40
+ }
41
+ //# sourceMappingURL=RecentSearchWidget.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecentSearchWidget.types.d.ts","sourceRoot":"","sources":["../packages/components/RecentSearchWidget/src/RecentSearchWidget.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACpC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AACjD,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,SAAS,CAAC;AAC3C,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAExD,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,6BAA6B;IAC1C,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,2BAA2B;IACxC,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,cAAc;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("@cleartrip/ct-design-typography"),a=require("@cleartrip/ct-platform-io-hoc"),r=require("@cleartrip/ct-platform-assets");var o="index-module_Container__VvUQc",d="index-module_expandAnimationWrapper__-pfI2",c="index-module_collapse__jgCkU",s="index-module_recentSearchWrapper__IWkQD",l="index-module_recentSearchWrapperPWA__oqiq4",p="index-module_recentSearchWrapperDesktop__a1fZl",_="index-module_contentWrapper__MDP3j",u="index-module_cardsContainerPWA__EQTxs",m="index-module_cardsContainerDesktop__7xN6a",x="index-module_cardContainer__YIOsP",f="index-module_cardContainerPWA__7SP9j",h="index-module_cardContainerDesktop__CVUbT",g="index-module_card__s8XF4",y="index-module_cardTextWrapper__I9aqX",v="index-module_cardSubTitleWrapper__j47SX",b="index-module_cardIconWrapper__NPXEl",k="index-module_cardRemoving__Dw1fu",w="index-module_textEllipsis__oEnUb";!function(e,n){void 0===n&&(n={});var t=n.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".index-module_Container__VvUQc{height:100%;position:relative;width:100%}.index-module_expandAnimationWrapper__-pfI2{backface-visibility:hidden;opacity:1;overflow:hidden;transform:translateZ(0) scaleY(1);transform-origin:top;transition:transform .6s cubic-bezier(.25,.46,.45,.94),opacity .4s ease-out}.index-module_collapse__jgCkU{left:0;margin:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0;transform:translateZ(0) scaleY(0)}.index-module_recentSearchWrapper__IWkQD{height:100%;width:100%}.index-module_recentSearchWrapperPWA__oqiq4{padding:32px 16px 16px}.index-module_recentSearchWrapperDesktop__a1fZl{padding:32px 0 16px}.index-module_contentWrapper__MDP3j{animation:index-module_fadeIn__cZep2 .3s ease-out;display:flex;flex-direction:column;gap:12px;width:100%}.index-module_cardsContainerPWA__EQTxs{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;display:flex;gap:12px;overflow-x:auto;scroll-behavior:smooth;scrollbar-width:none;width:100%}.index-module_cardsContainerPWA__EQTxs::-webkit-scrollbar{display:none;height:0;width:0}.index-module_cardsContainerDesktop__7xN6a{display:flex;flex:1;gap:12px;width:100%}.index-module_cardContainer__YIOsP{backface-visibility:hidden;border:1px solid rgba(26,26,26,.122);border-radius:12px;box-sizing:border-box;display:flex;flex:0 0 auto;flex-direction:column;gap:4px;max-width:272px;min-width:188px;opacity:1;transform:translateZ(0);transition:transform .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1),width .3s cubic-bezier(.4,0,.2,1) .3s,margin-right .3s cubic-bezier(.4,0,.2,1) .3s}.index-module_cardContainer__YIOsP:last-child{margin-right:16px}.index-module_cardContainerPWA__7SP9j{padding:12px}.index-module_cardContainerDesktop__CVUbT{cursor:pointer;padding:16px 12px 16px 16px;width:100%}.index-module_cardContainerDesktop__CVUbT:hover{background:#fff;border-color:#d0d0d0}.index-module_card__s8XF4{display:flex;justify-content:space-between}.index-module_cardTextWrapper__I9aqX{flex-direction:column}.index-module_cardSubTitleWrapper__j47SX,.index-module_cardTextWrapper__I9aqX{align-items:flex-start;display:flex;gap:4px}.index-module_cardIconWrapper__NPXEl{display:flex}.index-module_cardRemoving__Dw1fu{margin-right:0;opacity:0;overflow:hidden;padding-left:0;padding-right:0;pointer-events:none;transform:translate3d(-30px,-30px,0);width:0}.index-module_removeButton__rGjk-{align-items:center;display:flex;justify-content:center;transition:all .2s ease}.index-module_removeButton__rGjk-:hover{background:#f0f0f0;color:#666}.index-module_textEllipsis__oEnUb{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@-webkit-keyframes index-module_fadeIn__cZep2{0%{opacity:0}to{opacity:1}}@-moz-keyframes index-module_fadeIn__cZep2{0%{opacity:0}to{opacity:1}}@-o-keyframes index-module_fadeIn__cZep2{0%{opacity:0}to{opacity:1}}@keyframes index-module_fadeIn__cZep2{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}");var C=function(a){var o=a.card,d=a.deviceType,c=a.isRemoving,s=a.onRemove,l=a.onClick,p=t.useCallback((function(e){e.stopPropagation(),s(o.id)}),[s,o.id]),_=t.useCallback((function(e){e.stopPropagation(),null==l||l(o)}),[l,o]);return n.jsx("div",e.__assign({className:"".concat(x,"\n ").concat("desktop"===d?h:f,"\n ").concat(c?k:""," "),onClick:_},{children:n.jsxs("div",e.__assign({className:g},{children:[n.jsxs("div",e.__assign({className:y},{children:["pwa"===d&&n.jsx(i.Typography,e.__assign({variant:i.TypographyVariant.B3,colorCode:"#FF4F17",style:{textTransform:"uppercase"}},{children:o.lobType})),n.jsx(i.Typography,e.__assign({variant:i.TypographyVariant.HM4,className:"".concat(w)},{children:o.title.length>32?"".concat(o.title.substring(0,32),"..."):o.title})),n.jsxs("div",e.__assign({className:v},{children:[n.jsx(i.Typography,e.__assign({variant:i.TypographyVariant.P3,className:"".concat(w)},{children:o.subtitle})),n.jsx(i.Typography,e.__assign({variant:i.TypographyVariant.P3,className:"".concat(w)},{children:o.subtitle}))]}))]})),n.jsx("div",e.__assign({className:b,onClick:"desktop"===d?p:function(){},style:{cursor:"pointer",alignItems:"desktop"===d?"center":"flex-start"}},{children:"desktop"===d?n.jsx(r.ChevronRight,{width:16,height:16}):n.jsx(r.CrossIcon,{width:16,height:16,color:"#1A1A1A"})}))]}))}))},T=[{id:"1",title:"New York, Central Park",subtitle:"Oct 25 - Oct 28",lobType:"Hotel",cityName:"New York",hotelName:"Central Park Hotel",checkInDate:"Oct 25",checkOutDate:"Oct 28"},{id:"2",title:"London → Paris",subtitle:"Nov 10, 2025",lobType:"Flight",onwardFlight:"London → Paris",onwardDate:"Nov 10, 2025"},{id:"3",title:"Mumbai → Pune",subtitle:"Dec 15, 2025",lobType:"Bus",cityName:"Mumbai",onwardDate:"Dec 15, 2025"}];exports.Card=C,exports.RecentSearchWidget=function(r){var x=r.deviceType,f=void 0===x?"pwa":x;r.animationType,r.pageName,r.platform,r.deviceWidth;var h=t.useState(!0),g=h[0],y=h[1],v=t.useState(!1),b=v[0],k=v[1],w=t.useState([]),j=w[0],W=w[1],N=t.useState(!1),P=N[0],S=N[1],I=t.useState(new Set),A=I[0],D=I[1],E=t.useRef([]);t.useEffect((function(){var e=E.current;return function(){e.forEach((function(e){return clearTimeout(e)})),e.length=0}}),[]),t.useEffect((function(){if(!P){new Promise((function(e){setTimeout((function(){e({data:T})}),1e3)})).then((function(e){var n=e.data||[];Array.isArray(n)&&n.length>0?W(n):W(T),S(!0)}))}}),[P]),t.useEffect((function(){P&&j.length>0&&k(!0)}),[P,j.length]),t.useEffect((function(){if(b&&P){var e,n=requestAnimationFrame((function(){e=requestAnimationFrame((function(){y(!1)}))}));return function(){cancelAnimationFrame(n),void 0!==e&&cancelAnimationFrame(e)}}}),[b,P]),t.useEffect((function(){if(P&&0===j.length){console.log("RecentSearchWidget: All cards removed, auto-collapsing..."),y(!0);var e=setTimeout((function(){k(!1)}),600);return function(){clearTimeout(e)}}}),[P,j.length]);var q=t.useCallback((function(e){D((function(n){return new Set(n).add(e)}));var n=setTimeout((function(){W((function(n){return n.filter((function(n){return n.id!==e}))})),D((function(n){var t=new Set(n);return t.delete(e),t}))}),600);E.current.push(n)}),[]),R=t.useCallback((function(){console.log("RecentSearchWidget: Intersection observed")}),[]),F=t.useCallback((function(e){console.log("RecentSearchWidget: Item clicked",e)}),[]);return b?n.jsx(a.IntersectionObserverHOC,e.__assign({onIntersection:R},{children:n.jsx("div",e.__assign({className:o},{children:n.jsx("div",e.__assign({className:"".concat(d," ").concat(g?c:"")},{children:n.jsx("div",e.__assign({className:"".concat(s," ").concat("desktop"===f?p:l)},{children:P&&(null==j?void 0:j.length)>0&&n.jsxs("div",e.__assign({className:_},{children:[n.jsx(i.Typography,e.__assign({variant:"desktop"===f?i.TypographyVariant.HM1:i.TypographyVariant.HM3},{children:"Recent searches"})),n.jsx("div",e.__assign({className:"".concat("desktop"===f?m:u)},{children:j.map((function(e){return n.jsx(C,{card:e,deviceType:f,isRemoving:A.has(e.id),onRemove:q,onClick:F},e.id)}))}))]}))}))}))}))})):null};
2
+ //# sourceMappingURL=ct-platform-recent-search-widget.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ct-platform-recent-search-widget.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/RecentSearchWidget/src/RecentSearchCard.tsx","../packages/components/RecentSearchWidget/src/RecentSearchWidget.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","RecentSearchCard","_a","card","deviceType","isRemoving","onRemove","onClick","handleRemoveClick","useCallback","e","stopPropagation","id","handleClick","_jsx","jsx","__assign","className","concat","styles","children","_jsxs","jsxs","Typography","variant","TypographyVariant","B3","colorCode","textTransform","lobType","HM4","title","length","substring","P3","subtitle","cursor","alignItems","ChevronRight","width","height","CrossIcon","color","MOCK_CARDS","cityName","hotelName","checkInDate","checkOutDate","onwardFlight","onwardDate","_b","animationType","pageName","platform","deviceWidth","_d","useState","isCollapsed","setIsCollapsed","_e","shouldRender","setShouldRender","_f","cards","setCards","_g","dataLoaded","setDataLoaded","_h","Set","removingCardIds","setRemovingCardIds","removeTimeoutsRef","useRef","useEffect","timeouts","current","forEach","timeout","clearTimeout","Promise","resolve","setTimeout","data","then","apiResponse","items","Array","isArray","rafId2_1","rafId1_1","requestAnimationFrame","cancelAnimationFrame","undefined","console","log","removeTimer_1","handleRemoveCard","cardId","prev","add","filter","newSet","delete","push","handleIntersection","handleItemClick","item","IntersectionObserverHOC","onIntersection","HM1","HM3","map","has"],"mappings":"47BAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD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C,OACQ,YAAfd,EACMe,EACAA,IACR,CAAAC,SAED2C,EAAMiD,KAAI,SAAC7G,GAAS,OACjBW,EAAAC,IAACd,EAAgB,CAEbE,KAAMA,EACNC,WAAYA,EACZC,WAAYiE,EAAgB2C,IACxB9G,EAAKS,IAETN,SAAU2F,EACV1F,QAASmG,GAPJvG,EAAKS,0BAtCvC,IAwDf","x_google_ignoreList":[0]}
@@ -0,0 +1,2 @@
1
+ import{__assign as e}from"tslib";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useCallback as i,useState as o,useRef as r,useEffect as a}from"react";import{Typography as d,TypographyVariant as c}from"@cleartrip/ct-design-typography";import{IntersectionObserverHOC as l}from"@cleartrip/ct-platform-io-hoc";import{ChevronRight as s,CrossIcon as p}from"@cleartrip/ct-platform-assets";var m="index-module_Container__VvUQc",u="index-module_expandAnimationWrapper__-pfI2",_="index-module_collapse__jgCkU",f="index-module_recentSearchWrapper__IWkQD",x="index-module_recentSearchWrapperPWA__oqiq4",h="index-module_recentSearchWrapperDesktop__a1fZl",v="index-module_contentWrapper__MDP3j",g="index-module_cardsContainerPWA__EQTxs",y="index-module_cardsContainerDesktop__7xN6a",b="index-module_cardContainer__YIOsP",k="index-module_cardContainerPWA__7SP9j",w="index-module_cardContainerDesktop__CVUbT",C="index-module_card__s8XF4",W="index-module_cardTextWrapper__I9aqX",T="index-module_cardSubTitleWrapper__j47SX",N="index-module_cardIconWrapper__NPXEl",P="index-module_cardRemoving__Dw1fu",I="index-module_textEllipsis__oEnUb";!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".index-module_Container__VvUQc{height:100%;position:relative;width:100%}.index-module_expandAnimationWrapper__-pfI2{backface-visibility:hidden;opacity:1;overflow:hidden;transform:translateZ(0) scaleY(1);transform-origin:top;transition:transform .6s cubic-bezier(.25,.46,.45,.94),opacity .4s ease-out}.index-module_collapse__jgCkU{left:0;margin:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0;transform:translateZ(0) scaleY(0)}.index-module_recentSearchWrapper__IWkQD{height:100%;width:100%}.index-module_recentSearchWrapperPWA__oqiq4{padding:32px 16px 16px}.index-module_recentSearchWrapperDesktop__a1fZl{padding:32px 0 16px}.index-module_contentWrapper__MDP3j{animation:index-module_fadeIn__cZep2 .3s ease-out;display:flex;flex-direction:column;gap:12px;width:100%}.index-module_cardsContainerPWA__EQTxs{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;display:flex;gap:12px;overflow-x:auto;scroll-behavior:smooth;scrollbar-width:none;width:100%}.index-module_cardsContainerPWA__EQTxs::-webkit-scrollbar{display:none;height:0;width:0}.index-module_cardsContainerDesktop__7xN6a{display:flex;flex:1;gap:12px;width:100%}.index-module_cardContainer__YIOsP{backface-visibility:hidden;border:1px solid rgba(26,26,26,.122);border-radius:12px;box-sizing:border-box;display:flex;flex:0 0 auto;flex-direction:column;gap:4px;max-width:272px;min-width:188px;opacity:1;transform:translateZ(0);transition:transform .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1),width .3s cubic-bezier(.4,0,.2,1) .3s,margin-right .3s cubic-bezier(.4,0,.2,1) .3s}.index-module_cardContainer__YIOsP:last-child{margin-right:16px}.index-module_cardContainerPWA__7SP9j{padding:12px}.index-module_cardContainerDesktop__CVUbT{cursor:pointer;padding:16px 12px 16px 16px;width:100%}.index-module_cardContainerDesktop__CVUbT:hover{background:#fff;border-color:#d0d0d0}.index-module_card__s8XF4{display:flex;justify-content:space-between}.index-module_cardTextWrapper__I9aqX{flex-direction:column}.index-module_cardSubTitleWrapper__j47SX,.index-module_cardTextWrapper__I9aqX{align-items:flex-start;display:flex;gap:4px}.index-module_cardIconWrapper__NPXEl{display:flex}.index-module_cardRemoving__Dw1fu{margin-right:0;opacity:0;overflow:hidden;padding-left:0;padding-right:0;pointer-events:none;transform:translate3d(-30px,-30px,0);width:0}.index-module_removeButton__rGjk-{align-items:center;display:flex;justify-content:center;transition:all .2s ease}.index-module_removeButton__rGjk-:hover{background:#f0f0f0;color:#666}.index-module_textEllipsis__oEnUb{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@-webkit-keyframes index-module_fadeIn__cZep2{0%{opacity:0}to{opacity:1}}@-moz-keyframes index-module_fadeIn__cZep2{0%{opacity:0}to{opacity:1}}@-o-keyframes index-module_fadeIn__cZep2{0%{opacity:0}to{opacity:1}}@keyframes index-module_fadeIn__cZep2{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}");var A=function(o){var r=o.card,a=o.deviceType,l=o.isRemoving,m=o.onRemove,u=o.onClick,_=i((function(e){e.stopPropagation(),m(r.id)}),[m,r.id]),f=i((function(e){e.stopPropagation(),null==u||u(r)}),[u,r]);return t("div",e({className:"".concat(b,"\n ").concat("desktop"===a?w:k,"\n ").concat(l?P:""," "),onClick:f},{children:n("div",e({className:C},{children:[n("div",e({className:W},{children:["pwa"===a&&t(d,e({variant:c.B3,colorCode:"#FF4F17",style:{textTransform:"uppercase"}},{children:r.lobType})),t(d,e({variant:c.HM4,className:"".concat(I)},{children:r.title.length>32?"".concat(r.title.substring(0,32),"..."):r.title})),n("div",e({className:T},{children:[t(d,e({variant:c.P3,className:"".concat(I)},{children:r.subtitle})),t(d,e({variant:c.P3,className:"".concat(I)},{children:r.subtitle}))]}))]})),t("div",e({className:N,onClick:"desktop"===a?_:function(){},style:{cursor:"pointer",alignItems:"desktop"===a?"center":"flex-start"}},{children:"desktop"===a?t(s,{width:16,height:16}):t(p,{width:16,height:16,color:"#1A1A1A"})}))]}))}))},S=[{id:"1",title:"New York, Central Park",subtitle:"Oct 25 - Oct 28",lobType:"Hotel",cityName:"New York",hotelName:"Central Park Hotel",checkInDate:"Oct 25",checkOutDate:"Oct 28"},{id:"2",title:"London → Paris",subtitle:"Nov 10, 2025",lobType:"Flight",onwardFlight:"London → Paris",onwardDate:"Nov 10, 2025"},{id:"3",title:"Mumbai → Pune",subtitle:"Dec 15, 2025",lobType:"Bus",cityName:"Mumbai",onwardDate:"Dec 15, 2025"}],D=function(s){var p=s.deviceType,b=void 0===p?"pwa":p;s.animationType,s.pageName,s.platform,s.deviceWidth;var k=o(!0),w=k[0],C=k[1],W=o(!1),T=W[0],N=W[1],P=o([]),I=P[0],D=P[1],j=o(!1),E=j[0],F=j[1],R=o(new Set),Z=R[0],q=R[1],U=r([]);a((function(){var e=U.current;return function(){e.forEach((function(e){return clearTimeout(e)})),e.length=0}}),[]),a((function(){if(!E){new Promise((function(e){setTimeout((function(){e({data:S})}),1e3)})).then((function(e){var t=e.data||[];Array.isArray(t)&&t.length>0?D(t):D(S),F(!0)}))}}),[E]),a((function(){E&&I.length>0&&N(!0)}),[E,I.length]),a((function(){if(T&&E){var e,t=requestAnimationFrame((function(){e=requestAnimationFrame((function(){C(!1)}))}));return function(){cancelAnimationFrame(t),void 0!==e&&cancelAnimationFrame(e)}}}),[T,E]),a((function(){if(E&&0===I.length){console.log("RecentSearchWidget: All cards removed, auto-collapsing..."),C(!0);var e=setTimeout((function(){N(!1)}),600);return function(){clearTimeout(e)}}}),[E,I.length]);var X=i((function(e){q((function(t){return new Set(t).add(e)}));var t=setTimeout((function(){D((function(t){return t.filter((function(t){return t.id!==e}))})),q((function(t){var n=new Set(t);return n.delete(e),n}))}),600);U.current.push(t)}),[]),Y=i((function(){console.log("RecentSearchWidget: Intersection observed")}),[]),O=i((function(e){console.log("RecentSearchWidget: Item clicked",e)}),[]);return T?t(l,e({onIntersection:Y},{children:t("div",e({className:m},{children:t("div",e({className:"".concat(u," ").concat(w?_:"")},{children:t("div",e({className:"".concat(f," ").concat("desktop"===b?h:x)},{children:E&&(null==I?void 0:I.length)>0&&n("div",e({className:v},{children:[t(d,e({variant:"desktop"===b?c.HM1:c.HM3},{children:"Recent searches"})),t("div",e({className:"".concat("desktop"===b?y:g)},{children:I.map((function(e){return t(A,{card:e,deviceType:b,isRemoving:Z.has(e.id),onRemove:X,onClick:O},e.id)}))}))]}))}))}))}))})):null};export{A as Card,D as RecentSearchWidget};
2
+ //# sourceMappingURL=ct-platform-recent-search-widget.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ct-platform-recent-search-widget.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/RecentSearchWidget/src/RecentSearchCard.tsx","../packages/components/RecentSearchWidget/src/RecentSearchWidget.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","RecentSearchCard","_a","card","deviceType","isRemoving","onRemove","onClick","handleRemoveClick","useCallback","e","stopPropagation","id","handleClick","_jsx","__assign","className","concat","styles","children","_jsxs","Typography","variant","TypographyVariant","B3","colorCode","textTransform","lobType","HM4","title","length","substring","P3","subtitle","cursor","alignItems","ChevronRight","width","height","CrossIcon","color","MOCK_CARDS","cityName","hotelName","checkInDate","checkOutDate","onwardFlight","onwardDate","RecentSearchWidget","_b","animationType","pageName","platform","deviceWidth","_d","useState","isCollapsed","setIsCollapsed","_e","shouldRender","setShouldRender","_f","cards","setCards","_g","dataLoaded","setDataLoaded","_h","Set","removingCardIds","setRemovingCardIds","removeTimeoutsRef","useRef","useEffect","timeouts","current","forEach","timeout","clearTimeout","Promise","resolve","setTimeout","data","then","apiResponse","items","Array","isArray","rafId2_1","rafId1_1","requestAnimationFrame","cancelAnimationFrame","undefined","console","log","removeTimer_1","handleRemoveCard","cardId","prev","add","filter","newSet","delete","push","handleIntersection","handleItemClick","item","IntersectionObserverHOC","onIntersection","HM1","HM3","map","has"],"mappings":"2mCAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,m4FCnBM,IAAAe,EAA0D,SAACC,GAC7D,IAAAC,EAAID,EAAAC,KACJC,EAAUF,EAAAE,WACVC,EAAUH,EAAAG,WACVC,EAAQJ,EAAAI,SACRC,EAAOL,EAAAK,QAEDC,EAAoBC,GACtB,SAACC,GACGA,EAAEC,kBACFL,EAASH,EAAKS,GACjB,GACD,CAACN,EAAUH,EAAKS,KAGdC,EAAcJ,GAChB,SAACC,GACGA,EAAEC,kBACFJ,SAAAA,EAAUJ,EACd,GACA,CAACI,EAASJ,IAGd,OACIW,EACI,MAAAC,EAAA,CAAAC,UAAW,GAAAC,OAAGC,EACP,uBAAAD,OAAe,YAAfb,EAA2Bc,EAA8BA,EACzD,uBAAAD,OAAAZ,EAAaa,EAAsB,GAAK,KAC/CX,QAASM,GAET,CAAAM,SAAAC,EAAA,MAAAL,EAAA,CAAKC,UAAWE,GAAW,CAAAC,SAAA,CACvBC,EAAK,MAAAL,EAAA,CAAAC,UAAWE,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,EAAA,CAAAC,UAAW,GAAAC,OACQ,YAAfb,EACMc,EACAA,IACR,CAAAC,SAED2C,EAAMiD,KAAI,SAAC5G,GAAS,OACjBW,EAACb,EAAgB,CAEbE,KAAMA,EACNC,WAAYA,EACZC,WAAYgE,EAAgB2C,IACxB7G,EAAKS,IAETN,SAAU0F,EACVzF,QAASkG,GAPJtG,EAAKS,0BAtCvC,IAwDf","x_google_ignoreList":[0]}
@@ -0,0 +1,4 @@
1
+ export { default as RecentSearchWidget } from './RecentSearchWidget';
2
+ export { default as Card } from './RecentSearchCard';
3
+ export * from './RecentSearchWidget.types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/components/RecentSearchWidget/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACrD,cAAc,4BAA4B,CAAC"}
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@cleartrip/ct-platform-recent-search-widget",
3
+ "version": "1.0.1-beta.0",
4
+ "description": "Recent Search Widget Component",
5
+ "types": "dist/index.d.ts",
6
+ "main": "dist/ct-platform-recent-search-widget.cjs.js",
7
+ "module": "dist/ct-platform-recent-search-widget.esm.js",
8
+ "sideEffects": false,
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "dependencies": {
13
+ "@cleartrip/ct-design-container": "3.7.0",
14
+ "@cleartrip/ct-design-theme": "3.7.0",
15
+ "@cleartrip/ct-design-typography": "3.7.0",
16
+ "classnames": "^2.5.1",
17
+ "uuid": "^9.0.1",
18
+ "@cleartrip/ct-platform-types": "4.2.0-beta.31",
19
+ "@cleartrip/ct-platform-shimmer": "4.2.0-beta.31",
20
+ "@cleartrip/ct-platform-assets": "4.2.0-beta.31",
21
+ "@cleartrip/ct-platform-utils": "4.2.0-beta.31",
22
+ "@cleartrip/ct-platform-io-hoc": "4.2.0-beta.31"
23
+ },
24
+ "peerDependencies": {
25
+ "react": ">=16.8.0",
26
+ "react-dom": ">=16.8.0"
27
+ },
28
+ "author": "Cleartrip",
29
+ "license": "ISC",
30
+ "scripts": {
31
+ "test": "echo \"Error: no test specified\" && exit 1",
32
+ "watch-package": "rollup -c -w",
33
+ "build-package": "rollup -c",
34
+ "build-package:clean": "rm -rf dist && rollup -c"
35
+ }
36
+ }