@uniformdev/mesh-sdk-react 17.1.1-alpha.152 → 17.1.1-alpha.430
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.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +8 -8
package/dist/index.esm.js
CHANGED
|
@@ -145,7 +145,7 @@ var Lo=Object.defineProperty;var ko=(e,o)=>{for(var r in o)Lo(e,r,{get:o[r],enum
|
|
|
145
145
|
`,children:["Matching ",(e==null?void 0:e.length)||0," products"]}),q("ul",{css:[At`
|
|
146
146
|
max-height: 24rem;
|
|
147
147
|
overflow-x: auto;
|
|
148
|
-
`,Xo],children:e==null?void 0:e.map((t,n)=>{var f,m;let[a]=(t==null?void 0:t.categories)||[],l=typeof a=="undefined"||!o||(f=o.find(v=>v.id===a.id))==null?void 0:f.name;return q("li",{css:Mt,children:X("div",{css:Vt,children:[t.thumbnailUrl?q("img",{src:t.thumbnailUrl,alt:typeof t.title=="string"?t.title:t.name||`Product ${n}`,css:Dt}):q("div",{css:zt}),X("h4",{css:Ut,children:[t.title||t.name,l&&q("span",{css:Gt,children:l})]}),t&&X(Bt,{children:[X("p",{css:ze,children:["SKU: ",t.sku||t.id,q("br",{})]}),t.price!==void 0?X("p",{css:ze,children:["Price: ",t.price]}):null,t.editLink||t.url?X("a",{css:It,href:(m=t.editLink)!=null?m:t.url,title:`Go to ${t.title||t.name}`,target:"_blank",rel:"noopener noreferrer",children:[q("span",{css:Et,children:"Edit"}),r?q(F,{src:r,alt:"Logo",css:Tt}):null]}):null]})]})},`product-${t.id}`)})})]})};import Hn,{useContext as Fn,useMemo as $n,useRef as Kn}from"react";import*as A from"react";var Ge={};ko(Ge,{Caution:()=>Ht,Checkmark:()=>Le,ChevronDown:()=>ke,Close:()=>Kt,Danger:()=>Qt,ExclamationPoint:()=>_t,Info:()=>Ie,Lightbulb:()=>qt,MagnifyingGlass:()=>Jt,MaximizeAlt:()=>er,Minus:()=>we,MoreVerticalAlt:()=>he,Plus:()=>xe});import{jsx as Ot}from"@emotion/react/jsx-runtime";var qo=e=>Ot("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Ot("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}),Ht=qo;import{jsx as Ft}from"@emotion/react/jsx-runtime";var Yo=e=>Ft("svg",{width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:Ft("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 39.2A19.2 19.2 0 1 0 20 .8a19.2 19.2 0 0 0 0 38.4Zm8.897-22.303a2.4 2.4 0 0 0-3.394-3.394L17.6 21.407l-3.103-3.104a2.4 2.4 0 0 0-3.394 3.394l4.8 4.8a2.4 2.4 0 0 0 3.394 0l9.6-9.6Z"})}),Le=Yo;import{jsx as $t}from"@emotion/react/jsx-runtime";var Jo=e=>$t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",...e,children:$t("path",{d:"M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414Z"})}),ke=Jo;import{jsx as Ue,jsxs as en}from"@emotion/react/jsx-runtime";var jo=e=>Ue("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 19 19",fill:"currentColor",...e,children:en("g",{fillRule:"evenodd",children:[Ue("path",{d:"M16.578 1.636a1.174 1.174 0 0 1 0 1.66L3.296 16.578a1.174 1.174 0 1 1-1.66-1.66L14.918 1.636a1.174 1.174 0 0 1 1.66 0Z"}),Ue("path",{d:"M1.636 1.636a1.174 1.174 0 0 1 1.66 0l13.282 13.282a1.174 1.174 0 1 1-1.66 1.66L1.636 3.296a1.174 1.174 0 0 1 0-1.66Z"})]})}),Kt=jo;import{jsx as Nt}from"@emotion/react/jsx-runtime";var tn=e=>Nt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:Nt("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}),Qt=tn;import{jsx as Wt}from"@emotion/react/jsx-runtime";var rn=e=>Wt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 16",fill:"currentColor",...e,children:Wt("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}),_t=rn;import{jsx as Zt,jsxs as nn}from"@emotion/react/jsx-runtime";var on=e=>nn("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:[Zt("path",{xmlns:"http://www.w3.org/2000/svg",d:"M11 10.98a1 1 0 1 1 2 0v6a1 1 0 1 1-2 0v-6zm1-4.929a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"}),Zt("path",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12a8 8 0 1 0 16 0 8 8 0 0 0-16 0z"})]}),Ie=on;import{jsx as Xt}from"@emotion/react/jsx-runtime";var an=e=>Xt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:Xt("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}),qt=an;import{jsx as ve,jsxs as Yt}from"@emotion/react/jsx-runtime";var sn=e=>Yt("svg",{width:"1em",height:"1em",viewBox:"0 0 26 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:[Yt("g",{clipPath:"url(#magnifying-glass_svg__a)",children:[ve("path",{d:"M11.539 0C5.484 0 .559 4.741.559 10.57c0 5.827 4.925 10.568 10.98 10.568 6.055 0 10.98-4.74 10.98-10.569C22.52 4.741 17.595 0 11.54 0Zm0 19.187c-4.937 0-8.954-3.866-8.954-8.618 0-4.752 4.017-8.618 8.954-8.618s8.954 3.866 8.954 8.618c0 4.752-4.017 8.618-8.954 8.618Z"}),ve("path",{d:"m25.196 22.334-5.811-5.593a1.041 1.041 0 0 0-1.434 0 .95.95 0 0 0 0 1.38l5.812 5.593c.198.19.457.286.716.286.26 0 .519-.096.717-.286a.95.95 0 0 0 0-1.38Z"})]}),ve("defs",{children:ve("clipPath",{id:"magnifying-glass_svg__a",children:ve("path",{fill:"#fff",transform:"translate(.558)",d:"M0 0h24.935v24H0z"})})})]}),Jt=sn;import{jsx as jt}from"@emotion/react/jsx-runtime";var cn=e=>jt("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:jt("path",{xmlns:"http://www.w3.org/2000/svg",d:"M3 3h6v2H6.462l4.843 4.843-1.415 1.414L5 6.367V9H3V3zm0 18h6v-2H6.376l4.929-4.928-1.415-1.414L5 17.548V15H3v6zm12 0h6v-6h-2v2.524l-4.867-4.866-1.414 1.414L17.647 19H15v2zm6-18h-6v2h2.562l-4.843 4.843 1.414 1.414L19 6.39V9h2V3z"})}),er=cn;import{jsx as tr}from"@emotion/react/jsx-runtime";var dn=e=>tr("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:tr("path",{xmlns:"http://www.w3.org/2000/svg",d:"M14 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),he=dn;import{useThrottle as wn}from"react-use";import{v4 as Cn}from"uuid";import{useState as pn,useRef as lr,useEffect as un}from"react";function Ee(e,o){let r=window.open(e,"_blank"),t=setInterval(()=>{r!=null&&r.closed&&(clearInterval(t),o())},500)}import{format as mn}from"timeago.js";import{css as U}from"@emotion/react";import{mq as ln}from"@uniformdev/design-system";var rr=U`
|
|
148
|
+
`,Xo],children:e==null?void 0:e.map((t,n)=>{var f,m;let[a]=(t==null?void 0:t.categories)||[],l=typeof a=="undefined"||!o||(f=o.find(v=>v.id===a.id))==null?void 0:f.name;return q("li",{css:Mt,children:X("div",{css:Vt,"data-test-id":`product-item-${t.sku||t.id}`,children:[t.thumbnailUrl?q("img",{src:t.thumbnailUrl,alt:typeof t.title=="string"?t.title:t.name||`Product ${n}`,css:Dt,"data-test-id":"product-image"}):q("div",{css:zt}),X("h4",{css:Ut,"data-test-id":"product-name",children:[t.title||t.name,l&&q("span",{css:Gt,children:l})]}),t&&X(Bt,{children:[X("p",{css:ze,"data-test-id":"product-sku",children:["SKU: ",t.sku||t.id,q("br",{})]}),t.price!==void 0?X("p",{css:ze,"data-test-id":"product-price",children:["Price: ",t.price]}):null,t.editLink||t.url?X("a",{css:It,href:(m=t.editLink)!=null?m:t.url,title:`Go to ${t.title||t.name}`,target:"_blank",rel:"noopener noreferrer","data-test-id":"edit-product-button",children:[q("span",{css:Et,children:"Edit"}),r?q(F,{src:r,alt:"Logo",css:Tt}):null]}):null]})]})},`product-${t.id}`)})})]})};import Hn,{useContext as Fn,useMemo as $n,useRef as Kn}from"react";import*as A from"react";var Ge={};ko(Ge,{Caution:()=>Ht,Checkmark:()=>Le,ChevronDown:()=>ke,Close:()=>Kt,Danger:()=>Qt,ExclamationPoint:()=>_t,Info:()=>Ie,Lightbulb:()=>qt,MagnifyingGlass:()=>Jt,MaximizeAlt:()=>er,Minus:()=>we,MoreVerticalAlt:()=>he,Plus:()=>xe});import{jsx as Ot}from"@emotion/react/jsx-runtime";var qo=e=>Ot("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Ot("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}),Ht=qo;import{jsx as Ft}from"@emotion/react/jsx-runtime";var Yo=e=>Ft("svg",{width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:Ft("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 39.2A19.2 19.2 0 1 0 20 .8a19.2 19.2 0 0 0 0 38.4Zm8.897-22.303a2.4 2.4 0 0 0-3.394-3.394L17.6 21.407l-3.103-3.104a2.4 2.4 0 0 0-3.394 3.394l4.8 4.8a2.4 2.4 0 0 0 3.394 0l9.6-9.6Z"})}),Le=Yo;import{jsx as $t}from"@emotion/react/jsx-runtime";var Jo=e=>$t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",...e,children:$t("path",{d:"M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414Z"})}),ke=Jo;import{jsx as Ue,jsxs as en}from"@emotion/react/jsx-runtime";var jo=e=>Ue("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 19 19",fill:"currentColor",...e,children:en("g",{fillRule:"evenodd",children:[Ue("path",{d:"M16.578 1.636a1.174 1.174 0 0 1 0 1.66L3.296 16.578a1.174 1.174 0 1 1-1.66-1.66L14.918 1.636a1.174 1.174 0 0 1 1.66 0Z"}),Ue("path",{d:"M1.636 1.636a1.174 1.174 0 0 1 1.66 0l13.282 13.282a1.174 1.174 0 1 1-1.66 1.66L1.636 3.296a1.174 1.174 0 0 1 0-1.66Z"})]})}),Kt=jo;import{jsx as Nt}from"@emotion/react/jsx-runtime";var tn=e=>Nt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:Nt("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}),Qt=tn;import{jsx as Wt}from"@emotion/react/jsx-runtime";var rn=e=>Wt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 16",fill:"currentColor",...e,children:Wt("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}),_t=rn;import{jsx as Zt,jsxs as nn}from"@emotion/react/jsx-runtime";var on=e=>nn("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:[Zt("path",{xmlns:"http://www.w3.org/2000/svg",d:"M11 10.98a1 1 0 1 1 2 0v6a1 1 0 1 1-2 0v-6zm1-4.929a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"}),Zt("path",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12a8 8 0 1 0 16 0 8 8 0 0 0-16 0z"})]}),Ie=on;import{jsx as Xt}from"@emotion/react/jsx-runtime";var an=e=>Xt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:Xt("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}),qt=an;import{jsx as ve,jsxs as Yt}from"@emotion/react/jsx-runtime";var sn=e=>Yt("svg",{width:"1em",height:"1em",viewBox:"0 0 26 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:[Yt("g",{clipPath:"url(#magnifying-glass_svg__a)",children:[ve("path",{d:"M11.539 0C5.484 0 .559 4.741.559 10.57c0 5.827 4.925 10.568 10.98 10.568 6.055 0 10.98-4.74 10.98-10.569C22.52 4.741 17.595 0 11.54 0Zm0 19.187c-4.937 0-8.954-3.866-8.954-8.618 0-4.752 4.017-8.618 8.954-8.618s8.954 3.866 8.954 8.618c0 4.752-4.017 8.618-8.954 8.618Z"}),ve("path",{d:"m25.196 22.334-5.811-5.593a1.041 1.041 0 0 0-1.434 0 .95.95 0 0 0 0 1.38l5.812 5.593c.198.19.457.286.716.286.26 0 .519-.096.717-.286a.95.95 0 0 0 0-1.38Z"})]}),ve("defs",{children:ve("clipPath",{id:"magnifying-glass_svg__a",children:ve("path",{fill:"#fff",transform:"translate(.558)",d:"M0 0h24.935v24H0z"})})})]}),Jt=sn;import{jsx as jt}from"@emotion/react/jsx-runtime";var cn=e=>jt("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:jt("path",{xmlns:"http://www.w3.org/2000/svg",d:"M3 3h6v2H6.462l4.843 4.843-1.415 1.414L5 6.367V9H3V3zm0 18h6v-2H6.376l4.929-4.928-1.415-1.414L5 17.548V15H3v6zm12 0h6v-6h-2v2.524l-4.867-4.866-1.414 1.414L17.647 19H15v2zm6-18h-6v2h2.562l-4.843 4.843 1.414 1.414L19 6.39V9h2V3z"})}),er=cn;import{jsx as tr}from"@emotion/react/jsx-runtime";var dn=e=>tr("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:tr("path",{xmlns:"http://www.w3.org/2000/svg",d:"M14 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),he=dn;import{useThrottle as wn}from"react-use";import{v4 as Cn}from"uuid";import{useState as pn,useRef as lr,useEffect as un}from"react";function Ee(e,o){let r=window.open(e,"_blank"),t=setInterval(()=>{r!=null&&r.closed&&(clearInterval(t),o())},500)}import{format as mn}from"timeago.js";import{css as U}from"@emotion/react";import{mq as ln}from"@uniformdev/design-system";var rr=U`
|
|
149
149
|
border: 1px solid var(--gray-200);
|
|
150
150
|
background: var(--gray-50);
|
|
151
151
|
border-radius: var(--rounded-base);
|
package/dist/index.js
CHANGED
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
`,children:["Matching ",(e==null?void 0:e.length)||0," products"]}),(0,L.jsx)("ul",{css:[wt.css`
|
|
146
146
|
max-height: 24rem;
|
|
147
147
|
overflow-x: auto;
|
|
148
|
-
`,ro.scrollbarStyles],children:e==null?void 0:e.map((t,n)=>{var h,v;let[a]=(t==null?void 0:t.categories)||[],p=typeof a=="undefined"||!o||(h=o.find(S=>S.id===a.id))==null?void 0:h.name;return(0,L.jsx)("li",{css:qr,children:(0,L.jsxs)("div",{css:Yr,children:[t.thumbnailUrl?(0,L.jsx)("img",{src:t.thumbnailUrl,alt:typeof t.title=="string"?t.title:t.name||`Product ${n}`,css:Jr}):(0,L.jsx)("div",{css:jr}),(0,L.jsxs)("h4",{css:eo,children:[t.title||t.name,p&&(0,L.jsx)("span",{css:to,children:p})]}),t&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("p",{css:xt,children:["SKU: ",t.sku||t.id,(0,L.jsx)("br",{})]}),t.price!==void 0?(0,L.jsxs)("p",{css:xt,children:["Price: ",t.price]}):null,t.editLink||t.url?(0,L.jsxs)("a",{css:_r,href:(v=t.editLink)!=null?v:t.url,title:`Go to ${t.title||t.name}`,target:"_blank",rel:"noopener noreferrer",children:[(0,L.jsx)("span",{css:Zr,children:"Edit"}),r?(0,L.jsx)(Z,{src:r,alt:"Logo",css:Xr}):null]}):null]})]})},`product-${t.id}`)})})]})};var se=Ge(require("react"));var K=Ge(require("react"));var Ze={};Dr(Ze,{Caution:()=>no,Checkmark:()=>Ne,ChevronDown:()=>Qe,Close:()=>so,Danger:()=>lo,ExclamationPoint:()=>uo,Info:()=>_e,Lightbulb:()=>go,MagnifyingGlass:()=>fo,MaximizeAlt:()=>ho,Minus:()=>$e,MoreVerticalAlt:()=>Ie,Plus:()=>Fe});var oo=require("@emotion/react/jsx-runtime"),rn=e=>(0,oo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",...e,children:(0,oo.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}),no=rn;var ao=require("@emotion/react/jsx-runtime"),on=e=>(0,ao.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,ao.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 39.2A19.2 19.2 0 1 0 20 .8a19.2 19.2 0 0 0 0 38.4Zm8.897-22.303a2.4 2.4 0 0 0-3.394-3.394L17.6 21.407l-3.103-3.104a2.4 2.4 0 0 0-3.394 3.394l4.8 4.8a2.4 2.4 0 0 0 3.394 0l9.6-9.6Z"})}),Ne=on;var io=require("@emotion/react/jsx-runtime"),nn=e=>(0,io.jsx)("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",...e,children:(0,io.jsx)("path",{d:"M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414Z"})}),Qe=nn;var ke=require("@emotion/react/jsx-runtime"),an=e=>(0,ke.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 19 19",fill:"currentColor",...e,children:(0,ke.jsxs)("g",{fillRule:"evenodd",children:[(0,ke.jsx)("path",{d:"M16.578 1.636a1.174 1.174 0 0 1 0 1.66L3.296 16.578a1.174 1.174 0 1 1-1.66-1.66L14.918 1.636a1.174 1.174 0 0 1 1.66 0Z"}),(0,ke.jsx)("path",{d:"M1.636 1.636a1.174 1.174 0 0 1 1.66 0l13.282 13.282a1.174 1.174 0 1 1-1.66 1.66L1.636 3.296a1.174 1.174 0 0 1 0-1.66Z"})]})}),so=an;var co=require("@emotion/react/jsx-runtime"),sn=e=>(0,co.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:(0,co.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}),lo=sn;var po=require("@emotion/react/jsx-runtime"),cn=e=>(0,po.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 16",fill:"currentColor",...e,children:(0,po.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}),uo=cn;var We=require("@emotion/react/jsx-runtime"),dn=e=>(0,We.jsxs)("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:[(0,We.jsx)("path",{xmlns:"http://www.w3.org/2000/svg",d:"M11 10.98a1 1 0 1 1 2 0v6a1 1 0 1 1-2 0v-6zm1-4.929a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"}),(0,We.jsx)("path",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12a8 8 0 1 0 16 0 8 8 0 0 0-16 0z"})]}),_e=dn;var mo=require("@emotion/react/jsx-runtime"),ln=e=>(0,mo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:(0,mo.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}),go=ln;var oe=require("@emotion/react/jsx-runtime"),pn=e=>(0,oe.jsxs)("svg",{width:"1em",height:"1em",viewBox:"0 0 26 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,oe.jsxs)("g",{clipPath:"url(#magnifying-glass_svg__a)",children:[(0,oe.jsx)("path",{d:"M11.539 0C5.484 0 .559 4.741.559 10.57c0 5.827 4.925 10.568 10.98 10.568 6.055 0 10.98-4.74 10.98-10.569C22.52 4.741 17.595 0 11.54 0Zm0 19.187c-4.937 0-8.954-3.866-8.954-8.618 0-4.752 4.017-8.618 8.954-8.618s8.954 3.866 8.954 8.618c0 4.752-4.017 8.618-8.954 8.618Z"}),(0,oe.jsx)("path",{d:"m25.196 22.334-5.811-5.593a1.041 1.041 0 0 0-1.434 0 .95.95 0 0 0 0 1.38l5.812 5.593c.198.19.457.286.716.286.26 0 .519-.096.717-.286a.95.95 0 0 0 0-1.38Z"})]}),(0,oe.jsx)("defs",{children:(0,oe.jsx)("clipPath",{id:"magnifying-glass_svg__a",children:(0,oe.jsx)("path",{fill:"#fff",transform:"translate(.558)",d:"M0 0h24.935v24H0z"})})})]}),fo=pn;var vo=require("@emotion/react/jsx-runtime"),un=e=>(0,vo.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:(0,vo.jsx)("path",{xmlns:"http://www.w3.org/2000/svg",d:"M3 3h6v2H6.462l4.843 4.843-1.415 1.414L5 6.367V9H3V3zm0 18h6v-2H6.376l4.929-4.928-1.415-1.414L5 17.548V15H3v6zm12 0h6v-6h-2v2.524l-4.867-4.866-1.414 1.414L17.647 19H15v2zm6-18h-6v2h2.562l-4.843 4.843 1.414 1.414L19 6.39V9h2V3z"})}),ho=un;var bo=require("@emotion/react/jsx-runtime"),mn=e=>(0,bo.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:(0,bo.jsx)("path",{xmlns:"http://www.w3.org/2000/svg",d:"M14 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),Ie=mn;var wo=require("react-use"),Co=require("uuid");var pe=require("react");function Xe(e,o){let r=window.open(e,"_blank"),t=setInterval(()=>{r!=null&&r.closed&&(clearInterval(t),o())},500)}var So=require("timeago.js");var A=require("@emotion/react"),yo=require("@uniformdev/design-system"),Ct=A.css`
|
|
148
|
+
`,ro.scrollbarStyles],children:e==null?void 0:e.map((t,n)=>{var h,v;let[a]=(t==null?void 0:t.categories)||[],p=typeof a=="undefined"||!o||(h=o.find(S=>S.id===a.id))==null?void 0:h.name;return(0,L.jsx)("li",{css:qr,children:(0,L.jsxs)("div",{css:Yr,"data-test-id":`product-item-${t.sku||t.id}`,children:[t.thumbnailUrl?(0,L.jsx)("img",{src:t.thumbnailUrl,alt:typeof t.title=="string"?t.title:t.name||`Product ${n}`,css:Jr,"data-test-id":"product-image"}):(0,L.jsx)("div",{css:jr}),(0,L.jsxs)("h4",{css:eo,"data-test-id":"product-name",children:[t.title||t.name,p&&(0,L.jsx)("span",{css:to,children:p})]}),t&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("p",{css:xt,"data-test-id":"product-sku",children:["SKU: ",t.sku||t.id,(0,L.jsx)("br",{})]}),t.price!==void 0?(0,L.jsxs)("p",{css:xt,"data-test-id":"product-price",children:["Price: ",t.price]}):null,t.editLink||t.url?(0,L.jsxs)("a",{css:_r,href:(v=t.editLink)!=null?v:t.url,title:`Go to ${t.title||t.name}`,target:"_blank",rel:"noopener noreferrer","data-test-id":"edit-product-button",children:[(0,L.jsx)("span",{css:Zr,children:"Edit"}),r?(0,L.jsx)(Z,{src:r,alt:"Logo",css:Xr}):null]}):null]})]})},`product-${t.id}`)})})]})};var se=Ge(require("react"));var K=Ge(require("react"));var Ze={};Dr(Ze,{Caution:()=>no,Checkmark:()=>Ne,ChevronDown:()=>Qe,Close:()=>so,Danger:()=>lo,ExclamationPoint:()=>uo,Info:()=>_e,Lightbulb:()=>go,MagnifyingGlass:()=>fo,MaximizeAlt:()=>ho,Minus:()=>$e,MoreVerticalAlt:()=>Ie,Plus:()=>Fe});var oo=require("@emotion/react/jsx-runtime"),rn=e=>(0,oo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",...e,children:(0,oo.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}),no=rn;var ao=require("@emotion/react/jsx-runtime"),on=e=>(0,ao.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,ao.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 39.2A19.2 19.2 0 1 0 20 .8a19.2 19.2 0 0 0 0 38.4Zm8.897-22.303a2.4 2.4 0 0 0-3.394-3.394L17.6 21.407l-3.103-3.104a2.4 2.4 0 0 0-3.394 3.394l4.8 4.8a2.4 2.4 0 0 0 3.394 0l9.6-9.6Z"})}),Ne=on;var io=require("@emotion/react/jsx-runtime"),nn=e=>(0,io.jsx)("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",...e,children:(0,io.jsx)("path",{d:"M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414Z"})}),Qe=nn;var ke=require("@emotion/react/jsx-runtime"),an=e=>(0,ke.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 19 19",fill:"currentColor",...e,children:(0,ke.jsxs)("g",{fillRule:"evenodd",children:[(0,ke.jsx)("path",{d:"M16.578 1.636a1.174 1.174 0 0 1 0 1.66L3.296 16.578a1.174 1.174 0 1 1-1.66-1.66L14.918 1.636a1.174 1.174 0 0 1 1.66 0Z"}),(0,ke.jsx)("path",{d:"M1.636 1.636a1.174 1.174 0 0 1 1.66 0l13.282 13.282a1.174 1.174 0 1 1-1.66 1.66L1.636 3.296a1.174 1.174 0 0 1 0-1.66Z"})]})}),so=an;var co=require("@emotion/react/jsx-runtime"),sn=e=>(0,co.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:(0,co.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}),lo=sn;var po=require("@emotion/react/jsx-runtime"),cn=e=>(0,po.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 16",fill:"currentColor",...e,children:(0,po.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}),uo=cn;var We=require("@emotion/react/jsx-runtime"),dn=e=>(0,We.jsxs)("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:[(0,We.jsx)("path",{xmlns:"http://www.w3.org/2000/svg",d:"M11 10.98a1 1 0 1 1 2 0v6a1 1 0 1 1-2 0v-6zm1-4.929a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"}),(0,We.jsx)("path",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12a8 8 0 1 0 16 0 8 8 0 0 0-16 0z"})]}),_e=dn;var mo=require("@emotion/react/jsx-runtime"),ln=e=>(0,mo.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:(0,mo.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}),go=ln;var oe=require("@emotion/react/jsx-runtime"),pn=e=>(0,oe.jsxs)("svg",{width:"1em",height:"1em",viewBox:"0 0 26 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,oe.jsxs)("g",{clipPath:"url(#magnifying-glass_svg__a)",children:[(0,oe.jsx)("path",{d:"M11.539 0C5.484 0 .559 4.741.559 10.57c0 5.827 4.925 10.568 10.98 10.568 6.055 0 10.98-4.74 10.98-10.569C22.52 4.741 17.595 0 11.54 0Zm0 19.187c-4.937 0-8.954-3.866-8.954-8.618 0-4.752 4.017-8.618 8.954-8.618s8.954 3.866 8.954 8.618c0 4.752-4.017 8.618-8.954 8.618Z"}),(0,oe.jsx)("path",{d:"m25.196 22.334-5.811-5.593a1.041 1.041 0 0 0-1.434 0 .95.95 0 0 0 0 1.38l5.812 5.593c.198.19.457.286.716.286.26 0 .519-.096.717-.286a.95.95 0 0 0 0-1.38Z"})]}),(0,oe.jsx)("defs",{children:(0,oe.jsx)("clipPath",{id:"magnifying-glass_svg__a",children:(0,oe.jsx)("path",{fill:"#fff",transform:"translate(.558)",d:"M0 0h24.935v24H0z"})})})]}),fo=pn;var vo=require("@emotion/react/jsx-runtime"),un=e=>(0,vo.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:(0,vo.jsx)("path",{xmlns:"http://www.w3.org/2000/svg",d:"M3 3h6v2H6.462l4.843 4.843-1.415 1.414L5 6.367V9H3V3zm0 18h6v-2H6.376l4.929-4.928-1.415-1.414L5 17.548V15H3v6zm12 0h6v-6h-2v2.524l-4.867-4.866-1.414 1.414L17.647 19H15v2zm6-18h-6v2h2.562l-4.843 4.843 1.414 1.414L19 6.39V9h2V3z"})}),ho=un;var bo=require("@emotion/react/jsx-runtime"),mn=e=>(0,bo.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:(0,bo.jsx)("path",{xmlns:"http://www.w3.org/2000/svg",d:"M14 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),Ie=mn;var wo=require("react-use"),Co=require("uuid");var pe=require("react");function Xe(e,o){let r=window.open(e,"_blank"),t=setInterval(()=>{r!=null&&r.closed&&(clearInterval(t),o())},500)}var So=require("timeago.js");var A=require("@emotion/react"),yo=require("@uniformdev/design-system"),Ct=A.css`
|
|
149
149
|
border: 1px solid var(--gray-200);
|
|
150
150
|
background: var(--gray-50);
|
|
151
151
|
border-radius: var(--rounded-base);
|
package/dist/index.mjs
CHANGED
|
@@ -145,7 +145,7 @@ var Lo=Object.defineProperty;var ko=(e,o)=>{for(var r in o)Lo(e,r,{get:o[r],enum
|
|
|
145
145
|
`,children:["Matching ",(e==null?void 0:e.length)||0," products"]}),q("ul",{css:[At`
|
|
146
146
|
max-height: 24rem;
|
|
147
147
|
overflow-x: auto;
|
|
148
|
-
`,Xo],children:e==null?void 0:e.map((t,n)=>{var f,m;let[a]=(t==null?void 0:t.categories)||[],l=typeof a=="undefined"||!o||(f=o.find(v=>v.id===a.id))==null?void 0:f.name;return q("li",{css:Mt,children:X("div",{css:Vt,children:[t.thumbnailUrl?q("img",{src:t.thumbnailUrl,alt:typeof t.title=="string"?t.title:t.name||`Product ${n}`,css:Dt}):q("div",{css:zt}),X("h4",{css:Ut,children:[t.title||t.name,l&&q("span",{css:Gt,children:l})]}),t&&X(Bt,{children:[X("p",{css:ze,children:["SKU: ",t.sku||t.id,q("br",{})]}),t.price!==void 0?X("p",{css:ze,children:["Price: ",t.price]}):null,t.editLink||t.url?X("a",{css:It,href:(m=t.editLink)!=null?m:t.url,title:`Go to ${t.title||t.name}`,target:"_blank",rel:"noopener noreferrer",children:[q("span",{css:Et,children:"Edit"}),r?q(F,{src:r,alt:"Logo",css:Tt}):null]}):null]})]})},`product-${t.id}`)})})]})};import Hn,{useContext as Fn,useMemo as $n,useRef as Kn}from"react";import*as A from"react";var Ge={};ko(Ge,{Caution:()=>Ht,Checkmark:()=>Le,ChevronDown:()=>ke,Close:()=>Kt,Danger:()=>Qt,ExclamationPoint:()=>_t,Info:()=>Ie,Lightbulb:()=>qt,MagnifyingGlass:()=>Jt,MaximizeAlt:()=>er,Minus:()=>we,MoreVerticalAlt:()=>he,Plus:()=>xe});import{jsx as Ot}from"@emotion/react/jsx-runtime";var qo=e=>Ot("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Ot("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}),Ht=qo;import{jsx as Ft}from"@emotion/react/jsx-runtime";var Yo=e=>Ft("svg",{width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:Ft("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 39.2A19.2 19.2 0 1 0 20 .8a19.2 19.2 0 0 0 0 38.4Zm8.897-22.303a2.4 2.4 0 0 0-3.394-3.394L17.6 21.407l-3.103-3.104a2.4 2.4 0 0 0-3.394 3.394l4.8 4.8a2.4 2.4 0 0 0 3.394 0l9.6-9.6Z"})}),Le=Yo;import{jsx as $t}from"@emotion/react/jsx-runtime";var Jo=e=>$t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",...e,children:$t("path",{d:"M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414Z"})}),ke=Jo;import{jsx as Ue,jsxs as en}from"@emotion/react/jsx-runtime";var jo=e=>Ue("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 19 19",fill:"currentColor",...e,children:en("g",{fillRule:"evenodd",children:[Ue("path",{d:"M16.578 1.636a1.174 1.174 0 0 1 0 1.66L3.296 16.578a1.174 1.174 0 1 1-1.66-1.66L14.918 1.636a1.174 1.174 0 0 1 1.66 0Z"}),Ue("path",{d:"M1.636 1.636a1.174 1.174 0 0 1 1.66 0l13.282 13.282a1.174 1.174 0 1 1-1.66 1.66L1.636 3.296a1.174 1.174 0 0 1 0-1.66Z"})]})}),Kt=jo;import{jsx as Nt}from"@emotion/react/jsx-runtime";var tn=e=>Nt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:Nt("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}),Qt=tn;import{jsx as Wt}from"@emotion/react/jsx-runtime";var rn=e=>Wt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 16",fill:"currentColor",...e,children:Wt("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}),_t=rn;import{jsx as Zt,jsxs as nn}from"@emotion/react/jsx-runtime";var on=e=>nn("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:[Zt("path",{xmlns:"http://www.w3.org/2000/svg",d:"M11 10.98a1 1 0 1 1 2 0v6a1 1 0 1 1-2 0v-6zm1-4.929a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"}),Zt("path",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12a8 8 0 1 0 16 0 8 8 0 0 0-16 0z"})]}),Ie=on;import{jsx as Xt}from"@emotion/react/jsx-runtime";var an=e=>Xt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:Xt("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}),qt=an;import{jsx as ve,jsxs as Yt}from"@emotion/react/jsx-runtime";var sn=e=>Yt("svg",{width:"1em",height:"1em",viewBox:"0 0 26 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:[Yt("g",{clipPath:"url(#magnifying-glass_svg__a)",children:[ve("path",{d:"M11.539 0C5.484 0 .559 4.741.559 10.57c0 5.827 4.925 10.568 10.98 10.568 6.055 0 10.98-4.74 10.98-10.569C22.52 4.741 17.595 0 11.54 0Zm0 19.187c-4.937 0-8.954-3.866-8.954-8.618 0-4.752 4.017-8.618 8.954-8.618s8.954 3.866 8.954 8.618c0 4.752-4.017 8.618-8.954 8.618Z"}),ve("path",{d:"m25.196 22.334-5.811-5.593a1.041 1.041 0 0 0-1.434 0 .95.95 0 0 0 0 1.38l5.812 5.593c.198.19.457.286.716.286.26 0 .519-.096.717-.286a.95.95 0 0 0 0-1.38Z"})]}),ve("defs",{children:ve("clipPath",{id:"magnifying-glass_svg__a",children:ve("path",{fill:"#fff",transform:"translate(.558)",d:"M0 0h24.935v24H0z"})})})]}),Jt=sn;import{jsx as jt}from"@emotion/react/jsx-runtime";var cn=e=>jt("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:jt("path",{xmlns:"http://www.w3.org/2000/svg",d:"M3 3h6v2H6.462l4.843 4.843-1.415 1.414L5 6.367V9H3V3zm0 18h6v-2H6.376l4.929-4.928-1.415-1.414L5 17.548V15H3v6zm12 0h6v-6h-2v2.524l-4.867-4.866-1.414 1.414L17.647 19H15v2zm6-18h-6v2h2.562l-4.843 4.843 1.414 1.414L19 6.39V9h2V3z"})}),er=cn;import{jsx as tr}from"@emotion/react/jsx-runtime";var dn=e=>tr("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:tr("path",{xmlns:"http://www.w3.org/2000/svg",d:"M14 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),he=dn;import{useThrottle as wn}from"react-use";import{v4 as Cn}from"uuid";import{useState as pn,useRef as lr,useEffect as un}from"react";function Ee(e,o){let r=window.open(e,"_blank"),t=setInterval(()=>{r!=null&&r.closed&&(clearInterval(t),o())},500)}import{format as mn}from"timeago.js";import{css as U}from"@emotion/react";import{mq as ln}from"@uniformdev/design-system";var rr=U`
|
|
148
|
+
`,Xo],children:e==null?void 0:e.map((t,n)=>{var f,m;let[a]=(t==null?void 0:t.categories)||[],l=typeof a=="undefined"||!o||(f=o.find(v=>v.id===a.id))==null?void 0:f.name;return q("li",{css:Mt,children:X("div",{css:Vt,"data-test-id":`product-item-${t.sku||t.id}`,children:[t.thumbnailUrl?q("img",{src:t.thumbnailUrl,alt:typeof t.title=="string"?t.title:t.name||`Product ${n}`,css:Dt,"data-test-id":"product-image"}):q("div",{css:zt}),X("h4",{css:Ut,"data-test-id":"product-name",children:[t.title||t.name,l&&q("span",{css:Gt,children:l})]}),t&&X(Bt,{children:[X("p",{css:ze,"data-test-id":"product-sku",children:["SKU: ",t.sku||t.id,q("br",{})]}),t.price!==void 0?X("p",{css:ze,"data-test-id":"product-price",children:["Price: ",t.price]}):null,t.editLink||t.url?X("a",{css:It,href:(m=t.editLink)!=null?m:t.url,title:`Go to ${t.title||t.name}`,target:"_blank",rel:"noopener noreferrer","data-test-id":"edit-product-button",children:[q("span",{css:Et,children:"Edit"}),r?q(F,{src:r,alt:"Logo",css:Tt}):null]}):null]})]})},`product-${t.id}`)})})]})};import Hn,{useContext as Fn,useMemo as $n,useRef as Kn}from"react";import*as A from"react";var Ge={};ko(Ge,{Caution:()=>Ht,Checkmark:()=>Le,ChevronDown:()=>ke,Close:()=>Kt,Danger:()=>Qt,ExclamationPoint:()=>_t,Info:()=>Ie,Lightbulb:()=>qt,MagnifyingGlass:()=>Jt,MaximizeAlt:()=>er,Minus:()=>we,MoreVerticalAlt:()=>he,Plus:()=>xe});import{jsx as Ot}from"@emotion/react/jsx-runtime";var qo=e=>Ot("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Ot("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}),Ht=qo;import{jsx as Ft}from"@emotion/react/jsx-runtime";var Yo=e=>Ft("svg",{width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:Ft("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 39.2A19.2 19.2 0 1 0 20 .8a19.2 19.2 0 0 0 0 38.4Zm8.897-22.303a2.4 2.4 0 0 0-3.394-3.394L17.6 21.407l-3.103-3.104a2.4 2.4 0 0 0-3.394 3.394l4.8 4.8a2.4 2.4 0 0 0 3.394 0l9.6-9.6Z"})}),Le=Yo;import{jsx as $t}from"@emotion/react/jsx-runtime";var Jo=e=>$t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",...e,children:$t("path",{d:"M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414Z"})}),ke=Jo;import{jsx as Ue,jsxs as en}from"@emotion/react/jsx-runtime";var jo=e=>Ue("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 19 19",fill:"currentColor",...e,children:en("g",{fillRule:"evenodd",children:[Ue("path",{d:"M16.578 1.636a1.174 1.174 0 0 1 0 1.66L3.296 16.578a1.174 1.174 0 1 1-1.66-1.66L14.918 1.636a1.174 1.174 0 0 1 1.66 0Z"}),Ue("path",{d:"M1.636 1.636a1.174 1.174 0 0 1 1.66 0l13.282 13.282a1.174 1.174 0 1 1-1.66 1.66L1.636 3.296a1.174 1.174 0 0 1 0-1.66Z"})]})}),Kt=jo;import{jsx as Nt}from"@emotion/react/jsx-runtime";var tn=e=>Nt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:Nt("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}),Qt=tn;import{jsx as Wt}from"@emotion/react/jsx-runtime";var rn=e=>Wt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 16",fill:"currentColor",...e,children:Wt("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}),_t=rn;import{jsx as Zt,jsxs as nn}from"@emotion/react/jsx-runtime";var on=e=>nn("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:[Zt("path",{xmlns:"http://www.w3.org/2000/svg",d:"M11 10.98a1 1 0 1 1 2 0v6a1 1 0 1 1-2 0v-6zm1-4.929a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"}),Zt("path",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12a8 8 0 1 0 16 0 8 8 0 0 0-16 0z"})]}),Ie=on;import{jsx as Xt}from"@emotion/react/jsx-runtime";var an=e=>Xt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:Xt("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}),qt=an;import{jsx as ve,jsxs as Yt}from"@emotion/react/jsx-runtime";var sn=e=>Yt("svg",{width:"1em",height:"1em",viewBox:"0 0 26 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:[Yt("g",{clipPath:"url(#magnifying-glass_svg__a)",children:[ve("path",{d:"M11.539 0C5.484 0 .559 4.741.559 10.57c0 5.827 4.925 10.568 10.98 10.568 6.055 0 10.98-4.74 10.98-10.569C22.52 4.741 17.595 0 11.54 0Zm0 19.187c-4.937 0-8.954-3.866-8.954-8.618 0-4.752 4.017-8.618 8.954-8.618s8.954 3.866 8.954 8.618c0 4.752-4.017 8.618-8.954 8.618Z"}),ve("path",{d:"m25.196 22.334-5.811-5.593a1.041 1.041 0 0 0-1.434 0 .95.95 0 0 0 0 1.38l5.812 5.593c.198.19.457.286.716.286.26 0 .519-.096.717-.286a.95.95 0 0 0 0-1.38Z"})]}),ve("defs",{children:ve("clipPath",{id:"magnifying-glass_svg__a",children:ve("path",{fill:"#fff",transform:"translate(.558)",d:"M0 0h24.935v24H0z"})})})]}),Jt=sn;import{jsx as jt}from"@emotion/react/jsx-runtime";var cn=e=>jt("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:jt("path",{xmlns:"http://www.w3.org/2000/svg",d:"M3 3h6v2H6.462l4.843 4.843-1.415 1.414L5 6.367V9H3V3zm0 18h6v-2H6.376l4.929-4.928-1.415-1.414L5 17.548V15H3v6zm12 0h6v-6h-2v2.524l-4.867-4.866-1.414 1.414L17.647 19H15v2zm6-18h-6v2h2.562l-4.843 4.843 1.414 1.414L19 6.39V9h2V3z"})}),er=cn;import{jsx as tr}from"@emotion/react/jsx-runtime";var dn=e=>tr("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:tr("path",{xmlns:"http://www.w3.org/2000/svg",d:"M14 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),he=dn;import{useThrottle as wn}from"react-use";import{v4 as Cn}from"uuid";import{useState as pn,useRef as lr,useEffect as un}from"react";function Ee(e,o){let r=window.open(e,"_blank"),t=setInterval(()=>{r!=null&&r.closed&&(clearInterval(t),o())},500)}import{format as mn}from"timeago.js";import{css as U}from"@emotion/react";import{mq as ln}from"@uniformdev/design-system";var rr=U`
|
|
149
149
|
border: 1px solid var(--gray-200);
|
|
150
150
|
background: var(--gray-50);
|
|
151
151
|
border-radius: var(--rounded-base);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk-react",
|
|
3
|
-
"version": "17.1.1-alpha.
|
|
3
|
+
"version": "17.1.1-alpha.430+bbad72abe",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK for React",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"storybook:publish": "pnpm build && pnpm build-storybook -o ./out"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@uniformdev/design-system": "^17.1.1-alpha.
|
|
48
|
-
"@uniformdev/mesh-sdk": "^17.1.1-alpha.
|
|
47
|
+
"@uniformdev/design-system": "^17.1.1-alpha.430+bbad72abe",
|
|
48
|
+
"@uniformdev/mesh-sdk": "^17.1.1-alpha.430+bbad72abe",
|
|
49
49
|
"react-beautiful-dnd": "13.1.1",
|
|
50
50
|
"react-icons": "4.4.0",
|
|
51
51
|
"react-use": "17.4.0",
|
|
@@ -64,12 +64,12 @@
|
|
|
64
64
|
"@babel/preset-typescript": "7.18.6",
|
|
65
65
|
"@emotion/babel-preset-css-prop": "11.10.0",
|
|
66
66
|
"@emotion/react": "11.10.4",
|
|
67
|
-
"@storybook/addon-controls": "6.5.
|
|
68
|
-
"@storybook/addon-essentials": "6.5.
|
|
67
|
+
"@storybook/addon-controls": "6.5.12",
|
|
68
|
+
"@storybook/addon-essentials": "6.5.12",
|
|
69
69
|
"@storybook/addon-postcss": "2.0.0",
|
|
70
|
-
"@storybook/react": "6.5.
|
|
70
|
+
"@storybook/react": "6.5.12",
|
|
71
71
|
"@svgr/cli": "6.3.1",
|
|
72
|
-
"@types/react": "18.0.
|
|
72
|
+
"@types/react": "18.0.19",
|
|
73
73
|
"@types/react-beautiful-dnd": "13.1.2",
|
|
74
74
|
"@types/uuid": "8.3.4",
|
|
75
75
|
"react": "18.2.0",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "bbad72abe90c2be0ee138f96dac41d6c591e008a"
|
|
86
86
|
}
|