@uniformdev/mesh-sdk-react 16.0.0 → 16.0.1-alpha.128

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.js CHANGED
@@ -1,6 +1,6 @@
1
- var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDescriptor;var Rr=Object.getOwnPropertyNames;var kr=Object.getPrototypeOf,Lr=Object.prototype.hasOwnProperty;var Qt=(t,n)=>{for(var o in n)Se(t,o,{get:n[o],enumerable:!0})},ye=(t,n,o,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of Rr(n))!Lr.call(t,a)&&a!==o&&Se(t,a,{get:()=>n[a],enumerable:!(r=Pr(n,a))||r.enumerable});return t},U=(t,n,o)=>(ye(t,n,"default"),o&&ye(o,n,"default")),Z=(t,n,o)=>(o=t!=null?Cr(kr(t)):{},ye(n||!t||!t.__esModule?Se(o,"default",{value:t,enumerable:!0}):o,t)),xr=t=>ye(Se({},"__esModule",{value:!0}),t);var z={};Qt(z,{Button:()=>u.Button,Callout:()=>u.Callout,DefaultSearchRow:()=>lt,DefaultSelectedItem:()=>nt,EntrySearch:()=>Ct,Heading:()=>u.Heading,Icons:()=>xe,Input:()=>u.Input,InputSelect:()=>u.InputSelect,InputToggle:()=>u.InputToggle,KeywordSearchInput:()=>u.InputKeywordSearch,LoadingIndicator:()=>u.LoadingIndicator,LoadingOverlay:()=>u.LoadingOverlay,Menu:()=>u.Menu,MenuItem:()=>u.MenuItem,ProductPreviewList:()=>Ze,ProductQuery:()=>Gr,ProductQueryContext:()=>Ne,ProductSearch:()=>qr,ProductSearchContext:()=>Ut,ProductSearchRow:()=>Tt,ProductSelectedItem:()=>zt,ResolvableLoadingValue:()=>Ke,ScrollableList:()=>u.ScrollableList,ScrollableListItem:()=>u.ScrollableListItem,SelectionField:()=>Qe,Textarea:()=>u.Textarea,Theme:()=>u.Theme,UniformMeshLocationContext:()=>Ae,UniformMeshLocationContextProvider:()=>Be,UniformMeshSdkContext:()=>He,UniformMeshSdkContextProvider:()=>Er,badgeIcon:()=>Ie,draggableContainer:()=>yt,draggableIcon:()=>Te,draggableIconOffset:()=>wt,draggableIconWrapper:()=>St,entrySearchBtn:()=>ut,entrySearchConfig:()=>gt,entrySearchConfigHidden:()=>ft,entrySearchLoadMoreBtn:()=>mt,entrySearchResultList:()=>vt,entrySearchSelectIcon:()=>ht,entrySearchSelectImg:()=>bt,entrySearchSelectInput:()=>_r,entrySearchSelectOption:()=>Zr,entrySearchWrapper:()=>pt,productSearchRowActiveIcon:()=>Vt,productSearchRowCategory:()=>xt,productSearchRowContainer:()=>Pt,productSearchRowContent:()=>Rt,productSearchRowContentActive:()=>kt,productSearchRowDetails:()=>Mt,productSearchRowTitle:()=>Lt,productSelectedItemContainer:()=>It,productSelectedItemContent:()=>Gt,productSelectedItemDetails:()=>Dt,productSelectedItemImage:()=>De,searchRowBtn:()=>ct,searchRowContainer:()=>at,searchRowContainerActive:()=>it,searchRowPopover:()=>st,searchRowText:()=>Ee,searchRowTextSmall:()=>Ve,selectItemLinkBtn:()=>Me,selectItemLinkContainer:()=>ot,selectItemPopover:()=>rt,selectItemPopoverLabel:()=>ge,selectItemSmallText:()=>q,selectedItemCloseIcon:()=>tt,selectedItemContainer:()=>qe,selectedItemCopy:()=>Ye,selectedItemDetails:()=>Xe,selectedItemIcon:()=>et,selectedItemInner:()=>Je,selectedItemTitle:()=>je,useInitializeUniformMeshSdk:()=>Vr,useProductQueryContext:()=>_e,useProductSearchContext:()=>fe,useUniformMeshLocation:()=>Mr,useUniformMeshLocationContext:()=>Oe,useUniformMeshSdk:()=>Tr,useUniformMeshSdkContext:()=>Fe});module.exports=xr(z);var e=require("@emotion/react"),I=Z(require("react"));var ae=require("react"),Ae=(0,ae.createContext)(void 0),Be=({children:t})=>{let[n,o]=(0,ae.useState)(),r;if(typeof window!="undefined"&&typeof window.UniformMeshSDK!="undefined"){let a=n||window.UniformMeshSDK.getCurrentLocation();r={location:{getValue:a.getValue,getMetadata:a.getMetadata,setValue:async d=>{await a.setValue(d),o(window.UniformMeshSDK.getCurrentLocation())}}}}return(0,e.jsx)(Ae.Provider,{value:r},t)},Oe=()=>{let t=(0,ae.useContext)(Ae);if(!t)throw new Error("useUniformMeshLocationContext must be used within a UniformMeshLocationContextProvider");return t};function Mr(){let{location:t}=Oe();return{value:t==null?void 0:t.getValue(),setValue:t==null?void 0:t.setValue,metadata:t==null?void 0:t.getMetadata()}}var Nt=require("@uniformdev/mesh-sdk"),ue=require("react"),Vr=({autoResizingDisabled:t}={})=>{let[n,o]=(0,ue.useState)(),[r,a]=(0,ue.useState)();return(0,ue.useEffect)(()=>{typeof window=="undefined"||r||(typeof window.UniformMeshSDK=="undefined"?(0,Nt.initializeUniformMeshSDK)({autoResizingDisabled:t}).then(d=>{a(d)}).catch(d=>{o(d)}):a(window.UniformMeshSDK))},[t]),{initializing:!r&&!n,error:n,sdk:r}};var we=require("react");var _t=require("@uniformdev/design-system"),He=(0,we.createContext)(void 0),Er=({children:t})=>{let n;return typeof window!="undefined"&&typeof window.UniformMeshSDK!="undefined"&&(n={sdk:window.UniformMeshSDK}),(0,e.jsx)(He.Provider,{value:n},(0,e.jsx)(_t.Theme,null),(0,e.jsx)(Be,null,t))},Fe=()=>{let t=(0,we.useContext)(He);if(!t)throw new Error("useUniformMeshSdkContext must be used within a UniformMeshSdkContextProvider");return t};function Tr(){let{sdk:t}=Fe();return t}var We=Z(require("react"));var H=Z(require("react"));var ie=require("@emotion/react"),Zt=require("@uniformdev/design-system");var $e=Z(require("react")),Ke=({value:t,text:n,loading:o})=>(0,e.jsx)($e.default.Fragment,null,!!n&&n,!n&&(0,e.jsx)($e.default.Fragment,null,o&&`${t} (Loading...)`,!o&&`${t} (Unresolvable)`));var Qe=({id:t,label:n,loading:o,selectedValues:r,values:a,onAdd:d,onRemove:m})=>{var b;let f=(b=a==null?void 0:a.filter(i=>!(r!=null&&r.includes(i.id.toString()))))!=null?b:[],v=(i,h)=>{i.preventDefault(),m(h)};return(0,e.jsx)("div",null,(0,e.jsx)(Zt.InputSelect,{id:t,name:t,label:n,onChange:i=>d(i.target.value),disabled:o,options:[{value:"",label:"Add..."},...f.map(i=>({value:i.id,label:i.name||i.id}))],css:Array.isArray(r)&&r.length>0?ie.css`
1
+ var Cr=Object.create;var ye=Object.defineProperty;var Pr=Object.getOwnPropertyDescriptor;var Rr=Object.getOwnPropertyNames;var kr=Object.getPrototypeOf,xr=Object.prototype.hasOwnProperty;var Qt=(t,n)=>{for(var o in n)ye(t,o,{get:n[o],enumerable:!0})},be=(t,n,o,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of Rr(n))!xr.call(t,a)&&a!==o&&ye(t,a,{get:()=>n[a],enumerable:!(r=Pr(n,a))||r.enumerable});return t},A=(t,n,o)=>(be(t,n,"default"),o&&be(o,n,"default")),_=(t,n,o)=>(o=t!=null?Cr(kr(t)):{},be(n||!t||!t.__esModule?ye(o,"default",{value:t,enumerable:!0}):o,t)),Lr=t=>be(ye({},"__esModule",{value:!0}),t);var G={};Qt(G,{Button:()=>l.Button,Callout:()=>l.Callout,DefaultSearchRow:()=>lt,DefaultSelectedItem:()=>ot,EntrySearch:()=>Ct,Heading:()=>l.Heading,Icons:()=>xe,Input:()=>l.Input,InputSelect:()=>l.InputSelect,InputToggle:()=>l.InputToggle,KeywordSearchInput:()=>l.InputKeywordSearch,Label:()=>l.Label,LoadingIndicator:()=>l.LoadingIndicator,LoadingOverlay:()=>l.LoadingOverlay,Menu:()=>l.Menu,MenuItem:()=>l.MenuItem,ProductPreviewList:()=>_e,ProductQuery:()=>Gr,ProductQueryContext:()=>Qe,ProductSearch:()=>qr,ProductSearchContext:()=>Ut,ProductSearchRow:()=>Tt,ProductSelectedItem:()=>zt,ResolvableLoadingValue:()=>$e,ScrollableList:()=>l.ScrollableList,ScrollableListItem:()=>l.ScrollableListItem,SelectionField:()=>Ke,Switch:()=>l.Switch,Textarea:()=>l.Textarea,Theme:()=>l.Theme,UniformMeshLocationContext:()=>Ue,UniformMeshLocationContextProvider:()=>Ae,UniformMeshSdkContext:()=>Oe,UniformMeshSdkContextProvider:()=>Er,badgeIcon:()=>Te,draggableContainer:()=>yt,draggableIcon:()=>Ee,draggableIconOffset:()=>wt,draggableIconWrapper:()=>St,entrySearchBtn:()=>ut,entrySearchConfig:()=>gt,entrySearchConfigHidden:()=>ft,entrySearchLoadMoreBtn:()=>mt,entrySearchResultList:()=>vt,entrySearchSelectIcon:()=>ht,entrySearchSelectImg:()=>bt,entrySearchSelectInput:()=>_r,entrySearchSelectOption:()=>Wr,entrySearchWrapper:()=>pt,productSearchRowActiveIcon:()=>Vt,productSearchRowCategory:()=>Lt,productSearchRowContainer:()=>Pt,productSearchRowContent:()=>Rt,productSearchRowContentActive:()=>kt,productSearchRowDetails:()=>Mt,productSearchRowTitle:()=>xt,productSelectedItemContainer:()=>It,productSelectedItemContent:()=>Gt,productSelectedItemDetails:()=>Dt,productSelectedItemImage:()=>Ie,searchRowBtn:()=>ct,searchRowContainer:()=>nt,searchRowContainerActive:()=>it,searchRowContainerWithPopover:()=>at,searchRowPopover:()=>st,searchRowText:()=>Ve,searchRowTextSmall:()=>Me,selectItemLinkBtn:()=>Le,selectItemLinkContainer:()=>rt,selectItemPopover:()=>tt,selectItemPopoverLabel:()=>me,selectItemSmallText:()=>Z,selectedItemCloseIcon:()=>et,selectedItemContainer:()=>Ze,selectedItemCopy:()=>Xe,selectedItemDetails:()=>Je,selectedItemIcon:()=>je,selectedItemInner:()=>qe,selectedItemTitle:()=>Ye,useInitializeUniformMeshSdk:()=>Vr,useProductQueryContext:()=>Ne,useProductSearchContext:()=>ge,useUniformMeshLocation:()=>Mr,useUniformMeshLocationContext:()=>Be,useUniformMeshSdk:()=>Tr,useUniformMeshSdkContext:()=>He});module.exports=Lr(G);var e=require("@emotion/react"),T=_(require("react"));var ne=require("react"),Ue=(0,ne.createContext)(void 0),Ae=({children:t})=>{let[n,o]=(0,ne.useState)(),r;if(typeof window!="undefined"&&typeof window.UniformMeshSDK!="undefined"){let a=n||window.UniformMeshSDK.getCurrentLocation();r={location:{getValue:a.getValue,getMetadata:a.getMetadata,setValue:async(d,u)=>{await a.setValue(d,u),o(window.UniformMeshSDK.getCurrentLocation())},setValidationResult:async d=>{await a.setValidationResult(d)}}}}return(0,e.jsx)(Ue.Provider,{value:r},t)},Be=()=>{let t=(0,ne.useContext)(Ue);if(!t)throw new Error("useUniformMeshLocationContext must be used within a UniformMeshLocationContextProvider");return t};function Mr(){let{location:t}=Be();return{value:t==null?void 0:t.getValue(),setValue:t==null?void 0:t.setValue,metadata:t==null?void 0:t.getMetadata(),setValidationResult:t==null?void 0:t.setValidationResult}}var Nt=require("@uniformdev/mesh-sdk"),pe=require("react"),Vr=({autoResizingDisabled:t}={})=>{let[n,o]=(0,pe.useState)(),[r,a]=(0,pe.useState)();return(0,pe.useEffect)(()=>{typeof window=="undefined"||r||(typeof window.UniformMeshSDK=="undefined"?(0,Nt.initializeUniformMeshSDK)({autoResizingDisabled:t}).then(d=>{a(d)}).catch(d=>{o(d)}):a(window.UniformMeshSDK))},[t]),{initializing:!r&&!n,error:n,sdk:r}};var Se=require("react");var _t=require("@uniformdev/design-system"),Oe=(0,Se.createContext)(void 0),Er=({children:t})=>{let n;return typeof window!="undefined"&&typeof window.UniformMeshSDK!="undefined"&&(n={sdk:window.UniformMeshSDK}),(0,e.jsx)(Oe.Provider,{value:n},(0,e.jsx)(_t.Theme,null),(0,e.jsx)(Ae,null,t))},He=()=>{let t=(0,Se.useContext)(Oe);if(!t)throw new Error("useUniformMeshSdkContext must be used within a UniformMeshSdkContextProvider");return t};function Tr(){let{sdk:t}=He();return t}var We=_(require("react"));var O=_(require("react"));var ae=require("@emotion/react"),Wt=require("@uniformdev/design-system");var Fe=_(require("react")),$e=({value:t,text:n,loading:o})=>(0,e.jsx)(Fe.default.Fragment,null,!!n&&n,!n&&(0,e.jsx)(Fe.default.Fragment,null,o&&`${t} (Loading...)`,!o&&`${t} (Unresolvable)`));var Ke=({id:t,label:n,loading:o,selectedValues:r,values:a,onAdd:d,onRemove:u})=>{var h;let f=(h=a==null?void 0:a.filter(i=>!(r!=null&&r.includes(i.id.toString()))))!=null?h:[],v=(i,m)=>{i.preventDefault(),u(m)};return(0,e.jsx)("div",null,(0,e.jsx)(Wt.InputSelect,{id:t,name:t,label:n,onChange:i=>d(i.target.value),disabled:o,options:[{value:"",label:"Add..."},...f.map(i=>({value:i.id,label:i.name||i.id}))],css:Array.isArray(r)&&r.length>0?ae.css`
2
2
  margin-bottom: var(--spacing-base);
3
- `:""}),r==null?void 0:r.map(i=>{var h;return(0,e.jsx)("div",{css:ie.css`
3
+ `:""}),r==null?void 0:r.map(i=>{var m;return(0,e.jsx)("div",{css:ae.css`
4
4
  font-size: var(--fs-sm);
5
5
  display: inline-flex;
6
6
  align-items: center;
@@ -9,22 +9,22 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
9
9
  border: 1px solid var(--gray-300);
10
10
  margin-bottom: var(--spacing-sm);
11
11
  margin-right: var(--spacing-sm);
12
- `,key:i},(0,e.jsx)("span",{css:ie.css`
12
+ `,key:i},(0,e.jsx)("span",{css:ae.css`
13
13
  padding: var(--spacing-3);
14
14
  color: var(--gray-800);
15
- `},(0,e.jsx)(Ke,{value:i,loading:o,text:(h=a.find(P=>P.id===i))==null?void 0:h.name})),(0,e.jsx)("button",{css:ie.css`
15
+ `},(0,e.jsx)($e,{value:i,loading:o,text:(m=a.find(S=>S.id===i))==null?void 0:m.name})),(0,e.jsx)("button",{css:ae.css`
16
16
  padding: var(--spacing-3);
17
17
  border-left: 1px solid var(--gray-300);
18
- `,title:"remove",onClick:P=>v(P,i)},(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",css:ie.css`
18
+ `,title:"remove",onClick:S=>v(S,i)},(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",css:ae.css`
19
19
  height: 1.25rem;
20
20
  width: 1.25rem;
21
21
  pointer-events: none;
22
22
  display: block;
23
- `,viewBox:"0 0 20 20",fill:"currentColor"},(0,e.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))))}))};var Ir=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 46 46",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t},(0,e.jsx)("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"})),Ce=Ir;var Dr=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},(0,e.jsx)("path",{d:"M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z",fill:"currentColor"})),Pe=Dr;var Re=require("react-use"),x=require("@uniformdev/design-system"),R=require("@emotion/react"),Wt={count:1,categories:[],brand:"",keyword:"",sort:"date_modified",sortOrder:"desc"},Gr=({value:t,setValue:n,brands:o,categories:r,loading:a,categoriesLoading:d,brandsLoading:m,logoIcon:f,onGetProducts:v,sortOptions:b,sortOrderOptions:i,categoryLabel:h="Product Category",brandLabel:P="Brand",disableBrands:ee,restrictToSingleCategory:K=!1})=>{var V,_,oe;let w=async s=>{n({...Wt,...t||{},...s})},y=(0,H.useMemo)(()=>({...Wt,...t||{}}),[t]),[te,Y]=(0,Re.useAsyncFn)(async s=>await v(s),[v]);(0,Re.useDebounce)(async()=>{await Y({brand:y.brand,categories:y.categories,keyword:y.keyword,sort:y.sort,sortOrder:y.sortOrder,count:y.count})},250,[y]);let A=(0,H.useMemo)(()=>{let s=[];return r==null||r.forEach(E=>{let le=Jt(E,void 0);s.push(...le)}),s},[r]),Q=(0,H.useMemo)(()=>[{value:"",label:"All categories"},...A.map(s=>({label:s.name,value:s.id}))],[A]),he=(0,H.useMemo)(()=>(o==null?void 0:o.map(s=>({id:s.id.toString(),name:s.name})))||[],[o]),re=s=>{let E=(t==null?void 0:t.categories)||[];w({categories:[...E,s]})},N=s=>{var E;w({categories:(E=t==null?void 0:t.categories)==null?void 0:E.filter(le=>le!==s)})},B=s=>{w({brand:s.target.value})},p=s=>{w({count:s||1})};return a?(0,e.jsx)("div",null,"Loading..."):(0,e.jsx)(Ne.Provider,{value:{categories:r,logoIcon:f}},(0,e.jsx)("div",{css:R.css`
23
+ `,viewBox:"0 0 20 20",fill:"currentColor"},(0,e.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))))}))};var Ir=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 46 46",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t},(0,e.jsx)("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"})),we=Ir;var Dr=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},(0,e.jsx)("path",{d:"M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z",fill:"currentColor"})),Ce=Dr;var Pe=require("react-use"),x=require("@uniformdev/design-system"),P=require("@emotion/react"),Zt={count:1,categories:[],brand:"",keyword:"",sort:"date_modified",sortOrder:"desc"},Gr=({value:t,setValue:n,brands:o,categories:r,loading:a,categoriesLoading:d,brandsLoading:u,logoIcon:f,onGetProducts:v,sortOptions:h,sortOrderOptions:i,categoryLabel:m="Product Category",brandLabel:S="Brand",disableBrands:j,restrictToSingleCategory:$=!1})=>{var M,N,re;let w=async s=>{n({...Zt,...t||{},...s})},b=(0,O.useMemo)(()=>({...Zt,...t||{}}),[t]),[ee,Y]=(0,Pe.useAsyncFn)(async s=>await v(s),[v]);(0,Pe.useDebounce)(async()=>{await Y({brand:b.brand,categories:b.categories,keyword:b.keyword,sort:b.sort,sortOrder:b.sortOrder,count:b.count})},250,[b]);let z=(0,O.useMemo)(()=>{let s=[];return r==null||r.forEach(V=>{let de=Jt(V,void 0);s.push(...de)}),s},[r]),K=(0,O.useMemo)(()=>[{value:"",label:"All categories"},...z.map(s=>({label:s.name,value:s.id}))],[z]),ve=(0,O.useMemo)(()=>(o==null?void 0:o.map(s=>({id:s.id.toString(),name:s.name})))||[],[o]),te=s=>{let V=(t==null?void 0:t.categories)||[];w({categories:[...V,s]})},Q=s=>{var V;w({categories:(V=t==null?void 0:t.categories)==null?void 0:V.filter(de=>de!==s)})},U=s=>{w({brand:s.target.value})},p=s=>{w({count:s||1})};return a?(0,e.jsx)("div",null,"Loading..."):(0,e.jsx)(Qe.Provider,{value:{categories:r,logoIcon:f}},(0,e.jsx)("div",{css:P.css`
24
24
  > :not(:last-child) {
25
25
  margin-bottom: var(--spacing-md);
26
26
  }
27
- `},K?(0,e.jsx)(x.InputSelect,{id:"selection-field-product-category",label:h,disabled:a,value:(_=(V=y.categories)==null?void 0:V[0])!=null?_:"",options:Q,onChange:s=>{w({categories:s.target.value===""?[]:[s.target.value]})}}):(0,e.jsx)(Qe,{loading:d||!1,id:"selection-field-product-category",label:h,onAdd:re,onRemove:N,selectedValues:y.categories,values:A}),(0,e.jsx)("div",{css:R.css`
27
+ `},$?(0,e.jsx)(x.InputSelect,{id:"selection-field-product-category",label:m,disabled:a,value:(N=(M=b.categories)==null?void 0:M[0])!=null?N:"",options:K,onChange:s=>{w({categories:s.target.value===""?[]:[s.target.value]})}}):(0,e.jsx)(Ke,{loading:d||!1,id:"selection-field-product-category",label:m,onAdd:te,onRemove:Q,selectedValues:b.categories,values:z}),(0,e.jsx)("div",{css:P.css`
28
28
  display: flex;
29
29
  flex-wrap: wrap;
30
30
  column-gap: var(--spacing-lg);
@@ -32,12 +32,12 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
32
32
  ${(0,x.mq)("md")} {
33
33
  flex-wrap: nowrap;
34
34
  }
35
- `},ee?null:(0,e.jsx)("div",{css:R.css`
35
+ `},j?null:(0,e.jsx)("div",{css:P.css`
36
36
  width: 50%;
37
- `},(0,e.jsx)(x.InputSelect,{id:"brand",name:"brand",label:P,disabled:m,value:y.brand,onChange:B,options:[{value:"",label:"Choose..."},...he.map(s=>({value:s.id,label:s.name}))]})),(0,e.jsx)("div",{css:R.css`
37
+ `},(0,e.jsx)(x.InputSelect,{id:"brand",name:"brand",label:S,disabled:u,value:b.brand,onChange:U,options:[{value:"",label:"Choose..."},...ve.map(s=>({value:s.id,label:s.name}))]})),(0,e.jsx)("div",{css:P.css`
38
38
  flex-grow: 1;
39
39
  position: relative;
40
- `},(0,e.jsx)(x.Input,{id:"keyword-search",name:"keyword-search",label:"Keyword",value:y.keyword,placeholder:"Enter keyword",onChange:s=>w({keyword:s.target.value})}))),(0,e.jsx)("div",{css:R.css`
40
+ `},(0,e.jsx)(x.Input,{id:"keyword-search",name:"keyword-search",label:"Keyword",value:b.keyword,placeholder:"Enter keyword",onChange:s=>w({keyword:s.target.value})}))),(0,e.jsx)("div",{css:P.css`
41
41
  display: flex;
42
42
  flex-wrap: wrap;
43
43
  column-gap: var(--spacing-lg);
@@ -45,31 +45,31 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
45
45
  ${(0,x.mq)("md")} {
46
46
  flex-wrap: nowrap;
47
47
  }
48
- `},(0,e.jsx)("div",{css:R.css`
48
+ `},(0,e.jsx)("div",{css:P.css`
49
49
  width: 100%;
50
50
  ${(0,x.mq)("md")} {
51
51
  width: 33.333333%;
52
52
  }
53
53
  position: relative;
54
- `},(0,e.jsx)(x.Input,{id:"count",name:"count",type:"number",min:1,step:1,value:y.count,onChange:s=>p(s.target.valueAsNumber),label:"Count"}),(0,e.jsx)("div",{css:R.css`
54
+ `},(0,e.jsx)(x.Input,{id:"count",name:"count",type:"number",min:1,step:1,value:b.count,onChange:s=>p(s.target.valueAsNumber),label:"Count"}),(0,e.jsx)("div",{css:P.css`
55
55
  position: absolute;
56
56
  bottom: var(--spacing-sm);
57
57
  right: var(--spacing-sm);
58
58
  display: flex;
59
59
  gap: var(--spacing-sm);
60
- `},(0,e.jsx)(qt,{onCountChange:()=>p(y.count-1),countIcon:"decrement",disabled:y.count===1}),(0,e.jsx)(qt,{onCountChange:()=>p(y.count+1),countIcon:"increment"}))),Array.isArray(b)&&b.length>0?(0,e.jsx)("div",{css:R.css`
60
+ `},(0,e.jsx)(qt,{onCountChange:()=>p(b.count-1),countIcon:"decrement",disabled:b.count===1}),(0,e.jsx)(qt,{onCountChange:()=>p(b.count+1),countIcon:"increment"}))),Array.isArray(h)&&h.length>0?(0,e.jsx)("div",{css:P.css`
61
61
  flex-grow: 1;
62
62
  ${(0,x.mq)("md")} {
63
63
  width: 33.333333%;
64
64
  }
65
- `},(0,e.jsx)(x.InputSelect,{id:"sort",name:"sort",label:"Sort",value:y.sort,onChange:s=>w({sort:s.target.value}),options:[{value:"",label:"Select a sort"},...b.map(s=>({value:s.sortKey,label:s.name}))]})):null,Array.isArray(i)&&i.length>0?(0,e.jsx)("div",{css:R.css`
65
+ `},(0,e.jsx)(x.InputSelect,{id:"sort",name:"sort",label:"Sort",value:b.sort,onChange:s=>w({sort:s.target.value}),options:[{value:"",label:"Select a sort"},...h.map(s=>({value:s.sortKey,label:s.name}))]})):null,Array.isArray(i)&&i.length>0?(0,e.jsx)("div",{css:P.css`
66
66
  flex-grow: 1;
67
- `},(0,e.jsx)(x.InputSelect,{id:"sort-order",name:"sort-order",label:"Sort Order",value:y.sortOrder,onChange:s=>w({sortOrder:s.target.value}),options:i.map(s=>({value:s.sortOrderKey,label:s.name}))})):null),(0,e.jsx)("div",null,(0,e.jsx)("h3",{css:R.css`
67
+ `},(0,e.jsx)(x.InputSelect,{id:"sort-order",name:"sort-order",label:"Sort Order",value:b.sortOrder,onChange:s=>w({sortOrder:s.target.value}),options:i.map(s=>({value:s.sortOrderKey,label:s.name}))})):null),(0,e.jsx)("div",null,(0,e.jsx)("h3",{css:P.css`
68
68
  font-size: var(--fs-md);
69
69
  line-height: var(--spacing-md);
70
70
  font-weight: var(--fw-bold);
71
71
  margin-bottom: var(--spacing-xs);
72
- `},"Result Preview"),(0,e.jsx)(Ze,{products:(oe=te.value)==null?void 0:oe.products}))))};function Jt(t,n){var d;let o=[],r=n?`${n.name} > `:"",a={id:t.id.toString(),name:`${r}${t.name}`};return o.push(a),(d=t.children)==null||d.forEach(m=>{let f=Jt(m,a);o.push(...f)}),o}function qt({onCountChange:t,countIcon:n,disabled:o}){return(0,e.jsx)("button",{css:R.css`
72
+ `},"Result Preview"),(0,e.jsx)(_e,{products:(re=ee.value)==null?void 0:re.products}))))};function Jt(t,n){var d;let o=[],r=n?`${n.name} > `:"",a={id:t.id.toString(),name:`${r}${t.name}`};return o.push(a),(d=t.children)==null||d.forEach(u=>{let f=Jt(u,a);o.push(...f)}),o}function qt({onCountChange:t,countIcon:n,disabled:o}){return(0,e.jsx)("button",{css:P.css`
73
73
  width: 2.25rem;
74
74
  height: 2.25rem;
75
75
  border: 1px solid var(--gray-300);
@@ -81,58 +81,58 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
81
81
  &:hover {
82
82
  background-color: var(--gray-200);
83
83
  }
84
- ${o?R.css`
84
+ ${o?P.css`
85
85
  cursor: not-allowed;
86
86
  opacity: 0.3;
87
87
  `:""}
88
- `,onClick:t,disabled:o},n==="increment"?(0,e.jsx)(Ce,{css:R.css`
88
+ `,onClick:t,disabled:o},n==="increment"?(0,e.jsx)(we,{css:P.css`
89
89
  width: 1rem;
90
90
  height: 1rem;
91
- `}):(0,e.jsx)(Pe,{css:R.css`
91
+ `}):(0,e.jsx)(Ce,{css:P.css`
92
92
  width: 1rem;
93
93
  height: 1rem;
94
- `}))}var Ne=H.default.createContext(void 0),_e=()=>{let t=(0,H.useContext)(Ne);if(!t)throw new Error("useProductQueryContext must be used within a <ProductQueryContext> provider");return t};function W({src:t,alt:n,className:o}){let r=t&&typeof t!="string"?t:null;return r?(0,e.jsx)(r,{className:o}):(0,e.jsx)("img",{src:t,alt:n,className:o})}var k=require("@emotion/react"),Xt=require("@uniformdev/design-system"),Ze=({products:t})=>{let{categories:n,logoIcon:o}=_e();return(0,e.jsx)(We.default.Fragment,null,(0,e.jsx)("p",{css:k.css`
94
+ `}))}var Qe=O.default.createContext(void 0),Ne=()=>{let t=(0,O.useContext)(Qe);if(!t)throw new Error("useProductQueryContext must be used within a <ProductQueryContext> provider");return t};function W({src:t,alt:n,className:o}){let r=t&&typeof t!="string"?t:null;return r?(0,e.jsx)(r,{className:o}):(0,e.jsx)("img",{src:t,alt:n,className:o})}var R=require("@emotion/react"),Xt=require("@uniformdev/design-system"),_e=({products:t})=>{let{categories:n,logoIcon:o}=Ne();return(0,e.jsx)(We.default.Fragment,null,(0,e.jsx)("p",{css:R.css`
95
95
  margin-bottom: var(--spacing-base);
96
- `},"Matching ",(t==null?void 0:t.length)||0," products"),(0,e.jsx)("ul",{css:[k.css`
96
+ `},"Matching ",(t==null?void 0:t.length)||0," products"),(0,e.jsx)("ul",{css:[R.css`
97
97
  max-height: 24rem;
98
98
  overflow-x: auto;
99
- `,Xt.scrollbarStyles]},t==null?void 0:t.map((r,a)=>{var f;let[d]=(r==null?void 0:r.categories)||[],m=typeof d=="undefined"||!n||(f=n.find(v=>v.id===d.id))==null?void 0:f.name;return(0,e.jsx)("li",{key:`product-${r.id}`,css:k.css`
99
+ `,Xt.scrollbarStyles]},t==null?void 0:t.map((r,a)=>{var f;let[d]=(r==null?void 0:r.categories)||[],u=typeof d=="undefined"||!n||(f=n.find(v=>v.id===d.id))==null?void 0:f.name;return(0,e.jsx)("li",{key:`product-${r.id}`,css:R.css`
100
100
  border: 1px solid var(--gray-300);
101
101
  border-radius: var(--rounded-md);
102
102
  background-color: var(--gray-100);
103
103
  margin: var(--spacing-base) 0;
104
- `},(0,e.jsx)("div",{css:k.css`
104
+ `},(0,e.jsx)("div",{css:R.css`
105
105
  padding: var(--spacing-sm);
106
106
  display: flex;
107
107
  flex-grow: 1;
108
108
  margin-right: var(--spacing-sm);
109
109
  gap: var(--spacing-base);
110
110
  align-items: center;
111
- `},r.thumbnailUrl?(0,e.jsx)("img",{src:r.thumbnailUrl,alt:r.name||`Product ${a}`,css:k.css`
111
+ `},r.thumbnailUrl?(0,e.jsx)("img",{src:r.thumbnailUrl,alt:r.name||`Product ${a}`,css:R.css`
112
112
  background-color: var(--gray-200);
113
113
  width: 3.5rem;
114
114
  height: 3.5rem;
115
115
  object-fit: cover;
116
- `}):(0,e.jsx)("div",{css:k.css`
116
+ `}):(0,e.jsx)("div",{css:R.css`
117
117
  height: 3.5rem;
118
118
  width: 3.5rem;
119
119
  background-color: var(--gray-100);
120
- `}),(0,e.jsx)("h4",{css:k.css`
120
+ `}),(0,e.jsx)("h4",{css:R.css`
121
121
  font-weight: var(--fw-bold);
122
122
  width: 33.333333%;
123
123
  font-size: var(--fs-sm);
124
- `},r.name,m&&(0,e.jsx)("span",{css:k.css`
124
+ `},r.name,u&&(0,e.jsx)("span",{css:R.css`
125
125
  display: block;
126
126
  font-weight: var(--fw-regular);
127
- `},m)),r&&(0,e.jsx)(We.default.Fragment,null,(0,e.jsx)("p",{css:k.css`
127
+ `},u)),r&&(0,e.jsx)(We.default.Fragment,null,(0,e.jsx)("p",{css:R.css`
128
128
  margin-right: var(--spacing-lg);
129
129
  font-size: var(--fs-sm);
130
- `},"SKU: ",r.sku||r.id,(0,e.jsx)("br",null)),r.price!==void 0?(0,e.jsx)("p",{css:k.css`
130
+ `},"SKU: ",r.sku||r.id,(0,e.jsx)("br",null)),r.price!==void 0?(0,e.jsx)("p",{css:R.css`
131
131
  margin-right: var(--spacing-lg);
132
132
  font-size: var(--fs-sm);
133
- `},(0,e.jsx)("span",{css:k.css`
133
+ `},(0,e.jsx)("span",{css:R.css`
134
134
  display: block;
135
- `},"Price: ",r.price)):null,(0,e.jsx)("a",{css:k.css`
135
+ `},"Price: ",r.price)):null,(0,e.jsx)("a",{css:R.css`
136
136
  display: inline-flex;
137
137
  justify-content: space-between;
138
138
  align-items: center;
@@ -144,19 +144,19 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
144
144
  &:hover {
145
145
  background-color: var(--gray-100);
146
146
  }
147
- `,href:r.url,title:`Goto ${r.name}`,target:"__blank",rel:"noopener"},(0,e.jsx)("span",{css:k.css`
147
+ `,href:r.url,title:`Goto ${r.name}`,target:"__blank",rel:"noopener"},(0,e.jsx)("span",{css:R.css`
148
148
  font-size: var(--fs-sm);
149
149
  margin-right: var(--spacing-sm);
150
- `},"Edit"),o?(0,e.jsx)(W,{src:o,alt:"Logo",css:k.css`
150
+ `},"Edit"),o?(0,e.jsx)(W,{src:o,alt:"Logo",css:R.css`
151
151
  width: 2.25rem;
152
152
  height: 2.25rem;
153
- `}):null))))})))};var X=Z(require("react"));var G=Z(require("react"));var xe={};Qt(xe,{Caution:()=>Yt,Checkmark:()=>ke,ChevronDown:()=>Le,Close:()=>se,Danger:()=>jt,ExclamationPoint:()=>er,Info:()=>ce,Lightbulb:()=>tr,MagnifyingGlass:()=>rr,MaximizeAlt:()=>or,Minus:()=>Pe,MoreVerticalAlt:()=>me,Plus:()=>Ce});var zr=t=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",...t},(0,e.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"})),Yt=zr;var Ur=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t},(0,e.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"})),ke=Ur;var Ar=t=>(0,e.jsx)("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",...t},(0,e.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"})),Le=Ar;var Br=t=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 19 19",fill:"currentColor",...t},(0,e.jsx)("g",{fillRule:"evenodd"},(0,e.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,e.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"}))),se=Br;var Or=t=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...t},(0,e.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"})),jt=Or;var Hr=t=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 16",fill:"currentColor",...t},(0,e.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"})),er=Hr;var Fr=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",...t},(0,e.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,e.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"})),ce=Fr;var $r=t=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...t},(0,e.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"})),tr=$r;var Kr=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 26 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t},(0,e.jsx)("g",{clipPath:"url(#magnifying-glass_svg__a)"},(0,e.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,e.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,e.jsx)("defs",null,(0,e.jsx)("clipPath",{id:"magnifying-glass_svg__a"},(0,e.jsx)("path",{fill:"#fff",transform:"translate(.558)",d:"M0 0h24.935v24H0z"})))),rr=Kr;var Qr=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",...t},(0,e.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"})),or=Qr;var Nr=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",...t},(0,e.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"})),me=Nr;var sr=require("react-use"),cr=require("uuid");var F=Z(require("react"));function nr(t,n){let o=window.open(t,"_blank"),r=setInterval(()=>{o!=null&&o.closed&&(clearInterval(r),n())},500)}var ir=require("timeago.js");var M=require("@emotion/react"),ar=require("@uniformdev/design-system"),qe=M.css`
153
+ `}):null))))})))};var X=_(require("react"));var D=_(require("react"));var xe={};Qt(xe,{Caution:()=>Yt,Checkmark:()=>Re,ChevronDown:()=>ke,Close:()=>ie,Danger:()=>jt,ExclamationPoint:()=>er,Info:()=>se,Lightbulb:()=>tr,MagnifyingGlass:()=>rr,MaximizeAlt:()=>or,Minus:()=>Ce,MoreVerticalAlt:()=>ue,Plus:()=>we});var zr=t=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",...t},(0,e.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"})),Yt=zr;var Ur=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t},(0,e.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"})),Re=Ur;var Ar=t=>(0,e.jsx)("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",...t},(0,e.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"})),ke=Ar;var Br=t=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 19 19",fill:"currentColor",...t},(0,e.jsx)("g",{fillRule:"evenodd"},(0,e.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,e.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"}))),ie=Br;var Or=t=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...t},(0,e.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"})),jt=Or;var Hr=t=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 14 16",fill:"currentColor",...t},(0,e.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"})),er=Hr;var Fr=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",...t},(0,e.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,e.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"})),se=Fr;var $r=t=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 12 16",fill:"currentColor",...t},(0,e.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"})),tr=$r;var Kr=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 26 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t},(0,e.jsx)("g",{clipPath:"url(#magnifying-glass_svg__a)"},(0,e.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,e.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,e.jsx)("defs",null,(0,e.jsx)("clipPath",{id:"magnifying-glass_svg__a"},(0,e.jsx)("path",{fill:"#fff",transform:"translate(.558)",d:"M0 0h24.935v24H0z"})))),rr=Kr;var Qr=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",...t},(0,e.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"})),or=Qr;var Nr=t=>(0,e.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",...t},(0,e.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"})),ue=Nr;var sr=require("react-use"),cr=require("uuid");var H=_(require("react"));function nr(t,n){let o=window.open(t,"_blank"),r=setInterval(()=>{o!=null&&o.closed&&(clearInterval(r),n())},500)}var ir=require("timeago.js");var L=require("@emotion/react"),ar=require("@uniformdev/design-system"),Ze=L.css`
154
154
  border: 1px solid var(--gray-200);
155
155
  background: var(--gray-50);
156
156
  border-radius: var(--rounded-base);
157
157
  display: flex;
158
158
  width: 100%;
159
- `,Je=M.css`
159
+ `,qe=L.css`
160
160
  align-items: center;
161
161
  display: flex;
162
162
  flex-grow: 1;
@@ -164,45 +164,47 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
164
164
  margin-inline: 0 var(--spacing-sm);
165
165
  padding: var(--spacing-base) var(--spacing-base) var(--spacing-base) var(--spacing-lg);
166
166
  position: relative;
167
- `,Xe=M.css`
167
+ `,Je=L.css`
168
168
  flex-grow: 1;
169
- `,Ye=M.css`
169
+ `,Xe=L.css`
170
170
  align-items: start;
171
171
  display: inline-flex;
172
172
  position: relative;
173
- `,je=M.css`
173
+ `,Ye=L.css`
174
174
  color: var(--brand-secondary-1);
175
175
  font-size: var(--fs-base);
176
176
  font-weight: var(--fw-bold);
177
177
  line-height: 1;
178
- `,et=M.css`
178
+ `,je=L.css`
179
179
  width: 1.5rem;
180
180
  height: 1.5rem;
181
- `,tt=M.css`
181
+ `,et=L.css`
182
182
  width: 1rem;
183
183
  height: 1rem;
184
- `,rt=M.css`
184
+ `,tt=L.css`
185
185
  background: var(--white);
186
186
  border-radius: var(--rounded-base);
187
187
  border-left: 4px solid var(--brand-secondary-3);
188
+ box-shadow: var(--shadow-base);
188
189
  position: fixed;
189
190
  padding: var(--spacing-base);
190
191
  z-index: var(--z-10);
191
192
  width: max-content;
192
- `,q=M.css`
193
+ `,Z=L.css`
193
194
  font-size: var(--fs-sm);
194
- `,ge=M.css`
195
+ `,me=L.css`
195
196
  font-weight: var(--fw-bold);
196
197
  margin-right: var(--spacing-sm);
197
- `,ot=M.css`
198
+ `,rt=L.css`
198
199
  display: flex;
199
200
  flex-direction: column;
200
201
  gap: var(--spacing-sm);
201
202
 
202
203
  ${(0,ar.mq)("md")} {
203
204
  flex-direction: row;
205
+ min-width: 200px;
204
206
  }
205
- `,Me=M.css`
207
+ `,Le=L.css`
206
208
  align-items: center;
207
209
  background: var(--white);
208
210
  border-radius: var(--rounded-base);
@@ -215,40 +217,42 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
215
217
  &:hover {
216
218
  background: var(--gray-50);
217
219
  }
218
- `;var O=require("@emotion/react");var nt=({selectedItem:t,logoIcon:n,onDeselect:o,onEditClosed:r})=>{var b;let a=(0,F.useRef)(null),d=(0,F.useRef)(null),[m,f]=(0,F.useState)(!1);(0,F.useEffect)(()=>{let i=P=>{a.current&&!a.current.contains(P.target)&&d.current&&!d.current.contains(P.target)&&f(!1)},h=()=>{f(!1)};return window.addEventListener("resize",h,!0),document.addEventListener("scroll",i,!0),document.addEventListener("mousedown",i),()=>{window.removeEventListener("resize",h,!0),document.removeEventListener("scroll",i,!0),document.removeEventListener("mousedown",i)}},[d]);let v=()=>{var i;if(f(!m),d.current&&a.current){let h=(i=a==null?void 0:a.current)==null?void 0:i.getBoundingClientRect();d.current.style.top=`${h.top+30}px`}};return(0,e.jsx)("div",{css:qe,key:t.id},(0,e.jsx)("div",{css:Je},(0,e.jsx)("div",{css:Xe},(0,e.jsx)("div",{css:Ye},(0,e.jsx)("h4",{css:[je,t.popoverData?O.css`
220
+ `;var B=require("@emotion/react");var ot=({selectedItem:t,logoIcon:n,onDeselect:o,onEditClosed:r})=>{var h;let a=(0,H.useRef)(null),d=(0,H.useRef)(null),[u,f]=(0,H.useState)(!1);(0,H.useEffect)(()=>{let i=S=>{a.current&&!a.current.contains(S.target)&&d.current&&!d.current.contains(S.target)&&f(!1)},m=()=>{f(!1)};return window.addEventListener("resize",m,!0),document.addEventListener("scroll",i,!0),document.addEventListener("mousedown",i),()=>{window.removeEventListener("resize",m,!0),document.removeEventListener("scroll",i,!0),document.removeEventListener("mousedown",i)}},[d]);let v=()=>{var i;if(f(!u),d.current&&a.current){let m=(i=a==null?void 0:a.current)==null?void 0:i.getBoundingClientRect(),S=d.current.offsetWidth;d.current.style.top=`${m.top+30}px`,d.current.style.left=`${m.left-S+30}px`}};return(0,e.jsx)("div",{css:Ze,key:t.id},(0,e.jsx)("div",{css:qe},(0,e.jsx)("div",{css:Je},(0,e.jsx)("div",{css:Xe},(0,e.jsx)("h4",{css:[Ye,t.popoverData?B.css`
219
221
  margin-bottom: var(--spacing-sm);
220
- `:""],title:`ID: ${t.id}`,"data-test-id":"entry-id"},t.title||t.id||""),t.popoverData?(0,e.jsx)(F.default.Fragment,null,(0,e.jsx)("button",{type:"button",ref:a,css:O.css`
222
+ `:""],title:`ID: ${t.id}`,"data-test-id":"entry-id"},t.title||t.id||""),t.popoverData?(0,e.jsx)(H.default.Fragment,null,(0,e.jsx)("button",{type:"button",ref:a,css:B.css`
221
223
  margin: calc(var(--spacing-xs) * -1) 0 calc(var(--spacing-xs) * -1) var(--spacing-sm);
222
- `,"aria-controls":"path-details","aria-expanded":m,onClick:v},(0,e.jsx)(ce,{width:24,height:24,css:O.css`
224
+ `,"aria-controls":"path-details","aria-expanded":u,onClick:v},(0,e.jsx)(se,{width:24,height:24,css:B.css`
223
225
  color: var(--gray-400);
224
- `})),(0,e.jsx)("div",{id:"path-details","aria-hidden":!m,ref:d,css:[rt,m?O.css`
226
+ `})),(0,e.jsx)("div",{id:"path-details","aria-hidden":!u,ref:d,css:[tt,u?B.css`
225
227
  visibility: visible;
226
- `:O.css`
228
+ `:B.css`
227
229
  visibility: hidden;
228
- `]},Object.entries(t.popoverData).map(([i,h],P)=>(0,e.jsx)("div",{css:q,key:P},(0,e.jsx)("span",{css:ge},i,":"),h)))):null),t.createdDate&&(0,e.jsx)("div",{css:q},(0,e.jsx)("span",{css:ge},"Created:"),(0,ir.format)((b=t.createdDate)!=null?b:0)),(0,e.jsx)("div",{css:O.css`
230
+ `]},Object.entries(t.popoverData).map(([i,m],S)=>(0,e.jsx)("div",{css:Z,key:S},(0,e.jsx)("span",{css:me},i,":"),m)))):null),t.createdDate&&(0,e.jsx)("div",{css:Z},(0,e.jsx)("span",{css:me},"Created:"),(0,ir.format)((h=t.createdDate)!=null?h:0)),(0,e.jsx)("div",{css:B.css`
229
231
  display: flex;
230
232
  gap: var(--spacing-base);
231
- `},t.metadata?Object.entries(t.metadata).filter(([i])=>["type","status"].includes(i.toLocaleLowerCase())).map(([i,h])=>(0,e.jsx)("span",{css:q,key:i},h)):null),t.metadata?Object.entries(t.metadata).filter(([i])=>!["type","status"].includes(i.toLocaleLowerCase())).map(([i,h])=>(0,e.jsx)("div",{css:[q,O.css`
233
+ `},t.metadata?Object.entries(t.metadata).filter(([i])=>["type","status"].includes(i.toLocaleLowerCase())).map(([i,m])=>(0,e.jsx)("span",{css:Z,key:i},m)):null),t.metadata?Object.entries(t.metadata).filter(([i])=>!["type","status"].includes(i.toLocaleLowerCase())).map(([i,m])=>(0,e.jsx)("div",{css:[Z,B.css`
232
234
  order: 1;
233
- `],key:i},(0,e.jsx)("span",{css:[ge,O.css`
235
+ `],key:i},(0,e.jsx)("span",{css:[me,B.css`
234
236
  order: 1;
235
- `]},i,":"),h)):null),(0,e.jsx)("div",{css:ot},t.editLink?(0,e.jsx)("a",{href:t.editLink,title:"edit",rel:"noopener",target:"__blank",onClick:i=>{r&&(nr(i.currentTarget.href,()=>r(t)),i.preventDefault())},css:Me},(0,e.jsx)("span",{css:q},"Edit"),(0,e.jsx)(W,{src:n,css:et,alt:"Logo"})):null,(0,e.jsx)("button",{type:"button",onClick:i=>{i.preventDefault(),o(t)},css:Me},(0,e.jsx)("span",{css:q},"Unlink"),(0,e.jsx)(se,{css:[tt,O.css`
237
+ `]},i,":"),m)):null),(0,e.jsx)("div",{css:rt},t.editLink?(0,e.jsx)("a",{href:t.editLink,title:"edit",rel:"noopener",target:"__blank",onClick:i=>{r&&(nr(i.currentTarget.href,()=>r(t)),i.preventDefault())},css:Le},(0,e.jsx)("span",{css:Z},"Edit"),(0,e.jsx)(W,{src:n,css:je,alt:"Logo"})):null,(0,e.jsx)("button",{type:"button",onClick:i=>{i.preventDefault(),o(t)},css:Le},(0,e.jsx)("span",{css:Z},"Unlink"),(0,e.jsx)(ie,{css:[et,B.css`
236
238
  color: var(--brand-secondary-5);
237
- `]})))))};var $=Z(require("react"));var j=require("@emotion/react"),at=j.css`
239
+ `]})))))};var F=_(require("react"));var q=require("@emotion/react"),nt=q.css`
238
240
  cursor: pointer;
239
241
  padding: var(--spacing-sm);
240
242
  position: relative;
241
243
  transition: background-color var(--duration-fast) var(--timing-ease-out),
242
244
  color var(--duration-fast) var(--timing-ease-out);
243
- `,it=j.css`
245
+ `,at=q.css`
246
+ padding-right: var(--spacing-lg);
247
+ `,it=q.css`
244
248
  background: var(--brand-secondary-3);
245
249
  color: var(--white);
246
- `,Ve=j.css`
250
+ `,Me=q.css`
247
251
  font-size: var(--fs-xs);
248
- `,Ee=j.css`
252
+ `,Ve=q.css`
249
253
  font-weight: var(--fw-bold);
250
254
  margin-right: var(--spacing-sm);
251
- `,st=j.css`
255
+ `,st=q.css`
252
256
  background: var(--white);
253
257
  border-left: 4px solid var(--brand-secondary-3);
254
258
  border-radius: var(--rounded-base);
@@ -260,14 +264,14 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
260
264
  right: var(--spacing-xl);
261
265
  z-index: var(--z-10);
262
266
  width: max-content;
263
- `,ct=j.css`
267
+ `,ct=q.css`
264
268
  position: absolute;
265
269
  inset: 0 var(--spacing-sm) 0 auto;
266
- `;var dt=require("@emotion/react"),lt=({result:t,isSelected:n,triggerSelection:o})=>{let r=(0,$.useRef)(null),a=(0,$.useRef)(null),[d,m]=(0,$.useState)(!1);(0,$.useEffect)(()=>{function v(b){r.current&&!r.current.contains(b.target)&&a.current&&!a.current.contains(b.target)&&m(!1)}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[a]);let f=v=>{v.stopPropagation(),m(!d)};return(0,e.jsx)("div",{key:t.id,css:[at,n?it:void 0],"data-value":t.id,role:"option",tabIndex:-1,onClick:()=>o()},t.title,t.popoverData&&n?(0,e.jsx)($.default.Fragment,null,(0,e.jsx)("button",{type:"button",ref:r,css:ct,"aria-controls":"path-details",onClick:v=>f(v),"aria-expanded":d},(0,e.jsx)(ce,{width:24,height:24})),(0,e.jsx)("div",{id:"path-details","aria-hidden":!d,ref:a,css:[st,d?dt.css`
270
+ `;var dt=require("@emotion/react"),lt=({result:t,isSelected:n,triggerSelection:o})=>{let r=(0,F.useRef)(null),a=(0,F.useRef)(null),[d,u]=(0,F.useState)(!1);(0,F.useEffect)(()=>{function v(h){r.current&&!r.current.contains(h.target)&&a.current&&!a.current.contains(h.target)&&u(!1)}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[a]);let f=v=>{v.stopPropagation(),u(!d)};return(0,e.jsx)("div",{key:t.id,css:[nt,n?it:void 0,t.popoverData?at:void 0],"data-value":t.id,role:"option",tabIndex:-1,onClick:()=>o()},t.title,t.popoverData&&n?(0,e.jsx)(F.default.Fragment,null,(0,e.jsx)("button",{type:"button",ref:r,css:ct,"aria-controls":"path-details",onClick:v=>f(v),"aria-expanded":d},(0,e.jsx)(se,{width:24,height:24})),(0,e.jsx)("div",{id:"path-details","aria-hidden":!d,ref:a,css:[st,d?dt.css`
267
271
  visibility: visible;
268
272
  `:dt.css`
269
273
  visibility: hidden;
270
- `]},t.metadata&&Object.entries(t.metadata).map(([v,b],i)=>(0,e.jsx)("div",{css:Ve,key:i},(0,e.jsx)("span",{css:Ee},v,":"),b)),Object.entries(t.popoverData).map(([v,b],i)=>(0,e.jsx)("div",{css:Ve,key:i},(0,e.jsx)("span",{css:Ee},v,":"),b)))):null)};var de=require("react-beautiful-dnd");var C=require("@emotion/react"),pt=C.css`
274
+ `]},t.metadata&&Object.entries(t.metadata).map(([v,h],i)=>(0,e.jsx)("div",{css:Me,key:i},(0,e.jsx)("span",{css:Ve},v,":"),h)),Object.entries(t.popoverData).map(([v,h],i)=>(0,e.jsx)("div",{css:Me,key:i},(0,e.jsx)("span",{css:Ve},v,":"),h)))):null)};var ce=require("react-beautiful-dnd");var C=require("@emotion/react"),pt=C.css`
271
275
  background: var(--white);
272
276
  border: 1px solid var(--gray-300);
273
277
  border-radius: var(--rounded-base);
@@ -329,7 +333,7 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
329
333
  height: 1.25rem;
330
334
  transition: transform var(--duration-fast) var(--timing-ease-out);
331
335
  transform: rotate(0);
332
- `,Zr=C.css`
336
+ `,Wr=C.css`
333
337
  background: var(--white);
334
338
  color: var(--brand-secondary-1);
335
339
  `,yt=C.css`
@@ -346,45 +350,45 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
346
350
  inset: 0 auto 0 0;
347
351
  margin-block: auto;
348
352
  opacity: 0;
349
- `,Te=C.css`
353
+ `,Ee=C.css`
350
354
  color: var(--brand-secondary-1);
351
355
  `,wt=C.css`
352
356
  position: absolute;
353
357
  left: 0.375rem;
354
- `,Ie=C.css`
358
+ `,Te=C.css`
355
359
  width: calc(var(--spacing-lg) + var(--spacing-xs));
356
360
  height: calc(var(--spacing-lg) + var(--spacing-xs));
357
- `;var D=require("@emotion/react"),S=require("@uniformdev/design-system"),Wr=({searchText:t,selectedContentType:n})=>{let o="No content found";return n&&(o=`No ${n} content was found`),t&&(o=`${o} for keyword '${t}'.`),(0,e.jsx)(S.Callout,{type:"info"},o)},Ct=({search:t,results:n,contentTypes:o,selectedItems:r,logoIcon:a,select:d,multiSelect:m,multiSelectId:f,rowComponent:v,selectedItemComponent:b,totalResults:i,resultsLoading:h,requireContentType:P,onAddNew:ee,onEditClosed:K,onCancel:w,noResultsComponent:y,helpComponent:te,onSort:Y,typeSelectorLabel:A="Content Type Select",typeSelectorAllTypesOptionText:Q="All content types"})=>{var Ft,$t,Kt;let re=()=>P?Array.isArray(o)&&o.length>0?o[0].id:"":"any",[N,B]=G.useState(""),[p,V]=G.useState(re),[_,oe]=G.useState(!1),[s,E]=G.useState([]),[le,At]=G.useState(!1),be=(0,sr.useThrottle)(N,750);G.useEffect(()=>{t(be,{count:5,offset:0,contentType:p==="any"?void 0:p})},[be,p]);let pr=c=>{s.some(g=>g.id===c.id)?E(g=>g.filter(ne=>ne.id!==c.id)):E(m?g=>[...g,c]:[c])},ur=()=>{V(re()),B(""),E(r!=null&&r.length?r:[])},mr=()=>{oe(c=>!c),_||ur()},Bt=c=>{d((r==null?void 0:r.filter(g=>g.id!==c.id))||[],"")},gr=c=>{c.preventDefault(),d(s,p),oe(!1)},fr=c=>{c.preventDefault(),oe(!1),w&&w()},vr=c=>{c.preventDefault(),t(be,{count:5,offset:(n==null?void 0:n.length)||0,contentType:p==="any"?void 0:p}),At(!0);let g=setTimeout(()=>{At(!1)},750);return()=>clearTimeout(g)},Ue=G.useRef((0,cr.v4)()),hr=!(r==null?void 0:r.length)||m,br=v||lt,Ot=b||nt,yr=y||Wr,Ht=a&&typeof a!="string"?a:null,Sr=Ht?(0,e.jsx)(Ht,{css:Ie}):(0,e.jsx)("img",{src:a,alt:"Logo",css:Ie}),wr=c=>{var g,ne;if(c.destination&&c.source.droppableId===((g=c.destination)==null?void 0:g.droppableId)){let T=[...r||[]],[pe]=(ne=T==null?void 0:T.splice(c.source.index,1))!=null?ne:[];return T==null||T.splice(c.destination.index,0,pe),Y==null||Y(T),T}};return(0,e.jsx)("div",{css:D.css`
361
+ `;var I=require("@emotion/react"),y=require("@uniformdev/design-system"),Zr=({searchText:t,selectedContentType:n})=>{let o="No content found";return n&&(o=`No ${n} content was found`),t&&(o=`${o} for keyword '${t}'.`),(0,e.jsx)(y.Callout,{type:"info"},o)},Ct=({search:t,results:n,contentTypes:o,selectedItems:r,logoIcon:a,select:d,multiSelect:u,multiSelectId:f,rowComponent:v,selectedItemComponent:h,totalResults:i,resultsLoading:m,requireContentType:S,onAddNew:j,onEditClosed:$,onCancel:w,noResultsComponent:b,helpComponent:ee,onSort:Y,typeSelectorLabel:z="Content Type Select",typeSelectorAllTypesOptionText:K="All content types"})=>{var Ft,$t,Kt;let te=()=>S?Array.isArray(o)&&o.length>0?o[0].id:"":"any",[Q,U]=D.useState(""),[p,M]=D.useState(te),[N,re]=D.useState(!1),[s,V]=D.useState([]),[de,At]=D.useState(!1),he=(0,sr.useThrottle)(Q,750);D.useEffect(()=>{t(he,{count:5,offset:0,contentType:p==="any"?void 0:p})},[he,p]);let pr=c=>{s.some(g=>g.id===c.id)?V(g=>g.filter(oe=>oe.id!==c.id)):V(u?g=>[...g,c]:[c])},ur=()=>{M(te()),U(""),V(r!=null&&r.length?r:[])},mr=()=>{re(c=>!c),N||ur()},Bt=c=>{d((r==null?void 0:r.filter(g=>g.id!==c.id))||[],"")},gr=c=>{c.preventDefault(),d(s,p),re(!1)},fr=c=>{c.preventDefault(),re(!1),w&&w()},vr=c=>{c.preventDefault(),t(he,{count:5,offset:(n==null?void 0:n.length)||0,contentType:p==="any"?void 0:p}),At(!0);let g=setTimeout(()=>{At(!1)},750);return()=>clearTimeout(g)},ze=D.useRef((0,cr.v4)()),hr=!(r==null?void 0:r.length)||u,br=v||lt,Ot=h||ot,yr=b||Zr,Ht=a&&typeof a!="string"?a:null,Sr=Ht?(0,e.jsx)(Ht,{css:Te}):(0,e.jsx)("img",{src:a,alt:"Logo",css:Te}),wr=c=>{var g,oe;if(c.destination&&c.source.droppableId===((g=c.destination)==null?void 0:g.droppableId)){let E=[...r||[]],[le]=(oe=E==null?void 0:E.splice(c.source.index,1))!=null?oe:[];return E==null||E.splice(c.destination.index,0,le),Y==null||Y(E),E}};return(0,e.jsx)("div",{css:I.css`
358
362
  width: 100%;
359
- `},(0,e.jsx)("div",{css:D.css`
363
+ `},(0,e.jsx)("div",{css:I.css`
360
364
  position: relative;
361
365
  margin-block: var(--spacing-base);
362
- `},hr&&(0,e.jsx)(G.Fragment,null,(0,e.jsx)("div",{css:pt,"data-test-id":"component-search"},(0,e.jsx)("button",{css:ut,onClick:mr,type:"button","aria-haspopup":!0,"aria-expanded":_,"aria-controls":`entry-search-config-${Ue.current}`},Sr,(0,e.jsx)("span",{css:D.css`
366
+ `},hr&&(0,e.jsx)(D.Fragment,null,(0,e.jsx)("div",{css:pt,"data-test-id":"component-search"},(0,e.jsx)("button",{css:ut,onClick:mr,type:"button","aria-haspopup":!0,"aria-expanded":N,"aria-controls":`entry-search-config-${ze.current}`},Sr,(0,e.jsx)("span",{css:I.css`
363
367
  margin-left: var(--spacing-base);
364
- `},"Select"),(0,e.jsx)("span",{css:ht},(0,e.jsx)(Le,{css:[bt,_?D.css`
368
+ `},"Select"),(0,e.jsx)("span",{css:ht},(0,e.jsx)(ke,{css:[bt,N?I.css`
365
369
  transform: rotate(180deg);
366
- `:void 0]})))),(0,e.jsx)("div",{id:`entry-search-config-${Ue.current}`,"aria-hidden":!_,css:[gt,_?void 0:ft]},te||null,(0,e.jsx)("div",{css:D.css`
370
+ `:void 0]})))),(0,e.jsx)("div",{id:`entry-search-config-${ze.current}`,"aria-hidden":!N,css:[gt,N?void 0:ft]},ee||null,(0,e.jsx)("div",{css:I.css`
367
371
  display: flex;
368
372
  gap: calc(var(--spacing-base) - 0.25rem);
369
373
  margin-bottom: var(--spacing-base);
370
- `},(0,e.jsx)(S.InputSelect,{onChange:c=>V(c.target.value),value:p,label:A,showLabel:!1,options:[...P?[]:[{value:"any",label:Q}],...o?o.map(c=>({value:c.id,label:c.name})):[]]}),(0,e.jsx)("div",{css:D.css`
374
+ `},(0,e.jsx)(y.InputSelect,{onChange:c=>M(c.target.value),value:p,label:z,showLabel:!1,options:[...S?[]:[{value:"any",label:K}],...o?o.map(c=>({value:c.id,label:c.name})):[]]}),(0,e.jsx)("div",{css:I.css`
371
375
  flex-grow: 1;
372
- `},(0,e.jsx)(S.InputKeywordSearch,{inputFieldName:"searchText",placeholder:"Enter keyword to narrow your results",onSearchTextChanged:B,disabledFieldSubmission:!0,value:N}))),(0,e.jsx)("div",{css:[vt,S.scrollbarStyles],id:Ue.current,role:"listbox",tabIndex:0,"data-test-id":"entry-list"},!h&&Array.isArray(n)?n.map(c=>(0,e.jsx)(br,{key:c.id,isSelected:s.some(g=>g.id===c.id),result:c,triggerSelection:()=>pr(c)})):h?null:(0,e.jsx)(yr,{searchText:be||N,selectedContentType:($t=(Ft=o==null?void 0:o.find(c=>c.id===p))==null?void 0:Ft.name)!=null?$t:p}),!h&&typeof i!="undefined"&&n&&(n==null?void 0:n.length)<i&&(0,e.jsx)("button",{css:mt,onClick:vr},le?(0,e.jsx)(S.LoadingIndicator,null):"Load More"),h&&!(n!=null&&n.length)?(0,e.jsx)("div",{css:D.css`
376
+ `},(0,e.jsx)(y.InputKeywordSearch,{inputFieldName:"searchText",placeholder:"Enter keyword to narrow your results",onSearchTextChanged:U,disabledFieldSubmission:!0,value:Q}))),(0,e.jsx)("div",{css:[vt,y.scrollbarStyles],id:ze.current,role:"listbox",tabIndex:0,"data-test-id":"entry-list"},!m&&Array.isArray(n)?n.map(c=>(0,e.jsx)(br,{key:c.id,isSelected:s.some(g=>g.id===c.id),result:c,triggerSelection:()=>pr(c)})):m?null:(0,e.jsx)(yr,{searchText:he||Q,selectedContentType:($t=(Ft=o==null?void 0:o.find(c=>c.id===p))==null?void 0:Ft.name)!=null?$t:p}),!m&&typeof i!="undefined"&&n&&(n==null?void 0:n.length)<i&&(0,e.jsx)("button",{css:mt,onClick:vr},de?(0,e.jsx)(y.LoadingIndicator,null):"Load More"),m&&!(n!=null&&n.length)?(0,e.jsx)("div",{css:I.css`
373
377
  padding: var(--spacing-base);
374
378
  text-align: center;
375
379
  width: 100%;
376
- `},(0,e.jsx)(S.LoadingIndicator,null)):null),(0,e.jsx)("div",{css:D.css`
380
+ `},(0,e.jsx)(y.LoadingIndicator,null)):null),(0,e.jsx)("div",{css:I.css`
377
381
  display: flex;
378
382
  justify-content: space-between;
379
- `},(0,e.jsx)("div",null,ee&&((Kt=o==null?void 0:o.length)!=null?Kt:0)>0?(0,e.jsx)(S.Menu,{menuLabel:"Add new menu",menuTrigger:(0,e.jsx)(S.Button,{buttonType:"secondary"},"Add New")},o==null?void 0:o.map(c=>(0,e.jsx)(S.MenuItem,{key:c.id,css:D.css`
383
+ `},(0,e.jsx)("div",null,j&&((Kt=o==null?void 0:o.length)!=null?Kt:0)>0?(0,e.jsx)(y.Menu,{menuLabel:"Add new menu",menuTrigger:(0,e.jsx)(y.Button,{buttonType:"secondary"},"Add New")},o==null?void 0:o.map(c=>(0,e.jsx)(y.MenuItem,{key:c.id,css:I.css`
380
384
  background: var(--white);
381
385
  color: var(--brand-secondary-1);
382
- `,onClick:()=>ee(c)},c.name))):null),(0,e.jsx)("div",{css:D.css`
386
+ `,onClick:()=>j(c)},c.name))):null),(0,e.jsx)("div",{css:I.css`
383
387
  display: flex;
384
388
  gap: var(--spacing-base);
385
- `},(0,e.jsx)(S.Button,{buttonType:"unimportant",onClick:fr},"Cancel"),(0,e.jsx)(S.Button,{disabled:!s.length,onClick:gr,"data-test-id":"entry-accept-button"},"Accept"))))),m?(0,e.jsx)(de.DragDropContext,{onDragEnd:c=>wr(c)},(0,e.jsx)(de.Droppable,{droppableId:f||"canvas-multi-select"},c=>(0,e.jsx)("div",{...c.droppableProps,ref:c.innerRef,css:D.css`
389
+ `},(0,e.jsx)(y.Button,{buttonType:"unimportant",onClick:fr},"Cancel"),(0,e.jsx)(y.Button,{disabled:!s.length,onClick:gr,"data-test-id":"entry-accept-button"},"Accept"))))),u?(0,e.jsx)(ce.DragDropContext,{onDragEnd:c=>wr(c)},(0,e.jsx)(ce.Droppable,{droppableId:f||"canvas-multi-select"},c=>(0,e.jsx)("div",{...c.droppableProps,ref:c.innerRef,css:I.css`
386
390
  margin-block: var(--spacing-sm) 0;
387
- `},r==null?void 0:r.map((g,ne)=>{if(g!=null&&g.id)return(0,e.jsx)(de.Draggable,{key:g.id,draggableId:g.id,index:ne},T=>(0,e.jsx)("div",{css:yt,ref:T.innerRef,...T.draggableProps,...T.dragHandleProps},(0,e.jsx)("span",{css:St},(0,e.jsx)(me,{css:[Te,wt],width:24,height:24}),(0,e.jsx)(me,{css:Te,width:24,height:24})),(0,e.jsx)(Ot,{key:`selected-item-${g.id}`,logoIcon:a,selectedItem:g,onDeselect:pe=>Bt(pe),onEditClosed:K?pe=>K(pe):void 0})))}),c.placeholder))):r==null?void 0:r.map(c=>(0,e.jsx)(Ot,{key:`selected-item-${c.id}`,logoIcon:a,selectedItem:c,onDeselect:g=>Bt(g),onEditClosed:K?g=>K(g):void 0}))))};var J=require("@emotion/react"),Pt=J.css`
391
+ `},r==null?void 0:r.map((g,oe)=>{if(g!=null&&g.id)return(0,e.jsx)(ce.Draggable,{key:g.id,draggableId:g.id,index:oe},E=>(0,e.jsx)("div",{css:yt,ref:E.innerRef,...E.draggableProps,...E.dragHandleProps},(0,e.jsx)("span",{css:St},(0,e.jsx)(ue,{css:[Ee,wt],width:24,height:24}),(0,e.jsx)(ue,{css:Ee,width:24,height:24})),(0,e.jsx)(Ot,{key:`selected-item-${g.id}`,logoIcon:a,selectedItem:g,onDeselect:le=>Bt(le),onEditClosed:$?le=>$(le):void 0})))}),c.placeholder))):r==null?void 0:r.map(c=>(0,e.jsx)(Ot,{key:`selected-item-${c.id}`,logoIcon:a,selectedItem:c,onDeselect:g=>Bt(g),onEditClosed:$?g=>$(g):void 0}))))};var J=require("@emotion/react"),Pt=J.css`
388
392
  cursor: pointer;
389
393
  padding: var(--spacing-sm) 0;
390
394
  margin-right: var(--spacing-sm);
@@ -400,11 +404,11 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
400
404
  padding: var(--spacing-sm) var(--spacing-xs);
401
405
  `,kt=J.css`
402
406
  background-color: var(--green-50);
403
- `,Lt=J.css`
407
+ `,xt=J.css`
404
408
  font-size: var(--fs-sm);
405
409
  font-weight: var(--fw-bold);
406
410
  width: 50%;
407
- `,xt=J.css`
411
+ `,Lt=J.css`
408
412
  font-weight: var(--fw-normal);
409
413
  display: block;
410
414
  `,Mt=J.css`
@@ -418,7 +422,7 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
418
422
  width: 1.5rem;
419
423
  color: var(--brand-secondary-3);
420
424
  margin-left: auto;
421
- `;var Et=require("@emotion/react");function Tt({result:t,isSelected:n,triggerSelection:o}){var f;let{categories:r,logoIcon:a}=fe(),[d]=t.categories||[{id:"",name:""}],m=typeof d=="undefined"||!r||(f=r.find(v=>v.id===d.id))==null?void 0:f.name;return(0,e.jsx)("div",{key:t.id,"data-value":t.id,role:"option",tabIndex:-1,onClick:()=>o(),css:[Pt]},(0,e.jsx)("div",{css:[Rt,n?kt:void 0]},t.thumbnailUrl?(0,e.jsx)("img",{src:t.thumbnailUrl,alt:`Thumbnail for ${t.title}`,css:Et.css`
425
+ `;var Et=require("@emotion/react");function Tt({result:t,isSelected:n,triggerSelection:o}){var f;let{categories:r,logoIcon:a}=ge(),[d]=t.categories||[{id:"",name:""}],u=typeof d=="undefined"||!r||(f=r.find(v=>v.id===d.id))==null?void 0:f.name;return(0,e.jsx)("div",{key:t.id,"data-value":t.id,role:"option",tabIndex:-1,onClick:()=>o(),css:[Pt]},(0,e.jsx)("div",{css:[Rt,n?kt:void 0]},t.thumbnailUrl?(0,e.jsx)("img",{src:t.thumbnailUrl,alt:`Thumbnail for ${t.title}`,css:Et.css`
422
426
  background-color: var(--gray-200);
423
427
  width: 3rem;
424
428
  height: 3rem;
@@ -426,21 +430,21 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
426
430
  `}):(0,e.jsx)(W,{src:a,alt:"Logo",css:Et.css`
427
431
  height: 2.25rem;
428
432
  width: 2.25rem;
429
- `}),(0,e.jsx)("h4",{css:[Lt]},t.title,m?(0,e.jsx)("span",{css:[xt]},m):null),(0,e.jsx)("p",{css:[Mt]},"SKU: ",t.sku||t.id,t.price!==void 0?(0,e.jsx)("span",null,t.price):null),n?(0,e.jsx)(ke,{css:[Vt]}):null))}var ve=require("@emotion/react"),dr=require("@uniformdev/design-system"),It=ve.css`
433
+ `}),(0,e.jsx)("h4",{css:[xt]},t.title,u?(0,e.jsx)("span",{css:[Lt]},u):null),(0,e.jsx)("p",{css:[Mt]},"SKU: ",t.sku||t.id,t.price!==void 0?(0,e.jsx)("span",null,t.price):null),n?(0,e.jsx)(Re,{css:[Vt]}):null))}var fe=require("@emotion/react"),dr=require("@uniformdev/design-system"),It=fe.css`
430
434
  display: flex;
431
435
  width: 100%;
432
436
  border: 1px solid var(--gray-300);
433
437
  border-radius: var(--rounded-base);
434
438
  background-color: var(--gray-100);
435
439
  margin: var(--spacing-base) 0;
436
- `,Dt=ve.css`
440
+ `,Dt=fe.css`
437
441
  padding: var(--spacing-base) 0 var(--spacing-base) var(--spacing-lg);
438
442
  display: flex;
439
443
  flex-grow: 1;
440
444
  align-items: center;
441
445
  margin-right: var(--spacing-sm);
442
446
  gap: var(--spacing-base);
443
- `,Gt=ve.css`
447
+ `,Gt=fe.css`
444
448
  display: flex;
445
449
  align-items: center;
446
450
  gap: var(--spacing-sm);
@@ -448,29 +452,29 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
448
452
  width: 50%;
449
453
  margin-bottom: 0;
450
454
  }
451
- `,De=ve.css`
455
+ `,Ie=fe.css`
452
456
  background-color: var(--gray-200);
453
457
  width: 3.5rem;
454
458
  height: 3.5rem;
455
459
  object-fit: cover;
456
- `;var L=require("@emotion/react"),lr=require("@uniformdev/design-system");function zt({selectedItem:t,onDeselect:n}){var m;let{categories:o,logoIcon:r}=fe(),[a]=t.categories||[{id:"",name:""}],d=typeof a=="undefined"||!o||(m=o.find(f=>f.id===a.id))==null?void 0:m.name;return(0,e.jsx)("div",{css:[It],key:t.id},(0,e.jsx)("article",{css:[Dt]},(0,e.jsx)("div",{css:[Gt]},t.thumbnailUrl?(0,e.jsx)("img",{src:t.thumbnailUrl,alt:d,css:[De],loading:"lazy"}):(0,e.jsx)("div",{css:[De]}),(0,e.jsx)("div",{css:L.css`
460
+ `;var k=require("@emotion/react"),lr=require("@uniformdev/design-system");function zt({selectedItem:t,onDeselect:n}){var u;let{categories:o,logoIcon:r}=ge(),[a]=t.categories||[{id:"",name:""}],d=typeof a=="undefined"||!o||(u=o.find(f=>f.id===a.id))==null?void 0:u.name;return(0,e.jsx)("div",{css:[It],key:t.id},(0,e.jsx)("article",{css:[Dt]},(0,e.jsx)("div",{css:[Gt]},t.thumbnailUrl?(0,e.jsx)("img",{src:t.thumbnailUrl,alt:d,css:[Ie],loading:"lazy"}):(0,e.jsx)("div",{css:[Ie]}),(0,e.jsx)("div",{css:k.css`
457
461
  > :not(:last-child) {
458
462
  margin-bottom: var(--spacing-xs);
459
463
  }
460
- `},(0,e.jsx)("h4",{css:L.css`
464
+ `},(0,e.jsx)("h4",{css:k.css`
461
465
  font-weight: var(--fw-bold);
462
- `},t.title||t.id||"",d&&(0,e.jsx)("span",{css:L.css`
466
+ `},t.title||t.id||"",d&&(0,e.jsx)("span",{css:k.css`
463
467
  display: block;
464
468
  font-weight: var(--fw-regular);
465
- `},d)),(0,e.jsx)("ul",{css:L.css`
469
+ `},d)),(0,e.jsx)("ul",{css:k.css`
466
470
  font-size: var(--fs-sm);
467
471
  display: flex;
468
472
  gap: var(--spacing-base);
469
- `},(0,e.jsx)("li",null,(0,e.jsx)("span",{css:L.css`
473
+ `},(0,e.jsx)("li",null,(0,e.jsx)("span",{css:k.css`
470
474
  margin-right: var(--spacing-xs);
471
- `},"SKU:"),t.sku||t.id),t.price!==void 0?(0,e.jsx)("li",null,(0,e.jsx)("span",{css:L.css`
475
+ `},"SKU:"),t.sku||t.id),t.price!==void 0?(0,e.jsx)("li",null,(0,e.jsx)("span",{css:k.css`
472
476
  margin-right: var(--spacing-xs);
473
- `},"Price:"),(0,e.jsx)("span",null,t.price)):null))),(0,e.jsx)("div",{css:L.css`
477
+ `},"Price:"),(0,e.jsx)("span",null,t.price)):null))),(0,e.jsx)("div",{css:k.css`
474
478
  display: flex;
475
479
  flex-wrap: wrap;
476
480
  gap: var(--spacing-sm);
@@ -479,7 +483,7 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
479
483
  ${(0,lr.mq)("md")} {
480
484
  align-items: center;
481
485
  }
482
- `},t.editLink?(0,e.jsx)("a",{href:t.editLink,title:"edit",rel:"noopener",target:"__blank",css:L.css`
486
+ `},t.editLink?(0,e.jsx)("a",{href:t.editLink,title:"edit",rel:"noopener",target:"__blank",css:k.css`
483
487
  display: inline-flex;
484
488
  justify-content: space-between;
485
489
  align-items: center;
@@ -490,14 +494,14 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
490
494
  &:hover {
491
495
  background-color: var(--gray-100);
492
496
  }
493
- `},(0,e.jsx)("span",{css:L.css`
497
+ `},(0,e.jsx)("span",{css:k.css`
494
498
  margin-right: var(--spacing-sm);
495
499
  font-size: var(--fs-sm);
496
- `},"Edit"),(0,e.jsx)(W,{src:r,alt:"Logo",css:L.css`
500
+ `},"Edit"),(0,e.jsx)(W,{src:r,alt:"Logo",css:k.css`
497
501
  width: 1.75rem;
498
502
  height: 1.75rem;
499
503
  display: block;
500
- `})):null,(0,e.jsx)("button",{type:"button",onClick:f=>{f.preventDefault(),n==null||n(t)},css:L.css`
504
+ `})):null,(0,e.jsx)("button",{type:"button",onClick:f=>{f.preventDefault(),n==null||n(t)},css:k.css`
501
505
  display: flex;
502
506
  justify-content: space-between;
503
507
  align-items: center;
@@ -510,8 +514,8 @@ var Cr=Object.create;var Se=Object.defineProperty;var Pr=Object.getOwnPropertyDe
510
514
  &:hover {
511
515
  background-color: var(--gray-100);
512
516
  }
513
- `},(0,e.jsx)("span",{css:L.css`
517
+ `},(0,e.jsx)("span",{css:k.css`
514
518
  font-size: var(--fs-sm);
515
- `},"Unlink"),(0,e.jsx)(se,{css:L.css`
519
+ `},"Unlink"),(0,e.jsx)(ie,{css:k.css`
516
520
  color: var(--brand-secondary-5);
517
- `})))))}var Ge=require("@uniformdev/design-system"),ze=require("react-use");function qr({selectedProducts:t,setSelectedProducts:n,onGetCategories:o,onSearchProducts:r,logoIcon:a,multiSelect:d,multiSelectId:m,selectedItemComponent:f,rowComponent:v,errorComponent:b,helpComponent:i,noResultsComponent:h,onSort:P,typeSelectorAllTypesOptionText:ee="All categories",typeSelectorLabel:K="Select Category"}){var N;let{value:w,loading:y,error:te}=(0,ze.useAsync)(async()=>await o(),[o]),Y=(0,X.useMemo)(()=>w?w.map(p=>({id:p.id,name:p.name})):void 0,[w]),A=(0,X.useRef)(),[Q,he]=(0,ze.useAsyncFn)(async(B,p)=>{let V=await r({text:B,options:{limit:p==null?void 0:p.count,offset:p==null?void 0:p.offset,categoryId:p==null?void 0:p.contentType}});return(p==null?void 0:p.offset)===0&&(A.current=[]),(A.current=A.current||[]).push(...V.products),V},[r]),re=async B=>{await n(B)};return y?(0,e.jsx)(Ge.LoadingIndicator,null):te||Q.error?(0,e.jsx)(b||(({categoriesError:p,searchError:V})=>(0,e.jsx)(Ge.Callout,{type:"error"},"There was an error: ",(p==null?void 0:p.message)||(V==null?void 0:V.message))),{categoriesError:te,searchError:Q.error}):(0,e.jsx)(Ut.Provider,{value:{categories:w,logoIcon:a}},(0,e.jsx)(Ct,{search:he,results:A.current,logoIcon:a,selectedItems:t,select:re,multiSelectId:m||"product-search-multi-select",multiSelect:d,contentTypes:Y,selectedItemComponent:f||zt,rowComponent:v||Tt,totalResults:(N=Q.value)==null?void 0:N.total,resultsLoading:Q.loading,helpComponent:i,noResultsComponent:h,onSort:P,typeSelectorAllTypesOptionText:ee,typeSelectorLabel:K}))}var Ut=X.default.createContext(void 0),fe=()=>{let t=(0,X.useContext)(Ut);if(!t)throw new Error("useProductSearchContext must be used within a <ProductSearchContext> provider");return t};U(z,require("@uniformdev/mesh-sdk"),module.exports);var u=require("@uniformdev/design-system");0&&(module.exports={Button,Callout,DefaultSearchRow,DefaultSelectedItem,EntrySearch,Heading,Icons,Input,InputSelect,InputToggle,KeywordSearchInput,LoadingIndicator,LoadingOverlay,Menu,MenuItem,ProductPreviewList,ProductQuery,ProductQueryContext,ProductSearch,ProductSearchContext,ProductSearchRow,ProductSelectedItem,ResolvableLoadingValue,ScrollableList,ScrollableListItem,SelectionField,Textarea,Theme,UniformMeshLocationContext,UniformMeshLocationContextProvider,UniformMeshSdkContext,UniformMeshSdkContextProvider,badgeIcon,draggableContainer,draggableIcon,draggableIconOffset,draggableIconWrapper,entrySearchBtn,entrySearchConfig,entrySearchConfigHidden,entrySearchLoadMoreBtn,entrySearchResultList,entrySearchSelectIcon,entrySearchSelectImg,entrySearchSelectInput,entrySearchSelectOption,entrySearchWrapper,productSearchRowActiveIcon,productSearchRowCategory,productSearchRowContainer,productSearchRowContent,productSearchRowContentActive,productSearchRowDetails,productSearchRowTitle,productSelectedItemContainer,productSelectedItemContent,productSelectedItemDetails,productSelectedItemImage,searchRowBtn,searchRowContainer,searchRowContainerActive,searchRowPopover,searchRowText,searchRowTextSmall,selectItemLinkBtn,selectItemLinkContainer,selectItemPopover,selectItemPopoverLabel,selectItemSmallText,selectedItemCloseIcon,selectedItemContainer,selectedItemCopy,selectedItemDetails,selectedItemIcon,selectedItemInner,selectedItemTitle,useInitializeUniformMeshSdk,useProductQueryContext,useProductSearchContext,useUniformMeshLocation,useUniformMeshLocationContext,useUniformMeshSdk,useUniformMeshSdkContext});
521
+ `})))))}var De=require("@uniformdev/design-system"),Ge=require("react-use");function qr({selectedProducts:t,setSelectedProducts:n,onGetCategories:o,onSearchProducts:r,logoIcon:a,multiSelect:d,multiSelectId:u,selectedItemComponent:f,rowComponent:v,errorComponent:h,helpComponent:i,noResultsComponent:m,onSort:S,typeSelectorAllTypesOptionText:j="All categories",typeSelectorLabel:$="Select Category"}){var Q;let{value:w,loading:b,error:ee}=(0,Ge.useAsync)(async()=>await o(),[o]),Y=(0,X.useMemo)(()=>w?w.map(p=>({id:p.id,name:p.name})):void 0,[w]),z=(0,X.useRef)(),[K,ve]=(0,Ge.useAsyncFn)(async(U,p)=>{let M=await r({text:U,options:{limit:p==null?void 0:p.count,offset:p==null?void 0:p.offset,categoryId:p==null?void 0:p.contentType}});return(p==null?void 0:p.offset)===0&&(z.current=[]),(z.current=z.current||[]).push(...M.products),M},[r]),te=async U=>{await n(U)};return b?(0,e.jsx)(De.LoadingIndicator,null):ee||K.error?(0,e.jsx)(h||(({categoriesError:p,searchError:M})=>(0,e.jsx)(De.Callout,{type:"error"},"There was an error: ",(p==null?void 0:p.message)||(M==null?void 0:M.message))),{categoriesError:ee,searchError:K.error}):(0,e.jsx)(Ut.Provider,{value:{categories:w,logoIcon:a}},(0,e.jsx)(Ct,{search:ve,results:z.current,logoIcon:a,selectedItems:t,select:te,multiSelectId:u||"product-search-multi-select",multiSelect:d,contentTypes:Y,selectedItemComponent:f||zt,rowComponent:v||Tt,totalResults:(Q=K.value)==null?void 0:Q.total,resultsLoading:K.loading,helpComponent:i,noResultsComponent:m,onSort:S,typeSelectorAllTypesOptionText:j,typeSelectorLabel:$}))}var Ut=X.default.createContext(void 0),ge=()=>{let t=(0,X.useContext)(Ut);if(!t)throw new Error("useProductSearchContext must be used within a <ProductSearchContext> provider");return t};A(G,require("@uniformdev/mesh-sdk"),module.exports);var l=require("@uniformdev/design-system");0&&(module.exports={Button,Callout,DefaultSearchRow,DefaultSelectedItem,EntrySearch,Heading,Icons,Input,InputSelect,InputToggle,KeywordSearchInput,Label,LoadingIndicator,LoadingOverlay,Menu,MenuItem,ProductPreviewList,ProductQuery,ProductQueryContext,ProductSearch,ProductSearchContext,ProductSearchRow,ProductSelectedItem,ResolvableLoadingValue,ScrollableList,ScrollableListItem,SelectionField,Switch,Textarea,Theme,UniformMeshLocationContext,UniformMeshLocationContextProvider,UniformMeshSdkContext,UniformMeshSdkContextProvider,badgeIcon,draggableContainer,draggableIcon,draggableIconOffset,draggableIconWrapper,entrySearchBtn,entrySearchConfig,entrySearchConfigHidden,entrySearchLoadMoreBtn,entrySearchResultList,entrySearchSelectIcon,entrySearchSelectImg,entrySearchSelectInput,entrySearchSelectOption,entrySearchWrapper,productSearchRowActiveIcon,productSearchRowCategory,productSearchRowContainer,productSearchRowContent,productSearchRowContentActive,productSearchRowDetails,productSearchRowTitle,productSelectedItemContainer,productSelectedItemContent,productSelectedItemDetails,productSelectedItemImage,searchRowBtn,searchRowContainer,searchRowContainerActive,searchRowContainerWithPopover,searchRowPopover,searchRowText,searchRowTextSmall,selectItemLinkBtn,selectItemLinkContainer,selectItemPopover,selectItemPopoverLabel,selectItemSmallText,selectedItemCloseIcon,selectedItemContainer,selectedItemCopy,selectedItemDetails,selectedItemIcon,selectedItemInner,selectedItemTitle,useInitializeUniformMeshSdk,useProductQueryContext,useProductSearchContext,useUniformMeshLocation,useUniformMeshLocationContext,useUniformMeshSdk,useUniformMeshSdkContext});