@restaround/react 1.0.11 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/models/product.d.ts +1 -1
- package/dist/styles/ui.css +1 -1
- package/dist/styles/ui.css.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
1
|
+
import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{useRef as a,useEffect as n,memo as i,useCallback as c,useState as o}from"react";import{Row as s,IconLink as l,Tooltip as d,SVGIcon as m,Flex as u,Column as h,Carousel as g,CarouselItem as _,Chip as p,UIElementType as v,Container as f,Card as I}from"@sorocraft/ui";import{Phone as b,Whatsapp as N,Instagram as k,Telegram as y,Tiktok as P,Facebook as w,Wifi as L,MarkerPin as H}from"@sorocraft/ui/icons";import{isEmpty as C,priceFormatter as A,groupBy as B}from"@sorocraft/js-utils";var $="PublicMenu-module_container__QLN6U",z="PublicMenu-module_categories__Iy6NC",W="Header-module_container__tenlF",j="Header-module_cover__BAWZK",x="Header-module_content__Gx4Al",E="Header-module_logo__4MTCm",O="Header-module_info__IchYA",F="Header-module_name__30wyw",M="Header-module_address__WOxXc",R="Header-module_addressText__lUszI",V="Header-module_social__AoP0z",S="Header-module_links__EeQxg",T="Header-module_wifiPassword__VWBTa",D="Header-module_wifiPasswordIcon__Ukn3D";const Y=({branch:t,coverImage:a,logoImage:n,name:i,instagram:c,facebook:o,whatsapp:g,telegram:_,tiktok:p})=>{const{address:v,latitude:f,longitude:I,phone:A,wifiPassword:B}=t||{},$=C(t),z=`https://www.google.com/maps/place/${f},${I}`;return e("div",{className:W,children:[r("img",{src:a,alt:i,className:j}),r("div",{className:x,children:r($?()=>e(h,{fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",children:[r("img",{src:n,alt:i,className:E}),r("div",{className:O,children:r("h1",{className:F,children:i})})]}):()=>e(u,{direction:"row",gap:1,alignItems:"center",children:[r(u.Item,{children:r("img",{src:n,alt:i,className:E})}),r(u.Item,{shrink:!0,children:r("div",{className:O,children:e(h,{gap:.5,children:[r("h1",{className:F,children:i}),r("a",{className:M,href:z,target:"_blank",rel:"noopener noreferrer",children:e(s,{alignItems:"center",gap:.5,children:[r(m,{icon:H,theme:"dark"}),r("span",{className:R,children:v})]})})]})})})]}),{})}),!$&&r("div",{className:V,children:r("div",{className:S,children:e(s,{gap:2,alignItems:"center",children:[e(s,{alignItems:"center",justifyContent:"center",gap:.5,children:[!!A&&r(l,{icon:b,href:`tel:+${A}`,size:"sm",shape:"circle",theme:"light"}),!!g&&r(l,{icon:N,href:`https://wa.me/${g}`,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!c&&r(l,{icon:k,href:c,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!_&&r(l,{icon:y,href:_,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!p&&r(l,{icon:P,href:p,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!o&&r(l,{icon:w,href:o,size:"sm",shape:"circle",theme:"light",target:"_blank"})]}),r(s,{alignItems:"center",children:!!B&&r("div",{className:T,children:r(d,{hint:B,children:r(m,{icon:L,size:"sm",className:D})})})})]})})})]})},U=({categories:e,language:t,selectedCategoryId:i,onSelectCategory:c})=>{const o=a({});return n((()=>{i&&(()=>{var e;const r=null===(e=null==o?void 0:o.current)||void 0===e?void 0:e[i];r&&r.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})})()}),[i]),r("div",{className:z,children:r(g,{gap:1,children:e.map((({id:e,translations:a})=>{const{name:n}=a.find((e=>e.language===t))||{};return r(_,{children:r(p,{onClick:()=>(e=>{e!==i&&c(e)})(e),type:v.BORDERED_PRIMARY,active:e===i,children:r("div",{ref:r=>o.current[e]=r,children:n})})},e)}))})})};var Z={container:"Products-module_container__bF2LF",header:"Products-module_header__0EFvL",products:"Products-module_products__AoDrY",list:"Products-module_list__LH4v5"};var J={container:"ProductsListItem-module_container__i9tFs",data:"ProductsListItem-module_data__Mb3SF",name:"ProductsListItem-module_name__T1gyJ",description:"ProductsListItem-module_description__oL4CH",image:"ProductsListItem-module_image__h6Wbi",flexWide:"ProductsListItem-module_flexWide__Ds6LE",slidein:"ProductsListItem-module_slidein__rEzMI",fadeInOut:"ProductsListItem-module_fadeInOut__i1FNq",heightAnimation:"ProductsListItem-module_heightAnimation__2fk7l",fadein:"ProductsListItem-module_fadein__tPTJ6",floatAnimation:"ProductsListItem-module_floatAnimation__vugAV"};const K="https://images.restaround.co",Q=({product:t,currency:a,language:n})=>{const{translations:i,price:c,image:o}=t||{},{name:l,description:d}=i.find((e=>e.language===n))||{},m=A(c,a||"AZN",n);return r("div",{className:J.container,children:e(s,{justifyContent:"space-between",children:[r("div",{className:J.data,children:e(h,{gap:.5,children:[r("h3",{className:J.name,children:l}),r("div",{className:J.description,children:d}),r("div",{className:J.price,children:m})]})}),o&&r("img",{src:o?o.includes("base64")||o.startsWith("https://")?o:`${K}/${o}`:"",alt:l,className:J.image})]})})},q=i((({products:t,categories:a,currency:i,language:o,productBlocksRef:s,onCategoryInView:l})=>{const d=B(t,"categoryId"),m=c((e=>{let r=null,t=0;e.forEach((e=>{const a=Number(e.target.getAttribute("data-category-id")),n=e.intersectionRatio;n>t&&(t=n,r=a)})),r&&l(r)}),[l]);return n((()=>{const e=new IntersectionObserver(m,{root:null,threshold:[.1,.5,.75]});return Object.values((null==s?void 0:s.current)||{}).forEach((r=>{r&&e.observe(r)})),()=>{e.disconnect()}}),[s,m]),r("div",{className:Z.container,children:r(h,{children:Object.keys(d).map((t=>{const n=a.find((({id:e})=>e===Number(t)))||{},{name:c}=((e,r)=>{var t,a;return(null===(a=null===(t=null==e?void 0:e.translations)||void 0===t?void 0:t.find)||void 0===a?void 0:a.call(t,(e=>e.language===r)))||{}})(n,o);return e("div",{className:Z.products,ref:e=>s.current[n.id]=e,"data-category-id":t,children:[r("h2",{className:Z.category,children:c}),r("div",{className:Z.list,children:r(h,{gap:2,children:d[t].map((e=>r(Q,{product:e,currency:i,language:o},e.id)))})})]},t)}))})})}),((e,r)=>e.products===r.products&&e.categories===r.categories&&e.currency===r.currency&&e.language===r.language));var G="Branches-module_branches__sOuoV",X="Branches-module_list__vYoT2",ee="Branches-module_name__K0Z-4";const re=({branches:e=[],rootPath:t="",onBranchSelect:a})=>{const n=({children:e,id:n})=>a?r("div",{onClick:()=>a(n),children:e}):r("a",{href:`${t}/${n}`,children:e});return r("div",{className:G,children:r(f,{className:X,children:e.map((({id:e,name:t})=>r(n,{id:e,children:r(I,{noBottomMargin:!0,children:r(u,{justifyContent:"center",alignItems:"center",fullHeight:!0,children:r("h2",{className:ee,children:t})})})},e)))})})},te=({data:n})=>{var i;const{name:c,coverImage:s,logoImage:l,branches:d=[],branchId:m,language:u,categories:h,products:g,currency:_,instagram:p,facebook:v,whatsapp:f,telegram:I,tiktok:b,rootPath:N,onBranchSelect:k}=n||{},y=d.length<=1,P=(()=>{var e;return y?(null===(e=null==d?void 0:d[0])||void 0===e?void 0:e.id)?d[0]:{}:d.find((e=>e.id===Number(m)))})(),w=y||!(null==P?void 0:P.name)?c:(null==P?void 0:P.name)||"",[L,H]=o(null===(i=null==h?void 0:h[0])||void 0===i?void 0:i.id),C=a({});return e("div",{className:$,children:[r(Y,{branch:P,name:w,coverImage:s?s.includes("base64")||s.startsWith("https://")?s:`${K}/${s}`:"https://images.restaround.co/restaround-doodle.webp",logoImage:l?l.includes("base64")||l.startsWith("https://")?l:`${K}/${l}`:"https://images.restaround.co/no-photo-128.webp",instagram:p,facebook:v,whatsapp:f,telegram:I,tiktok:b}),y||m?e(t,{children:[r(U,{categories:h,language:u,selectedCategoryId:L,onSelectCategory:e=>{H(e),(e=>{var r;const t=null===(r=null==C?void 0:C.current)||void 0===r?void 0:r[e];t&&t.scrollIntoView({behavior:"smooth",block:"start"})})(e)}}),r(q,{categories:h,products:g,currency:_,language:u,productBlocksRef:C,onCategoryInView:e=>{}})]}):r(re,{branches:d,onBranchSelect:k,rootPath:N})]})};export{te as PublicMenu};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/components/PublicMenu/Header/Header.tsx","../src/components/PublicMenu/Categories.tsx","../src/components/PublicMenu/PublicMenu.constants.ts","../src/components/PublicMenu/ProductsListItem/ProductsListItem.tsx","../src/components/PublicMenu/Products/Products.tsx","../src/utils/category.ts","../src/components/PublicMenu/Branches/Branches.tsx","../src/components/PublicMenu/PublicMenu.tsx"],"sourcesContent":["import { Column, IconLink, Row, SVGIcon } from \"@sorocraft/ui\";\nimport {\n\tMarkerPin,\n\tPhone,\n\tWifi,\n\tInstagram,\n\tWhatsapp,\n\tTiktok,\n\tFacebook,\n\tTelegram,\n} from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Header.module.scss\";\n\nimport * as branchModels from \"src/models/branch\";\nimport * as menuModels from \"src/models/menu\";\n\ninterface Props\n\textends Pick<\n\t\tmenuModels.PublicMenuData,\n\t\t| \"coverImage\"\n\t\t| \"logoImage\"\n\t\t| \"name\"\n\t\t| \"instagram\"\n\t\t| \"facebook\"\n\t\t| \"whatsapp\"\n\t\t| \"telegram\"\n\t\t| \"tiktok\"\n\t> {\n\tbranch?: branchModels.Branch;\n}\n\nconst Header = ({\n\tbranch,\n\tcoverImage,\n\tlogoImage,\n\tname,\n\tinstagram,\n\tfacebook,\n\twhatsapp,\n\ttelegram,\n\ttiktok,\n}: Props) => {\n\tconst { address, latitude, longitude, phone } = branch || {};\n\tconst noBranch = isEmpty(branch);\n\n\tconst googleMapLink = `https://www.google.com/maps/place/${latitude},${longitude}`;\n\n\t// const languageOptions = useMemo(\n\t// \t() =>\n\t// \t\t[\"az\", \"en\"].map((language) => ({\n\t// \t\t\tvalue: language,\n\t// \t\t\tlabel: language,\n\t// \t\t})),\n\t// \t[]\n\t// );\n\n\tconst BranchInfo = () => (\n\t\t<Row gap={1}>\n\t\t\t<img src={logoImage} alt={name} className={styles.logo} />\n\t\t\t<div className={styles.info}>\n\t\t\t\t<h1 className={styles.name}>{name}</h1>\n\n\t\t\t\t<a\n\t\t\t\t\tclassName={styles.address}\n\t\t\t\t\thref={googleMapLink}\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t>\n\t\t\t\t\t<Row alignItems=\"center\" gap={0.5}>\n\t\t\t\t\t\t<SVGIcon icon={MarkerPin} theme=\"dark\" />\n\t\t\t\t\t\t<span>{address}</span>\n\t\t\t\t\t</Row>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</Row>\n\t);\n\n\tconst BusinessInfo = () => (\n\t\t<Column fullWidth fullHeight alignItems=\"center\" justifyContent=\"center\">\n\t\t\t<img src={logoImage} alt={name} className={styles.logo} />\n\t\t\t<div className={styles.info}>\n\t\t\t\t<h1 className={styles.name}>{name}</h1>\n\t\t\t</div>\n\t\t</Column>\n\t);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<img src={coverImage} alt={name} className={styles.cover} />\n\t\t\t<div className={styles.content}>{noBranch ? <BusinessInfo /> : <BranchInfo />}</div>\n\t\t\t{!noBranch && (\n\t\t\t\t<div className={styles.social}>\n\t\t\t\t\t<div className={styles.links}>\n\t\t\t\t\t\t<Row gap={2}>\n\t\t\t\t\t\t\t<Row alignItems=\"center\" justifyContent=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t{phone && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Phone}\n\t\t\t\t\t\t\t\t\t\thref={`tel:+${phone}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{whatsapp && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Whatsapp}\n\t\t\t\t\t\t\t\t\t\thref={`https://wa.me/${whatsapp}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{instagram && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Instagram}\n\t\t\t\t\t\t\t\t\t\thref={instagram}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{telegram && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Telegram}\n\t\t\t\t\t\t\t\t\t\thref={telegram}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{tiktok && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Tiktok}\n\t\t\t\t\t\t\t\t\t\thref={tiktok}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{facebook && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Facebook}\n\t\t\t\t\t\t\t\t\t\thref={facebook}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t<Row>\n\t\t\t\t\t\t\t\t<SVGIcon icon={Wifi} size=\"sm\" />\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default Header;\n","import { Carousel, CarouselItem, Chip, DivElementMap, UIElementType } from \"@sorocraft/ui\";\nimport { useRef } from \"react\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport * as categoryModels from \"src/models/category\";\n\ninterface Props {\n\tcategories: categoryModels.Category[];\n\tlanguage: string;\n\tselectedCategoryId: number;\n\tonSelectCategory: (id: number) => void;\n}\n\nconst Categories = ({ categories, language, selectedCategoryId, onSelectCategory }: Props) => {\n\tconst categoryBlocksRef = useRef<DivElementMap>({});\n\n\tconst scrollToCategoryBlock = (categoryId: number) => {\n\t\tconst categoryBlock = categoryBlocksRef?.current?.[categoryId];\n\t\tif (!categoryBlock) return;\n\n\t\tcategoryBlock.scrollIntoView({ behavior: \"smooth\", inline: \"center\" });\n\t};\n\n\tconst handleSelectCategory = (id: number) => {\n\t\tscrollToCategoryBlock(id);\n\t\tonSelectCategory(id);\n\t};\n\n\treturn (\n\t\t<div className={styles.categories}>\n\t\t\t<Carousel gap={1}>\n\t\t\t\t{categories.map(({ id, translations }) => {\n\t\t\t\t\tconst { name } = translations.find((item) => item.language === language) || {};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<CarouselItem key={id}>\n\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\tonClick={() => handleSelectCategory(id)}\n\t\t\t\t\t\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\t\t\t\t\t\tactive={id === selectedCategoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div ref={(el) => (categoryBlocksRef.current[id] = el)}>{name}</div>\n\t\t\t\t\t\t\t</Chip>\n\t\t\t\t\t\t</CarouselItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Carousel>\n\t\t</div>\n\t);\n};\nexport default Categories;\n","export const DEFAULT_CURRENCY = \"AZN\";\nexport const IMAGE_BASE_URL = \"https://images.restaround.co\";\n","import { Column, Row } from \"@sorocraft/ui\";\nimport { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ProductsListItem.module.scss\";\n\nimport * as productModels from \"src/models/product\";\n\nimport { DEFAULT_CURRENCY } from \"../PublicMenu.constants\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tcurrency: string;\n\tlanguage: string;\n}\n\nconst ProductsListItem = ({ product, currency, language }: Props) => {\n\tconst { translations, price, imageUrl } = product || {};\n\tconst { name, description } = translations.find((item) => item.language === language) || {};\n\tconst formattedPrice = priceFormatter(price, currency || DEFAULT_CURRENCY, language);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<Row justifyContent=\"space-between\">\n\t\t\t\t<div className={styles.data}>\n\t\t\t\t\t<Column gap={0.5}>\n\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t<div className={styles.description}>{description}</div>\n\t\t\t\t\t\t<div className={styles.price}>{formattedPrice}</div>\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t\t{imageUrl && <img src={imageUrl} alt={name} className={styles.image} />}\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\nexport default ProductsListItem;\n","import { RefObject, useEffect, memo, useCallback } from \"react\";\nimport { Column, DivElementMap } from \"@sorocraft/ui\";\nimport { groupBy } from \"@sorocraft/js-utils\";\nimport styles from \"./Products.module.scss\";\nimport * as productModels from \"src/models/product\";\nimport * as categoryModels from \"src/models/category\";\nimport * as categoryUtils from \"src/utils/category\";\nimport ProductsListItem from \"../ProductsListItem\";\n\ninterface Props {\n\tproducts: productModels.Product[];\n\tcategories: categoryModels.Category[];\n\tproductBlocksRef: RefObject<DivElementMap>;\n\tcurrency: string;\n\tlanguage: string;\n\tonCategoryInView: (categoryId: number) => void;\n}\n\nconst Products = memo(\n\t({ products, categories, currency, language, productBlocksRef, onCategoryInView }: Props) => {\n\t\tconst groupedProducts = groupBy(products, \"categoryId\");\n\n\t\tconst handleIntersection = useCallback(\n\t\t\t(entries: IntersectionObserverEntry[]) => {\n\t\t\t\tlet bestMatchCategoryId: number | null = null;\n\t\t\t\tlet maxVisibility = 0;\n\n\t\t\t\tentries.forEach((entry) => {\n\t\t\t\t\tconst categoryId = Number(entry.target.getAttribute(\"data-category-id\"));\n\t\t\t\t\tconst visiblePercentage = entry.intersectionRatio;\n\n\t\t\t\t\t// Track the category block that has the highest visible percentage\n\t\t\t\t\tif (visiblePercentage > maxVisibility) {\n\t\t\t\t\t\tmaxVisibility = visiblePercentage;\n\t\t\t\t\t\tbestMatchCategoryId = categoryId;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Only update if the best matching category is different from the currently selected one\n\t\t\t\tif (bestMatchCategoryId) {\n\t\t\t\t\tonCategoryInView(bestMatchCategoryId);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[onCategoryInView]\n\t\t);\n\n\t\tuseEffect(() => {\n\t\t\tconst observer = new IntersectionObserver(handleIntersection, {\n\t\t\t\troot: null,\n\t\t\t\tthreshold: [0.1, 0.5, 0.75], // Different levels of visibility\n\t\t\t});\n\n\t\t\tObject.values(productBlocksRef?.current || {}).forEach((block) => {\n\t\t\t\tif (block) {\n\t\t\t\t\tobserver.observe(block);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn () => {\n\t\t\t\tobserver.disconnect();\n\t\t\t};\n\t\t}, [productBlocksRef, handleIntersection]);\n\n\t\treturn (\n\t\t\t<div className={styles.container}>\n\t\t\t\t<Column>\n\t\t\t\t\t{Object.keys(groupedProducts).map((categoryId) => {\n\t\t\t\t\t\tconst category = (categories.find(({ id }) => id === Number(categoryId)) ||\n\t\t\t\t\t\t\t{}) as categoryModels.Category;\n\t\t\t\t\t\tconst { name } = categoryUtils.getCategoryTranslation(category, language);\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={styles.products}\n\t\t\t\t\t\t\t\tkey={categoryId}\n\t\t\t\t\t\t\t\tref={(el) => (productBlocksRef!.current![category.id] = el)}\n\t\t\t\t\t\t\t\tdata-category-id={categoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<h2 className={styles.category}>{name}</h2>\n\t\t\t\t\t\t\t\t<div className={styles.list}>\n\t\t\t\t\t\t\t\t\t<Column gap={2}>\n\t\t\t\t\t\t\t\t\t\t{groupedProducts[categoryId].map((product) => (\n\t\t\t\t\t\t\t\t\t\t\t<ProductsListItem\n\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t);\n\t},\n\t(prevProps, nextProps) => {\n\t\treturn (\n\t\t\tprevProps.products === nextProps.products &&\n\t\t\tprevProps.categories === nextProps.categories &&\n\t\t\tprevProps.currency === nextProps.currency &&\n\t\t\tprevProps.language === nextProps.language\n\t\t);\n\t}\n);\n\nexport default Products;\n","import { Category, CategoryTranslation } from \"src/models/category\";\n\nexport const getCategoryTranslation = (\n\tcategory: Category,\n\tlanguage: string\n): CategoryTranslation => {\n\treturn (category?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as CategoryTranslation;\n};\n","import { Card, Container, Flex } from \"@sorocraft/ui\";\n\nimport styles from \"./Branches.module.scss\";\n\nimport * as branchModels from \"src/models/branch\";\n\ninterface Props {\n\tbranches: branchModels.Branch[];\n\trootPath?: string;\n\tonBranchSelect: (branchId: number) => void;\n}\n\nconst Branches = ({ branches = [], rootPath = \"\", onBranchSelect }: Props) => {\n\tconst Parent = ({ children, id }) => {\n\t\tif (onBranchSelect) return <div onClick={() => onBranchSelect(id)}>{children}</div>;\n\n\t\treturn <a href={`${rootPath}/${id}`}>{children}</a>;\n\t};\n\n\treturn (\n\t\t<div className={styles.branches}>\n\t\t\t<Container className={styles.list}>\n\t\t\t\t{branches.map(({ id, name }) => (\n\t\t\t\t\t<Parent key={id} id={id}>\n\t\t\t\t\t\t<Card noBottomMargin>\n\t\t\t\t\t\t\t<Flex justifyContent=\"center\" alignItems=\"center\" fullHeight>\n\t\t\t\t\t\t\t\t<h2 className={styles.name}>{name}</h2>\n\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t</Parent>\n\t\t\t\t))}\n\t\t\t</Container>\n\t\t</div>\n\t);\n};\nexport default Branches;\n","import { DivElementMap } from \"@sorocraft/ui\";\nimport { useRef, useState } from \"react\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport * as menuModels from \"src/models/menu\";\n\nimport Header from \"./Header\";\nimport Categories from \"./Categories\";\nimport Products from \"./Products\";\nimport Branches from \"./Branches\";\n\nimport { IMAGE_BASE_URL } from \"./PublicMenu.constants\";\n\ninterface Props {\n\tdata: menuModels.PublicMenuData;\n}\n\nconst PublicMenu = ({ data }: Props) => {\n\tconst {\n\t\tname,\n\t\tcoverImage,\n\t\tlogoImage,\n\t\tbranches = [],\n\t\tbranchId,\n\t\tlanguage,\n\t\tcategories,\n\t\tproducts,\n\t\tcurrency,\n\t\tinstagram,\n\t\tfacebook,\n\t\twhatsapp,\n\t\ttelegram,\n\t\ttiktok,\n\t\trootPath,\n\t\tonBranchSelect,\n\t} = data || {};\n\n\tconst hasSingleBranch = branches.length <= 1;\n\tconst selectedBranch = branches.find((item) => item.id === Number(branchId));\n\tconst venueName = hasSingleBranch || !selectedBranch?.name ? name : selectedBranch?.name || \"\";\n\n\tconst [selectedCategoryId, setSelectedCategoryId] = useState<number>(categories?.[0]?.id);\n\tconst productBlocksRef = useRef<DivElementMap>({});\n\n\tconst scrollToProductBlock = (categoryId: number) => {\n\t\tconst productBlock = productBlocksRef?.current?.[categoryId];\n\t\tif (!productBlock) return;\n\n\t\tproductBlock.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n\t};\n\n\tconst handleSelectCategory = (categoryId: number) => {\n\t\tsetSelectedCategoryId(categoryId);\n\n\t\tscrollToProductBlock(categoryId);\n\t};\n\n\tconst handleCategoryInView = (categoryId: number) => {\n\t\tif (categoryId !== selectedCategoryId) {\n\t\t\tsetSelectedCategoryId(categoryId);\n\t\t}\n\t};\n\n\tconst getLogoImageSource = () => {\n\t\tif (!logoImage) return \"https://images.restaround.co/no-photo-128.webp\";\n\n\t\tif (logoImage.includes(\"base64\") || logoImage.startsWith(\"https://\")) return logoImage;\n\n\t\treturn `${IMAGE_BASE_URL}/${logoImage}`;\n\t};\n\n\tconst getCoverImageSource = () => {\n\t\tif (!coverImage) return \"https://images.restaround.co/restaround-doodle.webp\";\n\n\t\tif (coverImage.includes(\"base64\") || coverImage.startsWith(\"https://\")) return coverImage;\n\n\t\treturn `${IMAGE_BASE_URL}/${coverImage}`;\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<Header\n\t\t\t\tbranch={selectedBranch}\n\t\t\t\tname={venueName}\n\t\t\t\tcoverImage={getCoverImageSource()}\n\t\t\t\tlogoImage={getLogoImageSource()}\n\t\t\t\tinstagram={instagram}\n\t\t\t\tfacebook={facebook}\n\t\t\t\twhatsapp={whatsapp}\n\t\t\t\ttelegram={telegram}\n\t\t\t\ttiktok={tiktok}\n\t\t\t/>\n\t\t\t{!hasSingleBranch && !branchId ? (\n\t\t\t\t<Branches branches={branches} onBranchSelect={onBranchSelect} rootPath={rootPath} />\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<Categories\n\t\t\t\t\t\tcategories={categories}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tselectedCategoryId={selectedCategoryId}\n\t\t\t\t\t\tonSelectCategory={handleSelectCategory}\n\t\t\t\t\t/>\n\t\t\t\t\t<Products\n\t\t\t\t\t\tcategories={categories}\n\t\t\t\t\t\tproducts={products}\n\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tproductBlocksRef={productBlocksRef}\n\t\t\t\t\t\tonCategoryInView={handleCategoryInView}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default PublicMenu;\n"],"names":["Header","branch","coverImage","logoImage","name","instagram","facebook","whatsapp","telegram","tiktok","address","latitude","longitude","phone","noBranch","isEmpty","googleMapLink","_jsxs","className","styles","children","_jsx","src","alt","Column","fullWidth","fullHeight","alignItems","justifyContent","Row","gap","href","target","rel","SVGIcon","icon","MarkerPin","theme","IconLink","Phone","size","shape","Whatsapp","Instagram","Telegram","Tiktok","Facebook","Wifi","Categories","categories","language","selectedCategoryId","onSelectCategory","categoryBlocksRef","useRef","handleSelectCategory","id","categoryId","categoryBlock","_a","current","scrollIntoView","behavior","inline","scrollToCategoryBlock","Carousel","map","translations","find","item","CarouselItem","Chip","onClick","type","UIElementType","BORDERED_PRIMARY","active","ref","el","IMAGE_BASE_URL","ProductsListItem","product","currency","price","imageUrl","description","formattedPrice","priceFormatter","container","data","image","Products","memo","products","productBlocksRef","onCategoryInView","groupedProducts","groupBy","handleIntersection","useCallback","entries","bestMatchCategoryId","maxVisibility","forEach","entry","Number","getAttribute","visiblePercentage","intersectionRatio","useEffect","observer","IntersectionObserver","root","threshold","Object","values","block","observe","disconnect","keys","category","_b","call","categoryUtils.getCategoryTranslation","list","prevProps","nextProps","Branches","branches","rootPath","onBranchSelect","Parent","Container","Card","noBottomMargin","Flex","PublicMenu","branchId","hasSingleBranch","length","selectedBranch","venueName","setSelectedCategoryId","useState","includes","startsWith","productBlock","scrollToProductBlock"],"mappings":"24BAiCA,MAAMA,EAAS,EACdC,SACAC,aACAC,YACAC,OACAC,YACAC,WACAC,WACAC,WACAC,aAEA,MAAMC,QAAEA,EAAOC,SAAEA,EAAQC,UAAEA,EAASC,MAAEA,GAAUZ,GAAU,GACpDa,EAAWC,EAAQd,GAEnBe,EAAgB,qCAAqCL,KAAYC,IAyCvE,OACCK,EAAA,MAAA,CAAKC,UAAWC,EACfC,SAAA,CAAAC,EAAA,MAAA,CAAKC,IAAKpB,EAAYqB,IAAKnB,EAAMc,UAAWC,IAC5CE,EAAK,MAAA,CAAAH,UAAWC,EAAcC,SAAcC,EAAXP,EAZd,IACpBG,EAACO,EAAM,CAACC,WAAS,EAACC,YAAU,EAACC,WAAW,SAASC,eAAe,SAC/DR,SAAA,CAAAC,EAAA,MAAA,CAAKC,IAAKnB,EAAWoB,IAAKnB,EAAMc,UAAWC,IAC3CE,EAAK,MAAA,CAAAH,UAAWC,WACfE,EAAI,KAAA,CAAAH,UAAWC,EAA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,EAAAF,GAC5CyF,GAELA,EAAarF,eAAe,CAAEC,SAAU,SAAUsD,MAAO,SAAU,EAMnE+B,CAAqB1F,EAAW,IAgD7BpC,EAACsE,EAAQ,CACR1C,WAAYA,EACZ4C,SAAUA,EACVX,SAAUA,EACVhC,SAAUA,EACV4C,iBAAkBA,EAClBC,iBAnDyBtC,IACzBA,IAAeN,GAClB2F,EAAsBrF,EACtB,OAiCCpC,EAAC0G,EAAQ,CAACC,SAAUA,EAAUE,eAAgBA,EAAgBD,SAAUA,MAoBzE"}
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/components/PublicMenu/Header/Header.tsx","../src/components/PublicMenu/Categories.tsx","../src/components/PublicMenu/PublicMenu.constants.ts","../src/components/PublicMenu/ProductsListItem/ProductsListItem.tsx","../src/components/PublicMenu/Products/Products.tsx","../src/utils/category.ts","../src/components/PublicMenu/Branches/Branches.tsx","../src/components/PublicMenu/PublicMenu.tsx"],"sourcesContent":["import { Column, Flex, IconLink, Row, SVGIcon, Tooltip } from \"@sorocraft/ui\";\nimport {\n\tMarkerPin,\n\tPhone,\n\tWifi,\n\tInstagram,\n\tWhatsapp,\n\tTiktok,\n\tFacebook,\n\tTelegram,\n} from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Header.module.scss\";\n\nimport * as branchModels from \"src/models/branch\";\nimport * as menuModels from \"src/models/menu\";\n\ninterface Props\n\textends Pick<\n\t\tmenuModels.PublicMenuData,\n\t\t| \"coverImage\"\n\t\t| \"logoImage\"\n\t\t| \"name\"\n\t\t| \"instagram\"\n\t\t| \"facebook\"\n\t\t| \"whatsapp\"\n\t\t| \"telegram\"\n\t\t| \"tiktok\"\n\t> {\n\tbranch?: branchModels.Branch;\n}\n\nconst Header = ({\n\tbranch,\n\tcoverImage,\n\tlogoImage,\n\tname,\n\tinstagram,\n\tfacebook,\n\twhatsapp,\n\ttelegram,\n\ttiktok,\n}: Props) => {\n\tconst { address, latitude, longitude, phone, wifiPassword } = branch || {};\n\tconst noBranch = isEmpty(branch);\n\n\tconst googleMapLink = `https://www.google.com/maps/place/${latitude},${longitude}`;\n\n\t// const languageOptions = useMemo(\n\t// \t() =>\n\t// \t\t[\"az\", \"en\"].map((language) => ({\n\t// \t\t\tvalue: language,\n\t// \t\t\tlabel: language,\n\t// \t\t})),\n\t// \t[]\n\t// );\n\n\tconst BranchInfo = () => (\n\t\t<Flex direction=\"row\" gap={1} alignItems=\"center\">\n\t\t\t<Flex.Item>\n\t\t\t\t<img src={logoImage} alt={name} className={styles.logo} />\n\t\t\t</Flex.Item>\n\t\t\t<Flex.Item shrink>\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<Column gap={0.5}>\n\t\t\t\t\t\t<h1 className={styles.name}>{name}</h1>\n\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclassName={styles.address}\n\t\t\t\t\t\t\thref={googleMapLink}\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Row alignItems=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t<SVGIcon icon={MarkerPin} theme=\"dark\" />\n\t\t\t\t\t\t\t\t<span className={styles.addressText}>{address}</span>\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t</Flex.Item>\n\t\t</Flex>\n\t);\n\n\tconst BusinessInfo = () => (\n\t\t<Column fullWidth fullHeight alignItems=\"center\" justifyContent=\"center\">\n\t\t\t<img src={logoImage} alt={name} className={styles.logo} />\n\t\t\t<div className={styles.info}>\n\t\t\t\t<h1 className={styles.name}>{name}</h1>\n\t\t\t</div>\n\t\t</Column>\n\t);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<img src={coverImage} alt={name} className={styles.cover} />\n\t\t\t<div className={styles.content}>{noBranch ? <BusinessInfo /> : <BranchInfo />}</div>\n\t\t\t{!noBranch && (\n\t\t\t\t<div className={styles.social}>\n\t\t\t\t\t<div className={styles.links}>\n\t\t\t\t\t\t<Row gap={2} alignItems=\"center\">\n\t\t\t\t\t\t\t<Row alignItems=\"center\" justifyContent=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t{!!phone && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Phone}\n\t\t\t\t\t\t\t\t\t\thref={`tel:+${phone}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!whatsapp && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Whatsapp}\n\t\t\t\t\t\t\t\t\t\thref={`https://wa.me/${whatsapp}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!instagram && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Instagram}\n\t\t\t\t\t\t\t\t\t\thref={instagram}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!telegram && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Telegram}\n\t\t\t\t\t\t\t\t\t\thref={telegram}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!tiktok && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Tiktok}\n\t\t\t\t\t\t\t\t\t\thref={tiktok}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!facebook && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Facebook}\n\t\t\t\t\t\t\t\t\t\thref={facebook}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t<Row alignItems=\"center\">\n\t\t\t\t\t\t\t\t{!!wifiPassword && (\n\t\t\t\t\t\t\t\t\t<div className={styles.wifiPassword}>\n\t\t\t\t\t\t\t\t\t\t<Tooltip hint={wifiPassword}>\n\t\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={Wifi} size=\"sm\" className={styles.wifiPasswordIcon} />\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default Header;\n","import { Carousel, CarouselItem, Chip, DivElementMap, UIElementType } from \"@sorocraft/ui\";\nimport { useEffect, useRef } from \"react\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport * as categoryModels from \"src/models/category\";\n\ninterface Props {\n\tcategories: categoryModels.Category[];\n\tlanguage: string;\n\tselectedCategoryId: number;\n\tonSelectCategory: (id: number) => void;\n}\n\nconst Categories = ({ categories, language, selectedCategoryId, onSelectCategory }: Props) => {\n\tconst categoryBlocksRef = useRef<DivElementMap>({});\n\n\tconst scrollToCategoryBlock = () => {\n\t\tconst categoryBlock = categoryBlocksRef?.current?.[selectedCategoryId];\n\t\tif (!categoryBlock) return;\n\n\t\tcategoryBlock.scrollIntoView({ behavior: \"smooth\", inline: \"center\", block: \"nearest\" });\n\t};\n\n\tconst handleSelectCategory = (id: number) => {\n\t\tif (id === selectedCategoryId) return;\n\n\t\tonSelectCategory(id);\n\t};\n\n\tuseEffect(() => {\n\t\tif (selectedCategoryId) scrollToCategoryBlock();\n\t}, [selectedCategoryId]);\n\n\treturn (\n\t\t<div className={styles.categories}>\n\t\t\t<Carousel gap={1}>\n\t\t\t\t{categories.map(({ id, translations }) => {\n\t\t\t\t\tconst { name } = translations.find((item) => item.language === language) || {};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<CarouselItem key={id}>\n\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\tonClick={() => handleSelectCategory(id)}\n\t\t\t\t\t\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\t\t\t\t\t\tactive={id === selectedCategoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div ref={(el) => (categoryBlocksRef.current[id] = el)}>{name}</div>\n\t\t\t\t\t\t\t</Chip>\n\t\t\t\t\t\t</CarouselItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Carousel>\n\t\t</div>\n\t);\n};\nexport default Categories;\n","export const DEFAULT_CURRENCY = \"AZN\";\nexport const IMAGE_BASE_URL = \"https://images.restaround.co\";\n","import { Column, Row } from \"@sorocraft/ui\";\nimport { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ProductsListItem.module.scss\";\n\nimport * as productModels from \"src/models/product\";\n\nimport { DEFAULT_CURRENCY, IMAGE_BASE_URL } from \"../PublicMenu.constants\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tcurrency: string;\n\tlanguage: string;\n}\n\nconst ProductsListItem = ({ product, currency, language }: Props) => {\n\tconst { translations, price, image } = product || {};\n\tconst { name, description } = translations.find((item) => item.language === language) || {};\n\tconst formattedPrice = priceFormatter(price, currency || DEFAULT_CURRENCY, language);\n\n\tconst getImageSource = () => {\n\t\tif (!image) return \"\";\n\n\t\tif (image.includes(\"base64\") || image.startsWith(\"https://\")) return image;\n\n\t\treturn `${IMAGE_BASE_URL}/${image}`;\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<Row justifyContent=\"space-between\">\n\t\t\t\t<div className={styles.data}>\n\t\t\t\t\t<Column gap={0.5}>\n\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t<div className={styles.description}>{description}</div>\n\t\t\t\t\t\t<div className={styles.price}>{formattedPrice}</div>\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t\t{image && <img src={getImageSource()} alt={name} className={styles.image} />}\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\nexport default ProductsListItem;\n","import { RefObject, useEffect, memo, useCallback } from \"react\";\nimport { Column, DivElementMap } from \"@sorocraft/ui\";\nimport { groupBy } from \"@sorocraft/js-utils\";\nimport styles from \"./Products.module.scss\";\nimport * as productModels from \"src/models/product\";\nimport * as categoryModels from \"src/models/category\";\nimport * as categoryUtils from \"src/utils/category\";\nimport ProductsListItem from \"../ProductsListItem\";\n\ninterface Props {\n\tproducts: productModels.Product[];\n\tcategories: categoryModels.Category[];\n\tproductBlocksRef: RefObject<DivElementMap>;\n\tcurrency: string;\n\tlanguage: string;\n\tonCategoryInView: (categoryId: number) => void;\n}\n\nconst Products = memo(\n\t({ products, categories, currency, language, productBlocksRef, onCategoryInView }: Props) => {\n\t\tconst groupedProducts = groupBy(products, \"categoryId\");\n\n\t\tconst handleIntersection = useCallback(\n\t\t\t(entries: IntersectionObserverEntry[]) => {\n\t\t\t\tlet bestMatchCategoryId: number | null = null;\n\t\t\t\tlet maxVisibility = 0;\n\n\t\t\t\tentries.forEach((entry) => {\n\t\t\t\t\tconst categoryId = Number(entry.target.getAttribute(\"data-category-id\"));\n\t\t\t\t\tconst visiblePercentage = entry.intersectionRatio;\n\n\t\t\t\t\t// Track the category block that has the highest visible percentage\n\t\t\t\t\tif (visiblePercentage > maxVisibility) {\n\t\t\t\t\t\tmaxVisibility = visiblePercentage;\n\t\t\t\t\t\tbestMatchCategoryId = categoryId;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Only update if the best matching category is different from the currently selected one\n\t\t\t\tif (bestMatchCategoryId) {\n\t\t\t\t\tonCategoryInView(bestMatchCategoryId);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[onCategoryInView]\n\t\t);\n\n\t\tuseEffect(() => {\n\t\t\tconst observer = new IntersectionObserver(handleIntersection, {\n\t\t\t\troot: null,\n\t\t\t\tthreshold: [0.1, 0.5, 0.75], // Different levels of visibility\n\t\t\t});\n\n\t\t\tObject.values(productBlocksRef?.current || {}).forEach((block) => {\n\t\t\t\tif (block) {\n\t\t\t\t\tobserver.observe(block);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn () => {\n\t\t\t\tobserver.disconnect();\n\t\t\t};\n\t\t}, [productBlocksRef, handleIntersection]);\n\n\t\treturn (\n\t\t\t<div className={styles.container}>\n\t\t\t\t<Column>\n\t\t\t\t\t{Object.keys(groupedProducts).map((categoryId) => {\n\t\t\t\t\t\tconst category = (categories.find(({ id }) => id === Number(categoryId)) ||\n\t\t\t\t\t\t\t{}) as categoryModels.Category;\n\t\t\t\t\t\tconst { name } = categoryUtils.getCategoryTranslation(category, language);\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={styles.products}\n\t\t\t\t\t\t\t\tkey={categoryId}\n\t\t\t\t\t\t\t\tref={(el) => (productBlocksRef!.current![category.id] = el)}\n\t\t\t\t\t\t\t\tdata-category-id={categoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<h2 className={styles.category}>{name}</h2>\n\t\t\t\t\t\t\t\t<div className={styles.list}>\n\t\t\t\t\t\t\t\t\t<Column gap={2}>\n\t\t\t\t\t\t\t\t\t\t{groupedProducts[categoryId].map((product) => (\n\t\t\t\t\t\t\t\t\t\t\t<ProductsListItem\n\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t);\n\t},\n\t(prevProps, nextProps) => {\n\t\treturn (\n\t\t\tprevProps.products === nextProps.products &&\n\t\t\tprevProps.categories === nextProps.categories &&\n\t\t\tprevProps.currency === nextProps.currency &&\n\t\t\tprevProps.language === nextProps.language\n\t\t);\n\t}\n);\n\nexport default Products;\n","import { Category, CategoryTranslation } from \"src/models/category\";\n\nexport const getCategoryTranslation = (\n\tcategory: Category,\n\tlanguage: string\n): CategoryTranslation => {\n\treturn (category?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as CategoryTranslation;\n};\n","import { Card, Container, Flex } from \"@sorocraft/ui\";\n\nimport styles from \"./Branches.module.scss\";\n\nimport * as branchModels from \"src/models/branch\";\n\ninterface Props {\n\tbranches: branchModels.Branch[];\n\trootPath?: string;\n\tonBranchSelect: (branchId: number) => void;\n}\n\nconst Branches = ({ branches = [], rootPath = \"\", onBranchSelect }: Props) => {\n\tconst Parent = ({ children, id }) => {\n\t\tif (onBranchSelect) return <div onClick={() => onBranchSelect(id)}>{children}</div>;\n\n\t\treturn <a href={`${rootPath}/${id}`}>{children}</a>;\n\t};\n\n\treturn (\n\t\t<div className={styles.branches}>\n\t\t\t<Container className={styles.list}>\n\t\t\t\t{branches.map(({ id, name }) => (\n\t\t\t\t\t<Parent key={id} id={id}>\n\t\t\t\t\t\t<Card noBottomMargin>\n\t\t\t\t\t\t\t<Flex justifyContent=\"center\" alignItems=\"center\" fullHeight>\n\t\t\t\t\t\t\t\t<h2 className={styles.name}>{name}</h2>\n\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t</Parent>\n\t\t\t\t))}\n\t\t\t</Container>\n\t\t</div>\n\t);\n};\nexport default Branches;\n","import { DivElementMap } from \"@sorocraft/ui\";\nimport { useRef, useState } from \"react\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport * as menuModels from \"src/models/menu\";\nimport * as branchModels from \"src/models/branch\";\n\nimport Header from \"./Header\";\nimport Categories from \"./Categories\";\nimport Products from \"./Products\";\nimport Branches from \"./Branches\";\n\nimport { IMAGE_BASE_URL } from \"./PublicMenu.constants\";\n\ninterface Props {\n\tdata: menuModels.PublicMenuData;\n}\n\nconst PublicMenu = ({ data }: Props) => {\n\tconst {\n\t\tname,\n\t\tcoverImage,\n\t\tlogoImage,\n\t\tbranches = [],\n\t\tbranchId,\n\t\tlanguage,\n\t\tcategories,\n\t\tproducts,\n\t\tcurrency,\n\t\tinstagram,\n\t\tfacebook,\n\t\twhatsapp,\n\t\ttelegram,\n\t\ttiktok,\n\t\trootPath,\n\t\tonBranchSelect,\n\t} = data || {};\n\n\tconst hasSingleBranch = branches.length <= 1;\n\n\tconst getSelectedBranch = () => {\n\t\tif (hasSingleBranch) {\n\t\t\tif (branches?.[0]?.id) return branches[0];\n\n\t\t\treturn {} as branchModels.Branch;\n\t\t}\n\n\t\treturn branches.find((item) => item.id === Number(branchId));\n\t};\n\n\tconst selectedBranch = getSelectedBranch();\n\tconst venueName = hasSingleBranch || !selectedBranch?.name ? name : selectedBranch?.name || \"\";\n\n\tconst [selectedCategoryId, setSelectedCategoryId] = useState<number>(categories?.[0]?.id);\n\tconst productBlocksRef = useRef<DivElementMap>({});\n\n\tconst scrollToProductBlock = (categoryId: number) => {\n\t\tconst productBlock = productBlocksRef?.current?.[categoryId];\n\t\tif (!productBlock) return;\n\n\t\tproductBlock.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n\t};\n\n\tconst handleSelectCategory = (categoryId: number) => {\n\t\tsetSelectedCategoryId(categoryId);\n\n\t\tscrollToProductBlock(categoryId);\n\t};\n\n\tconst handleCategoryInView = (categoryId: number) => {\n\t\treturn;\n\t\tif (categoryId !== selectedCategoryId) {\n\t\t\tsetSelectedCategoryId(categoryId);\n\t\t}\n\t};\n\n\tconst getLogoImageSource = () => {\n\t\tif (!logoImage) return \"https://images.restaround.co/no-photo-128.webp\";\n\n\t\tif (logoImage.includes(\"base64\") || logoImage.startsWith(\"https://\")) return logoImage;\n\n\t\treturn `${IMAGE_BASE_URL}/${logoImage}`;\n\t};\n\n\tconst getCoverImageSource = () => {\n\t\tif (!coverImage) return \"https://images.restaround.co/restaround-doodle.webp\";\n\n\t\tif (coverImage.includes(\"base64\") || coverImage.startsWith(\"https://\")) return coverImage;\n\n\t\treturn `${IMAGE_BASE_URL}/${coverImage}`;\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<Header\n\t\t\t\tbranch={selectedBranch}\n\t\t\t\tname={venueName}\n\t\t\t\tcoverImage={getCoverImageSource()}\n\t\t\t\tlogoImage={getLogoImageSource()}\n\t\t\t\tinstagram={instagram}\n\t\t\t\tfacebook={facebook}\n\t\t\t\twhatsapp={whatsapp}\n\t\t\t\ttelegram={telegram}\n\t\t\t\ttiktok={tiktok}\n\t\t\t/>\n\t\t\t{!hasSingleBranch && !branchId ? (\n\t\t\t\t<Branches branches={branches} onBranchSelect={onBranchSelect} rootPath={rootPath} />\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<Categories\n\t\t\t\t\t\tcategories={categories}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tselectedCategoryId={selectedCategoryId}\n\t\t\t\t\t\tonSelectCategory={handleSelectCategory}\n\t\t\t\t\t/>\n\t\t\t\t\t<Products\n\t\t\t\t\t\tcategories={categories}\n\t\t\t\t\t\tproducts={products}\n\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tproductBlocksRef={productBlocksRef}\n\t\t\t\t\t\tonCategoryInView={handleCategoryInView}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default PublicMenu;\n"],"names":["Header","branch","coverImage","logoImage","name","instagram","facebook","whatsapp","telegram","tiktok","address","latitude","longitude","phone","wifiPassword","noBranch","isEmpty","googleMapLink","_jsxs","className","styles","children","_jsx","src","alt","Column","fullWidth","fullHeight","alignItems","justifyContent","Flex","direction","gap","Item","shrink","href","target","rel","Row","SVGIcon","icon","MarkerPin","theme","IconLink","Phone","size","shape","Whatsapp","Instagram","Telegram","Tiktok","Facebook","Tooltip","hint","Wifi","Categories","categories","language","selectedCategoryId","onSelectCategory","categoryBlocksRef","useRef","useEffect","categoryBlock","_a","current","scrollIntoView","behavior","inline","block","scrollToCategoryBlock","Carousel","map","id","translations","find","item","CarouselItem","Chip","onClick","handleSelectCategory","type","UIElementType","BORDERED_PRIMARY","active","ref","el","IMAGE_BASE_URL","ProductsListItem","product","currency","price","image","description","formattedPrice","priceFormatter","container","data","includes","startsWith","Products","memo","products","productBlocksRef","onCategoryInView","groupedProducts","groupBy","handleIntersection","useCallback","entries","bestMatchCategoryId","maxVisibility","forEach","entry","categoryId","Number","getAttribute","visiblePercentage","intersectionRatio","observer","IntersectionObserver","root","threshold","Object","values","observe","disconnect","keys","category","_b","call","categoryUtils.getCategoryTranslation","list","prevProps","nextProps","Branches","branches","rootPath","onBranchSelect","Parent","Container","Card","noBottomMargin","PublicMenu","branchId","hasSingleBranch","length","selectedBranch","getSelectedBranch","venueName","setSelectedCategoryId","useState","productBlock","scrollToProductBlock"],"mappings":"6gCAiCA,MAAMA,EAAS,EACdC,SACAC,aACAC,YACAC,OACAC,YACAC,WACAC,WACAC,WACAC,aAEA,MAAMC,QAAEA,EAAOC,SAAEA,EAAQC,UAAEA,EAASC,MAAEA,EAAKC,aAAEA,GAAiBb,GAAU,GAClEc,EAAWC,EAAQf,GAEnBgB,EAAgB,qCAAqCN,KAAYC,IA+CvE,OACCM,EAAK,MAAA,CAAAC,UAAWC,EACfC,SAAA,CAAAC,EAAA,MAAA,CAAKC,IAAKrB,EAAYsB,IAAKpB,EAAMe,UAAWC,IAC5CE,EAAA,MAAA,CAAKH,UAAWC,EAAcC,SAAcC,EAAXP,EAZd,IACpBG,EAACO,EAAM,CAACC,WAAS,EAACC,YAAU,EAACC,WAAW,SAASC,eAAe,SAC/DR,SAAA,CAAAC,EAAA,MAAA,CAAKC,IAAKpB,EAAWqB,IAAKpB,EAAMe,UAAWC,IAC3CE,EAAK,MAAA,CAAAH,UAAWC,WACfE,EAAI,KAAA,CAAAH,UAAWC,EAAcC,SAAAjB,SA/Bb,IAClBc,EAACY,EAAK,CAAAC,UAAU,MAAMC,IAAK,EAAGJ,WAAW,SAAQP,SAAA,CAChDC,EAACQ,EAAKG,KACL,CAAAZ,SAAAC,EAAA,MAAA,CA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AWgG,SAAS,WAAahG,EAAWiG,WAAW,YAAoBjG,EAExE,GAAGqF,KAAkBrF,IAJJ,sDAatBC,UArBGA,EAEDA,EAAU+F,SAAS,WAAa/F,EAAUgG,WAAW,YAAoBhG,EAEtE,GAAGoF,KAAkBpF,IAJL,iDAsBrBE,UAAWA,EACXC,SAAUA,EACVC,SAAUA,EACVC,SAAUA,EACVC,OAAQA,IAEPwI,GAAoBD,EAGrB9H,eACCI,EAACiC,EACA,CAAAC,WAAYA,EACZC,SAAUA,EACVC,mBAAoBA,EACpBC,iBAlDyBuD,IAC7BoC,EAAsBpC,GARM,CAACA,UAC7B,MAAMsC,EAA2C,QAA5BxF,EAAAuC,aAAA,EAAAA,EAAkBtC,eAAU,IAAAD,OAAA,EAAAA,EAAAkD,GAC5CsC,GAELA,EAAatF,eAAe,CAAEC,SAAU,SAAUE,MAAO,SAAU,EAMnEoF,CAAqBvC,EAAW,IAiD7B5F,EAAC8E,EAAQ,CACR5C,WAAYA,EACZ8C,SAAUA,EACVZ,SAAUA,EACVjC,SAAUA,EACV8C,iBAAkBA,EAClBC,iBApDyBU,IACtB,OAoCL5F,EAACiH,GAAQ,CAACC,SAAUA,EAAUE,eAAgBA,EAAgBD,SAAUA,MAoBzE"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),s=require("react"),r=require("@sorocraft/ui"),t=require("@sorocraft/ui/icons"),a=require("@sorocraft/js-utils"),n="PublicMenu-module_container__QLN6U",i="PublicMenu-module_categories__Iy6NC",c="Header-module_container__tenlF",o="Header-module_cover__BAWZK",l="Header-module_content__Gx4Al",d="Header-module_logo__4MTCm",
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),s=require("react"),r=require("@sorocraft/ui"),t=require("@sorocraft/ui/icons"),a=require("@sorocraft/js-utils"),n="PublicMenu-module_container__QLN6U",i="PublicMenu-module_categories__Iy6NC",c="Header-module_container__tenlF",o="Header-module_cover__BAWZK",l="Header-module_content__Gx4Al",d="Header-module_logo__4MTCm",m="Header-module_info__IchYA",u="Header-module_name__30wyw",h="Header-module_address__WOxXc",g="Header-module_addressText__lUszI",_="Header-module_social__AoP0z",x="Header-module_links__EeQxg",j="Header-module_wifiPassword__VWBTa",p="Header-module_wifiPasswordIcon__Ukn3D";const v=({branch:s,coverImage:n,logoImage:i,name:v,instagram:I,facebook:f,whatsapp:b,telegram:k,tiktok:N})=>{const{address:w,latitude:y,longitude:P,phone:C,wifiPassword:L}=s||{},H=a.isEmpty(s),F=`https://www.google.com/maps/place/${y},${P}`;return e.jsxs("div",{className:c,children:[e.jsx("img",{src:n,alt:v,className:o}),e.jsx("div",{className:l,children:H?e.jsx((()=>e.jsxs(r.Column,{fullWidth:!0,fullHeight:!0,alignItems:"center",justifyContent:"center",children:[e.jsx("img",{src:i,alt:v,className:d}),e.jsx("div",{className:m,children:e.jsx("h1",{className:u,children:v})})]})),{}):e.jsx((()=>e.jsxs(r.Flex,{direction:"row",gap:1,alignItems:"center",children:[e.jsx(r.Flex.Item,{children:e.jsx("img",{src:i,alt:v,className:d})}),e.jsx(r.Flex.Item,{shrink:!0,children:e.jsx("div",{className:m,children:e.jsxs(r.Column,{gap:.5,children:[e.jsx("h1",{className:u,children:v}),e.jsx("a",{className:h,href:F,target:"_blank",rel:"noopener noreferrer",children:e.jsxs(r.Row,{alignItems:"center",gap:.5,children:[e.jsx(r.SVGIcon,{icon:t.MarkerPin,theme:"dark"}),e.jsx("span",{className:g,children:w})]})})]})})})]})),{})}),!H&&e.jsx("div",{className:_,children:e.jsx("div",{className:x,children:e.jsxs(r.Row,{gap:2,alignItems:"center",children:[e.jsxs(r.Row,{alignItems:"center",justifyContent:"center",gap:.5,children:[!!C&&e.jsx(r.IconLink,{icon:t.Phone,href:`tel:+${C}`,size:"sm",shape:"circle",theme:"light"}),!!b&&e.jsx(r.IconLink,{icon:t.Whatsapp,href:`https://wa.me/${b}`,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!I&&e.jsx(r.IconLink,{icon:t.Instagram,href:I,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!k&&e.jsx(r.IconLink,{icon:t.Telegram,href:k,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!N&&e.jsx(r.IconLink,{icon:t.Tiktok,href:N,size:"sm",shape:"circle",theme:"light",target:"_blank"}),!!f&&e.jsx(r.IconLink,{icon:t.Facebook,href:f,size:"sm",shape:"circle",theme:"light",target:"_blank"})]}),e.jsx(r.Row,{alignItems:"center",children:!!L&&e.jsx("div",{className:j,children:e.jsx(r.Tooltip,{hint:L,children:e.jsx(r.SVGIcon,{icon:t.Wifi,size:"sm",className:p})})})})]})})})]})},I=({categories:t,language:a,selectedCategoryId:n,onSelectCategory:c})=>{const o=s.useRef({});return s.useEffect((()=>{n&&(()=>{var e;const s=null===(e=null==o?void 0:o.current)||void 0===e?void 0:e[n];s&&s.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})})()}),[n]),e.jsx("div",{className:i,children:e.jsx(r.Carousel,{gap:1,children:t.map((({id:s,translations:t})=>{const{name:i}=t.find((e=>e.language===a))||{};return e.jsx(r.CarouselItem,{children:e.jsx(r.Chip,{onClick:()=>(e=>{e!==n&&c(e)})(s),type:r.UIElementType.BORDERED_PRIMARY,active:s===n,children:e.jsx("div",{ref:e=>o.current[s]=e,children:i})})},s)}))})})};var f={container:"Products-module_container__bF2LF",header:"Products-module_header__0EFvL",products:"Products-module_products__AoDrY",list:"Products-module_list__LH4v5"};var b={container:"ProductsListItem-module_container__i9tFs",data:"ProductsListItem-module_data__Mb3SF",name:"ProductsListItem-module_name__T1gyJ",description:"ProductsListItem-module_description__oL4CH",image:"ProductsListItem-module_image__h6Wbi",flexWide:"ProductsListItem-module_flexWide__Ds6LE",slidein:"ProductsListItem-module_slidein__rEzMI",fadeInOut:"ProductsListItem-module_fadeInOut__i1FNq",heightAnimation:"ProductsListItem-module_heightAnimation__2fk7l",fadein:"ProductsListItem-module_fadein__tPTJ6",floatAnimation:"ProductsListItem-module_floatAnimation__vugAV"};const k="https://images.restaround.co",N=({product:s,currency:t,language:n})=>{const{translations:i,price:c,image:o}=s||{},{name:l,description:d}=i.find((e=>e.language===n))||{},m=a.priceFormatter(c,t||"AZN",n);return e.jsx("div",{className:b.container,children:e.jsxs(r.Row,{justifyContent:"space-between",children:[e.jsx("div",{className:b.data,children:e.jsxs(r.Column,{gap:.5,children:[e.jsx("h3",{className:b.name,children:l}),e.jsx("div",{className:b.description,children:d}),e.jsx("div",{className:b.price,children:m})]})}),o&&e.jsx("img",{src:o?o.includes("base64")||o.startsWith("https://")?o:`${k}/${o}`:"",alt:l,className:b.image})]})})},w=s.memo((({products:t,categories:n,currency:i,language:c,productBlocksRef:o,onCategoryInView:l})=>{const d=a.groupBy(t,"categoryId"),m=s.useCallback((e=>{let s=null,r=0;e.forEach((e=>{const t=Number(e.target.getAttribute("data-category-id")),a=e.intersectionRatio;a>r&&(r=a,s=t)})),s&&l(s)}),[l]);return s.useEffect((()=>{const e=new IntersectionObserver(m,{root:null,threshold:[.1,.5,.75]});return Object.values((null==o?void 0:o.current)||{}).forEach((s=>{s&&e.observe(s)})),()=>{e.disconnect()}}),[o,m]),e.jsx("div",{className:f.container,children:e.jsx(r.Column,{children:Object.keys(d).map((s=>{const t=n.find((({id:e})=>e===Number(s)))||{},{name:a}=((e,s)=>{var r,t;return(null===(t=null===(r=null==e?void 0:e.translations)||void 0===r?void 0:r.find)||void 0===t?void 0:t.call(r,(e=>e.language===s)))||{}})(t,c);return e.jsxs("div",{className:f.products,ref:e=>o.current[t.id]=e,"data-category-id":s,children:[e.jsx("h2",{className:f.category,children:a}),e.jsx("div",{className:f.list,children:e.jsx(r.Column,{gap:2,children:d[s].map((s=>e.jsx(N,{product:s,currency:i,language:c},s.id)))})})]},s)}))})})}),((e,s)=>e.products===s.products&&e.categories===s.categories&&e.currency===s.currency&&e.language===s.language));var y="Branches-module_branches__sOuoV",P="Branches-module_list__vYoT2",C="Branches-module_name__K0Z-4";const L=({branches:s=[],rootPath:t="",onBranchSelect:a})=>{const n=({children:s,id:r})=>a?e.jsx("div",{onClick:()=>a(r),children:s}):e.jsx("a",{href:`${t}/${r}`,children:s});return e.jsx("div",{className:y,children:e.jsx(r.Container,{className:P,children:s.map((({id:s,name:t})=>e.jsx(n,{id:s,children:e.jsx(r.Card,{noBottomMargin:!0,children:e.jsx(r.Flex,{justifyContent:"center",alignItems:"center",fullHeight:!0,children:e.jsx("h2",{className:C,children:t})})})},s)))})})};exports.PublicMenu=({data:r})=>{var t;const{name:a,coverImage:i,logoImage:c,branches:o=[],branchId:l,language:d,categories:m,products:u,currency:h,instagram:g,facebook:_,whatsapp:x,telegram:j,tiktok:p,rootPath:f,onBranchSelect:b}=r||{},N=o.length<=1,y=(()=>{var e;return N?(null===(e=null==o?void 0:o[0])||void 0===e?void 0:e.id)?o[0]:{}:o.find((e=>e.id===Number(l)))})(),P=N||!(null==y?void 0:y.name)?a:(null==y?void 0:y.name)||"",[C,H]=s.useState(null===(t=null==m?void 0:m[0])||void 0===t?void 0:t.id),F=s.useRef({});return e.jsxs("div",{className:n,children:[e.jsx(v,{branch:y,name:P,coverImage:i?i.includes("base64")||i.startsWith("https://")?i:`${k}/${i}`:"https://images.restaround.co/restaround-doodle.webp",logoImage:c?c.includes("base64")||c.startsWith("https://")?c:`${k}/${c}`:"https://images.restaround.co/no-photo-128.webp",instagram:g,facebook:_,whatsapp:x,telegram:j,tiktok:p}),N||l?e.jsxs(e.Fragment,{children:[e.jsx(I,{categories:m,language:d,selectedCategoryId:C,onSelectCategory:e=>{H(e),(e=>{var s;const r=null===(s=null==F?void 0:F.current)||void 0===s?void 0:s[e];r&&r.scrollIntoView({behavior:"smooth",block:"start"})})(e)}}),e.jsx(w,{categories:m,products:u,currency:h,language:d,productBlocksRef:F,onCategoryInView:e=>{}})]}):e.jsx(L,{branches:o,onBranchSelect:b,rootPath:f})]})};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/components/PublicMenu/Header/Header.tsx","../src/components/PublicMenu/Categories.tsx","../src/components/PublicMenu/PublicMenu.constants.ts","../src/components/PublicMenu/ProductsListItem/ProductsListItem.tsx","../src/components/PublicMenu/Products/Products.tsx","../src/utils/category.ts","../src/components/PublicMenu/Branches/Branches.tsx","../src/components/PublicMenu/PublicMenu.tsx"],"sourcesContent":["import { Column, IconLink, Row, SVGIcon } from \"@sorocraft/ui\";\nimport {\n\tMarkerPin,\n\tPhone,\n\tWifi,\n\tInstagram,\n\tWhatsapp,\n\tTiktok,\n\tFacebook,\n\tTelegram,\n} from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Header.module.scss\";\n\nimport * as branchModels from \"src/models/branch\";\nimport * as menuModels from \"src/models/menu\";\n\ninterface Props\n\textends Pick<\n\t\tmenuModels.PublicMenuData,\n\t\t| \"coverImage\"\n\t\t| \"logoImage\"\n\t\t| \"name\"\n\t\t| \"instagram\"\n\t\t| \"facebook\"\n\t\t| \"whatsapp\"\n\t\t| \"telegram\"\n\t\t| \"tiktok\"\n\t> {\n\tbranch?: branchModels.Branch;\n}\n\nconst Header = ({\n\tbranch,\n\tcoverImage,\n\tlogoImage,\n\tname,\n\tinstagram,\n\tfacebook,\n\twhatsapp,\n\ttelegram,\n\ttiktok,\n}: Props) => {\n\tconst { address, latitude, longitude, phone } = branch || {};\n\tconst noBranch = isEmpty(branch);\n\n\tconst googleMapLink = `https://www.google.com/maps/place/${latitude},${longitude}`;\n\n\t// const languageOptions = useMemo(\n\t// \t() =>\n\t// \t\t[\"az\", \"en\"].map((language) => ({\n\t// \t\t\tvalue: language,\n\t// \t\t\tlabel: language,\n\t// \t\t})),\n\t// \t[]\n\t// );\n\n\tconst BranchInfo = () => (\n\t\t<Row gap={1}>\n\t\t\t<img src={logoImage} alt={name} className={styles.logo} />\n\t\t\t<div className={styles.info}>\n\t\t\t\t<h1 className={styles.name}>{name}</h1>\n\n\t\t\t\t<a\n\t\t\t\t\tclassName={styles.address}\n\t\t\t\t\thref={googleMapLink}\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t>\n\t\t\t\t\t<Row alignItems=\"center\" gap={0.5}>\n\t\t\t\t\t\t<SVGIcon icon={MarkerPin} theme=\"dark\" />\n\t\t\t\t\t\t<span>{address}</span>\n\t\t\t\t\t</Row>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</Row>\n\t);\n\n\tconst BusinessInfo = () => (\n\t\t<Column fullWidth fullHeight alignItems=\"center\" justifyContent=\"center\">\n\t\t\t<img src={logoImage} alt={name} className={styles.logo} />\n\t\t\t<div className={styles.info}>\n\t\t\t\t<h1 className={styles.name}>{name}</h1>\n\t\t\t</div>\n\t\t</Column>\n\t);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<img src={coverImage} alt={name} className={styles.cover} />\n\t\t\t<div className={styles.content}>{noBranch ? <BusinessInfo /> : <BranchInfo />}</div>\n\t\t\t{!noBranch && (\n\t\t\t\t<div className={styles.social}>\n\t\t\t\t\t<div className={styles.links}>\n\t\t\t\t\t\t<Row gap={2}>\n\t\t\t\t\t\t\t<Row alignItems=\"center\" justifyContent=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t{phone && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Phone}\n\t\t\t\t\t\t\t\t\t\thref={`tel:+${phone}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{whatsapp && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Whatsapp}\n\t\t\t\t\t\t\t\t\t\thref={`https://wa.me/${whatsapp}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{instagram && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Instagram}\n\t\t\t\t\t\t\t\t\t\thref={instagram}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{telegram && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Telegram}\n\t\t\t\t\t\t\t\t\t\thref={telegram}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{tiktok && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Tiktok}\n\t\t\t\t\t\t\t\t\t\thref={tiktok}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{facebook && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Facebook}\n\t\t\t\t\t\t\t\t\t\thref={facebook}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t<Row>\n\t\t\t\t\t\t\t\t<SVGIcon icon={Wifi} size=\"sm\" />\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default Header;\n","import { Carousel, CarouselItem, Chip, DivElementMap, UIElementType } from \"@sorocraft/ui\";\nimport { useRef } from \"react\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport * as categoryModels from \"src/models/category\";\n\ninterface Props {\n\tcategories: categoryModels.Category[];\n\tlanguage: string;\n\tselectedCategoryId: number;\n\tonSelectCategory: (id: number) => void;\n}\n\nconst Categories = ({ categories, language, selectedCategoryId, onSelectCategory }: Props) => {\n\tconst categoryBlocksRef = useRef<DivElementMap>({});\n\n\tconst scrollToCategoryBlock = (categoryId: number) => {\n\t\tconst categoryBlock = categoryBlocksRef?.current?.[categoryId];\n\t\tif (!categoryBlock) return;\n\n\t\tcategoryBlock.scrollIntoView({ behavior: \"smooth\", inline: \"center\" });\n\t};\n\n\tconst handleSelectCategory = (id: number) => {\n\t\tscrollToCategoryBlock(id);\n\t\tonSelectCategory(id);\n\t};\n\n\treturn (\n\t\t<div className={styles.categories}>\n\t\t\t<Carousel gap={1}>\n\t\t\t\t{categories.map(({ id, translations }) => {\n\t\t\t\t\tconst { name } = translations.find((item) => item.language === language) || {};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<CarouselItem key={id}>\n\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\tonClick={() => handleSelectCategory(id)}\n\t\t\t\t\t\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\t\t\t\t\t\tactive={id === selectedCategoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div ref={(el) => (categoryBlocksRef.current[id] = el)}>{name}</div>\n\t\t\t\t\t\t\t</Chip>\n\t\t\t\t\t\t</CarouselItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Carousel>\n\t\t</div>\n\t);\n};\nexport default Categories;\n","export const DEFAULT_CURRENCY = \"AZN\";\nexport const IMAGE_BASE_URL = \"https://images.restaround.co\";\n","import { Column, Row } from \"@sorocraft/ui\";\nimport { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ProductsListItem.module.scss\";\n\nimport * as productModels from \"src/models/product\";\n\nimport { DEFAULT_CURRENCY } from \"../PublicMenu.constants\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tcurrency: string;\n\tlanguage: string;\n}\n\nconst ProductsListItem = ({ product, currency, language }: Props) => {\n\tconst { translations, price, imageUrl } = product || {};\n\tconst { name, description } = translations.find((item) => item.language === language) || {};\n\tconst formattedPrice = priceFormatter(price, currency || DEFAULT_CURRENCY, language);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<Row justifyContent=\"space-between\">\n\t\t\t\t<div className={styles.data}>\n\t\t\t\t\t<Column gap={0.5}>\n\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t<div className={styles.description}>{description}</div>\n\t\t\t\t\t\t<div className={styles.price}>{formattedPrice}</div>\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t\t{imageUrl && <img src={imageUrl} alt={name} className={styles.image} />}\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\nexport default ProductsListItem;\n","import { RefObject, useEffect, memo, useCallback } from \"react\";\nimport { Column, DivElementMap } from \"@sorocraft/ui\";\nimport { groupBy } from \"@sorocraft/js-utils\";\nimport styles from \"./Products.module.scss\";\nimport * as productModels from \"src/models/product\";\nimport * as categoryModels from \"src/models/category\";\nimport * as categoryUtils from \"src/utils/category\";\nimport ProductsListItem from \"../ProductsListItem\";\n\ninterface Props {\n\tproducts: productModels.Product[];\n\tcategories: categoryModels.Category[];\n\tproductBlocksRef: RefObject<DivElementMap>;\n\tcurrency: string;\n\tlanguage: string;\n\tonCategoryInView: (categoryId: number) => void;\n}\n\nconst Products = memo(\n\t({ products, categories, currency, language, productBlocksRef, onCategoryInView }: Props) => {\n\t\tconst groupedProducts = groupBy(products, \"categoryId\");\n\n\t\tconst handleIntersection = useCallback(\n\t\t\t(entries: IntersectionObserverEntry[]) => {\n\t\t\t\tlet bestMatchCategoryId: number | null = null;\n\t\t\t\tlet maxVisibility = 0;\n\n\t\t\t\tentries.forEach((entry) => {\n\t\t\t\t\tconst categoryId = Number(entry.target.getAttribute(\"data-category-id\"));\n\t\t\t\t\tconst visiblePercentage = entry.intersectionRatio;\n\n\t\t\t\t\t// Track the category block that has the highest visible percentage\n\t\t\t\t\tif (visiblePercentage > maxVisibility) {\n\t\t\t\t\t\tmaxVisibility = visiblePercentage;\n\t\t\t\t\t\tbestMatchCategoryId = categoryId;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Only update if the best matching category is different from the currently selected one\n\t\t\t\tif (bestMatchCategoryId) {\n\t\t\t\t\tonCategoryInView(bestMatchCategoryId);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[onCategoryInView]\n\t\t);\n\n\t\tuseEffect(() => {\n\t\t\tconst observer = new IntersectionObserver(handleIntersection, {\n\t\t\t\troot: null,\n\t\t\t\tthreshold: [0.1, 0.5, 0.75], // Different levels of visibility\n\t\t\t});\n\n\t\t\tObject.values(productBlocksRef?.current || {}).forEach((block) => {\n\t\t\t\tif (block) {\n\t\t\t\t\tobserver.observe(block);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn () => {\n\t\t\t\tobserver.disconnect();\n\t\t\t};\n\t\t}, [productBlocksRef, handleIntersection]);\n\n\t\treturn (\n\t\t\t<div className={styles.container}>\n\t\t\t\t<Column>\n\t\t\t\t\t{Object.keys(groupedProducts).map((categoryId) => {\n\t\t\t\t\t\tconst category = (categories.find(({ id }) => id === Number(categoryId)) ||\n\t\t\t\t\t\t\t{}) as categoryModels.Category;\n\t\t\t\t\t\tconst { name } = categoryUtils.getCategoryTranslation(category, language);\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={styles.products}\n\t\t\t\t\t\t\t\tkey={categoryId}\n\t\t\t\t\t\t\t\tref={(el) => (productBlocksRef!.current![category.id] = el)}\n\t\t\t\t\t\t\t\tdata-category-id={categoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<h2 className={styles.category}>{name}</h2>\n\t\t\t\t\t\t\t\t<div className={styles.list}>\n\t\t\t\t\t\t\t\t\t<Column gap={2}>\n\t\t\t\t\t\t\t\t\t\t{groupedProducts[categoryId].map((product) => (\n\t\t\t\t\t\t\t\t\t\t\t<ProductsListItem\n\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t);\n\t},\n\t(prevProps, nextProps) => {\n\t\treturn (\n\t\t\tprevProps.products === nextProps.products &&\n\t\t\tprevProps.categories === nextProps.categories &&\n\t\t\tprevProps.currency === nextProps.currency &&\n\t\t\tprevProps.language === nextProps.language\n\t\t);\n\t}\n);\n\nexport default Products;\n","import { Category, CategoryTranslation } from \"src/models/category\";\n\nexport const getCategoryTranslation = (\n\tcategory: Category,\n\tlanguage: string\n): CategoryTranslation => {\n\treturn (category?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as CategoryTranslation;\n};\n","import { Card, Container, Flex } from \"@sorocraft/ui\";\n\nimport styles from \"./Branches.module.scss\";\n\nimport * as branchModels from \"src/models/branch\";\n\ninterface Props {\n\tbranches: branchModels.Branch[];\n\trootPath?: string;\n\tonBranchSelect: (branchId: number) => void;\n}\n\nconst Branches = ({ branches = [], rootPath = \"\", onBranchSelect }: Props) => {\n\tconst Parent = ({ children, id }) => {\n\t\tif (onBranchSelect) return <div onClick={() => onBranchSelect(id)}>{children}</div>;\n\n\t\treturn <a href={`${rootPath}/${id}`}>{children}</a>;\n\t};\n\n\treturn (\n\t\t<div className={styles.branches}>\n\t\t\t<Container className={styles.list}>\n\t\t\t\t{branches.map(({ id, name }) => (\n\t\t\t\t\t<Parent key={id} id={id}>\n\t\t\t\t\t\t<Card noBottomMargin>\n\t\t\t\t\t\t\t<Flex justifyContent=\"center\" alignItems=\"center\" fullHeight>\n\t\t\t\t\t\t\t\t<h2 className={styles.name}>{name}</h2>\n\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t</Parent>\n\t\t\t\t))}\n\t\t\t</Container>\n\t\t</div>\n\t);\n};\nexport default Branches;\n","import { DivElementMap } from \"@sorocraft/ui\";\nimport { useRef, useState } from \"react\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport * as menuModels from \"src/models/menu\";\n\nimport Header from \"./Header\";\nimport Categories from \"./Categories\";\nimport Products from \"./Products\";\nimport Branches from \"./Branches\";\n\nimport { IMAGE_BASE_URL } from \"./PublicMenu.constants\";\n\ninterface Props {\n\tdata: menuModels.PublicMenuData;\n}\n\nconst PublicMenu = ({ data }: Props) => {\n\tconst {\n\t\tname,\n\t\tcoverImage,\n\t\tlogoImage,\n\t\tbranches = [],\n\t\tbranchId,\n\t\tlanguage,\n\t\tcategories,\n\t\tproducts,\n\t\tcurrency,\n\t\tinstagram,\n\t\tfacebook,\n\t\twhatsapp,\n\t\ttelegram,\n\t\ttiktok,\n\t\trootPath,\n\t\tonBranchSelect,\n\t} = data || {};\n\n\tconst hasSingleBranch = branches.length <= 1;\n\tconst selectedBranch = branches.find((item) => item.id === Number(branchId));\n\tconst venueName = hasSingleBranch || !selectedBranch?.name ? name : selectedBranch?.name || \"\";\n\n\tconst [selectedCategoryId, setSelectedCategoryId] = useState<number>(categories?.[0]?.id);\n\tconst productBlocksRef = useRef<DivElementMap>({});\n\n\tconst scrollToProductBlock = (categoryId: number) => {\n\t\tconst productBlock = productBlocksRef?.current?.[categoryId];\n\t\tif (!productBlock) return;\n\n\t\tproductBlock.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n\t};\n\n\tconst handleSelectCategory = (categoryId: number) => {\n\t\tsetSelectedCategoryId(categoryId);\n\n\t\tscrollToProductBlock(categoryId);\n\t};\n\n\tconst handleCategoryInView = (categoryId: number) => {\n\t\tif (categoryId !== selectedCategoryId) {\n\t\t\tsetSelectedCategoryId(categoryId);\n\t\t}\n\t};\n\n\tconst getLogoImageSource = () => {\n\t\tif (!logoImage) return \"https://images.restaround.co/no-photo-128.webp\";\n\n\t\tif (logoImage.includes(\"base64\") || logoImage.startsWith(\"https://\")) return logoImage;\n\n\t\treturn `${IMAGE_BASE_URL}/${logoImage}`;\n\t};\n\n\tconst getCoverImageSource = () => {\n\t\tif (!coverImage) return \"https://images.restaround.co/restaround-doodle.webp\";\n\n\t\tif (coverImage.includes(\"base64\") || coverImage.startsWith(\"https://\")) return coverImage;\n\n\t\treturn `${IMAGE_BASE_URL}/${coverImage}`;\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<Header\n\t\t\t\tbranch={selectedBranch}\n\t\t\t\tname={venueName}\n\t\t\t\tcoverImage={getCoverImageSource()}\n\t\t\t\tlogoImage={getLogoImageSource()}\n\t\t\t\tinstagram={instagram}\n\t\t\t\tfacebook={facebook}\n\t\t\t\twhatsapp={whatsapp}\n\t\t\t\ttelegram={telegram}\n\t\t\t\ttiktok={tiktok}\n\t\t\t/>\n\t\t\t{!hasSingleBranch && !branchId ? (\n\t\t\t\t<Branches branches={branches} onBranchSelect={onBranchSelect} rootPath={rootPath} />\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<Categories\n\t\t\t\t\t\tcategories={categories}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tselectedCategoryId={selectedCategoryId}\n\t\t\t\t\t\tonSelectCategory={handleSelectCategory}\n\t\t\t\t\t/>\n\t\t\t\t\t<Products\n\t\t\t\t\t\tcategories={categories}\n\t\t\t\t\t\tproducts={products}\n\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tproductBlocksRef={productBlocksRef}\n\t\t\t\t\t\tonCategoryInView={handleCategoryInView}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default PublicMenu;\n"],"names":["Header","branch","coverImage","logoImage","name","instagram","facebook","whatsapp","telegram","tiktok","address","latitude","longitude","phone","noBranch","isEmpty","googleMapLink","_jsxs","jsxs","className","styles","children","_jsx","src","alt","jsx","Column","fullWidth","fullHeight","alignItems","justifyContent","Row","gap","href","target","rel","SVGIcon","icon","MarkerPin","theme","IconLink","Phone","size","shape","Whatsapp","Instagram","Telegram","Tiktok","Facebook","Wifi","Categories","categories","language","selectedCategoryId","onSelectCategory","categoryBlocksRef","useRef","handleSelectCategory","id","categoryId","categoryBlock","_a","current","scrollIntoView","behavior","inline","scrollToCategoryBlock","Carousel","map","translations","find","item","CarouselItem","Chip","onClick","type","UIElementType","BORDERED_PRIMARY","active","ref","el","IMAGE_BASE_URL","ProductsListItem","product","currency","price","imageUrl","description","formattedPrice","priceFormatter","container","data","image","Products","memo","products","productBlocksRef","onCategoryInView","groupedProducts","groupBy","handleIntersection","useCallback","entries","bestMatchCategoryId","maxVisibility","forEach","entry","Number","getAttribute","visiblePercentage","intersectionRatio","useEffect","observer","IntersectionObserver","root","threshold","Object","values","block","observe","disconnect","keys","category","_b","call","categoryUtils.getCategoryTranslation","list","prevProps","nextProps","Branches","branches","rootPath","onBranchSelect","Parent","Container","Card","noBottomMargin","Flex","branchId","hasSingleBranch","length","selectedBranch","venueName","setSelectedCategoryId","useState","includes","startsWith","productBlock","scrollToProductBlock"],"mappings":"4gBAiCA,MAAMA,EAAS,EACdC,SACAC,aACAC,YACAC,OACAC,YACAC,WACAC,WACAC,WACAC,aAEA,MAAMC,QAAEA,EAAOC,SAAEA,EAAQC,UAAEA,EAASC,MAAEA,GAAUZ,GAAU,GACpDa,EAAWC,UAAQd,GAEnBe,EAAgB,qCAAqCL,KAAYC,IAyCvE,OACCK,EAAAC,KAAA,MAAA,CAAKC,UAAWC,EACfC,SAAA,CAAAC,MAAA,MAAA,CAAKC,IAAKrB,EAAYsB,IAAKpB,EAAMe,UAAWC,IAC5CE,MAAK,MAAA,CAAAH,UAAWC,EAAcC,SAAGP,EAAWQ,EAAAG,KAZzB,IACpBR,EAAAC,KAACQ,SAAM,CAACC,WAAS,EAACC,YAAU,EAACC,WAAW,SAASC,eAAe,SAC/DT,SAAA,CAAAC,MAAA,MAAA,CAAKC,IAAKpB,EAAWqB,IAAKpB,EAAMe,UAAWC,IAC3CE,EAAAA,IAAK,MAAA,CAAAH,UAAWC,WACfE,EAAIG,IAAA,KAAA,CAAAN,UAAWC,EAAcC,SAAAjB,UAQ2B,CAAA,GAAMkB,EAAAA,KAjC9C,IAClBL,OAACc,EAAAA,IAAI,CAAAC,IAAK,EAACX,SAAA,CACVC,aAAKC,IAAKpB,EAAWqB,IAAKpB,EAAMe,UAAWC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9I,EAAU+I,WAAW,YAAoB/I,EAEtE,GAAG8E,KAAkB9E,IAJL,iDAsBrBE,UAAWA,EACXC,SAAUA,EACVC,SAAUA,EACVC,SAAUA,EACVC,OAAQA,IAEPkI,GAAoBD,EAGrBzH,6BACCK,EAACG,IAAAyB,EACA,CAAAC,WAAYA,EACZC,SAAUA,EACVC,mBAAoBA,EACpBC,iBAjDyBK,IAC7BoF,EAAsBpF,GARM,CAACA,UAC7B,MAAMwF,EAA2C,QAA5BtF,EAAAmC,aAAA,EAAAA,EAAkBlC,eAAU,IAAAD,OAAA,EAAAA,EAAAF,GAC5CwF,GAELA,EAAapF,eAAe,CAAEC,SAAU,SAAUsD,MAAO,SAAU,EAMnE8B,CAAqBzF,EAAW,IAgD7BrC,EAAAA,IAACuE,EAAQ,CACR1C,WAAYA,EACZ4C,SAAUA,EACVX,SAAUA,EACVhC,SAAUA,EACV4C,iBAAkBA,EAClBC,iBAnDyBtC,IACzBA,IAAeN,GAClB0F,EAAsBpF,EACtB,OAiCCrC,EAAAG,IAACwG,EAAQ,CAACC,SAAUA,EAAUE,eAAgBA,EAAgBD,SAAUA,MAoBzE"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/PublicMenu/Header/Header.tsx","../src/components/PublicMenu/Categories.tsx","../src/components/PublicMenu/PublicMenu.constants.ts","../src/components/PublicMenu/ProductsListItem/ProductsListItem.tsx","../src/components/PublicMenu/Products/Products.tsx","../src/utils/category.ts","../src/components/PublicMenu/Branches/Branches.tsx","../src/components/PublicMenu/PublicMenu.tsx"],"sourcesContent":["import { Column, Flex, IconLink, Row, SVGIcon, Tooltip } from \"@sorocraft/ui\";\nimport {\n\tMarkerPin,\n\tPhone,\n\tWifi,\n\tInstagram,\n\tWhatsapp,\n\tTiktok,\n\tFacebook,\n\tTelegram,\n} from \"@sorocraft/ui/icons\";\nimport { isEmpty } from \"@sorocraft/js-utils\";\n\nimport styles from \"./Header.module.scss\";\n\nimport * as branchModels from \"src/models/branch\";\nimport * as menuModels from \"src/models/menu\";\n\ninterface Props\n\textends Pick<\n\t\tmenuModels.PublicMenuData,\n\t\t| \"coverImage\"\n\t\t| \"logoImage\"\n\t\t| \"name\"\n\t\t| \"instagram\"\n\t\t| \"facebook\"\n\t\t| \"whatsapp\"\n\t\t| \"telegram\"\n\t\t| \"tiktok\"\n\t> {\n\tbranch?: branchModels.Branch;\n}\n\nconst Header = ({\n\tbranch,\n\tcoverImage,\n\tlogoImage,\n\tname,\n\tinstagram,\n\tfacebook,\n\twhatsapp,\n\ttelegram,\n\ttiktok,\n}: Props) => {\n\tconst { address, latitude, longitude, phone, wifiPassword } = branch || {};\n\tconst noBranch = isEmpty(branch);\n\n\tconst googleMapLink = `https://www.google.com/maps/place/${latitude},${longitude}`;\n\n\t// const languageOptions = useMemo(\n\t// \t() =>\n\t// \t\t[\"az\", \"en\"].map((language) => ({\n\t// \t\t\tvalue: language,\n\t// \t\t\tlabel: language,\n\t// \t\t})),\n\t// \t[]\n\t// );\n\n\tconst BranchInfo = () => (\n\t\t<Flex direction=\"row\" gap={1} alignItems=\"center\">\n\t\t\t<Flex.Item>\n\t\t\t\t<img src={logoImage} alt={name} className={styles.logo} />\n\t\t\t</Flex.Item>\n\t\t\t<Flex.Item shrink>\n\t\t\t\t<div className={styles.info}>\n\t\t\t\t\t<Column gap={0.5}>\n\t\t\t\t\t\t<h1 className={styles.name}>{name}</h1>\n\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclassName={styles.address}\n\t\t\t\t\t\t\thref={googleMapLink}\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Row alignItems=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t<SVGIcon icon={MarkerPin} theme=\"dark\" />\n\t\t\t\t\t\t\t\t<span className={styles.addressText}>{address}</span>\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t</Flex.Item>\n\t\t</Flex>\n\t);\n\n\tconst BusinessInfo = () => (\n\t\t<Column fullWidth fullHeight alignItems=\"center\" justifyContent=\"center\">\n\t\t\t<img src={logoImage} alt={name} className={styles.logo} />\n\t\t\t<div className={styles.info}>\n\t\t\t\t<h1 className={styles.name}>{name}</h1>\n\t\t\t</div>\n\t\t</Column>\n\t);\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<img src={coverImage} alt={name} className={styles.cover} />\n\t\t\t<div className={styles.content}>{noBranch ? <BusinessInfo /> : <BranchInfo />}</div>\n\t\t\t{!noBranch && (\n\t\t\t\t<div className={styles.social}>\n\t\t\t\t\t<div className={styles.links}>\n\t\t\t\t\t\t<Row gap={2} alignItems=\"center\">\n\t\t\t\t\t\t\t<Row alignItems=\"center\" justifyContent=\"center\" gap={0.5}>\n\t\t\t\t\t\t\t\t{!!phone && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Phone}\n\t\t\t\t\t\t\t\t\t\thref={`tel:+${phone}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!whatsapp && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Whatsapp}\n\t\t\t\t\t\t\t\t\t\thref={`https://wa.me/${whatsapp}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!instagram && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Instagram}\n\t\t\t\t\t\t\t\t\t\thref={instagram}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!telegram && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Telegram}\n\t\t\t\t\t\t\t\t\t\thref={telegram}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!tiktok && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Tiktok}\n\t\t\t\t\t\t\t\t\t\thref={tiktok}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{!!facebook && (\n\t\t\t\t\t\t\t\t\t<IconLink\n\t\t\t\t\t\t\t\t\t\ticon={Facebook}\n\t\t\t\t\t\t\t\t\t\thref={facebook}\n\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\tshape=\"circle\"\n\t\t\t\t\t\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t\t<Row alignItems=\"center\">\n\t\t\t\t\t\t\t\t{!!wifiPassword && (\n\t\t\t\t\t\t\t\t\t<div className={styles.wifiPassword}>\n\t\t\t\t\t\t\t\t\t\t<Tooltip hint={wifiPassword}>\n\t\t\t\t\t\t\t\t\t\t\t<SVGIcon icon={Wifi} size=\"sm\" className={styles.wifiPasswordIcon} />\n\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Row>\n\t\t\t\t\t\t</Row>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default Header;\n","import { Carousel, CarouselItem, Chip, DivElementMap, UIElementType } from \"@sorocraft/ui\";\nimport { useEffect, useRef } from \"react\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport * as categoryModels from \"src/models/category\";\n\ninterface Props {\n\tcategories: categoryModels.Category[];\n\tlanguage: string;\n\tselectedCategoryId: number;\n\tonSelectCategory: (id: number) => void;\n}\n\nconst Categories = ({ categories, language, selectedCategoryId, onSelectCategory }: Props) => {\n\tconst categoryBlocksRef = useRef<DivElementMap>({});\n\n\tconst scrollToCategoryBlock = () => {\n\t\tconst categoryBlock = categoryBlocksRef?.current?.[selectedCategoryId];\n\t\tif (!categoryBlock) return;\n\n\t\tcategoryBlock.scrollIntoView({ behavior: \"smooth\", inline: \"center\", block: \"nearest\" });\n\t};\n\n\tconst handleSelectCategory = (id: number) => {\n\t\tif (id === selectedCategoryId) return;\n\n\t\tonSelectCategory(id);\n\t};\n\n\tuseEffect(() => {\n\t\tif (selectedCategoryId) scrollToCategoryBlock();\n\t}, [selectedCategoryId]);\n\n\treturn (\n\t\t<div className={styles.categories}>\n\t\t\t<Carousel gap={1}>\n\t\t\t\t{categories.map(({ id, translations }) => {\n\t\t\t\t\tconst { name } = translations.find((item) => item.language === language) || {};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<CarouselItem key={id}>\n\t\t\t\t\t\t\t<Chip\n\t\t\t\t\t\t\t\tonClick={() => handleSelectCategory(id)}\n\t\t\t\t\t\t\t\ttype={UIElementType.BORDERED_PRIMARY}\n\t\t\t\t\t\t\t\tactive={id === selectedCategoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div ref={(el) => (categoryBlocksRef.current[id] = el)}>{name}</div>\n\t\t\t\t\t\t\t</Chip>\n\t\t\t\t\t\t</CarouselItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Carousel>\n\t\t</div>\n\t);\n};\nexport default Categories;\n","export const DEFAULT_CURRENCY = \"AZN\";\nexport const IMAGE_BASE_URL = \"https://images.restaround.co\";\n","import { Column, Row } from \"@sorocraft/ui\";\nimport { priceFormatter } from \"@sorocraft/js-utils\";\n\nimport styles from \"./ProductsListItem.module.scss\";\n\nimport * as productModels from \"src/models/product\";\n\nimport { DEFAULT_CURRENCY, IMAGE_BASE_URL } from \"../PublicMenu.constants\";\n\ninterface Props {\n\tproduct: productModels.Product;\n\tcurrency: string;\n\tlanguage: string;\n}\n\nconst ProductsListItem = ({ product, currency, language }: Props) => {\n\tconst { translations, price, image } = product || {};\n\tconst { name, description } = translations.find((item) => item.language === language) || {};\n\tconst formattedPrice = priceFormatter(price, currency || DEFAULT_CURRENCY, language);\n\n\tconst getImageSource = () => {\n\t\tif (!image) return \"\";\n\n\t\tif (image.includes(\"base64\") || image.startsWith(\"https://\")) return image;\n\n\t\treturn `${IMAGE_BASE_URL}/${image}`;\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<Row justifyContent=\"space-between\">\n\t\t\t\t<div className={styles.data}>\n\t\t\t\t\t<Column gap={0.5}>\n\t\t\t\t\t\t<h3 className={styles.name}>{name}</h3>\n\t\t\t\t\t\t<div className={styles.description}>{description}</div>\n\t\t\t\t\t\t<div className={styles.price}>{formattedPrice}</div>\n\t\t\t\t\t</Column>\n\t\t\t\t</div>\n\t\t\t\t{image && <img src={getImageSource()} alt={name} className={styles.image} />}\n\t\t\t</Row>\n\t\t</div>\n\t);\n};\nexport default ProductsListItem;\n","import { RefObject, useEffect, memo, useCallback } from \"react\";\nimport { Column, DivElementMap } from \"@sorocraft/ui\";\nimport { groupBy } from \"@sorocraft/js-utils\";\nimport styles from \"./Products.module.scss\";\nimport * as productModels from \"src/models/product\";\nimport * as categoryModels from \"src/models/category\";\nimport * as categoryUtils from \"src/utils/category\";\nimport ProductsListItem from \"../ProductsListItem\";\n\ninterface Props {\n\tproducts: productModels.Product[];\n\tcategories: categoryModels.Category[];\n\tproductBlocksRef: RefObject<DivElementMap>;\n\tcurrency: string;\n\tlanguage: string;\n\tonCategoryInView: (categoryId: number) => void;\n}\n\nconst Products = memo(\n\t({ products, categories, currency, language, productBlocksRef, onCategoryInView }: Props) => {\n\t\tconst groupedProducts = groupBy(products, \"categoryId\");\n\n\t\tconst handleIntersection = useCallback(\n\t\t\t(entries: IntersectionObserverEntry[]) => {\n\t\t\t\tlet bestMatchCategoryId: number | null = null;\n\t\t\t\tlet maxVisibility = 0;\n\n\t\t\t\tentries.forEach((entry) => {\n\t\t\t\t\tconst categoryId = Number(entry.target.getAttribute(\"data-category-id\"));\n\t\t\t\t\tconst visiblePercentage = entry.intersectionRatio;\n\n\t\t\t\t\t// Track the category block that has the highest visible percentage\n\t\t\t\t\tif (visiblePercentage > maxVisibility) {\n\t\t\t\t\t\tmaxVisibility = visiblePercentage;\n\t\t\t\t\t\tbestMatchCategoryId = categoryId;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Only update if the best matching category is different from the currently selected one\n\t\t\t\tif (bestMatchCategoryId) {\n\t\t\t\t\tonCategoryInView(bestMatchCategoryId);\n\t\t\t\t}\n\t\t\t},\n\t\t\t[onCategoryInView]\n\t\t);\n\n\t\tuseEffect(() => {\n\t\t\tconst observer = new IntersectionObserver(handleIntersection, {\n\t\t\t\troot: null,\n\t\t\t\tthreshold: [0.1, 0.5, 0.75], // Different levels of visibility\n\t\t\t});\n\n\t\t\tObject.values(productBlocksRef?.current || {}).forEach((block) => {\n\t\t\t\tif (block) {\n\t\t\t\t\tobserver.observe(block);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn () => {\n\t\t\t\tobserver.disconnect();\n\t\t\t};\n\t\t}, [productBlocksRef, handleIntersection]);\n\n\t\treturn (\n\t\t\t<div className={styles.container}>\n\t\t\t\t<Column>\n\t\t\t\t\t{Object.keys(groupedProducts).map((categoryId) => {\n\t\t\t\t\t\tconst category = (categories.find(({ id }) => id === Number(categoryId)) ||\n\t\t\t\t\t\t\t{}) as categoryModels.Category;\n\t\t\t\t\t\tconst { name } = categoryUtils.getCategoryTranslation(category, language);\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={styles.products}\n\t\t\t\t\t\t\t\tkey={categoryId}\n\t\t\t\t\t\t\t\tref={(el) => (productBlocksRef!.current![category.id] = el)}\n\t\t\t\t\t\t\t\tdata-category-id={categoryId}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<h2 className={styles.category}>{name}</h2>\n\t\t\t\t\t\t\t\t<div className={styles.list}>\n\t\t\t\t\t\t\t\t\t<Column gap={2}>\n\t\t\t\t\t\t\t\t\t\t{groupedProducts[categoryId].map((product) => (\n\t\t\t\t\t\t\t\t\t\t\t<ProductsListItem\n\t\t\t\t\t\t\t\t\t\t\t\tproduct={product}\n\t\t\t\t\t\t\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\t\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\t\t\t\t\t\t\tkey={product.id}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</Column>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</Column>\n\t\t\t</div>\n\t\t);\n\t},\n\t(prevProps, nextProps) => {\n\t\treturn (\n\t\t\tprevProps.products === nextProps.products &&\n\t\t\tprevProps.categories === nextProps.categories &&\n\t\t\tprevProps.currency === nextProps.currency &&\n\t\t\tprevProps.language === nextProps.language\n\t\t);\n\t}\n);\n\nexport default Products;\n","import { Category, CategoryTranslation } from \"src/models/category\";\n\nexport const getCategoryTranslation = (\n\tcategory: Category,\n\tlanguage: string\n): CategoryTranslation => {\n\treturn (category?.translations?.find?.((item) => item.language === language) ||\n\t\t{}) as CategoryTranslation;\n};\n","import { Card, Container, Flex } from \"@sorocraft/ui\";\n\nimport styles from \"./Branches.module.scss\";\n\nimport * as branchModels from \"src/models/branch\";\n\ninterface Props {\n\tbranches: branchModels.Branch[];\n\trootPath?: string;\n\tonBranchSelect: (branchId: number) => void;\n}\n\nconst Branches = ({ branches = [], rootPath = \"\", onBranchSelect }: Props) => {\n\tconst Parent = ({ children, id }) => {\n\t\tif (onBranchSelect) return <div onClick={() => onBranchSelect(id)}>{children}</div>;\n\n\t\treturn <a href={`${rootPath}/${id}`}>{children}</a>;\n\t};\n\n\treturn (\n\t\t<div className={styles.branches}>\n\t\t\t<Container className={styles.list}>\n\t\t\t\t{branches.map(({ id, name }) => (\n\t\t\t\t\t<Parent key={id} id={id}>\n\t\t\t\t\t\t<Card noBottomMargin>\n\t\t\t\t\t\t\t<Flex justifyContent=\"center\" alignItems=\"center\" fullHeight>\n\t\t\t\t\t\t\t\t<h2 className={styles.name}>{name}</h2>\n\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t</Card>\n\t\t\t\t\t</Parent>\n\t\t\t\t))}\n\t\t\t</Container>\n\t\t</div>\n\t);\n};\nexport default Branches;\n","import { DivElementMap } from \"@sorocraft/ui\";\nimport { useRef, useState } from \"react\";\n\nimport styles from \"./PublicMenu.module.scss\";\n\nimport * as menuModels from \"src/models/menu\";\nimport * as branchModels from \"src/models/branch\";\n\nimport Header from \"./Header\";\nimport Categories from \"./Categories\";\nimport Products from \"./Products\";\nimport Branches from \"./Branches\";\n\nimport { IMAGE_BASE_URL } from \"./PublicMenu.constants\";\n\ninterface Props {\n\tdata: menuModels.PublicMenuData;\n}\n\nconst PublicMenu = ({ data }: Props) => {\n\tconst {\n\t\tname,\n\t\tcoverImage,\n\t\tlogoImage,\n\t\tbranches = [],\n\t\tbranchId,\n\t\tlanguage,\n\t\tcategories,\n\t\tproducts,\n\t\tcurrency,\n\t\tinstagram,\n\t\tfacebook,\n\t\twhatsapp,\n\t\ttelegram,\n\t\ttiktok,\n\t\trootPath,\n\t\tonBranchSelect,\n\t} = data || {};\n\n\tconst hasSingleBranch = branches.length <= 1;\n\n\tconst getSelectedBranch = () => {\n\t\tif (hasSingleBranch) {\n\t\t\tif (branches?.[0]?.id) return branches[0];\n\n\t\t\treturn {} as branchModels.Branch;\n\t\t}\n\n\t\treturn branches.find((item) => item.id === Number(branchId));\n\t};\n\n\tconst selectedBranch = getSelectedBranch();\n\tconst venueName = hasSingleBranch || !selectedBranch?.name ? name : selectedBranch?.name || \"\";\n\n\tconst [selectedCategoryId, setSelectedCategoryId] = useState<number>(categories?.[0]?.id);\n\tconst productBlocksRef = useRef<DivElementMap>({});\n\n\tconst scrollToProductBlock = (categoryId: number) => {\n\t\tconst productBlock = productBlocksRef?.current?.[categoryId];\n\t\tif (!productBlock) return;\n\n\t\tproductBlock.scrollIntoView({ behavior: \"smooth\", block: \"start\" });\n\t};\n\n\tconst handleSelectCategory = (categoryId: number) => {\n\t\tsetSelectedCategoryId(categoryId);\n\n\t\tscrollToProductBlock(categoryId);\n\t};\n\n\tconst handleCategoryInView = (categoryId: number) => {\n\t\treturn;\n\t\tif (categoryId !== selectedCategoryId) {\n\t\t\tsetSelectedCategoryId(categoryId);\n\t\t}\n\t};\n\n\tconst getLogoImageSource = () => {\n\t\tif (!logoImage) return \"https://images.restaround.co/no-photo-128.webp\";\n\n\t\tif (logoImage.includes(\"base64\") || logoImage.startsWith(\"https://\")) return logoImage;\n\n\t\treturn `${IMAGE_BASE_URL}/${logoImage}`;\n\t};\n\n\tconst getCoverImageSource = () => {\n\t\tif (!coverImage) return \"https://images.restaround.co/restaround-doodle.webp\";\n\n\t\tif (coverImage.includes(\"base64\") || coverImage.startsWith(\"https://\")) return coverImage;\n\n\t\treturn `${IMAGE_BASE_URL}/${coverImage}`;\n\t};\n\n\treturn (\n\t\t<div className={styles.container}>\n\t\t\t<Header\n\t\t\t\tbranch={selectedBranch}\n\t\t\t\tname={venueName}\n\t\t\t\tcoverImage={getCoverImageSource()}\n\t\t\t\tlogoImage={getLogoImageSource()}\n\t\t\t\tinstagram={instagram}\n\t\t\t\tfacebook={facebook}\n\t\t\t\twhatsapp={whatsapp}\n\t\t\t\ttelegram={telegram}\n\t\t\t\ttiktok={tiktok}\n\t\t\t/>\n\t\t\t{!hasSingleBranch && !branchId ? (\n\t\t\t\t<Branches branches={branches} onBranchSelect={onBranchSelect} rootPath={rootPath} />\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<Categories\n\t\t\t\t\t\tcategories={categories}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tselectedCategoryId={selectedCategoryId}\n\t\t\t\t\t\tonSelectCategory={handleSelectCategory}\n\t\t\t\t\t/>\n\t\t\t\t\t<Products\n\t\t\t\t\t\tcategories={categories}\n\t\t\t\t\t\tproducts={products}\n\t\t\t\t\t\tcurrency={currency}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tproductBlocksRef={productBlocksRef}\n\t\t\t\t\t\tonCategoryInView={handleCategoryInView}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n};\nexport default PublicMenu;\n"],"names":["Header","branch","coverImage","logoImage","name","instagram","facebook","whatsapp","telegram","tiktok","address","latitude","longitude","phone","wifiPassword","noBranch","isEmpty","googleMapLink","_jsxs","className","styles","children","_jsx","src","alt","jsx","jsxs","Column","fullWidth","fullHeight","alignItems","justifyContent","Flex","direction","gap","Item","shrink","href","target","rel","Row","SVGIcon","icon","MarkerPin","theme","IconLink","Phone","size","shape","Whatsapp","Instagram","Telegram","Tiktok","Facebook","Tooltip","hint","Wifi","Categories","categories","language","selectedCategoryId","onSelectCategory","categoryBlocksRef","useRef","useEffect","categoryBlock","_a","current","scrollIntoView","behavior","inline","block","scrollToCategoryBlock","Carousel","map","id","translations","find","item","CarouselItem","Chip","onClick","handleSelectCategory","type","UIElementType","BORDERED_PRIMARY","active","ref","el","IMAGE_BASE_URL","ProductsListItem","product","currency","price","image","description","formattedPrice","priceFormatter","container","data","includes","startsWith","Products","memo","products","productBlocksRef","onCategoryInView","groupedProducts","groupBy","handleIntersection","useCallback","entries","bestMatchCategoryId","maxVisibility","forEach","entry","categoryId","Number","getAttribute","visiblePercentage","intersectionRatio","observer","IntersectionObserver","root","threshold","Object","values","observe","disconnect","keys","category","_b","call","categoryUtils.getCategoryTranslation","list","prevProps","nextProps","Branches","branches","rootPath","onBranchSelect","Parent","Container","Card","noBottomMargin","branchId","hasSingleBranch","length","selectedBranch","getSelectedBranch","venueName","setSelectedCategoryId","useState","productBlock","scrollToProductBlock"],"mappings":"ioBAiCA,MAAMA,EAAS,EACdC,SACAC,aACAC,YACAC,OACAC,YACAC,WACAC,WACAC,WACAC,aAEA,MAAMC,QAAEA,EAAOC,SAAEA,EAAQC,UAAEA,EAASC,MAAEA,EAAKC,aAAEA,GAAiBb,GAAU,GAClEc,EAAWC,UAAQf,GAEnBgB,EAAgB,qCAAqCN,KAAYC,IA+CvE,OACCM,OAAK,MAAA,CAAAC,UAAWC,EACfC,SAAA,CAAAC,EAAAA,IAAA,MAAA,CAAKC,IAAKrB,EAAYsB,IAAKpB,EAAMe,UAAWC,IAC5CE,EAAAG,IAAA,MAAA,CAAKN,UAAWC,EAAcC,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,EACVC,SAAUA,EACVC,SAAUA,EACVC,OAAQA,IAEPyI,GAAoBD,EAGrB/H,6BACCI,EAACG,IAAAgC,EACA,CAAAC,WAAYA,EACZC,SAAUA,EACVC,mBAAoBA,EACpBC,iBAlDyBuD,IAC7BmC,EAAsBnC,GARM,CAACA,UAC7B,MAAMqC,EAA2C,QAA5BvF,EAAAuC,aAAA,EAAAA,EAAkBtC,eAAU,IAAAD,OAAA,EAAAA,EAAAkD,GAC5CqC,GAELA,EAAarF,eAAe,CAAEC,SAAU,SAAUE,MAAO,SAAU,EAMnEmF,CAAqBtC,EAAW,IAiD7B9F,EAAAA,IAACgF,EAAQ,CACR5C,WAAYA,EACZ8C,SAAUA,EACVZ,SAAUA,EACVjC,SAAUA,EACV8C,iBAAkBA,EAClBC,iBApDyBU,IACtB,OAoCL9F,EAAAG,IAACgH,EAAQ,CAACC,SAAUA,EAAUE,eAAgBA,EAAgBD,SAAUA,MAoBzE"}
|
package/dist/models/product.d.ts
CHANGED
package/dist/styles/ui.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@keyframes PublicMenu-module_flexWide__M9IEY{0%{flex:0}to{flex:1}}@keyframes PublicMenu-module_slidein__kwZ1c{0%{transform:translateX(0)}to{transform:translateX(-100%)}}@keyframes PublicMenu-module_fadeInOut__ORUVR{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}@keyframes PublicMenu-module_heightAnimation__Upf4B{0%{height:0}to{height:100%}}@keyframes PublicMenu-module_fadein__Q7QsJ{0%{opacity:0}to{opacity:1}}@keyframes PublicMenu-module_floatAnimation__IxmsY{0%{transform:translateY(0)}to{transform:translateY(-20px)}}.PublicMenu-module_container__QLN6U{background-color:#fff;position:relative}.PublicMenu-module_container__QLN6U .PublicMenu-module_description__Qlb4s{font-size:.9rem;padding:1rem 1rem .5rem;text-align:center}.PublicMenu-module_container__QLN6U .PublicMenu-module_contact__Jtkor{padding:1rem}.PublicMenu-module_container__QLN6U .PublicMenu-module_contact__Jtkor svg path{fill:#fff}.PublicMenu-module_container__QLN6U .PublicMenu-module_categories__Iy6NC{background-color:#fff;left:0;max-width:100%;padding:.5rem 1rem;position:sticky;right:0;top
|
|
1
|
+
@keyframes PublicMenu-module_flexWide__M9IEY{0%{flex:0}to{flex:1}}@keyframes PublicMenu-module_slidein__kwZ1c{0%{transform:translateX(0)}to{transform:translateX(-100%)}}@keyframes PublicMenu-module_fadeInOut__ORUVR{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}@keyframes PublicMenu-module_heightAnimation__Upf4B{0%{height:0}to{height:100%}}@keyframes PublicMenu-module_fadein__Q7QsJ{0%{opacity:0}to{opacity:1}}@keyframes PublicMenu-module_floatAnimation__IxmsY{0%{transform:translateY(0)}to{transform:translateY(-20px)}}.PublicMenu-module_container__QLN6U{background-color:#fff;position:relative}.PublicMenu-module_container__QLN6U .PublicMenu-module_description__Qlb4s{font-size:.9rem;padding:1rem 1rem .5rem;text-align:center}.PublicMenu-module_container__QLN6U .PublicMenu-module_contact__Jtkor{padding:1rem}.PublicMenu-module_container__QLN6U .PublicMenu-module_contact__Jtkor svg path{fill:#fff}.PublicMenu-module_container__QLN6U .PublicMenu-module_categories__Iy6NC{background-color:#fff;left:0;max-width:100%;padding:.5rem 1rem;position:sticky;right:0;top:0;z-index:1}@keyframes Header-module_flexWide__XiQ6l{0%{flex:0}to{flex:1}}@keyframes Header-module_slidein__srDhG{0%{transform:translateX(0)}to{transform:translateX(-100%)}}@keyframes Header-module_fadeInOut__CRL2N{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}@keyframes Header-module_heightAnimation__YItGG{0%{height:0}to{height:100%}}@keyframes Header-module_fadein__3t3t-{0%{opacity:0}to{opacity:1}}@keyframes Header-module_floatAnimation__yIXwQ{0%{transform:translateY(0)}to{transform:translateY(-20px)}}.Header-module_container__tenlF{height:12.5rem;margin-bottom:3rem;position:relative;width:100%}.Header-module_container__tenlF .Header-module_cover__BAWZK{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.Header-module_container__tenlF .Header-module_content__Gx4Al{align-items:flex-end;background:linear-gradient(0deg,rgba(0,0,0,.5) 20%,transparent);bottom:0;color:#fff;display:flex;left:0;padding:1rem 1rem 2rem;position:absolute;right:0;top:0;width:100%}.Header-module_container__tenlF .Header-module_content__Gx4Al .Header-module_logo__4MTCm{border-radius:50%;display:block;height:6rem;-o-object-fit:cover;object-fit:cover;overflow:hidden;width:6rem}.Header-module_container__tenlF .Header-module_content__Gx4Al .Header-module_info__IchYA{width:100%}.Header-module_container__tenlF .Header-module_content__Gx4Al .Header-module_info__IchYA .Header-module_name__30wyw{font-size:1.5rem;margin:0}.Header-module_container__tenlF .Header-module_content__Gx4Al .Header-module_info__IchYA .Header-module_address__WOxXc{color:#fff;font-size:.9rem}.Header-module_container__tenlF .Header-module_content__Gx4Al .Header-module_info__IchYA .Header-module_address__WOxXc .Header-module_addressText__lUszI{line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;white-space:normal}.Header-module_container__tenlF .Header-module_content__Gx4Al .Header-module_labels__gYyth{bottom:0;height:100%;padding:.75rem;position:absolute;right:0;scrollbar-width:none;top:0}.Header-module_container__tenlF .Header-module_content__Gx4Al .Header-module_labels__gYyth::-webkit-scrollbar{background:transparent;height:0;width:0}.Header-module_container__tenlF .Header-module_social__AoP0z{bottom:-1.25rem;display:flex;justify-content:center;left:0;position:absolute;right:0}.Header-module_container__tenlF .Header-module_links__EeQxg{background-color:#fff;border-radius:1.5rem;box-shadow:0 0 50px 0 rgba(0,0,0,.15);padding:.25rem .75rem;width:-moz-fit-content;width:fit-content}.Header-module_container__tenlF .Header-module_links__EeQxg .Header-module_wifiPassword__VWBTa{align-items:center;cursor:pointer;display:flex}.Header-module_container__tenlF .Header-module_links__EeQxg .Header-module_wifiPassword__VWBTa .Header-module_wifiPasswordIcon__Ukn3D{height:100%}.Products-module_container__bF2LF{padding:1rem}.Products-module_container__bF2LF .Products-module_header__0EFvL{margin-bottom:-1rem}.Products-module_container__bF2LF .Products-module_products__AoDrY{padding:3rem 0 0;width:100%}.Products-module_container__bF2LF .Products-module_products__AoDrY .Products-module_list__LH4v5{width:100%}@keyframes ProductsListItem-module_flexWide__Ds6LE{0%{flex:0}to{flex:1}}@keyframes ProductsListItem-module_slidein__rEzMI{0%{transform:translateX(0)}to{transform:translateX(-100%)}}@keyframes ProductsListItem-module_fadeInOut__i1FNq{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}@keyframes ProductsListItem-module_heightAnimation__2fk7l{0%{height:0}to{height:100%}}@keyframes ProductsListItem-module_fadein__tPTJ6{0%{opacity:0}to{opacity:1}}@keyframes ProductsListItem-module_floatAnimation__vugAV{0%{transform:translateY(0)}to{transform:translateY(-20px)}}.ProductsListItem-module_container__i9tFs{width:100%}.ProductsListItem-module_container__i9tFs .ProductsListItem-module_data__Mb3SF{flex:1}.ProductsListItem-module_container__i9tFs .ProductsListItem-module_data__Mb3SF .ProductsListItem-module_name__T1gyJ{font-size:1.25rem;font-weight:500;margin:0}.ProductsListItem-module_container__i9tFs .ProductsListItem-module_data__Mb3SF .ProductsListItem-module_description__oL4CH{line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;color:#a1a5b7;display:-webkit-box;font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:normal}.ProductsListItem-module_container__i9tFs .ProductsListItem-module_image__h6Wbi{border-radius:.475rem;width:10rem}@keyframes Branches-module_flexWide__-waUA{0%{flex:0}to{flex:1}}@keyframes Branches-module_slidein__6gTfw{0%{transform:translateX(0)}to{transform:translateX(-100%)}}@keyframes Branches-module_fadeInOut__lplH2{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}@keyframes Branches-module_heightAnimation__pcTJk{0%{height:0}to{height:100%}}@keyframes Branches-module_fadein__U1Mpr{0%{opacity:0}to{opacity:1}}@keyframes Branches-module_floatAnimation__sU2p3{0%{transform:translateY(0)}to{transform:translateY(-20px)}}.Branches-module_branches__sOuoV{background-color:#fff}.Branches-module_branches__sOuoV .Branches-module_list__vYoT2{display:grid;gap:2rem;grid-auto-rows:1fr;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));padding-bottom:2rem}@media (max-width:580px){.Branches-module_branches__sOuoV .Branches-module_list__vYoT2{grid-template-columns:1fr}}.Branches-module_branches__sOuoV .Branches-module_list__vYoT2 .Branches-module_name__K0Z-4{font-size:1.25rem;font-weight:500;margin:0;text-align:center}
|
|
2
2
|
/*# sourceMappingURL=ui.css.map */
|
package/dist/styles/ui.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PublicMenu.module.scss","Header.module.scss","Products.module.scss","ProductsListItem.module.scss","Branches.module.scss"],"names":[],"mappings":"AA0BA,6CACE,GACE,MACF,CACA,GACE,MACF,CACF,CACA,4CACE,GACE,uBACF,CACA,GACE,2BACF,CACF,CACA,8CACE,GACE,UACF,CACA,IACE,SACF,CACA,GACE,UACF,CACF,CACA,oDACE,GACE,QACF,CACA,GACE,WACF,CACF,CACA,2CACE,GACE,SACF,CACA,GACE,SACF,CACF,CA4BA,mDACE,GACE,uBACF,CACA,GACE,2BACF,CACF,CACA,oCACE,qBAAyB,CACzB,iBACF,CACA,0EAGE,eAAiB,CAFjB,uBAAyB,CACzB,iBAEF,CACA,sEACE,YACF,CACA,+EACE,SACF,CACA,yEAOE,qBAAyB,CAHzB,MAAO,CAHP,cAAe,CAOf,kBAAoB,CANpB,eAAgB,CAGhB,OAAQ,CACR,SAAU,CAHV,SAMF,CCtGA,yCACE,GACE,MACF,CACA,GACE,MACF,CACF,CACA,wCACE,GACE,uBACF,CACA,GACE,2BACF,CACF,CACA,0CACE,GACE,UACF,CACA,IACE,SACF,CACA,GACE,UACF,CACF,CACA,gDACE,GACE,QACF,CACA,GACE,WACF,CACF,CACA,uCACE,GACE,SACF,CACA,GACE,SACF,CACF,CA4BA,+CACE,GACE,uBACF,CACA,GACE,2BACF,CACF,CACA,gCAE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B,CACvB,kBAGF,CACA,gFAEE,qBAAuB,CADvB,WAEF,CCvGA,2CACE,GACE,MACF,CACA,GACE,MACF,CACF,CACA,0CACE,GACE,uBACF,CACA,GACE,2BACF,CACF,CACA,4CACE,GACE,UACF,CACA,IACE,SACF,CACA,GACE,UACF,CACF,CACA,kDACE,GACE,QACF,CACA,GACE,WACF,CACF,CACA,yCACE,GACE,SACF,CACA,GACE,SACF,CACF,CA4BA,iDACE,GACE,uBACF,CACA,GACE,2BACF,CACF,CACA,iCACE,qBACF,CACA,8DAEE,YAAa,CACb,QAAS,CACT,kBAAmB,CACnB,wDAA2D,CAJ3D,mBAKF,CACA,yBACE,8DACE,yBACF,CACF,CACA,2FAGE,iBAAkB,CADlB,eAAgB,CAEhB,QAAS,CAHT,iBAIF","file":"ui.css","sourcesContent":["/* Text */\n/* Input */\n/* Button */\n/* TABLE */\n/* Modal */\n/* Bagde */\n/* Menu */\n/* Notification */\n/* Border radius */\n/* Fonts */\n/* BUTTON */\n/* WIDTH */\n/* HEIGHT */\n/* CARD */\n/* TABLE */\n/* MODAL */\n/* BADGE */\n/* Menu */\n/* Input */\n/* EDITOR */\n/* HEADER */\n/* Z-INDEX */\n/* SIZES */\n/* SHADOW */\n/**/\n/* RESPONSIVE */\n@keyframes flexWide {\n from {\n flex: 0;\n }\n to {\n flex: 1;\n }\n}\n@keyframes slidein {\n from {\n transform: translateX(0%);\n }\n to {\n transform: translateX(-100%);\n }\n}\n@keyframes fadeInOut {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@keyframes heightAnimation {\n 0% {\n height: 0%;\n }\n 100% {\n height: 100%;\n }\n}\n@keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Firefox < 16 */\n@-moz-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Internet Explorer */\n@-ms-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes floatAnimation {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(-20px);\n }\n}\n.container {\n background-color: #ffffff;\n position: relative;\n}\n.container .description {\n padding: 1rem 1rem 0.5rem;\n text-align: center;\n font-size: 0.9rem;\n}\n.container .contact {\n padding: 1rem;\n}\n.container .contact svg path {\n fill: #ffffff;\n}\n.container .categories {\n max-width: 100%;\n position: sticky;\n z-index: 1;\n left: 0;\n right: 0;\n top: -2rem;\n background-color: #ffffff;\n padding: 0.5rem 1rem;\n}","/* Text */\n/* Input */\n/* Button */\n/* TABLE */\n/* Modal */\n/* Bagde */\n/* Menu */\n/* Notification */\n/* Border radius */\n/* Fonts */\n/* BUTTON */\n/* WIDTH */\n/* HEIGHT */\n/* CARD */\n/* TABLE */\n/* MODAL */\n/* BADGE */\n/* Menu */\n/* Input */\n/* EDITOR */\n/* HEADER */\n/* Z-INDEX */\n/* SIZES */\n/* SHADOW */\n/**/\n/* RESPONSIVE */\n@keyframes flexWide {\n from {\n flex: 0;\n }\n to {\n flex: 1;\n }\n}\n@keyframes slidein {\n from {\n transform: translateX(0%);\n }\n to {\n transform: translateX(-100%);\n }\n}\n@keyframes fadeInOut {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@keyframes heightAnimation {\n 0% {\n height: 0%;\n }\n 100% {\n height: 100%;\n }\n}\n@keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Firefox < 16 */\n@-moz-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Internet Explorer */\n@-ms-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes floatAnimation {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(-20px);\n }\n}\n.container {\n width: 100%;\n height: 12.5rem;\n position: relative;\n margin-bottom: 3rem;\n}\n.container .cover {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.container .content {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n padding: 1rem;\n color: #ffffff;\n background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 20%, transparent 100%);\n display: flex;\n align-items: flex-end;\n}\n.container .content .logo {\n width: 6rem;\n height: 6rem;\n border-radius: 50%;\n overflow: hidden;\n}\n.container .content .info .name {\n font-size: 1.5rem;\n margin: 0;\n}\n.container .content .info .address {\n color: #ffffff;\n font-size: 0.9rem;\n}\n.container .content .labels {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n height: 100%;\n padding: 0.75rem;\n scrollbar-width: none;\n}\n.container .content .labels::-webkit-scrollbar {\n height: 0;\n width: 0;\n background: transparent;\n}\n.container .social {\n position: absolute;\n bottom: -1.25rem;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n}\n.container .links {\n padding: 0.25rem 0.75rem;\n background-color: #ffffff;\n border-radius: 1.5rem;\n box-shadow: 0px 0px 50px 0px rgba(0, 0, 0, 0.15);\n width: fit-content;\n}",".container {\n padding: 1rem;\n}\n.container .header {\n margin-bottom: -1rem;\n}\n.container .products {\n width: 100%;\n padding: 3rem 0 0;\n}\n.container .products .list {\n width: 100%;\n}","/* Text */\n/* Input */\n/* Button */\n/* TABLE */\n/* Modal */\n/* Bagde */\n/* Menu */\n/* Notification */\n/* Border radius */\n/* Fonts */\n/* BUTTON */\n/* WIDTH */\n/* HEIGHT */\n/* CARD */\n/* TABLE */\n/* MODAL */\n/* BADGE */\n/* Menu */\n/* Input */\n/* EDITOR */\n/* HEADER */\n/* Z-INDEX */\n/* SIZES */\n/* SHADOW */\n/**/\n/* RESPONSIVE */\n@keyframes flexWide {\n from {\n flex: 0;\n }\n to {\n flex: 1;\n }\n}\n@keyframes slidein {\n from {\n transform: translateX(0%);\n }\n to {\n transform: translateX(-100%);\n }\n}\n@keyframes fadeInOut {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@keyframes heightAnimation {\n 0% {\n height: 0%;\n }\n 100% {\n height: 100%;\n }\n}\n@keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Firefox < 16 */\n@-moz-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Internet Explorer */\n@-ms-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes floatAnimation {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(-20px);\n }\n}\n.container {\n width: 100%;\n}\n.container .data {\n flex: 1;\n}\n.container .data .name {\n font-size: 1.25rem;\n font-weight: 500;\n margin: 0;\n}\n.container .data .description {\n display: -webkit-box;\n line-clamp: 2;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: normal;\n color: #a1a5b7;\n font-size: 0.9rem;\n}\n.container .image {\n width: 10rem;\n border-radius: 0.475rem;\n}","/* Text */\n/* Input */\n/* Button */\n/* TABLE */\n/* Modal */\n/* Bagde */\n/* Menu */\n/* Notification */\n/* Border radius */\n/* Fonts */\n/* BUTTON */\n/* WIDTH */\n/* HEIGHT */\n/* CARD */\n/* TABLE */\n/* MODAL */\n/* BADGE */\n/* Menu */\n/* Input */\n/* EDITOR */\n/* HEADER */\n/* Z-INDEX */\n/* SIZES */\n/* SHADOW */\n/**/\n/* RESPONSIVE */\n@keyframes flexWide {\n from {\n flex: 0;\n }\n to {\n flex: 1;\n }\n}\n@keyframes slidein {\n from {\n transform: translateX(0%);\n }\n to {\n transform: translateX(-100%);\n }\n}\n@keyframes fadeInOut {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@keyframes heightAnimation {\n 0% {\n height: 0%;\n }\n 100% {\n height: 100%;\n }\n}\n@keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Firefox < 16 */\n@-moz-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Internet Explorer */\n@-ms-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes floatAnimation {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(-20px);\n }\n}\n.branches {\n background-color: #ffffff;\n}\n.branches .list {\n padding-bottom: 2rem;\n display: grid;\n gap: 2rem;\n grid-auto-rows: 1fr;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n}\n@media (max-width: 580px) {\n .branches .list {\n grid-template-columns: 1fr;\n }\n}\n.branches .list .name {\n text-align: center;\n font-weight: 500;\n font-size: 1.25rem;\n margin: 0;\n}"]}
|
|
1
|
+
{"version":3,"sources":["PublicMenu.module.scss","Header.module.scss","Products.module.scss","ProductsListItem.module.scss","Branches.module.scss"],"names":[],"mappings":"AA0BA,6CACE,GACE,MACF,CACA,GACE,MACF,CACF,CACA,4CACE,GACE,uBACF,CACA,GACE,2BACF,CACF,CACA,8CACE,GACE,UACF,CACA,IACE,SACF,CACA,GACE,UACF,CACF,CACA,oDACE,GACE,QACF,CACA,GACE,WACF,CACF,CACA,2CACE,GACE,SACF,CACA,GACE,SACF,CACF,CA4BA,mDACE,GACE,uBACF,CACA,GACE,2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CAHvB,MAAO,CAFP,iBAAkB,CAGlB,OAGF,CACA,4DAEE,qBAAyB,CACzB,oBAAqB,CACrB,qCAAgD,CAHhD,qBAAwB,CAIxB,sBAAkB,CAAlB,iBACF,CACA,+FAEE,kBAAmB,CACnB,cAAe,CAFf,YAGF,CACA,sIACE,WACF,CChMA,kCACE,YACF,CACA,iEACE,mBACF,CACA,mEAEE,gBAAiB,CADjB,UAEF,CACA,gGACE,UACF,CCcA,mDACE,GACE,MACF,CACA,GACE,MACF,CACF,CACA,kDACE,GACE,uBACF,CACA,GACE,2BACF,CACF,CACA,oDACE,GACE,UACF,CACA,IACE,SACF,CACA,GACE,UACF,CACF,CACA,0DACE,GACE,QACF,CACA,GACE,WACF,CACF,CACA,iDACE,GACE,SACF,CACA,GACE,SACF,CACF,CA4BA,yDACE,GACE,uBACF,CACA,GACE,2BACF,CACF,CACA,0CACE,UACF,CACA,+EACE,MACF,CACA,oHACE,iBAAkB,CAClB,eAAgB,CAChB,QACF,CACA,2HAEE,YAAa,CACb,oBAAqB,CACrB,2BAA4B,CAI5B,aAAc,CAPd,mBAAoB,CAQpB,eAAiB,CAJjB,eAAgB,CAChB,sBAAuB,CACvB,kBAGF,CACA,gFAEE,qBAAuB,CADvB,WAEF,CCvGA,2CACE,GACE,MACF,CACA,GACE,MACF,CACF,CACA,0CACE,GACE,uBACF,CACA,GACE,2BACF,CACF,CACA,4CACE,GACE,UACF,CACA,IACE,SACF,CACA,GACE,UACF,CACF,CACA,kDACE,GACE,QACF,CACA,GACE,WACF,CACF,CACA,yCACE,GACE,SACF,CACA,GACE,SACF,CACF,CA4BA,iDACE,GACE,uBACF,CACA,GACE,2BACF,CACF,CACA,iCACE,qBACF,CACA,8DAEE,YAAa,CACb,QAAS,CACT,kBAAmB,CACnB,wDAA2D,CAJ3D,mBAKF,CACA,yBACE,8DACE,yBACF,CACF,CACA,2FAGE,iBAAkB,CADlB,eAAgB,CAEhB,QAAS,CAHT,iBAIF","file":"ui.css","sourcesContent":["/* Text */\n/* Input */\n/* Button */\n/* TABLE */\n/* Modal */\n/* Bagde */\n/* Menu */\n/* Notification */\n/* Border radius */\n/* Fonts */\n/* BUTTON */\n/* WIDTH */\n/* HEIGHT */\n/* CARD */\n/* TABLE */\n/* MODAL */\n/* BADGE */\n/* Menu */\n/* Input */\n/* EDITOR */\n/* HEADER */\n/* Z-INDEX */\n/* SIZES */\n/* SHADOW */\n/**/\n/* RESPONSIVE */\n@keyframes flexWide {\n from {\n flex: 0;\n }\n to {\n flex: 1;\n }\n}\n@keyframes slidein {\n from {\n transform: translateX(0%);\n }\n to {\n transform: translateX(-100%);\n }\n}\n@keyframes fadeInOut {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@keyframes heightAnimation {\n 0% {\n height: 0%;\n }\n 100% {\n height: 100%;\n }\n}\n@keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Firefox < 16 */\n@-moz-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Internet Explorer */\n@-ms-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes floatAnimation {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(-20px);\n }\n}\n.container {\n background-color: #ffffff;\n position: relative;\n}\n.container .description {\n padding: 1rem 1rem 0.5rem;\n text-align: center;\n font-size: 0.9rem;\n}\n.container .contact {\n padding: 1rem;\n}\n.container .contact svg path {\n fill: #ffffff;\n}\n.container .categories {\n max-width: 100%;\n position: sticky;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n background-color: #ffffff;\n padding: 0.5rem 1rem;\n}","/* Text */\n/* Input */\n/* Button */\n/* TABLE */\n/* Modal */\n/* Bagde */\n/* Menu */\n/* Notification */\n/* Border radius */\n/* Fonts */\n/* BUTTON */\n/* WIDTH */\n/* HEIGHT */\n/* CARD */\n/* TABLE */\n/* MODAL */\n/* BADGE */\n/* Menu */\n/* Input */\n/* EDITOR */\n/* HEADER */\n/* Z-INDEX */\n/* SIZES */\n/* SHADOW */\n/**/\n/* RESPONSIVE */\n@keyframes flexWide {\n from {\n flex: 0;\n }\n to {\n flex: 1;\n }\n}\n@keyframes slidein {\n from {\n transform: translateX(0%);\n }\n to {\n transform: translateX(-100%);\n }\n}\n@keyframes fadeInOut {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@keyframes heightAnimation {\n 0% {\n height: 0%;\n }\n 100% {\n height: 100%;\n }\n}\n@keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Firefox < 16 */\n@-moz-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Internet Explorer */\n@-ms-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes floatAnimation {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(-20px);\n }\n}\n.container {\n width: 100%;\n height: 12.5rem;\n position: relative;\n margin-bottom: 3rem;\n}\n.container .cover {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.container .content {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n padding: 1rem 1rem 2rem;\n color: #ffffff;\n background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 20%, transparent 100%);\n display: flex;\n align-items: flex-end;\n}\n.container .content .logo {\n display: block;\n width: 6rem;\n height: 6rem;\n border-radius: 50%;\n overflow: hidden;\n object-fit: cover;\n}\n.container .content .info {\n width: 100%;\n}\n.container .content .info .name {\n font-size: 1.5rem;\n margin: 0;\n}\n.container .content .info .address {\n color: #ffffff;\n font-size: 0.9rem;\n}\n.container .content .info .address .addressText {\n display: -webkit-box;\n line-clamp: 2;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: normal;\n}\n.container .content .labels {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n height: 100%;\n padding: 0.75rem;\n scrollbar-width: none;\n}\n.container .content .labels::-webkit-scrollbar {\n height: 0;\n width: 0;\n background: transparent;\n}\n.container .social {\n position: absolute;\n bottom: -1.25rem;\n left: 0;\n right: 0;\n display: flex;\n justify-content: center;\n}\n.container .links {\n padding: 0.25rem 0.75rem;\n background-color: #ffffff;\n border-radius: 1.5rem;\n box-shadow: 0px 0px 50px 0px rgba(0, 0, 0, 0.15);\n width: fit-content;\n}\n.container .links .wifiPassword {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.container .links .wifiPassword .wifiPasswordIcon {\n height: 100%;\n}",".container {\n padding: 1rem;\n}\n.container .header {\n margin-bottom: -1rem;\n}\n.container .products {\n width: 100%;\n padding: 3rem 0 0;\n}\n.container .products .list {\n width: 100%;\n}","/* Text */\n/* Input */\n/* Button */\n/* TABLE */\n/* Modal */\n/* Bagde */\n/* Menu */\n/* Notification */\n/* Border radius */\n/* Fonts */\n/* BUTTON */\n/* WIDTH */\n/* HEIGHT */\n/* CARD */\n/* TABLE */\n/* MODAL */\n/* BADGE */\n/* Menu */\n/* Input */\n/* EDITOR */\n/* HEADER */\n/* Z-INDEX */\n/* SIZES */\n/* SHADOW */\n/**/\n/* RESPONSIVE */\n@keyframes flexWide {\n from {\n flex: 0;\n }\n to {\n flex: 1;\n }\n}\n@keyframes slidein {\n from {\n transform: translateX(0%);\n }\n to {\n transform: translateX(-100%);\n }\n}\n@keyframes fadeInOut {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@keyframes heightAnimation {\n 0% {\n height: 0%;\n }\n 100% {\n height: 100%;\n }\n}\n@keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Firefox < 16 */\n@-moz-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Internet Explorer */\n@-ms-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes floatAnimation {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(-20px);\n }\n}\n.container {\n width: 100%;\n}\n.container .data {\n flex: 1;\n}\n.container .data .name {\n font-size: 1.25rem;\n font-weight: 500;\n margin: 0;\n}\n.container .data .description {\n display: -webkit-box;\n line-clamp: 2;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: normal;\n color: #a1a5b7;\n font-size: 0.9rem;\n}\n.container .image {\n width: 10rem;\n border-radius: 0.475rem;\n}","/* Text */\n/* Input */\n/* Button */\n/* TABLE */\n/* Modal */\n/* Bagde */\n/* Menu */\n/* Notification */\n/* Border radius */\n/* Fonts */\n/* BUTTON */\n/* WIDTH */\n/* HEIGHT */\n/* CARD */\n/* TABLE */\n/* MODAL */\n/* BADGE */\n/* Menu */\n/* Input */\n/* EDITOR */\n/* HEADER */\n/* Z-INDEX */\n/* SIZES */\n/* SHADOW */\n/**/\n/* RESPONSIVE */\n@keyframes flexWide {\n from {\n flex: 0;\n }\n to {\n flex: 1;\n }\n}\n@keyframes slidein {\n from {\n transform: translateX(0%);\n }\n to {\n transform: translateX(-100%);\n }\n}\n@keyframes fadeInOut {\n 0% {\n opacity: 0.5;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0.5;\n }\n}\n@keyframes heightAnimation {\n 0% {\n height: 0%;\n }\n 100% {\n height: 100%;\n }\n}\n@keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Firefox < 16 */\n@-moz-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n/* Internet Explorer */\n@-ms-keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes floatAnimation {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(-20px);\n }\n}\n.branches {\n background-color: #ffffff;\n}\n.branches .list {\n padding-bottom: 2rem;\n display: grid;\n gap: 2rem;\n grid-auto-rows: 1fr;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n}\n@media (max-width: 580px) {\n .branches .list {\n grid-template-columns: 1fr;\n }\n}\n.branches .list .name {\n text-align: center;\n font-weight: 500;\n font-size: 1.25rem;\n margin: 0;\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restaround/react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "React Library by restaround.co",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"homepage": "https://restaround.co",
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@sorocraft/js-utils": ">=1.0.10",
|
|
35
|
-
"@sorocraft/ui": ">=1.0.
|
|
35
|
+
"@sorocraft/ui": ">=1.0.60",
|
|
36
36
|
"react": ">=18.2.0",
|
|
37
37
|
"react-dom": ">=18.2.0"
|
|
38
38
|
},
|