@cleartrip/ct-platform-top-offers 2.5.0-beta.1 → 2.5.0-beta.3

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,4 @@
1
+ import { IBaseItemProps, ITopOffersProps } from './TopOffers.types';
2
+ declare const TopOffers: <T extends IBaseItemProps = IBaseItemProps>({ eligibleUserType, lazyWidget, widgetData, }: ITopOffersProps<T>) => import("react/jsx-runtime").JSX.Element;
3
+ export default TopOffers;
4
+ //# sourceMappingURL=TopOffers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TopOffers.d.ts","sourceRoot":"","sources":["../packages/components/TopOffers/src/TopOffers.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpE,QAAA,MAAM,SAAS,2JAyEd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,20 @@
1
+ export type IBaseItemProps = Record<string, any>;
2
+ export interface ITopOffersItems<T extends IBaseItemProps> {
3
+ items: T[];
4
+ }
5
+ export interface ITopOffersWidgetData<T extends IBaseItemProps> {
6
+ title?: string;
7
+ slidesToDisplay: number;
8
+ forYou: ITopOffersItems<T>;
9
+ bank: ITopOffersItems<T>;
10
+ flights: ITopOffersItems<T>;
11
+ hotels: ITopOffersItems<T>;
12
+ buses: ITopOffersItems<T>;
13
+ trains: ITopOffersItems<T>;
14
+ }
15
+ export interface ITopOffersProps<T extends IBaseItemProps = IBaseItemProps> {
16
+ eligibleUserType?: string;
17
+ lazyWidget: boolean;
18
+ widgetData?: ITopOffersWidgetData<T>;
19
+ }
20
+ //# sourceMappingURL=TopOffers.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TopOffers.types.d.ts","sourceRoot":"","sources":["../packages/components/TopOffers/src/TopOffers.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEjD,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,cAAc;IACrD,KAAK,EAAE,CAAC,EAAE,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,cAAc;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC3B,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IACzB,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC3B,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC1B,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc;IACtE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC;CACxC"}
@@ -0,0 +1,15 @@
1
+ export declare const WIDGET_HEADER = "Top offers";
2
+ export declare const FILTERS_MAP: {
3
+ FOR_YOU: string;
4
+ BANK: string;
5
+ FLIGHTS: string;
6
+ HOTELS: string;
7
+ BUSES: string;
8
+ TRAINS: string;
9
+ };
10
+ export declare const PILL_CAROUSEL_CONFIG: {
11
+ text: string;
12
+ imageUrl: any;
13
+ value: string;
14
+ }[];
15
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../packages/components/TopOffers/src/constants.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,aAAa,eAAe,CAAC;AAE1C,eAAO,MAAM,WAAW;;;;;;;CAOvB,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;GA+BhC,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),t=require("react/jsx-runtime"),a=require("@cleartrip/ct-design-typography"),r=require("@cleartrip/ct-platform-assets"),i=require("@cleartrip/ct-platform-merch-carousel"),l=require("@cleartrip/ct-platform-pill-carousel"),s=require("@cleartrip/ct-platform-widget-manager");var o="index-module_top-offers__container__Z747x",p="index-module_top-offers__header__hIxia";!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===a&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap");.index-module_top-offers__container__Z747x{align-items:flex-start;background:linear-gradient(180deg,#e4edff,#f7faff);display:flex;flex-direction:column;gap:16px;padding:16px 0 24px}.index-module_top-offers__header__hIxia{font-feature-settings:"dlig" on,"clig" off,"liga" off;font-family:Inter;font-style:normal;padding-left:16px}');exports.TopOffers=function(m){return m.config,t.jsx(t.Fragment,{children:t.jsxs("div",e.__assign({className:o},{children:[t.jsx(a.Typography,e.__assign({variant:a.TypographyVariant.HM3,className:p},{children:"Top Offers"})),t.jsx(l.PillCarousel,{carouselData:[{text:"For you",imageUrl:r.ForYouPill},{text:"Bank",imageUrl:r.BankPill},{text:"Flights",imageUrl:r.FlightPill},{text:"Hotels",imageUrl:r.HotelPill},{text:"Buses",imageUrl:r.BusPill},{text:"Trains",imageUrl:r.TrainPill}],carouselType:l.CarouselType.PILL_CHIP,onItemClick:function(){},styleConfig:{carouselStyleConfig:{paddingLeft:"16px",paddingRight:"16px"}}}),t.jsx("div",e.__assign({style:{width:"100%",marginTop:"8px"}},{children:t.jsx(i.MerchCarousel,e.__assign({slidesToDisplay:1.5,slides:[{itemId:"item1",targetUrl:"https://www.cleartrip.com/flights",image:{url:"https://fastui.cltpstatic.com/image/upload/w_224,h_178,dpr_2,f_auto,q_auto/offermgmt/images/banner/top-offers-card-1.png",alt:"Image 1"}},{itemId:"item2",targetUrl:"https://www.cleartrip.com/flights",image:{url:"https://fastui.cltpstatic.com/image/upload/w_224,h_178,dpr_2,f_auto,q_auto/offermgmt/images/banner/top-offers-card-1.png",alt:"Image 2"}},{itemId:"item3",targetUrl:"https://www.cleartrip.com/flights",image:{url:"https://fastui.cltpstatic.com/image/upload/w_224,h_178,dpr_2,f_auto,q_auto/offermgmt/images/banner/top-offers-card-1.png",alt:"Image 3"}},{itemId:"item4",targetUrl:"https://www.cleartrip.com/flights",image:{url:"https://fastui.cltpstatic.com/image/upload/w_224,h_178,dpr_2,f_auto,q_auto/offermgmt/images/banner/top-offers-card-1.png",alt:"Image 4"}},{itemId:"item5",targetUrl:"https://www.cleartrip.com/flights",image:{url:"https://fastui.cltpstatic.com/image/upload/w_224,h_178,dpr_2,f_auto,q_auto/offermgmt/images/banner/top-offers-card-1.png",alt:"Image 5"}}]},s.MerchCarouselPeekingProps))}))]}))})};
1
+ "use strict";var e=require("tslib"),i=require("react/jsx-runtime"),A=require("react"),n=require("@cleartrip/ct-design-typography"),r=require("@cleartrip/ct-platform-merch-carousel"),o=require("@cleartrip/ct-platform-pill-carousel"),t=require("@cleartrip/ct-platform-assets");var d="index-module_top-offers__container__Z747x",l="index-module_top-offers__header__hIxia";!function(e,i){void 0===i&&(i={});var A=i.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===A&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('@font-face{font-family:swiper-icons;font-style:normal;font-weight:400;src:url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgA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4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff")}:root{--swiper-theme-color:#007aff}.index-module_swiper-container__3KSgl{list-style:none;margin-left:auto;margin-right:auto;overflow:hidden;padding:0;position:relative;z-index:1}.index-module_swiper-container-vertical__-qoi0>.index-module_swiper-wrapper__xTq01{flex-direction:column}.index-module_swiper-wrapper__xTq01{box-sizing:content-box;display:flex;height:100%;position:relative;transition-property:transform;width:100%;z-index:1}.index-module_swiper-container-android__ALUNh .index-module_swiper-slide__Zchn0,.index-module_swiper-wrapper__xTq01{transform:translateZ(0)}.index-module_swiper-container-multirow__XQ6jv>.index-module_swiper-wrapper__xTq01{flex-wrap:wrap}.index-module_swiper-container-multirow-column__pF8z->.index-module_swiper-wrapper__xTq01{flex-direction:column;flex-wrap:wrap}.index-module_swiper-container-free-mode__wWVcG>.index-module_swiper-wrapper__xTq01{margin:0 auto;transition-timing-function:ease-out}.index-module_swiper-container-pointer-events__UnxWm{touch-action:pan-y}.index-module_swiper-container-pointer-events__UnxWm.index-module_swiper-container-vertical__-qoi0{touch-action:pan-x}.index-module_swiper-slide__Zchn0{flex-shrink:0;height:100%;position:relative;transition-property:transform;width:100%}.index-module_swiper-slide-invisible-blank__FdKYe{visibility:hidden}.index-module_swiper-container-autoheight__ag5Qv,.index-module_swiper-container-autoheight__ag5Qv .index-module_swiper-slide__Zchn0{height:auto}.index-module_swiper-container-autoheight__ag5Qv .index-module_swiper-wrapper__xTq01{align-items:flex-start;transition-property:transform,height}.index-module_swiper-container-3d__utVhl{perspective:1200px}.index-module_swiper-container-3d__utVhl .index-module_swiper-cube-shadow__5Bd--,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide__Zchn0,.index-module_swiper-container-3d__utVhl .index-module_swiper-wrapper__xTq01{transform-style:preserve-3d}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:10}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea{background-image:linear-gradient(270deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3{background-image:linear-gradient(90deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ{background-image:linear-gradient(0deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF{background-image:linear-gradient(180deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{-ms-overflow-style:none;overflow:auto;scrollbar-width:none}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01::-webkit-scrollbar{display:none}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01>.index-module_swiper-slide__Zchn0{scroll-snap-align:start start}.index-module_swiper-container-horizontal__yvB5j.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{scroll-snap-type:x mandatory}.index-module_swiper-container-vertical__-qoi0.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{scroll-snap-type:y mandatory}.index-module_top-offers__container__Z747x{align-items:flex-start;background:linear-gradient(180deg,#e4edff,#f7faff);display:flex;flex-direction:column;gap:16px;padding:16px 0 24px}.index-module_top-offers__header__hIxia{font-feature-settings:"dlig" on,"clig" off,"liga" off;font-style:normal;padding-left:16px}');var a="forYou",s=[{text:"For you",imageUrl:t.ForYouPill,value:"forYou"},{text:"Bank",imageUrl:t.BankPill,value:"bank"},{text:"Flights",imageUrl:t.FlightPill,value:"flights"},{text:"Hotels",imageUrl:t.HotelPill,value:"hotels"},{text:"Buses",imageUrl:t.BusPill,value:"buses"},{text:"Trains",imageUrl:t.TrainPill,value:"trains"}];exports.TopOffers=function(t){var _=t.eligibleUserType,p=t.lazyWidget,u=t.widgetData,g=A.useState(a),m=g[0],c=g[1],w=A.useState([]),x=w[0],h=w[1];A.useEffect((function(){var e,i;if(_){var A=null===(e=null==u?void 0:u[m])||void 0===e?void 0:e.items.filter((function(e){return(null==e?void 0:e.userType)===_}));h(A)}else h(null===(i=null==u?void 0:u[m])||void 0===i?void 0:i.items)}),[m]);var f=A.useCallback((function(e){c(e.value)}),[]);return i.jsx(i.Fragment,{children:i.jsxs("div",e.__assign({className:d},{children:[i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.HM3,className:l},{children:(null==u?void 0:u.title)||"Top offers"})),i.jsx(o.PillCarousel,{carouselType:o.CarouselType.PILL_CHIP,carouselData:s.filter((function(e){var i;return(null===(i=null==u?void 0:u[e.value])||void 0===i?void 0:i.items.length)>0})),onItemClick:function(e){return f(e)},styleConfig:{carouselStyleConfig:{paddingLeft:"16px",paddingRight:"16px"}}}),i.jsx("div",e.__assign({style:{width:"100%",marginTop:"8px"}},{children:i.jsx(r.MerchCarousel,{isFreeSwipe:!1,isCentered:!1,isInfinite:!1,isAutoplay:!0,isLoopAdditionalSlides:!0,lazyLoad:!0,lazyWidget:p,showNavigation:!1,showPagination:!1,startingSlide:0,spacingBetween:0,slidesToDisplay:null==u?void 0:u.slidesToDisplay,slides:x},m)}))]}))})};
2
2
  //# sourceMappingURL=ct-platform-top-offers.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ct-platform-top-offers.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../../packages/components/TopOffers/src/TopOffers.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],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","_a","config","_jsx","_Fragment","children","_jsxs","jsxs","__assign","className","styles","Typography","variant","TypographyVariant","HM3","PillCarousel","carouselData","text","imageUrl","ForYouPill","BankPill","FlightPill","HotelPill","BusPill","TrainPill","carouselType","CarouselType","PILL_CHIP","onItemClick","styleConfig","carouselStyleConfig","paddingLeft","paddingRight","width","marginTop","MerchCarousel","slidesToDisplay","slides","itemId","targetUrl","image","url","alt","MerchCarouselPeekingProps"],"mappings":"iZAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,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,0bCF4C,SAACe,GACzC,OADiDA,EAAAC,OAE7CC,EAAAA,IAAAC,EAAAA,SAAA,CAAAC,SACIC,EAAKC,KAAA,MAAAC,EAAAA,SAAA,CAAAC,UAAWC,GAA+B,CAAAL,SAAA,CAC3CF,EAAAA,IAACQ,EAAUA,uBACPC,QAASC,EAAAA,kBAAkBC,IAC3BL,UAAWC,GAA4B,CAAAL,SAAA,gBAI3CF,EAAAA,IAACY,EAAAA,aAAY,CACTC,aAAc,CACV,CACIC,KAAM,UACNC,SAAUC,EAAUA,YAExB,CACIF,KAAM,OACNC,SAAUE,EAAQA,UAEtB,CACIH,KAAM,UACNC,SAAUG,EAAUA,YAExB,CACIJ,KAAM,SACNC,SAAUI,EAASA,WAEvB,CACIL,KAAM,QACNC,SAAUK,EAAOA,SAErB,CACIN,KAAM,SACNC,SAAUM,EAASA,YAG3BC,aAAcC,EAAAA,aAAaC,UAC3BC,YAAa,WAAQ,EACrBC,YAAa,CACTC,oBAAqB,CACjBC,YAAa,OACbC,aAAc,WAI1B7B,wBAAKX,MAAO,CAAEyC,MAAO,OAAQC,UAAW,QAAO,CAAA7B,SAC3CF,MAACgC,EAAAA,cAAa3B,EAAAA,SAAA,CACV4B,gBAAiB,IACjBC,OAAQ,CACJ,CACIC,OAAQ,QACRC,UAAW,oCACXC,MAAO,CACHC,IAAK,2HACLC,IAAK,YAGb,CACIJ,OAAQ,QACRC,UAAW,oCACXC,MAAO,CACHC,IAAK,2HACLC,IAAK,YAGb,CACIJ,OAAQ,QACRC,UAAW,oCACXC,MAAO,CACHC,IAAK,2HACLC,IAAK,YAGb,CACIJ,OAAQ,QACRC,UAAW,oCACXC,MAAO,CACHC,IAAK,2HACLC,IAAK,YAGb,CACIJ,OAAQ,QACRC,UAAW,oCACXC,MAAO,CACHC,IAAK,2HACLC,IAAK,cAIbC,EAAyBA,oCAMrD","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ct-platform-top-offers.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/TopOffers/src/constants.ts","../packages/components/TopOffers/src/TopOffers.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","FILTERS_MAP","PILL_CAROUSEL_CONFIG","text","imageUrl","ForYouPill","value","BankPill","FlightPill","HotelPill","BusPill","TrainPill","_a","eligibleUserType","lazyWidget","widgetData","_b","useState","selectedFilter","setSelectedFilter","_c","filteredSlides","setFilteredSlides","useEffect","slidesByUserType","items","filter","item","userType","handleFilterClick","useCallback","data","_jsx","_Fragment","children","_jsxs","__assign","className","styles","Typography","variant","TypographyVariant","HM3","title","jsx","PillCarousel","carouselType","CarouselType","PILL_CHIP","carouselData","length","onItemClick","styleConfig","carouselStyleConfig","paddingLeft","paddingRight","width","marginTop","MerchCarousel","isFreeSwipe","isCentered","isInfinite","isAutoplay","isLoopAdditionalSlides","lazyLoad","showNavigation","showPagination","startingSlide","spacingBetween","slidesToDisplay","slides"],"mappings":"iXAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,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,GAn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aAAcC,EAAYA,aAACC,UAC3BC,aArBL/C,EAAqBwB,QAAO,SAACK,SAChC,OAAiC,QAA1BnB,EAAAG,aAAU,EAAVA,EAAagB,EAAKzB,cAAQ,IAAAM,OAAA,EAAAA,EAAAa,MAAMyB,QAAS,CACpD,IAoBYC,YAAa,SAACpB,GAAS,OAAAF,EAAkBE,EAAK,EAC9CqB,YAAa,CACTC,oBAAqB,CACjBC,YAAa,OACbC,aAAc,WAK1BvB,EAAKY,IAAA,MAAAR,EAAAA,SAAA,CAAA5C,MAAO,CAAEgE,MAAO,OAAQC,UAAW,kBACpCzB,MAAC0B,EAAAA,eAEGC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,YAAY,EACZC,wBAAwB,EACxBC,UAAU,EACVlD,WAAYA,EACZmD,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAe,EACfC,eAAgB,EAChBC,gBAAiBtD,eAAAA,EAAYsD,gBAC7BC,OAAQjD,GAbHH,WAmB7B","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as e,Fragment as a,jsxs as r}from"react/jsx-runtime";import{Typography as i,TypographyVariant as o}from"@cleartrip/ct-design-typography";import{ForYouPill as l,BankPill as m,FlightPill as p,HotelPill as s,BusPill as f,TrainPill as n}from"@cleartrip/ct-platform-assets";import{MerchCarousel as c}from"@cleartrip/ct-platform-merch-carousel";import{PillCarousel as d,CarouselType as g}from"@cleartrip/ct-platform-pill-carousel";import{MerchCarouselPeekingProps as u}from"@cleartrip/ct-platform-widget-manager";var _="index-module_top-offers__container__Z747x",h="index-module_top-offers__header__hIxia";!function(t,e){void 0===e&&(e={});var a=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===a&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap");.index-module_top-offers__container__Z747x{align-items:flex-start;background:linear-gradient(180deg,#e4edff,#f7faff);display:flex;flex-direction:column;gap:16px;padding:16px 0 24px}.index-module_top-offers__header__hIxia{font-feature-settings:"dlig" on,"clig" off,"liga" off;font-family:Inter;font-style:normal;padding-left:16px}');var x=function(x){return x.config,e(a,{children:r("div",t({className:_},{children:[e(i,t({variant:o.HM3,className:h},{children:"Top Offers"})),e(d,{carouselData:[{text:"For you",imageUrl:l},{text:"Bank",imageUrl:m},{text:"Flights",imageUrl:p},{text:"Hotels",imageUrl:s},{text:"Buses",imageUrl:f},{text:"Trains",imageUrl:n}],carouselType:g.PILL_CHIP,onItemClick:function(){},styleConfig:{carouselStyleConfig:{paddingLeft:"16px",paddingRight:"16px"}}}),e("div",t({style:{width:"100%",marginTop:"8px"}},{children:e(c,t({slidesToDisplay:1.5,slides:[{itemId:"item1",targetUrl:"https://www.cleartrip.com/flights",image:{url:"https://fastui.cltpstatic.com/image/upload/w_224,h_178,dpr_2,f_auto,q_auto/offermgmt/images/banner/top-offers-card-1.png",alt:"Image 1"}},{itemId:"item2",targetUrl:"https://www.cleartrip.com/flights",image:{url:"https://fastui.cltpstatic.com/image/upload/w_224,h_178,dpr_2,f_auto,q_auto/offermgmt/images/banner/top-offers-card-1.png",alt:"Image 2"}},{itemId:"item3",targetUrl:"https://www.cleartrip.com/flights",image:{url:"https://fastui.cltpstatic.com/image/upload/w_224,h_178,dpr_2,f_auto,q_auto/offermgmt/images/banner/top-offers-card-1.png",alt:"Image 3"}},{itemId:"item4",targetUrl:"https://www.cleartrip.com/flights",image:{url:"https://fastui.cltpstatic.com/image/upload/w_224,h_178,dpr_2,f_auto,q_auto/offermgmt/images/banner/top-offers-card-1.png",alt:"Image 4"}},{itemId:"item5",targetUrl:"https://www.cleartrip.com/flights",image:{url:"https://fastui.cltpstatic.com/image/upload/w_224,h_178,dpr_2,f_auto,q_auto/offermgmt/images/banner/top-offers-card-1.png",alt:"Image 5"}}]},u))}))]}))})};export{x as TopOffers};
