@uniformdev/mesh-sdk-react 17.6.0 → 17.6.1-alpha.106
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.d.ts +11 -3
- package/dist/index.esm.js +150 -146
- package/dist/index.js +142 -138
- package/dist/index.mjs +150 -146
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Io=Object.defineProperty;var Do=(e,t)=>{for(var o in t)Io(e,o,{get:t[o],enumerable:!0})};import{jsx as c}from"@emotion/react";import*as y from"react";var tt={};Do(tt,{Caution:()=>Ut,Checkmark:()=>Ve,ChevronDown:()=>Ee,Close:()=>zt,Danger:()=>Ht,ExclamationPoint:()=>Ot,Info:()=>Me,Lightbulb:()=>Ft,MagnifyingGlass:()=>Kt,MaximizeAlt:()=>Yt,Minus:()=>Ue,MoreVerticalAlt:()=>ke,Plus:()=>Be});import{jsx as Mt}from"@emotion/react/jsx-runtime";var Vo=e=>Mt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",...e,children:Mt("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"})}),Ut=Vo;import{jsx as Bt}from"@emotion/react/jsx-runtime";var Eo=e=>Bt("svg",{width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:Bt("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"})}),Ve=Eo;import{jsx as At}from"@emotion/react/jsx-runtime";var Mo=e=>At("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",...e,children:At("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"})}),Ee=Mo;import{jsx as et,jsxs as Bo}from"@emotion/react/jsx-runtime";var Uo=e=>et("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 19 19",fill:"currentColor",...e,children:Bo("g",{fillRule:"evenodd",children:[et("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"}),et("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"})]})}),zt=Uo;import{jsx as qt}from"@emotion/react/jsx-runtime";var Ao=e=>qt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:qt("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"})}),Ht=Ao;import{jsx as Gt}from"@emotion/react/jsx-runtime";var zo=e=>Gt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 16",fill:"currentColor",...e,children:Gt("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"})}),Ot=zo;import{jsx as Nt,jsxs as Ho}from"@emotion/react/jsx-runtime";var qo=e=>Ho("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:[Nt("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"}),Nt("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"})]}),Me=qo;import{jsx as $t}from"@emotion/react/jsx-runtime";var Go=e=>$t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...e,children:$t("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"})}),Ft=Go;import{jsx as Pe,jsxs as Wt}from"@emotion/react/jsx-runtime";var Oo=e=>Wt("svg",{width:"1em",height:"1em",viewBox:"0 0 26 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:[Wt("g",{clipPath:"url(#magnifying-glass_svg__a)",children:[Pe("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"}),Pe("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"})]}),Pe("defs",{children:Pe("clipPath",{id:"magnifying-glass_svg__a",children:Pe("path",{fill:"#fff",transform:"translate(.558)",d:"M0 0h24.935v24H0z"})})})]}),Kt=Oo;import{jsx as Qt}from"@emotion/react/jsx-runtime";var No=e=>Qt("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:Qt("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"})}),Yt=No;import{jsx as Zt}from"@emotion/react/jsx-runtime";var $o=e=>Zt("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Zt("path",{d:"M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z",fill:"currentColor"})}),Ue=$o;import{jsx as Xt}from"@emotion/react/jsx-runtime";var Fo=e=>Xt("svg",{width:"1em",height:"1em",fill:"currentColor",...e,children:Xt("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"})}),ke=Fo;import{jsx as Jt}from"@emotion/react/jsx-runtime";var Wo=e=>Jt("svg",{width:"1em",height:"1em",viewBox:"0 0 46 46",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:Jt("path",{d:"M44.203 21.203H24.797V1.797a1.797 1.797 0 1 0-3.594 0v19.406H1.797a1.797 1.797 0 1 0 0 3.594h19.406v19.406a1.797 1.797 0 0 0 3.594 0V24.797h19.406a1.797 1.797 0 0 0 0-3.594Z"})}),Be=Wo;import{css as Rr}from"@emotion/react";import{scrollbarStyles as tn}from"@uniformdev/design-system";import{jsx as jt}from"@emotion/react/jsx-runtime";function W({src:e,alt:t,className:o}){let a=e&&typeof e!="string"?e:null;return a?jt(a,{className:o}):jt("img",{src:e,alt:t,className:o})}import{css as L}from"@emotion/react";import{Input as lr,InputSelect as Ae,mq as ze}from"@uniformdev/design-system";import Xo,{useContext as Jo,useMemo as qe}from"react";import{useAsyncFn as jo,useDebounce as en}from"react-use";import{css as Ko}from"@emotion/react";import{Icon as Qo,InputSelect as Yo}from"@uniformdev/design-system";import{CgClose as Zo}from"react-icons/cg";import{Fragment as er,jsxs as tr}from"@emotion/react/jsx-runtime";var rr=({value:e,text:t,loading:o})=>tr(er,{children:[!!t&&t,!t&&tr(er,{children:[o&&`${e} (Loading...)`,!o&&`${e} (Unresolvable)`]})]});import{css as rt}from"@emotion/react";var ar=rt`
|
|
2
2
|
align-items: center;
|
|
3
3
|
background: var(--gray-100);
|
|
4
4
|
border: 1px solid var(--gray-300);
|
|
@@ -7,66 +7,66 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
7
7
|
justify-content: space-between;
|
|
8
8
|
margin-bottom: var(--spacing-sm);
|
|
9
9
|
margin-right: var(--spacing-sm);
|
|
10
|
-
`,
|
|
10
|
+
`,or=rt`
|
|
11
11
|
color: var(--gray-800);
|
|
12
12
|
padding: var(--spacing-3);
|
|
13
|
-
`,
|
|
13
|
+
`,nr=rt`
|
|
14
14
|
border: none;
|
|
15
15
|
border-left: 1px solid var(--gray-300);
|
|
16
16
|
background: var(--gray-100);
|
|
17
17
|
padding: var(--spacing-3);
|
|
18
|
-
`;import{jsx as
|
|
18
|
+
`;import{jsx as Te,jsxs as ir}from"@emotion/react/jsx-runtime";var sr=({id:e,label:t,loading:o,selectedValues:a,values:r,onAdd:n,onRemove:i})=>{var u;let l=(u=r==null?void 0:r.filter(s=>!(a!=null&&a.includes(s.id.toString()))))!=null?u:[],d=(s,p)=>{s.preventDefault(),i(p)};return ir("div",{children:[Te(Yo,{id:e,name:e,label:t,onChange:s=>n(s.target.value),disabled:o,options:[{value:"",label:"Add..."},...l.map(s=>({value:s.id,label:s.name||s.id}))],value:"",css:Array.isArray(a)&&a.length>0?Ko`
|
|
19
19
|
margin-bottom: var(--spacing-base);
|
|
20
|
-
`:""}),a==null?void 0:a.map(s=>{var p;return
|
|
20
|
+
`:""}),a==null?void 0:a.map(s=>{var p;return ir("div",{css:ar,children:[Te("span",{css:or,children:Te(rr,{value:s,loading:o,text:(p=r.find(h=>h.id===s))==null?void 0:p.name})}),Te("button",{css:nr,title:"remove",onClick:h=>d(h,s),children:Te(Qo,{icon:Zo,iconColor:"currentColor",size:20})})]},s)})]})};import{jsx as R,jsxs as fe}from"@emotion/react/jsx-runtime";var dr={count:1,categories:[],brand:"",keyword:"",sort:"date_modified",sortOrder:"desc"},Ll=({value:e,setValue:t,brands:o,categories:a,loading:r,categoriesLoading:n,brandsLoading:i,logoIcon:l,onGetProducts:d,sortOptions:u,sortOrderOptions:s,categoryLabel:p="Product Category",brandLabel:h="Brand",disableBrands:f,restrictToSingleCategory:C=!1})=>{var U,v,q;let b=async g=>{t({...dr,...e||{},...g})},w=qe(()=>({...dr,...e||{}}),[e]),[me,Ce]=jo(async g=>await d(g),[d]);en(async()=>{await Ce({brand:w.brand,categories:w.categories,keyword:w.keyword,sort:w.sort,sortOrder:w.sortOrder,count:w.count})},250,[w]);let F=qe(()=>{let g=[];return a==null||a.forEach(G=>{let P=pr(G,void 0);g.push(...P)}),g},[a]),j=qe(()=>[{value:"",label:"All categories"},...F.map(g=>({label:g.name,value:g.id}))],[F]),J=qe(()=>(o==null?void 0:o.map(g=>({id:g.id.toString(),name:g.name})))||[],[o]),Re=g=>{if(!g)return;let G=(e==null?void 0:e.categories)||[];b({categories:[...G,g]})},De=g=>{var G;b({categories:(G=e==null?void 0:e.categories)==null?void 0:G.filter(P=>P!==g)})},ie=g=>{b({brand:g.target.value})},M=g=>{b({count:g||1})};return r?R("div",{children:"Loading..."}):R(ur.Provider,{value:{categories:a,logoIcon:l},children:fe("div",{css:L`
|
|
21
21
|
> :not(:last-child) {
|
|
22
22
|
margin-bottom: var(--spacing-md);
|
|
23
23
|
}
|
|
24
|
-
`,children:[C?R(
|
|
24
|
+
`,children:[C?R(Ae,{id:"selection-field-product-category",label:p,disabled:r,value:(v=(U=w.categories)==null?void 0:U[0])!=null?v:"",options:j,onChange:g=>{b({categories:g.target.value===""?[]:[g.target.value]})}}):R(sr,{loading:n||!1,id:"selection-field-product-category",label:p,onAdd:Re,onRemove:De,selectedValues:w.categories,values:F}),fe("div",{css:L`
|
|
25
25
|
display: flex;
|
|
26
26
|
flex-wrap: wrap;
|
|
27
27
|
column-gap: var(--spacing-lg);
|
|
28
28
|
row-gap: var(--spacing-md);
|
|
29
|
-
${
|
|
29
|
+
${ze("md")} {
|
|
30
30
|
flex-wrap: nowrap;
|
|
31
31
|
}
|
|
32
32
|
`,children:[f?null:R("div",{css:L`
|
|
33
33
|
width: 50%;
|
|
34
|
-
`,children:R(
|
|
34
|
+
`,children:R(Ae,{id:"brand",name:"brand",label:h,disabled:i,value:w.brand,onChange:ie,options:[{value:"",label:"Choose..."},...J.map(g=>({value:g.id,label:g.name}))]})}),R("div",{css:L`
|
|
35
35
|
flex-grow: 1;
|
|
36
36
|
position: relative;
|
|
37
|
-
`,children:R(
|
|
37
|
+
`,children:R(lr,{id:"keyword-search",name:"keyword-search",label:"Keyword",value:w.keyword,placeholder:"Enter keyword",onChange:g=>b({keyword:g.target.value})})})]}),fe("div",{css:L`
|
|
38
38
|
display: flex;
|
|
39
39
|
flex-wrap: wrap;
|
|
40
40
|
column-gap: var(--spacing-lg);
|
|
41
41
|
row-gap: var(--spacing-md);
|
|
42
|
-
${
|
|
42
|
+
${ze("md")} {
|
|
43
43
|
flex-wrap: nowrap;
|
|
44
44
|
}
|
|
45
|
-
`,children:[
|
|
45
|
+
`,children:[fe("div",{css:L`
|
|
46
46
|
width: 100%;
|
|
47
|
-
${
|
|
47
|
+
${ze("md")} {
|
|
48
48
|
width: 33.333333%;
|
|
49
49
|
}
|
|
50
50
|
position: relative;
|
|
51
|
-
`,children:[R(
|
|
51
|
+
`,children:[R(lr,{id:"count",name:"count",type:"number",min:1,step:1,value:w.count,onChange:g=>M(g.target.valueAsNumber),label:"Count"}),fe("div",{css:L`
|
|
52
52
|
position: absolute;
|
|
53
53
|
bottom: var(--spacing-sm);
|
|
54
54
|
right: var(--spacing-sm);
|
|
55
55
|
display: flex;
|
|
56
56
|
gap: var(--spacing-sm);
|
|
57
|
-
`,children:[R(
|
|
57
|
+
`,children:[R(cr,{onCountChange:()=>M(w.count-1),countIcon:"decrement",disabled:w.count===1}),R(cr,{onCountChange:()=>M(w.count+1),countIcon:"increment"})]})]}),Array.isArray(u)&&u.length>0?R("div",{css:L`
|
|
58
58
|
flex-grow: 1;
|
|
59
|
-
${
|
|
59
|
+
${ze("md")} {
|
|
60
60
|
width: 33.333333%;
|
|
61
61
|
}
|
|
62
|
-
`,children:R(
|
|
62
|
+
`,children:R(Ae,{id:"sort",name:"sort",label:"Sort",value:w.sort,onChange:g=>b({sort:g.target.value}),options:[{value:"",label:"Select a sort"},...u.map(g=>({value:g.sortKey,label:g.name}))]})}):null,Array.isArray(s)&&s.length>0?R("div",{css:L`
|
|
63
63
|
flex-grow: 1;
|
|
64
|
-
`,children:R(
|
|
64
|
+
`,children:R(Ae,{id:"sort-order",name:"sort-order",label:"Sort Order",value:w.sortOrder,onChange:g=>b({sortOrder:g.target.value}),options:s.map(g=>({value:g.sortOrderKey,label:g.name}))})}):null]}),fe("div",{children:[R("h3",{css:L`
|
|
65
65
|
font-size: var(--fs-md);
|
|
66
66
|
line-height: var(--spacing-md);
|
|
67
67
|
font-weight: var(--fw-bold);
|
|
68
68
|
margin-bottom: var(--spacing-xs);
|
|
69
|
-
`,children:"Result Preview"}),R(
|
|
69
|
+
`,children:"Result Preview"}),R(mr,{products:(q=me.value)==null?void 0:q.products})]})]})})};function pr(e,t){var n;let o=[],a=t?`${t.name} > `:"",r={id:e.id.toString(),name:`${a}${e.name}`};return o.push(r),(n=e.children)==null||n.forEach(i=>{let l=pr(i,r);o.push(...l)}),o}function cr({onCountChange:e,countIcon:t,disabled:o}){return R("button",{css:L`
|
|
70
70
|
width: 2.25rem;
|
|
71
71
|
height: 2.25rem;
|
|
72
72
|
border: 1px solid var(--gray-300);
|
|
@@ -78,17 +78,17 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
78
78
|
&:hover {
|
|
79
79
|
background-color: var(--gray-200);
|
|
80
80
|
}
|
|
81
|
-
${
|
|
81
|
+
${o?L`
|
|
82
82
|
cursor: not-allowed;
|
|
83
83
|
opacity: 0.3;
|
|
84
84
|
`:""}
|
|
85
|
-
`,onClick:e,disabled:
|
|
85
|
+
`,onClick:e,disabled:o,children:t==="increment"?R(Be,{css:L`
|
|
86
86
|
width: 1rem;
|
|
87
87
|
height: 1rem;
|
|
88
|
-
`}):R(
|
|
88
|
+
`}):R(Ue,{css:L`
|
|
89
89
|
width: 1rem;
|
|
90
90
|
height: 1rem;
|
|
91
|
-
`})})}var
|
|
91
|
+
`})})}var ur=Xo.createContext(void 0),gr=()=>{let e=Jo(ur);if(!e)throw new Error("useProductQueryContext must be used within a <ProductQueryContext> provider");return e};import{css as K}from"@emotion/react";var fr=K`
|
|
92
92
|
align-items: center;
|
|
93
93
|
background: var(--white);
|
|
94
94
|
border-radius: var(--rounded-base);
|
|
@@ -103,65 +103,65 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
103
103
|
&:hover {
|
|
104
104
|
background: var(--gray-50);
|
|
105
105
|
}
|
|
106
|
-
`,
|
|
106
|
+
`,vr=K`
|
|
107
107
|
font-size: var(--fs-sm);
|
|
108
|
-
`,
|
|
108
|
+
`,hr=K`
|
|
109
109
|
width: 1rem;
|
|
110
110
|
height: 1rem;
|
|
111
|
-
`,
|
|
111
|
+
`,at=K`
|
|
112
112
|
margin-right: var(--spacing-lg);
|
|
113
113
|
font-size: var(--fs-sm);
|
|
114
|
-
`,
|
|
114
|
+
`,br=K`
|
|
115
115
|
border: 1px solid var(--gray-200);
|
|
116
116
|
border-radius: var(--rounded-md);
|
|
117
117
|
background: var(--gray-50);
|
|
118
118
|
margin: var(--spacing-base) 0;
|
|
119
|
-
`,
|
|
119
|
+
`,yr=K`
|
|
120
120
|
align-items: center;
|
|
121
121
|
display: flex;
|
|
122
122
|
flex-grow: 1;
|
|
123
123
|
gap: var(--spacing-base);
|
|
124
124
|
padding: var(--spacing-sm);
|
|
125
125
|
margin-right: var(--spacing-sm);
|
|
126
|
-
`,
|
|
126
|
+
`,xr=K`
|
|
127
127
|
background: var(--gray-200);
|
|
128
128
|
width: 3.5rem;
|
|
129
129
|
height: 3.5rem;
|
|
130
130
|
object-fit: cover;
|
|
131
|
-
`,
|
|
131
|
+
`,wr=K`
|
|
132
132
|
background: var(--gray-100);
|
|
133
133
|
height: 3.5rem;
|
|
134
134
|
width: 3.5rem;
|
|
135
|
-
`,
|
|
135
|
+
`,Sr=K`
|
|
136
136
|
margin-top: 0;
|
|
137
137
|
font-weight: var(--fw-bold);
|
|
138
138
|
font-size: var(--fs-sm);
|
|
139
139
|
width: calc(100% / 3);
|
|
140
|
-
`,
|
|
140
|
+
`,Cr=K`
|
|
141
141
|
display: block;
|
|
142
142
|
font-weight: var(--fw-regular);
|
|
143
|
-
`;import{Fragment as
|
|
143
|
+
`;import{Fragment as Pr,jsx as re,jsxs as te}from"@emotion/react/jsx-runtime";var mr=({products:e})=>{let{categories:t,logoIcon:o}=gr();return te(Pr,{children:[te("p",{css:Rr`
|
|
144
144
|
margin-bottom: var(--spacing-base);
|
|
145
|
-
`,children:["Matching ",(e==null?void 0:e.length)||0," products"]}),re("ul",{css:[
|
|
145
|
+
`,children:["Matching ",(e==null?void 0:e.length)||0," products"]}),re("ul",{css:[Rr`
|
|
146
146
|
max-height: 24rem;
|
|
147
147
|
overflow-x: auto;
|
|
148
|
-
`,
|
|
148
|
+
`,tn],children:e==null?void 0:e.map((a,r)=>{var l,d;let[n]=(a==null?void 0:a.categories)||[],i=typeof n=="undefined"||!t||(l=t.find(u=>u.id===n.id))==null?void 0:l.name;return re("li",{css:br,children:te("div",{css:yr,"data-test-id":`product-item-${a.sku||a.id}`,children:[a.thumbnailUrl?re("img",{src:a.thumbnailUrl,alt:typeof a.title=="string"?a.title:a.name||`Product ${r}`,css:xr,"data-test-id":"product-image"}):re("div",{css:wr}),te("h4",{css:Sr,"data-test-id":"product-name",children:[a.title||a.name,i&&re("span",{css:Cr,children:i})]}),a&&te(Pr,{children:[te("p",{css:at,"data-test-id":"product-sku",children:["SKU: ",a.sku||a.id,re("br",{})]}),a.price!==void 0?te("p",{css:at,"data-test-id":"product-price",children:["Price: ",a.price]}):null,a.editLink||a.url?te("a",{css:fr,href:(d=a.editLink)!=null?d:a.url,title:`Go to ${a.title||a.name}`,target:"_blank",rel:"noopener noreferrer","data-test-id":"edit-product-button",children:[re("span",{css:vr,children:"Edit"}),o?re(W,{src:o,alt:"Logo",css:hr}):null]}):null]})]})},`product-${a.id}`)})})]})};import{Callout as En}from"@uniformdev/design-system";import Mn,{useContext as Un,useMemo as Bn,useRef as An}from"react";import{useAsync as zn,useAsyncFn as qn}from"react-use";import{css as Dr}from"@emotion/react";import{useEffect as rn,useRef as Vr,useState as an}from"react";import{css as le}from"@emotion/react";var kr=le`
|
|
149
149
|
cursor: pointer;
|
|
150
150
|
padding: var(--spacing-sm);
|
|
151
151
|
position: relative;
|
|
152
152
|
transition: background-color var(--duration-fast) var(--timing-ease-out),
|
|
153
153
|
color var(--duration-fast) var(--timing-ease-out);
|
|
154
|
-
`,
|
|
154
|
+
`,Tr=le`
|
|
155
155
|
padding-right: var(--spacing-lg);
|
|
156
|
-
`,
|
|
156
|
+
`,Lr=le`
|
|
157
157
|
background: var(--brand-secondary-3);
|
|
158
158
|
color: var(--white);
|
|
159
|
-
`,
|
|
159
|
+
`,ot=le`
|
|
160
160
|
font-size: var(--fs-xs);
|
|
161
|
-
`,
|
|
161
|
+
`,nt=le`
|
|
162
162
|
font-weight: var(--fw-bold);
|
|
163
163
|
margin-right: var(--spacing-sm);
|
|
164
|
-
`,
|
|
164
|
+
`,_r=le`
|
|
165
165
|
background: var(--white);
|
|
166
166
|
border-left: 4px solid var(--brand-secondary-3);
|
|
167
167
|
border-radius: var(--rounded-base);
|
|
@@ -173,20 +173,20 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
173
173
|
right: var(--spacing-xl);
|
|
174
174
|
z-index: var(--z-10);
|
|
175
175
|
width: max-content;
|
|
176
|
-
`,
|
|
176
|
+
`,Ir=le`
|
|
177
177
|
position: absolute;
|
|
178
178
|
inset: 0 var(--spacing-sm) 0 auto;
|
|
179
|
-
`;import{Fragment as
|
|
179
|
+
`;import{Fragment as on,jsx as Er,jsxs as de}from"@emotion/react/jsx-runtime";var Mr=({result:e,isSelected:t,triggerSelection:o})=>{let a=Vr(null),r=Vr(null),[n,i]=an(!1);rn(()=>{function d(u){a.current&&!a.current.contains(u.target)&&r.current&&!r.current.contains(u.target)&&i(!1)}return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[r]);let l=d=>{d.stopPropagation(),i(!n)};return de("div",{css:[kr,t?Lr:void 0,e.popoverData?Tr:void 0],"data-value":e.id,role:"option",tabIndex:-1,onClick:()=>o(),children:[e.title,e.popoverData&&t?de(on,{children:[Er("button",{type:"button",ref:a,css:Ir,"aria-controls":"path-details",onClick:d=>l(d),"aria-expanded":n,children:Er(Me,{width:24,height:24})}),de("div",{id:"path-details","aria-hidden":!n,ref:r,css:[_r,n?Dr`
|
|
180
180
|
visibility: visible;
|
|
181
|
-
`:
|
|
181
|
+
`:Dr`
|
|
182
182
|
visibility: hidden;
|
|
183
|
-
`],children:[e.metadata&&Object.entries(e.metadata).map(([d,
|
|
183
|
+
`],children:[e.metadata&&Object.entries(e.metadata).map(([d,u],s)=>de("div",{css:ot,children:[de("span",{css:nt,children:[d,":"]}),u]},s)),Object.entries(e.popoverData).map(([d,u],s)=>de("div",{css:ot,children:[de("span",{css:nt,children:[d,":"]}),u]},s))]})]}):null]},e.id)};import{css as ae}from"@emotion/react";import{Icon as Nr}from"@uniformdev/design-system";import{useEffect as sn,useRef as $r,useState as ln}from"react";import{CgClose as dn,CgInfo as cn}from"react-icons/cg";import{format as pn}from"timeago.js";function He(e,t){let o=window.open(e,"_blank"),a=setInterval(()=>{o!=null&&o.closed&&(clearInterval(a),t())},500)}import{css as O}from"@emotion/react";import{mq as nn}from"@uniformdev/design-system";var Ur=O`
|
|
184
184
|
border: 1px solid var(--gray-200);
|
|
185
185
|
background: var(--gray-50);
|
|
186
186
|
border-radius: var(--rounded-base);
|
|
187
187
|
display: flex;
|
|
188
188
|
width: 100%;
|
|
189
|
-
`,
|
|
189
|
+
`,Br=O`
|
|
190
190
|
align-items: center;
|
|
191
191
|
display: flex;
|
|
192
192
|
flex-grow: 1;
|
|
@@ -194,22 +194,22 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
194
194
|
margin-inline: 0 var(--spacing-sm);
|
|
195
195
|
padding: var(--spacing-base) var(--spacing-base) var(--spacing-base) var(--spacing-lg);
|
|
196
196
|
position: relative;
|
|
197
|
-
`,
|
|
197
|
+
`,Ar=O`
|
|
198
198
|
flex-grow: 1;
|
|
199
|
-
`,
|
|
199
|
+
`,zr=O`
|
|
200
200
|
align-items: start;
|
|
201
201
|
display: inline-flex;
|
|
202
202
|
position: relative;
|
|
203
|
-
`,
|
|
203
|
+
`,qr=O`
|
|
204
204
|
color: var(--brand-secondary-1);
|
|
205
205
|
font-size: var(--fs-base);
|
|
206
206
|
font-weight: var(--fw-bold);
|
|
207
207
|
line-height: 1;
|
|
208
208
|
margin: 0;
|
|
209
|
-
`,
|
|
209
|
+
`,Hr=O`
|
|
210
210
|
width: 1.5rem;
|
|
211
211
|
height: 1.5rem;
|
|
212
|
-
`,
|
|
212
|
+
`,Gr=O`
|
|
213
213
|
background: var(--white);
|
|
214
214
|
border-radius: var(--rounded-base);
|
|
215
215
|
border-left: 4px solid var(--brand-secondary-3);
|
|
@@ -218,22 +218,22 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
218
218
|
padding: var(--spacing-base);
|
|
219
219
|
z-index: var(--z-10);
|
|
220
220
|
width: max-content;
|
|
221
|
-
`,
|
|
221
|
+
`,ce=O`
|
|
222
222
|
font-size: var(--fs-sm);
|
|
223
|
-
`,
|
|
223
|
+
`,Le=O`
|
|
224
224
|
font-weight: var(--fw-bold);
|
|
225
225
|
margin-right: var(--spacing-sm);
|
|
226
|
-
`,
|
|
226
|
+
`,Or=O`
|
|
227
227
|
display: flex;
|
|
228
228
|
flex-direction: column;
|
|
229
229
|
gap: var(--spacing-sm);
|
|
230
230
|
|
|
231
|
-
${
|
|
231
|
+
${nn("md")} {
|
|
232
232
|
flex-direction: row;
|
|
233
233
|
min-width: 200px;
|
|
234
234
|
justify-content: end;
|
|
235
235
|
}
|
|
236
|
-
`,
|
|
236
|
+
`,it=O`
|
|
237
237
|
align-items: center;
|
|
238
238
|
background: var(--white);
|
|
239
239
|
border-radius: var(--rounded-base);
|
|
@@ -248,29 +248,29 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
248
248
|
&:hover {
|
|
249
249
|
background: var(--gray-50);
|
|
250
250
|
}
|
|
251
|
-
`;import{Fragment as
|
|
251
|
+
`;import{Fragment as un,jsx as Q,jsxs as _}from"@emotion/react/jsx-runtime";var Fr=({selectedItem:e,logoIcon:t,onDeselect:o,onEditClosed:a})=>{var u;let r=$r(null),n=$r(null),[i,l]=ln(!1);sn(()=>{let s=h=>{r.current&&!r.current.contains(h.target)&&n.current&&!n.current.contains(h.target)&&l(!1)},p=()=>{l(!1)};return window.addEventListener("resize",p,!0),document.addEventListener("scroll",s,!0),document.addEventListener("mousedown",s),()=>{window.removeEventListener("resize",p,!0),document.removeEventListener("scroll",s,!0),document.removeEventListener("mousedown",s)}},[n]);let d=()=>{var s;if(l(!i),n.current&&r.current){let p=(s=r==null?void 0:r.current)==null?void 0:s.getBoundingClientRect(),h=n.current.offsetWidth;n.current.style.top=`${p.top+30}px`,n.current.style.left=`${p.left-h+30}px`}};return Q("div",{css:Ur,children:_("div",{css:Br,children:[_("div",{css:Ar,children:[_("div",{css:zr,children:[Q("h4",{css:[qr,e.popoverData?ae`
|
|
252
252
|
margin-bottom: var(--spacing-sm);
|
|
253
|
-
`:""],title:`ID: ${e.id}`,"data-test-id":"entry-id",children:e.title||e.id||""}),e.popoverData?_(
|
|
253
|
+
`:""],title:`ID: ${e.id}`,"data-test-id":"entry-id",children:e.title||e.id||""}),e.popoverData?_(un,{children:[Q("button",{type:"button",ref:r,css:ae`
|
|
254
254
|
margin: calc(var(--spacing-xs) * -1) 0 calc(var(--spacing-xs) * -1) var(--spacing-sm);
|
|
255
|
-
`,"aria-controls":"path-details","aria-expanded":i,onClick:d,children:
|
|
255
|
+
`,"aria-controls":"path-details","aria-expanded":i,onClick:d,children:Q(Nr,{icon:cn,iconColor:"gray",size:24,css:ae`
|
|
256
256
|
opacity: var(--opacity-75);
|
|
257
|
-
`})}),
|
|
257
|
+
`})}),Q("div",{id:"path-details","aria-hidden":!i,ref:n,css:[Gr,i?ae`
|
|
258
258
|
visibility: visible;
|
|
259
259
|
`:ae`
|
|
260
260
|
visibility: hidden;
|
|
261
|
-
`],children:Object.entries(e.popoverData).map(([s,p],h)=>_("div",{css:
|
|
261
|
+
`],children:Object.entries(e.popoverData).map(([s,p],h)=>_("div",{css:ce,children:[_("span",{css:Le,children:[s,":"]}),p]},h))})]}):null]}),e.createdDate&&_("div",{css:ce,children:[Q("span",{css:Le,children:"Created:"}),pn((u=e.createdDate)!=null?u:0)]}),e.metadata?Object.entries(e.metadata).filter(([s])=>["type","status"].includes(s.toLocaleLowerCase())).map(([s,p])=>_("div",{css:[ce,ae`
|
|
262
262
|
order: 1;
|
|
263
|
-
`],children:[_("span",{css:
|
|
263
|
+
`],children:[_("span",{css:Le,children:[s,":"]}),p]},s)):null,e.metadata?Object.entries(e.metadata).filter(([s])=>!["type","status"].includes(s.toLocaleLowerCase())).map(([s,p])=>_("div",{css:[ce,ae`
|
|
264
264
|
order: 1;
|
|
265
|
-
`],children:[_("span",{css:[
|
|
265
|
+
`],children:[_("span",{css:[Le,ae`
|
|
266
266
|
order: 1;
|
|
267
|
-
`],children:[s,":"]}),p]},s)):null]}),_("div",{css:
|
|
267
|
+
`],children:[s,":"]}),p]},s)):null]}),_("div",{css:Or,children:[e.editLink?_("a",{href:e.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",onClick:s=>{a&&(He(s.currentTarget.href,()=>a(e)),s.preventDefault())},css:it,children:[Q("span",{css:ce,children:"Edit"}),Q(W,{src:t,css:Hr,alt:"Logo"})]}):null,_("button",{type:"button",onClick:()=>{o(e)},css:it,children:[Q("span",{css:ce,children:"Unlink"}),Q(Nr,{icon:dn,iconColor:"red",size:16})]})]})]})},e.id)};import{css as Y}from"@emotion/react";import{Button as dt,Callout as fn,InputKeywordSearch as vn,InputSelect as hn,LoadingIndicator as bn,LoadingOverlay as yn,Menu as xn,MenuItem as wn,scrollbarStyles as Sn}from"@uniformdev/design-system";import*as Z from"react";import{DragDropContext as Cn,Draggable as Rn,Droppable as Pn}from"react-beautiful-dnd";import{useDebounce as kn}from"react-use";import{v4 as Tn}from"uuid";import{useEffect as Wr,useRef as gn,useState as mn}from"react";function Kr(e,{delay:t=500,minDuration:o=200}={delay:500,minDuration:200}){let[a,r]=mn("IDLE"),n=gn(void 0);return Wr(()=>{e&&a==="IDLE"&&(clearTimeout(n.current),n.current=setTimeout(()=>{if(!e)return r("IDLE");n.current=setTimeout(()=>{r("EXPIRE")},o),r("DISPLAY")},t),r("DELAY")),!e&&a!=="DISPLAY"&&(clearTimeout(n.current),r("IDLE"))},[e,a,t,o]),Wr(()=>()=>clearTimeout(n.current),[]),a==="DISPLAY"||a==="EXPIRE"}import{css as k}from"@emotion/react";var Qr=k`
|
|
268
268
|
background: var(--white);
|
|
269
269
|
border: 1px solid var(--gray-300);
|
|
270
270
|
border-radius: var(--rounded-base);
|
|
271
271
|
padding: calc(var(--spacing-base) - 0.25rem) var(--spacing-sm);
|
|
272
272
|
margin-bottom: var(--spacing-base);
|
|
273
|
-
|
|
273
|
+
`,Yr=k`
|
|
274
274
|
align-items: center;
|
|
275
275
|
display: flex;
|
|
276
276
|
position: relative;
|
|
@@ -278,7 +278,7 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
278
278
|
width: 100%;
|
|
279
279
|
background-color: transparent;
|
|
280
280
|
border: 0;
|
|
281
|
-
`,
|
|
281
|
+
`,Zr=k`
|
|
282
282
|
color: var(--brand-secondary-1);
|
|
283
283
|
display: block;
|
|
284
284
|
font-weight: var(--fw-bold);
|
|
@@ -294,15 +294,15 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
294
294
|
background: var(--gray-100);
|
|
295
295
|
outline: none;
|
|
296
296
|
}
|
|
297
|
-
`,
|
|
297
|
+
`,Xr=k`
|
|
298
298
|
background: var(--white);
|
|
299
299
|
border: 1px solid var(--gray-300);
|
|
300
300
|
border-radius: var(--rounded-base);
|
|
301
301
|
padding: calc(var(--spacing-base) - 0.25rem) var(--spacing-base);
|
|
302
302
|
display: block;
|
|
303
|
-
`,
|
|
303
|
+
`,Jr=k`
|
|
304
304
|
display: none;
|
|
305
|
-
`,
|
|
305
|
+
`,jr=k`
|
|
306
306
|
overflow-y: auto;
|
|
307
307
|
height: 16rem;
|
|
308
308
|
margin-bottom: var(--spacing-base);
|
|
@@ -311,26 +311,26 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
311
311
|
& > :not(:last-child) {
|
|
312
312
|
border-bottom: 1px solid var(--gray-200);
|
|
313
313
|
}
|
|
314
|
-
`,
|
|
314
|
+
`,Sd=k`
|
|
315
315
|
background-color: var(--gray-50);
|
|
316
316
|
max-width: 33.33%;
|
|
317
|
-
`,
|
|
317
|
+
`,ea=k`
|
|
318
318
|
align-items: center;
|
|
319
319
|
display: flex;
|
|
320
320
|
position: absolute;
|
|
321
321
|
inset: 0 0 0 auto;
|
|
322
322
|
pointer-events: none;
|
|
323
323
|
padding-right: var(--spacing-sm);
|
|
324
|
-
`,
|
|
324
|
+
`,ta=k`
|
|
325
325
|
color: var(--brand-secondary-1);
|
|
326
326
|
width: 1.25rem;
|
|
327
327
|
height: 1.25rem;
|
|
328
328
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
329
329
|
transform: rotate(0);
|
|
330
|
-
`,
|
|
330
|
+
`,Cd=k`
|
|
331
331
|
background: var(--white);
|
|
332
332
|
color: var(--brand-secondary-1);
|
|
333
|
-
`,
|
|
333
|
+
`,ra=k`
|
|
334
334
|
position: relative;
|
|
335
335
|
margin-block: var(--spacing-sm) 0;
|
|
336
336
|
|
|
@@ -342,96 +342,96 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
342
342
|
left: auto !important;
|
|
343
343
|
top: auto !important;
|
|
344
344
|
}
|
|
345
|
-
`,
|
|
345
|
+
`,aa=k`
|
|
346
346
|
align-items: center;
|
|
347
347
|
display: flex;
|
|
348
348
|
position: absolute;
|
|
349
349
|
inset: 0 auto 0 0;
|
|
350
350
|
margin-block: auto;
|
|
351
351
|
opacity: 0;
|
|
352
|
-
`,
|
|
352
|
+
`,st=k`
|
|
353
353
|
color: var(--brand-secondary-1);
|
|
354
|
-
`,
|
|
354
|
+
`,oa=k`
|
|
355
355
|
position: absolute;
|
|
356
356
|
left: 0.375rem;
|
|
357
|
-
`,
|
|
357
|
+
`,lt=k`
|
|
358
358
|
width: calc(var(--spacing-lg) + var(--spacing-xs));
|
|
359
359
|
height: calc(var(--spacing-lg) + var(--spacing-xs));
|
|
360
|
-
`;import{Fragment as
|
|
360
|
+
`;import{Fragment as _n,jsx as x,jsxs as N}from"@emotion/react/jsx-runtime";var Ln=({searchText:e,selectedContentType:t})=>{let o="No content found";return t&&t!=="any"&&(o=`No ${t} content was found`),e&&(o=`${o} for keyword '${e}'.`),x(fn,{type:"info",children:o})},na=({search:e,results:t,contentTypes:o,selectedItems:a,logoIcon:r,select:n,multiSelect:i,multiSelectId:l,rowComponent:d,selectedItemComponent:u,totalResults:s,cursor:p,resultsLoading:h,requireContentType:f,onAddNew:C,onEditClosed:b,onCancel:w,noResultsComponent:me,helpComponent:Ce,onSort:F,typeSelectorLabel:j="Content Type Select",typeSelectorAllTypesOptionText:J="All content types",loadingIndicatorDelay:Re=1e3})=>{var Dt,Vt,Et;let ie=()=>f?Array.isArray(o)&&o.length>0?o[0].id:"":"any",[M,U]=Z.useState(""),[v,q]=Z.useState(ie),[g,G]=Z.useState(!1),[P,se]=Z.useState([]),[vo,Tt]=Z.useState(!1),Xe=Z.useRef(`x${Tn()}`);kn(()=>{e(M,{count:5,offset:0,contentType:v==="any"?void 0:v})},300,[M,v]);let ho=Kr(h,{delay:Re}),bo=m=>{P.some(S=>S.id===m.id)?se(S=>S.filter(ee=>ee.id!==m.id)):se(i?S=>[...S,m]:[m])},yo=a==null?void 0:a.map(m=>m.id+m.title).join(",");Z.useEffect(()=>{Array.isArray(a)&&se(a)},[yo]);let xo=()=>{q(ie()),U(""),se(a!=null&&a.length?a:[])},wo=()=>{G(m=>!m),g||xo()},Lt=m=>{let S=(P==null?void 0:P.filter(ee=>ee.id!==m.id))||[];se(S),n(S,"")},So=m=>{m.preventDefault(),n(P,v),G(!1)},Co=m=>{m.preventDefault(),G(!1),w&&w()},Ro=()=>{e(M,{count:5,offset:(t==null?void 0:t.length)||0,contentType:v==="any"?void 0:v,cursor:p}),Tt(!0);let m=setTimeout(()=>{Tt(!1)},750);return()=>clearTimeout(m)},Po=!(a==null?void 0:a.length)||i,ko=d||Mr,_t=u||Fr,To=me||Ln,It=r&&typeof r!="string"?r:null,Lo=It?x(It,{css:lt}):x("img",{src:r,alt:"Logo",css:lt}),_o=m=>{var S,ee;if(m.destination&&m.source.droppableId===((S=m.destination)==null?void 0:S.droppableId)){let B=[...a||[]],[Je]=(ee=B==null?void 0:B.splice(m.source.index,1))!=null?ee:[];return B==null||B.splice(m.destination.index,0,Je),F&&(se(B),F==null||F(B)),B}};return x("div",{css:Y`
|
|
361
361
|
width: 100%;
|
|
362
|
-
`,children:
|
|
362
|
+
`,children:N("div",{css:Y`
|
|
363
363
|
position: relative;
|
|
364
364
|
margin-block: var(--spacing-base);
|
|
365
|
-
`,children:[
|
|
365
|
+
`,children:[Po?N(_n,{children:[x("div",{css:Qr,"data-test-id":"component-search",children:N("button",{css:Yr,onClick:wo,type:"button","aria-haspopup":!0,"aria-expanded":g,"aria-controls":`entry-search-config-${Xe.current}`,children:[Lo,x("span",{css:Y`
|
|
366
366
|
margin-left: var(--spacing-base);
|
|
367
|
-
`,children:"Select"}),x("span",{css:
|
|
367
|
+
`,children:"Select"}),x("span",{css:ea,children:x(Ee,{css:[ta,g?Y`
|
|
368
368
|
transform: rotate(180deg);
|
|
369
|
-
`:void 0]})})]})}),
|
|
369
|
+
`:void 0]})})]})}),N("div",{id:`entry-search-config-${Xe.current}`,"aria-hidden":!g,css:[Xr,g?void 0:Jr],children:[Ce||null,N("div",{css:Y`
|
|
370
370
|
display: flex;
|
|
371
371
|
gap: calc(var(--spacing-base) - 0.25rem);
|
|
372
372
|
margin-bottom: var(--spacing-base);
|
|
373
|
-
`,children:[x(
|
|
373
|
+
`,children:[x(hn,{onChange:m=>q(m.target.value),value:v,label:j,showLabel:!1,options:[...f?[]:[{value:"any",label:J}],...o?o.map(m=>({value:m.id,label:m.name})):[]]}),x("div",{css:Y`
|
|
374
374
|
flex-grow: 1;
|
|
375
|
-
`,children:x(
|
|
375
|
+
`,children:x(vn,{inputFieldName:"searchText",placeholder:"Enter keyword to narrow your results",onSearchTextChanged:U,disabledFieldSubmission:!0,value:M})})]}),N("div",{css:[jr,Sn],id:Xe.current,role:"listbox",tabIndex:0,"data-test-id":"entry-list",children:[x(yn,{isActive:ho}),Array.isArray(t)&&t.length>0?t.map(m=>x(ko,{isSelected:P.some(S=>S.id===m.id),result:m,triggerSelection:()=>bo(m)},m.id)):h?null:x(To,{searchText:M||M,selectedContentType:(Vt=(Dt=o==null?void 0:o.find(m=>m.id===v))==null?void 0:Dt.name)!=null?Vt:v}),!h&&typeof s!="undefined"&&t&&(t==null?void 0:t.length)<s&&x("button",{type:"button",css:Zr,onClick:Ro,children:vo?x(bn,{}):"Load More"})]}),N("div",{css:Y`
|
|
376
376
|
display: flex;
|
|
377
377
|
justify-content: space-between;
|
|
378
|
-
`,children:[x("div",{children:C&&((
|
|
378
|
+
`,children:[x("div",{children:C&&((Et=o==null?void 0:o.length)!=null?Et:0)>0?x(xn,{menuLabel:"Add new menu",menuTrigger:x(dt,{buttonType:"secondary",children:"Add New"}),children:o==null?void 0:o.map(m=>x(wn,{css:Y`
|
|
379
379
|
background: var(--white);
|
|
380
380
|
color: var(--brand-secondary-1);
|
|
381
|
-
`,onClick:()=>C(
|
|
381
|
+
`,onClick:()=>C(m),children:m.name},m.id))}):null}),N("div",{css:Y`
|
|
382
382
|
display: flex;
|
|
383
383
|
gap: var(--spacing-base);
|
|
384
|
-
`,children:[x(
|
|
384
|
+
`,children:[x(dt,{buttonType:"unimportant",onClick:Co,children:"Cancel"}),x(dt,{disabled:!P.length,onClick:So,"data-test-id":"entry-accept-button",children:"Accept"})]})]})]})]}):null,g?null:i&&P.length>1?x(Cn,{onDragEnd:m=>_o(m),children:x(Pn,{droppableId:l||"canvas-multi-select",children:m=>N("div",{...m.droppableProps,ref:m.innerRef,css:Y`
|
|
385
385
|
margin-block: var(--spacing-sm) 0;
|
|
386
|
-
`,children:[P==null?void 0:P.map((S,ee)=>{if(S!=null&&S.id)return x(
|
|
386
|
+
`,children:[P==null?void 0:P.map((S,ee)=>{if(S!=null&&S.id)return x(Rn,{draggableId:S.id,index:ee,children:(B,Je)=>N("div",{css:ra,ref:B.innerRef,"data-dragging":Je.isDragging,...B.draggableProps,...B.dragHandleProps,children:[N("span",{css:aa,children:[x(ke,{css:[st,oa],width:24,height:24}),x(ke,{css:st,width:24,height:24})]}),x(_t,{logoIcon:r,selectedItem:S,onDeselect:je=>Lt(je),onEditClosed:b?je=>b(je):void 0},`selected-item-${S.id}`)]})},S.id)}),m.placeholder]})})}):P==null?void 0:P.map(m=>x(_t,{logoIcon:r,selectedItem:m,onDeselect:S=>Lt(S),onEditClosed:b?S=>b(S):void 0},`selected-item-${m.id}`))]})})};import{css as ga}from"@emotion/react";import{css as pe}from"@emotion/react";var ia=pe`
|
|
387
387
|
cursor: pointer;
|
|
388
388
|
padding: var(--spacing-sm) 0;
|
|
389
389
|
margin-right: var(--spacing-sm);
|
|
390
390
|
position: relative;
|
|
391
391
|
transition: background-color var(--duration-fast) var(--timing-ease-out),
|
|
392
392
|
color var(--duration-fast) var(--timing-ease-out);
|
|
393
|
-
`,
|
|
393
|
+
`,sa=pe`
|
|
394
394
|
border: 2px solid transparent;
|
|
395
395
|
border-radius: var(--rounded-base);
|
|
396
396
|
display: flex;
|
|
397
397
|
align-items: center;
|
|
398
398
|
gap: var(--spacing-base);
|
|
399
399
|
padding: var(--spacing-sm) var(--spacing-xs);
|
|
400
|
-
`,
|
|
400
|
+
`,la=pe`
|
|
401
401
|
background-color: var(--green-50);
|
|
402
|
-
`,
|
|
402
|
+
`,da=pe`
|
|
403
403
|
font-size: var(--fs-sm);
|
|
404
404
|
font-weight: var(--fw-bold);
|
|
405
405
|
width: 50%;
|
|
406
|
-
`,
|
|
406
|
+
`,ca=pe`
|
|
407
407
|
font-weight: var(--fw-normal);
|
|
408
408
|
display: block;
|
|
409
|
-
`,
|
|
409
|
+
`,pa=pe`
|
|
410
410
|
font-size: var(--fs-sm);
|
|
411
411
|
> * {
|
|
412
412
|
display: block;
|
|
413
413
|
}
|
|
414
|
-
`,
|
|
414
|
+
`,ua=pe`
|
|
415
415
|
display: block;
|
|
416
416
|
height: 1.5rem;
|
|
417
417
|
width: 1.5rem;
|
|
418
418
|
color: var(--brand-secondary-3);
|
|
419
419
|
margin-left: auto;
|
|
420
|
-
`;import{jsx as
|
|
420
|
+
`;import{jsx as ve,jsxs as ct}from"@emotion/react/jsx-runtime";function ma({result:e,isSelected:t,triggerSelection:o}){var l;let{categories:a,logoIcon:r}=Ge(),[n]=e.categories||[{id:"",name:""}],i=typeof n=="undefined"||!a||(l=a.find(d=>d.id===n.id))==null?void 0:l.name;return ve("div",{"data-value":e.id,role:"option",tabIndex:-1,onClick:()=>o(),css:[ia],children:ct("div",{css:[sa,t?la:void 0],children:[e.thumbnailUrl?ve("img",{src:e.thumbnailUrl,alt:`Thumbnail for ${e.title}`,css:ga`
|
|
421
421
|
background-color: var(--gray-200);
|
|
422
422
|
width: 3rem;
|
|
423
423
|
height: 3rem;
|
|
424
424
|
object-fit: cover;
|
|
425
|
-
`}):
|
|
425
|
+
`}):ve(W,{src:r,alt:"Logo",css:ga`
|
|
426
426
|
height: 2.25rem;
|
|
427
427
|
width: 2.25rem;
|
|
428
|
-
`}),
|
|
428
|
+
`}),ct("h4",{css:[da],children:[e.title,i?ve("span",{css:[ca],children:i}):null]}),ct("p",{css:[pa],children:["SKU: ",e.sku||e.id,e.price!==void 0?ve("span",{children:e.price}):null]}),t?ve(Ve,{css:[ua]}):null]})},e.id)}import{css as he}from"@emotion/react";import{Icon as In,mq as Dn}from"@uniformdev/design-system";import{CgClose as Vn}from"react-icons/cg";import{css as oe}from"@emotion/react";import{mq as fa}from"@uniformdev/design-system";var va=oe`
|
|
429
429
|
border: 1px solid var(--gray-200);
|
|
430
430
|
border-radius: var(--rounded-base);
|
|
431
431
|
background: var(--gray-50);
|
|
432
432
|
display: flex;
|
|
433
433
|
width: 100%;
|
|
434
|
-
`,
|
|
434
|
+
`,ha=oe`
|
|
435
435
|
align-items: center;
|
|
436
436
|
display: flex;
|
|
437
437
|
padding: var(--spacing-base) var(--spacing-base) var(--spacing-base) var(--spacing-lg);
|
|
@@ -439,22 +439,22 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
439
439
|
flex-grow: 1;
|
|
440
440
|
gap: var(--spacing-sm);
|
|
441
441
|
margin-inline: 0 var(--spacing-sm);
|
|
442
|
-
`,
|
|
442
|
+
`,ba=oe`
|
|
443
443
|
display: flex;
|
|
444
444
|
align-items: center;
|
|
445
445
|
gap: var(--spacing-sm);
|
|
446
446
|
flex-grow: 1;
|
|
447
447
|
|
|
448
|
-
${
|
|
448
|
+
${fa("lg")} {
|
|
449
449
|
width: 50%;
|
|
450
450
|
margin-bottom: 0;
|
|
451
451
|
}
|
|
452
|
-
`,
|
|
452
|
+
`,pt=oe`
|
|
453
453
|
background-color: var(--gray-200);
|
|
454
454
|
width: 3.5rem;
|
|
455
455
|
height: 3.5rem;
|
|
456
456
|
object-fit: cover;
|
|
457
|
-
`,
|
|
457
|
+
`,ut=oe`
|
|
458
458
|
align-items: center;
|
|
459
459
|
background: var(--white);
|
|
460
460
|
border-radius: var(--rounded-base);
|
|
@@ -469,50 +469,50 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
469
469
|
&:hover {
|
|
470
470
|
background: var(--gray-50);
|
|
471
471
|
}
|
|
472
|
-
`,
|
|
472
|
+
`,gt=oe`
|
|
473
473
|
font-size: var(--fs-sm);
|
|
474
|
-
`,
|
|
474
|
+
`,ya=oe`
|
|
475
475
|
display: block;
|
|
476
476
|
width: 1rem;
|
|
477
477
|
height: 1rem;
|
|
478
|
-
`,
|
|
478
|
+
`,xa=oe`
|
|
479
479
|
display: flex;
|
|
480
480
|
flex-direction: column;
|
|
481
481
|
gap: var(--spacing-sm);
|
|
482
482
|
|
|
483
|
-
${
|
|
483
|
+
${fa("md")} {
|
|
484
484
|
flex-direction: row;
|
|
485
485
|
min-width: 200px;
|
|
486
486
|
justify-content: end;
|
|
487
487
|
}
|
|
488
|
-
`;import{jsx as
|
|
488
|
+
`;import{jsx as $,jsxs as X}from"@emotion/react/jsx-runtime";function wa({selectedItem:e,onDeselect:t}){var i;let{categories:o,logoIcon:a}=Ge(),[r]=e.categories||[{id:"",name:""}],n=typeof r=="undefined"||!o||(i=o.find(l=>l.id===r.id))==null?void 0:i.name;return $("div",{css:[va],children:X("article",{css:[ha],children:[X("div",{css:[ba],children:[e.thumbnailUrl?$("img",{src:e.thumbnailUrl,alt:n,css:[pt],loading:"lazy"}):$("div",{css:[pt]}),X("div",{css:he`
|
|
489
489
|
> :not(:last-child) {
|
|
490
490
|
margin-bottom: var(--spacing-xs);
|
|
491
491
|
}
|
|
492
|
-
`,children:[
|
|
492
|
+
`,children:[X("h4",{css:he`
|
|
493
493
|
margin-top: 0px;
|
|
494
494
|
font-weight: var(--fw-bold);
|
|
495
|
-
`,children:[e.title||e.id||"",
|
|
495
|
+
`,children:[e.title||e.id||"",n&&$("span",{css:he`
|
|
496
496
|
display: block;
|
|
497
497
|
font-weight: var(--fw-regular);
|
|
498
|
-
`,children:
|
|
498
|
+
`,children:n})]}),X("ul",{css:he`
|
|
499
499
|
font-size: var(--fs-sm);
|
|
500
500
|
|
|
501
|
-
${
|
|
501
|
+
${Dn("sm")} {
|
|
502
502
|
display: flex;
|
|
503
503
|
gap: var(--spacing-base);
|
|
504
504
|
}
|
|
505
|
-
`,children:[
|
|
505
|
+
`,children:[X("li",{children:[$("span",{css:he`
|
|
506
506
|
margin-right: var(--spacing-xs);
|
|
507
|
-
`,children:"SKU:"}),e.sku||e.id]}),e.price!==void 0?
|
|
507
|
+
`,children:"SKU:"}),e.sku||e.id]}),e.price!==void 0?X("li",{children:[$("span",{css:he`
|
|
508
508
|
margin-right: var(--spacing-xs);
|
|
509
|
-
`,children:"Price:"})
|
|
509
|
+
`,children:"Price:"}),$("span",{children:e.price})]}):null]})]})]}),X("div",{css:xa,children:[e.editLink?X("a",{href:e.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",css:ut,children:[$("span",{css:gt,children:"Edit"}),$(W,{src:a,alt:"Logo",css:ya})]}):null,X("button",{type:"button",onClick:()=>{t==null||t(e)},css:ut,children:[$("span",{css:gt,children:"Unlink"}),$(In,{icon:Vn,iconColor:"red",size:16})]})]})]})},e.id)}import{jsx as mt,jsxs as Hn}from"@emotion/react/jsx-runtime";function wc({selectedProducts:e,setSelectedProducts:t,onGetCategories:o,onSearchProducts:a,logoIcon:r,multiSelect:n,multiSelectId:i,selectedItemComponent:l,rowComponent:d,errorComponent:u,helpComponent:s,noResultsComponent:p,onSort:h,typeSelectorAllTypesOptionText:f="All categories",typeSelectorLabel:C="Select Category"}){var ie,M;let{value:b,loading:w,error:me}=zn(async()=>await o(),[o]),Ce=b==null?void 0:b.map(U=>U.id).join(","),F=Bn(()=>b?b.map(v=>({id:v.id,name:v.name})):void 0,[Ce]),j=An(),[J,Re]=qn(async(U,v)=>{let q=await a({text:U,options:{limit:v==null?void 0:v.count,offset:v==null?void 0:v.offset,categoryId:v==null?void 0:v.contentType,cursor:v==null?void 0:v.cursor}});return(v==null?void 0:v.offset)===0&&(j.current=[]),(j.current=j.current||[]).push(...q.products),q},[a]),De=async U=>{await t(U)};return me||J.error?mt(u||(({categoriesError:v,searchError:q})=>Hn(En,{type:"error",children:["There was an error: ",(v==null?void 0:v.message)||(q==null?void 0:q.message)]})),{categoriesError:me,searchError:J.error}):mt(Sa.Provider,{value:{categories:b,logoIcon:r},children:mt(na,{search:Re,results:j.current,logoIcon:r,selectedItems:e,select:De,multiSelectId:i||"product-search-multi-select",multiSelect:n,contentTypes:F,selectedItemComponent:l||wa,rowComponent:d||ma,totalResults:(ie=J.value)==null?void 0:ie.total,cursor:(M=J.value)==null?void 0:M.cursor,resultsLoading:J.loading||w,helpComponent:s,noResultsComponent:p,onSort:h,typeSelectorAllTypesOptionText:f,typeSelectorLabel:C})})}var Sa=Mn.createContext(void 0),Ge=()=>{let e=Un(Sa);if(!e)throw new Error("useProductSearchContext must be used within a <ProductSearchContext> provider");return e};import{css as ye}from"@emotion/react";import{Icon as Ea}from"@uniformdev/design-system";import{useEffect as On,useRef as Ma,useState as Nn}from"react";import{CgClose as $n,CgInfo as Fn}from"react-icons/cg";import{format as Wn}from"timeago.js";import{css as I}from"@emotion/react";import{mq as Gn}from"@uniformdev/design-system";var Ca=I`
|
|
510
510
|
border: 1px solid var(--gray-200);
|
|
511
511
|
background: var(--gray-50);
|
|
512
512
|
border-radius: var(--rounded-base);
|
|
513
513
|
display: flex;
|
|
514
514
|
width: 100%;
|
|
515
|
-
`,
|
|
515
|
+
`,Ra=I`
|
|
516
516
|
align-items: center;
|
|
517
517
|
display: flex;
|
|
518
518
|
flex-grow: 1;
|
|
@@ -520,23 +520,23 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
520
520
|
margin-inline: 0 var(--spacing-sm);
|
|
521
521
|
padding: var(--spacing-base) var(--spacing-base) var(--spacing-base) var(--spacing-lg);
|
|
522
522
|
position: relative;
|
|
523
|
-
`,
|
|
523
|
+
`,Pa=I`
|
|
524
524
|
flex-grow: 1;
|
|
525
|
-
`,
|
|
525
|
+
`,ka=I`
|
|
526
526
|
align-items: center;
|
|
527
527
|
display: flex;
|
|
528
528
|
position: relative;
|
|
529
|
-
`,
|
|
529
|
+
`,Ta=I`
|
|
530
530
|
color: var(--brand-secondary-1);
|
|
531
531
|
font-size: var(--fs-base);
|
|
532
532
|
font-weight: var(--fw-bold);
|
|
533
533
|
line-height: 1;
|
|
534
534
|
margin: 0;
|
|
535
535
|
word-break: break-word;
|
|
536
|
-
`,
|
|
536
|
+
`,La=I`
|
|
537
537
|
width: 1.5rem;
|
|
538
538
|
height: 1.5rem;
|
|
539
|
-
`,
|
|
539
|
+
`,_a=I`
|
|
540
540
|
background: var(--white);
|
|
541
541
|
border-radius: var(--rounded-base);
|
|
542
542
|
border-left: 4px solid var(--brand-secondary-3);
|
|
@@ -545,22 +545,22 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
545
545
|
padding: var(--spacing-base);
|
|
546
546
|
z-index: var(--z-10);
|
|
547
547
|
width: max-content;
|
|
548
|
-
`,
|
|
548
|
+
`,be=I`
|
|
549
549
|
font-size: var(--fs-sm);
|
|
550
|
-
`,
|
|
550
|
+
`,Oe=I`
|
|
551
551
|
font-weight: var(--fw-bold);
|
|
552
552
|
margin-right: var(--spacing-sm);
|
|
553
|
-
`,
|
|
553
|
+
`,Ia=I`
|
|
554
554
|
display: flex;
|
|
555
555
|
flex-direction: column;
|
|
556
556
|
gap: var(--spacing-sm);
|
|
557
557
|
|
|
558
|
-
${
|
|
558
|
+
${Gn("md")} {
|
|
559
559
|
flex-direction: row;
|
|
560
560
|
justify-content: end;
|
|
561
561
|
min-width: 200px;
|
|
562
562
|
}
|
|
563
|
-
`,
|
|
563
|
+
`,ft=I`
|
|
564
564
|
align-items: center;
|
|
565
565
|
background: var(--white);
|
|
566
566
|
border-radius: var(--rounded-base);
|
|
@@ -575,52 +575,52 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
575
575
|
&:hover {
|
|
576
576
|
background: var(--gray-50);
|
|
577
577
|
}
|
|
578
|
-
`,
|
|
578
|
+
`,Da=I`
|
|
579
579
|
display: flex;
|
|
580
580
|
margin-top: var(--spacing-sm);
|
|
581
581
|
gap: var(--spacing-sm);
|
|
582
|
-
`,
|
|
582
|
+
`,Va=I`
|
|
583
583
|
background: none;
|
|
584
584
|
outline: none;
|
|
585
585
|
border: none;
|
|
586
586
|
margin: calc(var(--spacing-xs) * -1) 0 calc(var(--spacing-xs) * -1) var(--spacing-sm);
|
|
587
|
-
`,
|
|
587
|
+
`,vt=I`
|
|
588
588
|
display: block;
|
|
589
589
|
max-width: 100%;
|
|
590
590
|
min-width: 100px;
|
|
591
591
|
height: auto;
|
|
592
|
-
`;import{Fragment as
|
|
592
|
+
`;import{Fragment as Qn,jsx as D,jsxs as V}from"@emotion/react/jsx-runtime";function zc({selectedItem:e,onDeselect:t,onEditClosed:o,logoIcon:a,itemDetailsRendererComponent:r}){let n=Ma(null),i=Ma(null),[l,d]=Nn(!1);On(()=>{let p=f=>{n.current&&!n.current.contains(f.target)&&i.current&&!i.current.contains(f.target)&&d(!1)},h=()=>{d(!1)};return window.addEventListener("resize",h,!0),document.addEventListener("scroll",p,!0),document.addEventListener("mousedown",p),()=>{window.removeEventListener("resize",h,!0),document.removeEventListener("scroll",p,!0),document.removeEventListener("mousedown",p)}},[i]);let u=()=>{var p;if(d(!l),i.current&&n.current){let h=(p=n==null?void 0:n.current)==null?void 0:p.getBoundingClientRect();i.current.style.top=`${h.top+30}px`}},s=r!=null?r:Kn;return D("div",{css:[Ca,ye`
|
|
593
593
|
margin: 0 0 1rem 0;
|
|
594
|
-
`],children:V("div",{css:
|
|
594
|
+
`],children:V("div",{css:Ra,children:[V("div",{css:Pa,children:[V("div",{css:ka,children:[D("h4",{css:[Ta],title:`ID: ${e.id}`,"data-test-id":"dam-selected-item",children:e.title||e.id||""}),e.popoverData?V(Qn,{children:[D("button",{type:"button",ref:n,css:Va,"aria-controls":"path-details","aria-expanded":l,onClick:u,children:D(Ea,{icon:Fn,iconColor:"gray",size:24,css:ye`
|
|
595
595
|
opacity: var(--opacity-75);
|
|
596
|
-
`})}),D("div",{id:"path-details","aria-hidden":!
|
|
596
|
+
`})}),D("div",{id:"path-details","aria-hidden":!l,ref:i,css:[_a,l?ye`
|
|
597
597
|
visibility: visible;
|
|
598
|
-
`:
|
|
598
|
+
`:ye`
|
|
599
599
|
visibility: hidden;
|
|
600
|
-
`],children:Object.entries(e.popoverData).map(([p,h],f)=>V("div",{css:
|
|
600
|
+
`],children:Object.entries(e.popoverData).map(([p,h],f)=>V("div",{css:be,children:[V("span",{css:Oe,children:[p,":"]}),h]},f))})]}):null]}),D(s,{item:e})]}),V("div",{css:Ia,children:[e.editLink?typeof e.editLink=="string"?V("a",{href:e.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",onClick:p=>{o&&(He(p.currentTarget.href,()=>o(e)),p.preventDefault())},css:ft,children:[D("span",{css:be,children:"Edit"}),a?D(W,{src:a,css:La,alt:"Logo"}):null]}):e.editLink:null,V("button",{type:"button",onClick:()=>{t(e)},css:ft,children:[D("span",{css:be,children:"Unlink"}),D(Ea,{icon:$n,iconColor:"red",size:16})]})]})]})},e.id)}function Kn({item:e}){let t=null;return e.previewUrl&&typeof e.previewUrl=="string"?e.type==="image"?t=D("img",{src:e.previewUrl,alt:e.id,width:"200",css:vt}):e.type==="video"&&(t=D("video",{src:e.previewUrl,title:e.id,width:"200",controls:!0,css:vt})):e.previewUrl&&typeof e.previewUrl!="string"&&(t=e.previewUrl),t||e.metadata?V("div",{css:Da,children:[t?D("div",{children:t}):null,V("ul",{children:[e.metadata?Object.entries(e.metadata).map(([o,a])=>V("li",{css:[be,ye`
|
|
601
601
|
order: 1;
|
|
602
|
-
`],children:[V("span",{css:[
|
|
602
|
+
`],children:[V("span",{css:[Oe,ye`
|
|
603
603
|
order: 1;
|
|
604
|
-
`],children:[
|
|
604
|
+
`],children:[o,":"]}),a]},o)):null,e.createdDate?V("li",{css:be,children:[D("span",{css:Oe,children:"Date:"}),Wn(e.createdDate)]}):null]})]}):null}import{LoadingIndicator as si,Theme as li}from"@uniformdev/design-system";import{initializeUniformMeshSDK as Yn}from"@uniformdev/mesh-sdk";import{useEffect as Zn,useRef as Xn,useState as Ua}from"react";var Ba=({autoResizingDisabled:e}={})=>{let[t,o]=Ua(),[a,r]=Ua(),n=Xn(!1);return Zn(()=>{typeof window=="undefined"||a||(typeof window.UniformMeshSDK=="undefined"&&!n.current?(n.current=!0,Yn({autoResizingDisabled:e}).then(i=>{r(i)}).catch(i=>{o(i)}).finally(()=>{n.current=!1})):r(window.UniformMeshSDK))},[e]),{initializing:!a&&!t,error:t,sdk:a}};import{createContext as ri,useContext as ai,useEffect as oi,useState as ni}from"react";import{Theme as Jn}from"@uniformdev/design-system";import{createContext as jn,useContext as ei}from"react";import{jsx as Aa,jsxs as ti}from"@emotion/react/jsx-runtime";var Ne=jn(void 0),Xc=({children:e})=>{let t;return typeof window!="undefined"&&typeof window.UniformMeshSDK!="undefined"&&(t={sdk:window.UniformMeshSDK}),ti(Ne.Provider,{value:t,children:[Aa(Jn,{}),Aa($e,{children:e})]})},za=()=>{let e=ei(Ne);if(!e)throw new Error("useUniformMeshSdkContext must be used within <MeshApp /> or <UniformMeshSdkContext />");return e};function qa(){let{sdk:e}=za();return e}import{jsx as ii}from"@emotion/react/jsx-runtime";var Ha=ri(void 0),$e=({children:e})=>{let t=qa(),[o,a]=ni(t.getCurrentLocation()),r=n=>{a(i=>({...i,value:n.newValue}))};return oi(()=>(t.events.on("onValueChanged",r),()=>{t.events.off("onValueChanged",r)}),[t]),ii(Ha.Provider,{value:{location:o},children:e})},Fe=()=>{let e=ai(Ha);if(!e)throw new Error("useUniformMeshLocationContext must be used within a UniformMeshLocationContextProvider");return e};import{jsx as _e,jsxs as di}from"@emotion/react/jsx-runtime";var mp=({children:e,loadingComponent:t,errorComponent:o})=>{let{initializing:a,error:r,sdk:n}=Ba();if(a||!n){let i=t;return i?_e(i,{}):_e(si,{})}if(r){let i=o;if(i)return _e(i,{error:r});throw r}return di(Ne.Provider,{value:{sdk:n},children:[_e(li,{}),_e($e,{children:e})]})};import{css as Fa}from"@emotion/react";import ui from"@monaco-editor/react";import{InputSelect as gi}from"@uniformdev/design-system";import{useState as mi}from"react";import*as xe from"react";import{jsx as ci}from"@emotion/react/jsx-runtime";var Ga=xe.createContext(null);function bp({value:e,onChange:t,children:o}){let a=xe.useMemo(()=>({dispatch:r=>{if(r.type==="setRelativeUrl")t(n=>({...n,relativeUrl:r.relativeUrl}));else if(r.type==="updateParameter")t(n=>{let i=[...n.parameters];return typeof r.index=="number"?i[r.index]=r.parameter:i.push(r.parameter),{...n,parameters:i}});else if(r.type==="removeParameter")t(n=>{let i=[...n.parameters];return i.splice(r.index,1),{...n,parameters:i}});else if(r.type==="updateHeader")t(n=>{let i=[...n.headers];return typeof r.index!="undefined"?i[r.index]=r.header:i.push(r.header),{...n,headers:i}});else if(r.type==="removeHeader")t(n=>{let i=[...n.headers];return i.splice(r.index,1),{...n,headers:i}});else if(r.type==="setMethod")t(n=>({...n,method:r.method}));else if(r.type==="setBody")t(n=>{let i=[...n.headers],l=i.findIndex(({key:d})=>d.trim().toLocaleLowerCase()==="content-type");return l>-1?i[l].value=r.contentType:i.push({key:"Content-Type",value:r.contentType}),{...n,body:r.body,headers:i}});else throw new Error(`Unknown event ${JSON.stringify(r)}`)},request:e}),[t,e]);return ci(Ga.Provider,{value:a,children:o})}function H(){let e=xe.useContext(Ga);if(!e)throw new Error("No RequestProvider present");return e}import{css as Oa}from"@emotion/react";var We=Oa`
|
|
605
605
|
background: var(--white);
|
|
606
|
-
`,
|
|
606
|
+
`,Na=e=>Oa`
|
|
607
607
|
align-items: start;
|
|
608
608
|
background: ${e};
|
|
609
609
|
display: grid;
|
|
610
610
|
grid-template-columns: 12ch 1fr;
|
|
611
611
|
gap: var(--spacing-sm);
|
|
612
|
-
`;import{jsx as
|
|
612
|
+
`;import{jsx as pi}from"@emotion/react/jsx-runtime";var $a=({bgColor:e="transparent",children:t,...o})=>pi("div",{css:Na(e),...o,children:t});import{jsx as bt,jsxs as vi}from"@emotion/react/jsx-runtime";var fi=[{label:"Text",value:"plaintext"},{label:"JSON",value:"json"},{label:"YAML",value:"yaml"},{label:"JavaScript",value:"javascript"},{label:"XML",value:"xml"},{label:"HTML",value:"html"}],Wa={plaintext:"text/plain",json:"application/json",yaml:"application/x-yaml",javascript:"application/javascript",xml:"application/xml",html:"text/html"};function Ep(){let{request:e,dispatch:t}=H(),[o,a]=mi("json");return vi("div",{css:Fa`
|
|
613
613
|
background: var(--white);
|
|
614
|
-
`,children:[
|
|
614
|
+
`,children:[bt($a,{bgColor:"var(--gray-100)",css:Fa`
|
|
615
615
|
padding: var(--spacing-sm) var(--spacing-base);
|
|
616
|
-
`,children:
|
|
616
|
+
`,children:bt(gi,{label:"Language",showLabel:!1,options:fi,value:o,onChange:r=>{let n=r.currentTarget.value;a(n),e.body&&t({type:"setBody",body:e.body,contentType:Wa[n]})}})}),bt(ui,{height:200,value:e.body,language:o,options:{language:o,minimap:{enabled:!1},folding:!1},onChange:r=>{r&&t({type:"setBody",body:r,contentType:Wa[o]})}})]})}import{Input as Ka,Table as hi,TableBody as bi,TableCellData as Ke,TableCellHead as Qa,TableHead as yi,TableRow as yt,WarningMessage as xi}from"@uniformdev/design-system";import{jsx as A,jsxs as ue}from"@emotion/react/jsx-runtime";function qp({disableVariables:e}){var r,n;let{dispatch:t,request:o}=H(),a=[...o.headers,{key:"",value:""}];return A("div",{css:We,children:ue(hi,{children:[A(yi,{children:ue(yt,{children:[A(Qa,{children:"Name"}),A(Qa,{children:"Value"})]})}),ue(bi,{children:[(n=(r=o.baseRequest)==null?void 0:r.headers)==null?void 0:n.map(i=>ue(yt,{children:[ue(Ke,{width:"50%",children:[i.key,A("br",{}),A("i",{css:{color:"var(--gray-500)"},children:A("small",{children:"from data source"})})]}),ue(Ke,{width:"50%",children:[A("i",{css:{color:"var(--gray-500)"},children:i.value}),o.headers.find(l=>l.key===i.key)?A(xi,{message:"overridden below"}):null]})]},i.key)),a.map((i,l)=>ue(yt,{children:[A(Ke,{width:"50%",children:A(Ka,{label:i.key,value:i.key,showLabel:!1,onChange:d=>{d.currentTarget.value?t({type:"updateHeader",header:{key:d.currentTarget.value,value:i.value},index:l}):t({type:"removeHeader",index:l})}})}),A(Ke,{width:"50%",children:i.key?A(Ka,{showLabel:!1,label:i.value,value:i.value,onChange:d=>t({type:"updateHeader",header:{key:i.key,value:d.currentTarget.value},index:l})}):null})]},l))]})]})})}import{InputSelect as wi}from"@uniformdev/design-system";import{jsx as Si}from"@emotion/react/jsx-runtime";function Wp(e){var a;let{request:t,dispatch:o}=H();return Si(wi,{...e,options:[{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"HEAD",value:"HEAD"}],value:(a=t.method)!=null?a:"GET",onChange:r=>o({type:"setMethod",method:r.currentTarget.value})})}import{Input as Ya,Table as Ci,TableBody as Ri,TableCellData as Qe,TableCellHead as Za,TableHead as Pi,TableRow as xt,WarningMessage as ki}from"@uniformdev/design-system";import{jsx as z,jsxs as ge}from"@emotion/react/jsx-runtime";function Jp({disableVariables:e}){var r,n;let{dispatch:t,request:o}=H(),a=[...o.parameters,{key:"",value:""}];return z("div",{css:We,children:ge(Ci,{children:[z(Pi,{children:ge(xt,{children:[z(Za,{children:"Name"}),z(Za,{children:"Value"})]})}),ge(Ri,{children:[(n=(r=o.baseRequest)==null?void 0:r.parameters)==null?void 0:n.map(i=>ge(xt,{children:[ge(Qe,{width:"50%",children:[i.key,z("br",{}),z("i",{css:{color:"var(--gray-500)"},children:z("small",{children:"from data source"})})]}),ge(Qe,{width:"50%",children:[z("i",{css:{color:"var(--gray-500)"},children:i.value}),o.parameters.find(l=>l.key===i.key)?z(ki,{message:"overridden below"}):null]})]},i.key)),a.map((i,l)=>ge(xt,{children:[z(Qe,{width:"50%",children:z(Ya,{label:i.key,value:i.key,showLabel:!1,onChange:d=>{d.currentTarget.value?t({type:"updateParameter",parameter:{key:d.currentTarget.value,value:i.value},index:l}):t({type:"removeParameter",index:l})}})}),z(Qe,{width:"50%",children:i.key?z(Ya,{showLabel:!1,label:i.value,value:i.value,onChange:d=>t({type:"updateParameter",parameter:{key:i.key,value:d.currentTarget.value},index:l})}):null})]},l))]})]})})}import{css as Ki}from"@emotion/react";import{useMemo as Qi}from"react";import{Global as Di}from"@emotion/react";import Vi from"@yaireo/tagify/dist/react.tagify";import*as E from"react";import{css as wt}from"@emotion/react";var Xa=wt`
|
|
617
617
|
> * {
|
|
618
618
|
margin: var(--spacing-base) 0 0;
|
|
619
619
|
}
|
|
620
|
-
`,
|
|
620
|
+
`,Ja=wt`
|
|
621
621
|
display: flex;
|
|
622
622
|
gap: var(--spacing-sm);
|
|
623
|
-
`,
|
|
623
|
+
`,ja=wt`
|
|
624
624
|
:root {
|
|
625
625
|
--tagify-dd-color-primary: rgb(53, 149, 246);
|
|
626
626
|
--tagify-dd-bg-color: var(--white);
|
|
@@ -1117,14 +1117,14 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
1117
1117
|
opacity: 0;
|
|
1118
1118
|
transition: inherit;
|
|
1119
1119
|
}
|
|
1120
|
-
`;import*as
|
|
1120
|
+
`;import*as Se from"react";import{Button as to,Input as St}from"@uniformdev/design-system";import{Form as Ti,Formik as Li}from"formik";import{jsx as we,jsxs as ro}from"@emotion/react/jsx-runtime";function ao({variable:e,onSubmit:t,onCancel:o}){var r,n,i,l,d,u,s,p,h;let{variables:a}=ne();return we(Li,{initialValues:{name:e,default:(n=(r=a[e])==null?void 0:r.default)!=null?n:"",displayName:(l=(i=a[e])==null?void 0:i.displayName)!=null?l:"",helpText:(u=(d=a[e])==null?void 0:d.helpText)!=null?u:"",order:(s=a[e])==null?void 0:s.order,type:(h=(p=a[e])==null?void 0:p.type)!=null?h:""},onSubmit:f=>{let C={...f,helpText:f.helpText||void 0,type:f.type||void 0,displayName:f.displayName||void 0};return t(C)},children:({getFieldProps:f,initialValues:C})=>ro(Ti,{css:Xa,children:[we(St,{...f("name"),label:"Name",disabled:C.name!=="",caption:"This cannot change once created."}),we(St,{...f("helpText"),label:"Help Text",caption:"Appears in the composition data resource when entering a value for this variable.",autoComplete:"off"}),we(St,{...f("default"),label:"Default Value",autoComplete:"off"}),ro("div",{css:Ja,children:[we(to,{type:"submit",children:"Save"}),we(to,{type:"button",buttonType:"ghost",onClick:o,children:"cancel"})]})]})})}import{jsx as _i,jsxs as Ii}from"@emotion/react/jsx-runtime";var oo=Se.createContext(null);function uu({value:e,onChange:t,editVariableComponent:o,children:a}){let[r,n]=Se.useState(),i=o!=null?o:ao,l={dispatch:d=>{if(d.type==="set"){let{name:u,...s}=d.variable;t({...l.variables,[d.variable.name]:s}),d.openEditor&&n(d.variable.name)}else if(d.type==="edit")n(d.variable);else if(d.type==="remove"){let u={...e};delete u[d.variable],t(u)}else if(d.type==="reorder")t(d.result);else throw new Error(`Unknown event ${JSON.stringify(d)}`)},variables:e};return Ii(oo.Provider,{value:l,children:[a,typeof r!="undefined"?_i(i,{onSubmit:d=>{n(void 0);let{name:u,...s}=d;t({...e,[u]:s})},onCancel:()=>n(void 0),variable:r}):null]})}function ne(){let e=Se.useContext(oo);if(!e)throw new Error("No VariablesProvider present");return e}import{Fragment as Ei,jsx as no,jsxs as Mi}from"@emotion/react/jsx-runtime";function Ct(e){return e.replace(/\${{.*?"value":"([^"]+)".*?}}/g,"${$1}").replace(/[\r\n]+/g,"")}function io({label:e,value:t,disableVariables:o,onChange:a,onPaste:r}){let{variables:n,dispatch:i}=ne(),l=E.useRef(n),d=E.useRef(i),u=E.useRef(a),s=E.useRef();E.useEffect(()=>{l.current=n},[n]),E.useEffect(()=>{d.current=i},[i]),E.useEffect(()=>{u.current=a},[a]),E.useEffect(()=>{var f;((f=s==null?void 0:s.current)==null?void 0:f.DOM)&&r&&(s.current.DOM.input.onpaste=()=>{var C,b;return r(Ct((b=(C=s.current)==null?void 0:C.getInputValue())!=null?b:""))})}),E.useEffect(()=>{var C,b,w;let f=Ct((b=(C=s.current)==null?void 0:C.getInputValue())!=null?b:"");t!==f&&((w=s.current)==null||w.loadOriginalValues(t))},[t]);let p=E.useCallback(f=>{u.current(Ct(f))},[]),h=E.useCallback(f=>{l.current[f]||d.current({type:"set",variable:{name:f,default:""},openEditor:!0})},[]);return Mi(Ei,{children:[no(Di,{styles:ja}),no(Vi,{tagifyRef:s,"aria-label":e,defaultValue:t,autoFocus:!1,whitelist:Object.entries(n).map(([f,C])=>{var b;return{name:(b=C.displayName)!=null?b:f,value:f}}),settings:{pattern:o?null:/\$/,enforceWhitelist:o,mixTagsInterpolator:["${","}"],duplicates:!0,tagTextProp:"name",dropdown:{position:"text",enabled:0,mapValueTo:f=>f.name,includeSelectedTags:!0,searchKeys:["name","value"],highlightFirst:!0}},InputMode:"textarea",onAdd:f=>{var b;let C=(b=f.detail.data)==null?void 0:b.value;C&&h(C)},onRemove:f=>{p(f.detail.tagify.getInputValue())},onChange:f=>{p(f.detail.value)},onInput:f=>{p(f.detail.tagify.getInputValue())}})]})}import{css as Bi}from"@emotion/react";import{AddListButton as Ai,button as zi,Icon as qi,Table as Hi,TableBody as Gi,TableCellData as Rt,TableCellHead as Pt,TableHead as Oi,TableRow as go}from"@uniformdev/design-system";import{DragDropContext as Ni,Draggable as $i,Droppable as Fi}from"react-beautiful-dnd";import{css as Ye}from"@emotion/react";var so=e=>Ye`
|
|
1121
1121
|
position: relative;
|
|
1122
1122
|
${e?`
|
|
1123
1123
|
display: table;
|
|
1124
1124
|
left: auto !important;
|
|
1125
1125
|
top: auto !important;
|
|
1126
1126
|
`:void 0}
|
|
1127
|
-
`,
|
|
1127
|
+
`,lo=Ye`
|
|
1128
1128
|
&::after {
|
|
1129
1129
|
content: '';
|
|
1130
1130
|
display: block;
|
|
@@ -1141,7 +1141,7 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
1141
1141
|
&:hover::after {
|
|
1142
1142
|
opacity: 1;
|
|
1143
1143
|
}
|
|
1144
|
-
`,
|
|
1144
|
+
`,co=Ye`
|
|
1145
1145
|
border: none;
|
|
1146
1146
|
color: var(--brand-secondary-5);
|
|
1147
1147
|
font-weight: var(--fw-medium);
|
|
@@ -1151,11 +1151,15 @@ var ko=Object.defineProperty;var Lo=(e,r)=>{for(var n in r)ko(e,n,{get:r[n],enum
|
|
|
1151
1151
|
text-overflow: ellipsis;
|
|
1152
1152
|
white-space: nowrap;
|
|
1153
1153
|
max-width: 20ch;
|
|
1154
|
-
`,
|
|
1154
|
+
`,po=Ye`
|
|
1155
1155
|
overflow: hidden;
|
|
1156
1156
|
text-overflow: ellipsis;
|
|
1157
1157
|
white-space: nowrap;
|
|
1158
1158
|
max-width: 20ch;
|
|
1159
|
-
`;function
|
|
1159
|
+
`;function uo(e){return Object.entries(e||{}).sort(([t,o],[a,r])=>{var n,i;return o.order&&r.order?o.order-r.order:o.order?1:r.order?-1:((n=o.displayName)!=null?n:t).localeCompare((i=r.displayName)!=null?i:a)}).map(([t,o])=>({name:t,...o}))}import{Fragment as Wi,jsx as T,jsxs as Ie}from"@emotion/react/jsx-runtime";function Vu(){let{variables:e,dispatch:t}=ne(),o=uo(e),a=r=>{var n,i;if(r.destination&&r.source.droppableId===((n=r.destination)==null?void 0:n.droppableId)){let l=[...o||[]],[d]=(i=l==null?void 0:l.splice(r.source.index,1))!=null?i:[];l==null||l.splice(r.destination.index,0,d);let u=l.reduce((s,p,h)=>({...s,[p.name]:{type:p.type,default:p.default,order:h}}),{});return t({type:"reorder",result:u}),l}};return Ie(Wi,{children:[T(Ni,{onDragEnd:r=>a(r),children:T(Fi,{droppableId:"variables-table",children:r=>Ie(Hi,{...r.droppableProps,ref:r.innerRef,children:[T(Oi,{children:Ie(go,{children:[T(Pt,{children:"Name"}),T(Pt,{children:"Default Value"}),T(Pt,{})]})}),Ie(Gi,{children:[o.map(({name:n,displayName:i,default:l},d)=>{let u=i!=null?i:n;return T($i,{draggableId:n,index:d,isDragDisabled:o.length===1,children:(s,p)=>Ie(go,{ref:s.innerRef,...s.dragHandleProps,...s.draggableProps,id:u,css:so(p.isDragging),"data-dragging":p.isDragging,children:[T(Rt,{css:o.length>1?lo:void 0,children:T("button",{css:co,type:"button",onClick:h=>{h.preventDefault(),t({type:"edit",variable:n})},title:u,children:u})}),T(Rt,{children:T("span",{css:po,title:l,children:l})}),T(Rt,{align:"right",children:T("button",{type:"button",title:`delete ${u}`,css:[zi,Bi`
|
|
1160
1160
|
background: transparent;
|
|
1161
|
-
`],"aria-controls":
|
|
1161
|
+
`],"aria-controls":u,onClick:()=>t({type:"remove",variable:n}),children:T(qi,{icon:"trash",iconColor:"red"})})})]})},n)}),r.placeholder]})]})})}),T(Ai,{onButtonClick:()=>t({type:"edit",variable:""}),"aria-label":"Add variable",buttonText:"add variable",icon:"math-plus",css:{marginLeft:"var(--spacing-md)"}})]})}function mo(e,t){return kt(encodeURI(e),t)}function fo(e,t){return{key:kt(encodeURIComponent(e.key),t),value:kt(encodeURIComponent(e.value),t)}}function kt(e,t){return e.replace(/(\$|%24)%7B(.*?)%7D/g,(o,a,r)=>{var i;let n=decodeURIComponent(r);return(i=t==null?void 0:t[n])!=null&&i.default?t[n].default:`\${${n}}`})}import{Fragment as Zi,jsx as Yi,jsxs as Ze}from"@emotion/react/jsx-runtime";function Nu(){var a,r;let{variables:e}=ne(),{request:t}=H(),o=Qi(()=>{var n;return(n=t.baseRequest)!=null&&n.parameters?t.baseRequest.parameters.filter(i=>!t.parameters.find(l=>l.key===i.key)).concat(t.parameters):t.parameters},[(a=t.baseRequest)==null?void 0:a.parameters,t.parameters]);return Ze("small",{css:Ki`
|
|
1162
|
+
display: inline-block;
|
|
1163
|
+
margin-bottom: var(--spacing-xs);
|
|
1164
|
+
word-break: break-word;
|
|
1165
|
+
`,children:[t.baseRequest?Yi("span",{children:(r=t.baseRequest)==null?void 0:r.baseUrl}):null,Ze("span",{css:{fontWeight:t.baseRequest?"bold":"inherit"},children:[mo(t.relativeUrl,e),o.length>0?Ze(Zi,{children:["?",o.map((n,i)=>{let l=fo(n,e);return Ze("span",{children:[i>0?"&":null,l.key,"=",l.value]},i)})]}):null]})]})}import{jsx as Xi}from"@emotion/react/jsx-runtime";function Zu(e){let{request:t,dispatch:o}=H();return Xi(io,{...e,value:t.relativeUrl,onPaste:a=>{var n,i,l;let r=a.indexOf("?");if(r>=0){let d=a.substring(0,r);((n=t.baseRequest)==null?void 0:n.baseUrl)&&d.startsWith((i=t.baseRequest)==null?void 0:i.baseUrl)&&(d=d.substring((l=t.baseRequest)==null?void 0:l.baseUrl.length)),o({type:"setRelativeUrl",relativeUrl:d});for(let u=t.parameters.length-1;u>=0;u--)o({type:"removeParameter",index:u});try{new URLSearchParams(a.substring(r)).forEach((s,p)=>{o({type:"updateParameter",parameter:{key:p,value:s}})})}catch(u){}}},onChange:a=>{o({type:"setRelativeUrl",relativeUrl:a})}})}function tg(e){let{location:t}=Fe();if(e&&t.type!==e)throw new Error(`Expected location type ${e} but got ${t.type}`);return t}function ng(){let{location:e}=Fe();return e}import{AddListButton as vg,Button as hg,Callout as bg,Heading as yg,Input as xg,InputComboBox as wg,InputKeywordSearch as Sg,InputSelect as Cg,InputToggle as Rg,InputKeywordSearch as Pg,Label as kg,LoadingIndicator as Tg,LoadingOverlay as Lg,Menu as _g,MenuItem as Ig,ScrollableList as Dg,ScrollableListItem as Vg,Switch as Eg,Textarea as Mg,Theme as Ug}from"@uniformdev/design-system";export*from"@uniformdev/mesh-sdk";export{vg as AddListButton,hg as Button,bg as Callout,zc as DamSelectedItem,Mr as DefaultSearchRow,Fr as DefaultSelectedItem,na as EntrySearch,yg as Heading,tt as Icons,xg as Input,wg as InputComboBox,Sg as InputKeywordSearch,Cg as InputSelect,Rg as InputToggle,io as InputVariables,Pg as KeywordSearchInput,kg as Label,Tg as LoadingIndicator,Lg as LoadingOverlay,_g as Menu,Ig as MenuItem,mp as MeshApp,mr as ProductPreviewList,Ll as ProductQuery,ur as ProductQueryContext,wc as ProductSearch,Sa as ProductSearchContext,ma as ProductSearchRow,wa as ProductSelectedItem,Ep as RequestBody,qp as RequestHeaders,Wp as RequestMethodSelect,Jp as RequestParameters,bp as RequestProvider,$a as RequestTypeContainer,Nu as RequestUrl,Zu as RequestUrlInput,rr as ResolvableLoadingValue,Dg as ScrollableList,Vg as ScrollableListItem,sr as SelectionField,Eg as Switch,Mg as Textarea,Ug as Theme,Ha as UniformMeshLocationContext,$e as UniformMeshLocationContextProvider,Ne as UniformMeshSdkContext,Xc as UniformMeshSdkContextProvider,ao as VariableEditor,Vu as VariablesList,uu as VariablesProvider,lt as badgeIcon,vt as damSelectItemImage,Ca as damSelectedItemContainer,ka as damSelectedItemCopy,Pa as damSelectedItemDetails,La as damSelectedItemIcon,Va as damSelectedItemInfoBtn,Ra as damSelectedItemInner,ft as damSelectedItemLinkBtn,Ia as damSelectedItemLinkContainer,Da as damSelectedItemMediaContainer,_a as damSelectedItemPopover,Oe as damSelectedItemPopoverLabel,be as damSelectedItemSmallText,Ta as damSelectedItemTitle,ra as draggableContainer,st as draggableIcon,oa as draggableIconOffset,aa as draggableIconWrapper,Yr as entrySearchBtn,Xr as entrySearchConfig,Jr as entrySearchConfigHidden,Zr as entrySearchLoadMoreBtn,jr as entrySearchResultList,ea as entrySearchSelectIcon,ta as entrySearchSelectImg,Sd as entrySearchSelectInput,Cd as entrySearchSelectOption,Qr as entrySearchWrapper,ua as productSearchRowActiveIcon,ca as productSearchRowCategory,ia as productSearchRowContainer,sa as productSearchRowContent,la as productSearchRowContentActive,pa as productSearchRowDetails,da as productSearchRowTitle,va as productSelectedItemContainer,ba as productSelectedItemContent,ha as productSelectedItemDetails,ya as productSelectedItemIcon,pt as productSelectedItemImage,xa as productSelectedItemLinkContainer,ut as productedSelectedItemLinkBtn,gt as productedSelectedItemSmallText,Ir as searchRowBtn,kr as searchRowContainer,Lr as searchRowContainerActive,Tr as searchRowContainerWithPopover,_r as searchRowPopover,nt as searchRowText,ot as searchRowTextSmall,it as selectItemLinkBtn,Or as selectItemLinkContainer,Gr as selectItemPopover,Le as selectItemPopoverLabel,ce as selectItemSmallText,Ur as selectedItemContainer,zr as selectedItemCopy,Ar as selectedItemDetails,Hr as selectedItemIcon,Br as selectedItemInner,qr as selectedItemTitle,fo as urlEncodeRequestParameter,mo as urlEncodeRequestUrl,Ba as useInitializeUniformMeshSdk,tg as useMeshLocation,gr as useProductQueryContext,Ge as useProductSearchContext,H as useRequest,ng as useUniformMeshLocation,Fe as useUniformMeshLocationContext,qa as useUniformMeshSdk,za as useUniformMeshSdkContext,ne as useVariables,uo as variablesToList};
|