1
+ import{__assign as e}from"tslib";import{jsx as i,Fragment as A,jsxs as n}from"react/jsx-runtime";import{useState as r,useEffect as o,useCallback as t}from"react";import{Typography as d,TypographyVariant as a}from"@cleartrip/ct-design-typography";import{MerchCarousel as l}from"@cleartrip/ct-platform-merch-carousel";import{PillCarousel as s,CarouselType as _}from"@cleartrip/ct-platform-pill-carousel";import{ForYouPill as p,BankPill as u,FlightPill as m,HotelPill as c,BusPill as w,TrainPill as g}from"@cleartrip/ct-platform-assets";var x="index-module_top-offers__container__Z747x",h="index-module_top-offers__header__hIxia";!function(e,i){void 0===i&&(i={});var A=i.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===A&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('@font-face{font-family:swiper-icons;font-style:normal;font-weight:400;src:url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6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2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff")}:root{--swiper-theme-color:#007aff}.index-module_swiper-container__3KSgl{list-style:none;margin-left:auto;margin-right:auto;overflow:hidden;padding:0;position:relative;z-index:1}.index-module_swiper-container-vertical__-qoi0>.index-module_swiper-wrapper__xTq01{flex-direction:column}.index-module_swiper-wrapper__xTq01{box-sizing:content-box;display:flex;height:100%;position:relative;transition-property:transform;width:100%;z-index:1}.index-module_swiper-container-android__ALUNh .index-module_swiper-slide__Zchn0,.index-module_swiper-wrapper__xTq01{transform:translateZ(0)}.index-module_swiper-container-multirow__XQ6jv>.index-module_swiper-wrapper__xTq01{flex-wrap:wrap}.index-module_swiper-container-multirow-column__pF8z->.index-module_swiper-wrapper__xTq01{flex-direction:column;flex-wrap:wrap}.index-module_swiper-container-free-mode__wWVcG>.index-module_swiper-wrapper__xTq01{margin:0 auto;transition-timing-function:ease-out}.index-module_swiper-container-pointer-events__UnxWm{touch-action:pan-y}.index-module_swiper-container-pointer-events__UnxWm.index-module_swiper-container-vertical__-qoi0{touch-action:pan-x}.index-module_swiper-slide__Zchn0{flex-shrink:0;height:100%;position:relative;transition-property:transform;width:100%}.index-module_swiper-slide-invisible-blank__FdKYe{visibility:hidden}.index-module_swiper-container-autoheight__ag5Qv,.index-module_swiper-container-autoheight__ag5Qv .index-module_swiper-slide__Zchn0{height:auto}.index-module_swiper-container-autoheight__ag5Qv .index-module_swiper-wrapper__xTq01{align-items:flex-start;transition-property:transform,height}.index-module_swiper-container-3d__utVhl{perspective:1200px}.index-module_swiper-container-3d__utVhl .index-module_swiper-cube-shadow__5Bd--,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide__Zchn0,.index-module_swiper-container-3d__utVhl .index-module_swiper-wrapper__xTq01{transform-style:preserve-3d}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3,.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:10}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-left__nE-ea{background-image:linear-gradient(270deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-right__eqgi3{background-image:linear-gradient(90deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-top__8lRuZ{background-image:linear-gradient(0deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-3d__utVhl .index-module_swiper-slide-shadow-bottom__64IwF{background-image:linear-gradient(180deg,rgba(0,0,0,.5),transparent)}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{-ms-overflow-style:none;overflow:auto;scrollbar-width:none}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01::-webkit-scrollbar{display:none}.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01>.index-module_swiper-slide__Zchn0{scroll-snap-align:start start}.index-module_swiper-container-horizontal__yvB5j.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{scroll-snap-type:x mandatory}.index-module_swiper-container-vertical__-qoi0.index-module_swiper-container-css-mode__hCP0y>.index-module_swiper-wrapper__xTq01{scroll-snap-type:y mandatory}.index-module_top-offers__container__Z747x{align-items:flex-start;background:linear-gradient(180deg,#e4edff,#f7faff);display:flex;flex-direction:column;gap:16px;padding:16px 0 24px}.index-module_top-offers__header__hIxia{font-feature-settings:"dlig" on,"clig" off,"liga" off;font-style:normal;padding-left:16px}');var f="forYou",B=[{text:"For you",imageUrl:p,value:"forYou"},{text:"Bank",imageUrl:u,value:"bank"},{text:"Flights",imageUrl:m,value:"flights"},{text:"Hotels",imageUrl:c,value:"hotels"},{text:"Buses",imageUrl:w,value:"buses"},{text:"Trains",imageUrl:g,value:"trains"}],v=function(p){var u=p.eligibleUserType,m=p.lazyWidget,c=p.widgetData,w=r(f),g=w[0],v=w[1],Y=r([]),y=Y[0],G=Y[1];o((function(){var e,i;if(u){var A=null===(e=null==c?void 0:c[g])||void 0===e?void 0:e.items.filter((function(e){return(null==e?void 0:e.userType)===u}));G(A)}else G(null===(i=null==c?void 0:c[g])||void 0===i?void 0:i.items)}),[g]);var E=t((function(e){v(e.value)}),[]);return i(A,{children:n("div",e({className:x},{children:[i(d,e({variant:a.HM3,className:h},{children:(null==c?void 0:c.title)||"Top offers"})),i(s,{carouselType:_.PILL_CHIP,carouselData:B.filter((function(e){var i;return(null===(i=null==c?void 0:c[e.value])||void 0===i?void 0:i.items.length)>0})),onItemClick:function(e){return E(e)},styleConfig:{carouselStyleConfig:{paddingLeft:"16px",paddingRight:"16px"}}}),i("div",e({style:{width:"100%",marginTop:"8px"}},{children:i(l,{isFreeSwipe:!1,isCentered:!1,isInfinite:!1,isAutoplay:!0,isLoopAdditionalSlides:!0,lazyLoad:!0,lazyWidget:m,showNavigation:!1,showPagination:!1,startingSlide:0,spacingBetween:0,slidesToDisplay:null==c?void 0:c.slidesToDisplay,slides:y},g)}))]}))})};export{v as TopOffers};
2
2
  //# sourceMappingURL=ct-platform-top-offers.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ct-platform-top-offers.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../../packages/components/TopOffers/src/TopOffers.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],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","TopOffers","_a","config","_jsx","_Fragment","children","_jsxs","__assign","className","styles","Typography","variant","TypographyVariant","HM3","PillCarousel","carouselData","text","imageUrl","ForYouPill","BankPill","FlightPill","HotelPill","BusPill","TrainPill","carouselType","CarouselType","PILL_CHIP","onItemClick","styleConfig","carouselStyleConfig","paddingLeft","paddingRight","width","marginTop","MerchCarousel","slidesToDisplay","slides","itemId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C,IAAK,YAGb,CACIJ,OAAQ,QACRC,UAAW,oCACXC,MAAO,CACHC,IAAK,2HACLC,IAAK,YAGb,CACIJ,OAAQ,QACRC,UAAW,oCACXC,MAAO,CACHC,IAAK,2HACLC,IAAK,YAGb,CACIJ,OAAQ,QACRC,UAAW,oCACXC,MAAO,CACHC,IAAK,2HACLC,IAAK,cAIbC,YAM5B","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ct-platform-top-offers.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/TopOffers/src/constants.ts","../packages/components/TopOffers/src/TopOffers.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","FILTERS_MAP","PILL_CAROUSEL_CONFIG","text","imageUrl","ForYouPill","value","BankPill","FlightPill","HotelPill","BusPill","TrainPill","TopOffers","_a","eligibleUserType","lazyWidget","widgetData","_b","useState","selectedFilter","setSelectedFilter","_c","filteredSlides","setFilteredSlides","useEffect","slidesByUserType","items","filter","item","userType","handleFilterClick","useCallback","data","_jsx","_Fragment","children","_jsxs","__assign","className","styles","Typography","variant","TypographyVariant","HM3","title","PillCarousel","carouselType","CarouselType","PILL_CHIP","carouselData","length","onItemClick","styleConfig","carouselStyleConfig","paddingLeft","paddingRight","width","marginTop","MerchCarousel","isFreeSwipe","isCentered","isInfinite","isAutoplay","isLoopAdditionalSlides","lazyLoad","showNavigation","showPagination","startingSlide","spacingBetween","slidesToDisplay","slides"],"mappings":"onBAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,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,+hNChBO,IAEMe,EACA,SAQAC,EAAuB,CAChC,CACIC,KAAM,UACNC,SAAUC,EACVC,MAAO,UAEX,CACIH,KAAM,OACNC,SAAUG,EACVD,MAAO,QAEX,CACIH,KAAM,UACNC,SAAUI,EACVF,MAAO,WAEX,CACIH,KAAM,SACNC,SAAUK,EACVH,MAAO,UAEX,CACIH,KAAM,QACNC,SAAUM,EACVJ,MAAO,SAEX,CACIH,KAAM,SACNC,SAAUO,EACVL,MAAO,WClCTM,EAAY,SAA4CC,GAC1D,IAAAC,qBACAC,EAAUF,EAAAE,WACVC,EAAUH,EAAAG,WAEJC,EAAsCC,EAASjB,GAA9CkB,EAAcF,EAAA,GAAEG,OACjBC,EAAsCH,EAAS,IAA9CI,EAAcD,EAAA,GAAEE,EAAiBF,EAAA,GAExCG,GAAU,mBACN,GAAIV,EAAkB,CAClB,IAAMW,EAAiD,QAA9BZ,EAAAG,aAAA,EAAAA,EAAaG,UAAiB,IAAAN,OAAA,EAAAA,EAAAa,MAAMC,QACzD,SAACC,GACG,OAAAA,eAAAA,EAAMC,YAAaf,CAAnB,IAERS,EAAkBE,EACrB,MACGF,EAAgD,QAA9BN,EAAAD,aAAU,EAAVA,EAAaG,UAAiB,IAAAF,OAAA,EAAAA,EAAAS,MAExD,GAAG,CAACP,IAEJ,IAMMW,EAAoBC,GAAY,SAACC,GACnCZ,EAAkBY,EAAK1B,MAC1B,GAAE,IAEH,OACI2B,EAAAC,EAAA,CAAAC,SACIC,EAAK,MAAAC,EAAA,CAAAC,UAAWC,GAA+B,CAAAJ,SAAA,CAC3CF,EAACO,KACGC,QAASC,EAAkBC,IAC3BL,UAAWC,GAA4B,CAAAJ,UAEtCnB,eAAAA,EAAY4B,QD3CJ,gBC8CbX,EAACY,EAAY,CACTC,aAAcC,EAAaC,UAC3BC,aArBL/C,EAAqByB,QAAO,SAACK,SAChC,OAAiC,QAA1BnB,EAAAG,aAAU,EAAVA,EAAagB,EAAK1B,cAAQ,IAAAO,OAAA,EAAAA,EAAAa,MAAMwB,QAAS,CACpD,IAoBYC,YAAa,SAACnB,GAAS,OAAAF,EAAkBE,EAAK,EAC9CoB,YAAa,CACTC,oBAAqB,CACjBC,YAAa,OACbC,aAAc,WAK1BtB,EAAK,MAAAI,EAAA,CAAA7C,MAAO,CAAEgE,MAAO,OAAQC,UAAW,kBACpCxB,EAACyB,GAEGC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,YAAY,EACZC,wBAAwB,EACxBC,UAAU,EACVjD,WAAYA,EACZkD,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAe,EACfC,eAAgB,EAChBC,gBAAiBrD,eAAAA,EAAYqD,gBAC7BC,OAAQhD,GAbHH,WAmB7B","x_google_ignoreList":[0]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/components/TopOffers/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,cAAc,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleartrip/ct-platform-top-offers",
3
- "version": "2.5.0-beta.1",
3
+ "version": "2.5.0-beta.3",
4
4
  "description": "Top Offers Component",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/ct-platform-top-offers.cjs.js",
@@ -12,10 +12,9 @@
12
12
  "dependencies": {
13
13
  "@cleartrip/ct-design-typography": "2.6.0",
14
14
  "swiper": "6.8.4",
15
- "@cleartrip/ct-platform-pill-carousel": "0.1.0-beta.1",
16
- "@cleartrip/ct-platform-merch-carousel": "2.5.0",
17
- "@cleartrip/ct-platform-widget-manager": "2.6.0",
18
- "@cleartrip/ct-platform-assets": "2.5.0-beta.1"
15
+ "@cleartrip/ct-platform-assets": "2.5.0-beta.2",
16
+ "@cleartrip/ct-platform-merch-carousel": "2.5.1-beta.0",
17
+ "@cleartrip/ct-platform-pill-carousel": "0.1.0-beta.3"
19
18
  },
20
19
  "peerDependencies": {
21
20
  "react": ">=16.8.0",
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { TopOffersProps } from './TopOffers.types';
3
- declare const TopOffers: React.FC<TopOffersProps>;
4
- export default TopOffers;
5
- //# sourceMappingURL=TopOffers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TopOffers.d.ts","sourceRoot":"","sources":["../../packages/components/TopOffers/src/TopOffers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAqB1B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAiGvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,4 +0,0 @@
1
- export interface TopOffersProps {
2
- config?: string[];
3
- }
4
- //# sourceMappingURL=TopOffers.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TopOffers.types.d.ts","sourceRoot":"","sources":["../../packages/components/TopOffers/src/TopOffers.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC3B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/TopOffers/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,cAAc,mBAAmB,CAAC"}
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- component: React.FC<import("../src").TopOffersProps>;
5
- };
6
- export default _default;
7
- export declare function Default(args: any): import("react/jsx-runtime").JSX.Element;
8
- export declare namespace Default {
9
- var args: {
10
- config: {
11
- text: string;
12
- imageUrl: any;
13
- }[];
14
- };
15
- }
16
- //# sourceMappingURL=TopOffers.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TopOffers.stories.d.ts","sourceRoot":"","sources":["../../packages/components/TopOffers/stories/TopOffers.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;AAM1B,wBAGE;AAEF,wBAAgB,OAAO,CAAC,IAAI,KAAA,2CAE3B;yBAFe,OAAO"}
@@ -1,5 +0,0 @@
1
- export declare const PillCarouselData: {
2
- text: string;
3
- imageUrl: any;
4
- }[];
5
- //# sourceMappingURL=mockData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../packages/components/TopOffers/stories/mockData.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,gBAAgB;;;GAyB5B,CAAC"}
File without changes