@uniformdev/mesh-sdk-react 16.1.1-alpha.169 → 16.1.1-alpha.294

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 Qr=Object.create;var Le=Object.defineProperty;var Wr=Object.getOwnPropertyDescriptor;var _r=Object.getOwnPropertyNames;var Zr=Object.getPrototypeOf,Xr=Object.prototype.hasOwnProperty;var sr=(t,n)=>{for(var o in n)Le(t,o,{get:n[o],enumerable:!0})},Re=(t,n,o,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of _r(n))!Xr.call(t,a)&&a!==o&&Le(t,a,{get:()=>n[a],enumerable:!(r=Wr(n,a))||r.enumerable});return t},O=(t,n,o)=>(Re(t,n,"default"),o&&Re(o,n,"default")),N=(t,n,o)=>(o=t!=null?Qr(Zr(t)):{},Re(n||!t||!t.__esModule?Le(o,"default",{value:t,enumerable:!0}):o,t)),qr=t=>Re(Le({},"__esModule",{value:!0}),t);var B={};sr(B,{AddListButton:()=>m.AddListButton,Button:()=>m.Button,Callout:()=>m.Callout,DamSelectedItem:()=>So,DefaultSearchRow:()=>ht,DefaultSelectedItem:()=>lt,EntrySearch:()=>Et,Heading:()=>m.Heading,Icons:()=>Ve,Input:()=>m.Input,InputSelect:()=>m.InputSelect,InputToggle:()=>m.InputToggle,KeywordSearchInput:()=>m.InputKeywordSearch,Label:()=>m.Label,LoadingIndicator:()=>m.LoadingIndicator,LoadingOverlay:()=>m.LoadingOverlay,Menu:()=>m.Menu,MenuItem:()=>m.MenuItem,ProductPreviewList:()=>je,ProductQuery:()=>oo,ProductQueryContext:()=>Ye,ProductSearch:()=>yo,ProductSearchContext:()=>Kt,ProductSearchRow:()=>Bt,ProductSelectedItem:()=>Ft,ResolvableLoadingValue:()=>Xe,ScrollableList:()=>m.ScrollableList,ScrollableListItem:()=>m.ScrollableListItem,SelectionField:()=>qe,Switch:()=>m.Switch,Textarea:()=>m.Textarea,Theme:()=>m.Theme,UniformMeshLocationContext:()=>Ke,UniformMeshLocationContextProvider:()=>Ne,UniformMeshSdkContext:()=>We,UniformMeshSdkContextProvider:()=>jr,badgeIcon:()=>Be,damSelectedItemCloseIcon:()=>qt,damSelectedItemContainer:()=>Nt,damSelectedItemCopy:()=>_t,damSelectedItemDetails:()=>Wt,damSelectedItemIcon:()=>Xt,damSelectedItemInner:()=>Qt,damSelectedItemLinkBtn:()=>$e,damSelectedItemLinkContainer:()=>Jt,damSelectedItemMediaContainer:()=>jt,damSelectedItemPopover:()=>Yt,damSelectedItemPopoverLabel:()=>we,damSelectedItemSmallText:()=>de,damSelectedItemTitle:()=>Zt,draggableContainer:()=>kt,draggableIcon:()=>Ae,draggableIconOffset:()=>It,draggableIconWrapper:()=>xt,entrySearchBtn:()=>yt,entrySearchConfig:()=>wt,entrySearchConfigHidden:()=>Ct,entrySearchLoadMoreBtn:()=>St,entrySearchResultList:()=>Pt,entrySearchSelectIcon:()=>Rt,entrySearchSelectImg:()=>Lt,entrySearchSelectInput:()=>vo,entrySearchSelectOption:()=>ho,entrySearchWrapper:()=>bt,productSearchRowActiveIcon:()=>Gt,productSearchRowCategory:()=>zt,productSearchRowContainer:()=>Mt,productSearchRowContent:()=>Tt,productSearchRowContentActive:()=>Vt,productSearchRowDetails:()=>Ut,productSearchRowTitle:()=>Dt,productSelectedItemContainer:()=>Ot,productSelectedItemContent:()=>$t,productSelectedItemDetails:()=>Ht,productSelectedItemImage:()=>Oe,searchRowBtn:()=>ft,searchRowContainer:()=>pt,searchRowContainerActive:()=>ut,searchRowContainerWithPopover:()=>mt,searchRowPopover:()=>gt,searchRowText:()=>Ge,searchRowTextSmall:()=>Ue,selectItemLinkBtn:()=>ze,selectItemLinkContainer:()=>dt,selectItemPopover:()=>ct,selectItemPopoverLabel:()=>ge,selectItemSmallText:()=>oe,selectedItemCloseIcon:()=>st,selectedItemContainer:()=>tt,selectedItemCopy:()=>nt,selectedItemDetails:()=>ot,selectedItemIcon:()=>it,selectedItemInner:()=>rt,selectedItemTitle:()=>at,useInitializeUniformMeshSdk:()=>Jr,useProductQueryContext:()=>Je,useProductSearchContext:()=>ye,useUniformMeshLocation:()=>Yr,useUniformMeshLocationContext:()=>Qe,useUniformMeshSdk:()=>eo,useUniformMeshSdkContext:()=>_e});module.exports=qr(B);var e=require("@emotion/react"),x=N(require("react"));var me=require("react"),Ke=(0,me.createContext)(void 0),Ne=({children:t})=>{let[n,o]=(0,me.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(i,l)=>{await a.setValue(i,l),o(window.UniformMeshSDK.getCurrentLocation())},setValidationResult:async i=>{await a.setValidationResult(i)}}}}return(0,e.jsx)(Ke.Provider,{value:r},t)},Qe=()=>{let t=(0,me.useContext)(Ke);if(!t)throw new Error("useUniformMeshLocationContext must be used within a UniformMeshLocationContextProvider");return t};function Yr(){let{location:t}=Qe();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 cr=require("@uniformdev/mesh-sdk"),he=require("react"),Jr=({autoResizingDisabled:t}={})=>{let[n,o]=(0,he.useState)(),[r,a]=(0,he.useState)();return(0,he.useEffect)(()=>{typeof window=="undefined"||r||(typeof window.UniformMeshSDK=="undefined"?(0,cr.initializeUniformMeshSDK)({autoResizingDisabled:t}).then(i=>{a(i)}).catch(i=>{o(i)}):a(window.UniformMeshSDK))},[t]),{initializing:!r&&!n,error:n,sdk:r}};var ke=require("react");var dr=require("@uniformdev/design-system"),We=(0,ke.createContext)(void 0),jr=({children:t})=>{let n;return typeof window!="undefined"&&typeof window.UniformMeshSDK!="undefined"&&(n={sdk:window.UniformMeshSDK}),(0,e.jsx)(We.Provider,{value:n},(0,e.jsx)(dr.Theme,null),(0,e.jsx)(Ne,null,t))},_e=()=>{let t=(0,ke.useContext)(We);if(!t)throw new Error("useUniformMeshSdkContext must be used within a UniformMeshSdkContextProvider");return t};function eo(){let{sdk:t}=_e();return t}var et=N(require("react"));var Q=N(require("react"));var ue=require("@emotion/react"),lr=require("@uniformdev/design-system");var Ze=N(require("react")),Xe=({value:t,text:n,loading:o})=>(0,e.jsx)(Ze.default.Fragment,null,!!n&&n,!n&&(0,e.jsx)(Ze.default.Fragment,null,o&&`${t} (Loading...)`,!o&&`${t} (Unresolvable)`));var qe=({id:t,label:n,loading:o,selectedValues:r,values:a,onAdd:i,onRemove:l})=>{var v;let f=(v=a==null?void 0:a.filter(s=>!(r!=null&&r.includes(s.id.toString()))))!=null?v:[],g=(s,p)=>{s.preventDefault(),l(p)};return(0,e.jsx)("div",null,(0,e.jsx)(lr.InputSelect,{id:t,name:t,label:n,onChange:s=>i(s.target.value),disabled:o,options:[{value:"",label:"Add..."},...f.map(s=>({value:s.id,label:s.name||s.id}))],value:"",css:Array.isArray(r)&&r.length>0?ue.css`
1
+ var po=Object.create;var Pe=Object.defineProperty;var mo=Object.getOwnPropertyDescriptor;var uo=Object.getOwnPropertyNames;var go=Object.getPrototypeOf,fo=Object.prototype.hasOwnProperty;var hr=(t,n)=>{for(var o in n)Pe(t,o,{get:n[o],enumerable:!0})},Ce=(t,n,o,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of uo(n))!fo.call(t,a)&&a!==o&&Pe(t,a,{get:()=>n[a],enumerable:!(r=mo(n,a))||r.enumerable});return t},B=(t,n,o)=>(Ce(t,n,"default"),o&&Ce(o,n,"default")),j=(t,n,o)=>(o=t!=null?po(go(t)):{},Ce(n||!t||!t.__esModule?Pe(o,"default",{value:t,enumerable:!0}):o,t)),vo=t=>Ce(Pe({},"__esModule",{value:!0}),t);var A={};hr(A,{AddListButton:()=>m.AddListButton,Button:()=>m.Button,Callout:()=>m.Callout,DamSelectedItem:()=>Oo,DefaultSearchRow:()=>Pt,DefaultSelectedItem:()=>vt,EntrySearch:()=>Ut,Heading:()=>m.Heading,Icons:()=>Me,Input:()=>m.Input,InputSelect:()=>m.InputSelect,InputToggle:()=>m.InputToggle,KeywordSearchInput:()=>m.InputKeywordSearch,Label:()=>m.Label,LoadingIndicator:()=>m.LoadingIndicator,LoadingOverlay:()=>m.LoadingOverlay,Menu:()=>m.Menu,MenuItem:()=>m.MenuItem,ProductPreviewList:()=>nt,ProductQuery:()=>Po,ProductQueryContext:()=>rt,ProductSearch:()=>Bo,ProductSearchContext:()=>Jt,ProductSearchRow:()=>Nt,ProductSelectedItem:()=>Yt,ResolvableLoadingValue:()=>et,ScrollableList:()=>m.ScrollableList,ScrollableListItem:()=>m.ScrollableListItem,SelectionField:()=>tt,Switch:()=>m.Switch,Textarea:()=>m.Textarea,Theme:()=>m.Theme,UniformMeshLocationContext:()=>Ze,UniformMeshLocationContextProvider:()=>Xe,UniformMeshSdkContext:()=>Ye,UniformMeshSdkContextProvider:()=>yo,badgeIcon:()=>Be,damSelectItemImage:()=>Qe,damSelectedItemContainer:()=>jt,damSelectedItemCopy:()=>rr,damSelectedItemDetails:()=>tr,damSelectedItemIcon:()=>nr,damSelectedItemInfoBtn:()=>cr,damSelectedItemInner:()=>er,damSelectedItemLinkBtn:()=>Ne,damSelectedItemLinkContainer:()=>ir,damSelectedItemMediaContainer:()=>sr,damSelectedItemPopover:()=>ar,damSelectedItemPopoverLabel:()=>ye,damSelectedItemSmallText:()=>se,damSelectedItemTitle:()=>or,draggableContainer:()=>Vt,draggableIcon:()=>Ae,draggableIconOffset:()=>zt,draggableIconWrapper:()=>Dt,entrySearchBtn:()=>Rt,entrySearchConfig:()=>kt,entrySearchConfigHidden:()=>It,entrySearchLoadMoreBtn:()=>xt,entrySearchResultList:()=>Et,entrySearchSelectIcon:()=>Tt,entrySearchSelectImg:()=>Mt,entrySearchSelectInput:()=>Uo,entrySearchSelectOption:()=>Go,entrySearchWrapper:()=>Lt,productSearchRowActiveIcon:()=>Ft,productSearchRowCategory:()=>Ht,productSearchRowContainer:()=>Gt,productSearchRowContent:()=>At,productSearchRowContentActive:()=>Bt,productSearchRowDetails:()=>$t,productSearchRowTitle:()=>Ot,productSelectedItemContainer:()=>Wt,productSelectedItemContent:()=>Zt,productSelectedItemDetails:()=>_t,productSelectedItemIcon:()=>Xt,productSelectedItemImage:()=>Oe,productSelectedItemLinkContainer:()=>qt,productedSelectedItemLinkBtn:()=>He,productedSelectedItemSmallText:()=>$e,searchRowBtn:()=>wt,searchRowContainer:()=>ht,searchRowContainerActive:()=>yt,searchRowContainerWithPopover:()=>bt,searchRowPopover:()=>St,searchRowText:()=>Ge,searchRowTextSmall:()=>Ue,selectItemLinkBtn:()=>De,selectItemLinkContainer:()=>gt,selectItemPopover:()=>ut,selectItemPopoverLabel:()=>ue,selectItemSmallText:()=>ee,selectedItemContainer:()=>st,selectedItemCopy:()=>lt,selectedItemDetails:()=>dt,selectedItemIcon:()=>mt,selectedItemInner:()=>ct,selectedItemTitle:()=>pt,useInitializeUniformMeshSdk:()=>bo,useProductQueryContext:()=>ot,useProductSearchContext:()=>be,useUniformMeshLocation:()=>ho,useUniformMeshLocationContext:()=>qe,useUniformMeshSdk:()=>So,useUniformMeshSdkContext:()=>Je});module.exports=vo(A);var e=require("@emotion/react"),w=j(require("react"));var pe=require("react"),Ze=(0,pe.createContext)(void 0),Xe=({children:t})=>{let[n,o]=(0,pe.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(i,l)=>{await a.setValue(i,l),o(window.UniformMeshSDK.getCurrentLocation())},setValidationResult:async i=>{await a.setValidationResult(i)}}}}return(0,e.jsx)(Ze.Provider,{value:r},t)},qe=()=>{let t=(0,pe.useContext)(Ze);if(!t)throw new Error("useUniformMeshLocationContext must be used within a UniformMeshLocationContextProvider");return t};function ho(){let{location:t}=qe();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 br=require("@uniformdev/mesh-sdk"),ve=require("react"),bo=({autoResizingDisabled:t}={})=>{let[n,o]=(0,ve.useState)(),[r,a]=(0,ve.useState)();return(0,ve.useEffect)(()=>{typeof window=="undefined"||r||(typeof window.UniformMeshSDK=="undefined"?(0,br.initializeUniformMeshSDK)({autoResizingDisabled:t}).then(i=>{a(i)}).catch(i=>{o(i)}):a(window.UniformMeshSDK))},[t]),{initializing:!r&&!n,error:n,sdk:r}};var Le=require("react");var yr=require("@uniformdev/design-system"),Ye=(0,Le.createContext)(void 0),yo=({children:t})=>{let n;return typeof window!="undefined"&&typeof window.UniformMeshSDK!="undefined"&&(n={sdk:window.UniformMeshSDK}),(0,e.jsx)(Ye.Provider,{value:n},(0,e.jsx)(yr.Theme,null),(0,e.jsx)(Xe,null,t))},Je=()=>{let t=(0,Le.useContext)(Ye);if(!t)throw new Error("useUniformMeshSdkContext must be used within a UniformMeshSdkContextProvider");return t};function So(){let{sdk:t}=Je();return t}var $=j(require("react"));var me=require("@emotion/react"),Sr=require("@uniformdev/design-system");var je=j(require("react")),et=({value:t,text:n,loading:o})=>(0,e.jsx)(je.default.Fragment,null,!!n&&n,!n&&(0,e.jsx)(je.default.Fragment,null,o&&`${t} (Loading...)`,!o&&`${t} (Unresolvable)`));var tt=({id:t,label:n,loading:o,selectedValues:r,values:a,onAdd:i,onRemove:l})=>{var v;let f=(v=a==null?void 0:a.filter(s=>!(r!=null&&r.includes(s.id.toString()))))!=null?v:[],g=(s,p)=>{s.preventDefault(),l(p)};return(0,e.jsx)("div",null,(0,e.jsx)(Sr.InputSelect,{id:t,name:t,label:n,onChange:s=>i(s.target.value),disabled:o,options:[{value:"",label:"Add..."},...f.map(s=>({value:s.id,label:s.name||s.id}))],value:"",css:Array.isArray(r)&&r.length>0?me.css`
2
2
  margin-bottom: var(--spacing-base);
3
- `:""}),r==null?void 0:r.map(s=>{var p;return(0,e.jsx)("div",{css:ue.css`
3
+ `:""}),r==null?void 0:r.map(s=>{var p;return(0,e.jsx)("div",{css:me.css`
4
4
  font-size: var(--fs-sm);
5
5
  display: inline-flex;
6
6
  align-items: center;
@@ -9,67 +9,67 @@ var Qr=Object.create;var Le=Object.defineProperty;var Wr=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:s},(0,e.jsx)("span",{css:ue.css`
12
+ `,key:s},(0,e.jsx)("span",{css:me.css`
13
13
  padding: var(--spacing-3);
14
14
  color: var(--gray-800);
15
- `},(0,e.jsx)(Xe,{value:s,loading:o,text:(p=a.find(b=>b.id===s))==null?void 0:p.name})),(0,e.jsx)("button",{css:ue.css`
15
+ `},(0,e.jsx)(et,{value:s,loading:o,text:(p=a.find(b=>b.id===s))==null?void 0:p.name})),(0,e.jsx)("button",{css:me.css`
16
16
  padding: var(--spacing-3);
17
17
  border-left: 1px solid var(--gray-300);
18
- `,title:"remove",onClick:b=>g(b,s)},(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",css:ue.css`
18
+ `,title:"remove",onClick:b=>g(b,s)},(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",css:me.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 to=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"})),xe=to;var ro=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"})),Ie=ro;var Ee=require("react-use"),T=require("@uniformdev/design-system"),R=require("@emotion/react"),pr={count:1,categories:[],brand:"",keyword:"",sort:"date_modified",sortOrder:"desc"},oo=({value:t,setValue:n,brands:o,categories:r,loading:a,categoriesLoading:i,brandsLoading:l,logoIcon:f,onGetProducts:g,sortOptions:v,sortOrderOptions:s,categoryLabel:p="Product Category",brandLabel:b="Brand",disableBrands:U,restrictToSingleCategory:X=!1})=>{var u,z,K;let C=async d=>{n({...pr,...t||{},...d})},y=(0,Q.useMemo)(()=>({...pr,...t||{}}),[t]),[le,q]=(0,Ee.useAsyncFn)(async d=>await g(d),[g]);(0,Ee.useDebounce)(async()=>{await q({brand:y.brand,categories:y.categories,keyword:y.keyword,sort:y.sort,sortOrder:y.sortOrder,count:y.count})},250,[y]);let se=(0,Q.useMemo)(()=>{let d=[];return r==null||r.forEach(S=>{let G=ur(S,void 0);d.push(...G)}),d},[r]),Y=(0,Q.useMemo)(()=>[{value:"",label:"All categories"},...se.map(d=>({label:d.name,value:d.id}))],[se]),J=(0,Q.useMemo)(()=>(o==null?void 0:o.map(d=>({id:d.id.toString(),name:d.name})))||[],[o]),Ce=d=>{if(!d)return;let S=(t==null?void 0:t.categories)||[];C({categories:[...S,d]})},pe=d=>{var S;C({categories:(S=t==null?void 0:t.categories)==null?void 0:S.filter(G=>G!==d)})},j=d=>{C({brand:d.target.value})},k=d=>{C({count:d||1})};return a?(0,e.jsx)("div",null,"Loading..."):(0,e.jsx)(Ye.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 wo=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"})),Re=wo;var Co=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"})),xe=Co;var ke=require("react-use"),E=require("@uniformdev/design-system"),R=require("@emotion/react"),wr={count:1,categories:[],brand:"",keyword:"",sort:"date_modified",sortOrder:"desc"},Po=({value:t,setValue:n,brands:o,categories:r,loading:a,categoriesLoading:i,brandsLoading:l,logoIcon:f,onGetProducts:g,sortOptions:v,sortOrderOptions:s,categoryLabel:p="Product Category",brandLabel:b="Brand",disableBrands:D,restrictToSingleCategory:_=!1})=>{var u,M,H;let P=async d=>{n({...wr,...t||{},...d})},y=(0,$.useMemo)(()=>({...wr,...t||{}}),[t]),[de,Z]=(0,ke.useAsyncFn)(async d=>await g(d),[g]);(0,ke.useDebounce)(async()=>{await Z({brand:y.brand,categories:y.categories,keyword:y.keyword,sort:y.sort,sortOrder:y.sortOrder,count:y.count})},250,[y]);let ne=(0,$.useMemo)(()=>{let d=[];return r==null||r.forEach(S=>{let z=Pr(S,void 0);d.push(...z)}),d},[r]),X=(0,$.useMemo)(()=>[{value:"",label:"All categories"},...ne.map(d=>({label:d.name,value:d.id}))],[ne]),q=(0,$.useMemo)(()=>(o==null?void 0:o.map(d=>({id:d.id.toString(),name:d.name})))||[],[o]),Se=d=>{if(!d)return;let S=(t==null?void 0:t.categories)||[];P({categories:[...S,d]})},le=d=>{var S;P({categories:(S=t==null?void 0:t.categories)==null?void 0:S.filter(z=>z!==d)})},Y=d=>{P({brand:d.target.value})},k=d=>{P({count:d||1})};return a?(0,e.jsx)("div",null,"Loading..."):(0,e.jsx)(rt.Provider,{value:{categories:r,logoIcon:f}},(0,e.jsx)("div",{css:R.css`
24
24
  > :not(:last-child) {
25
25
  margin-bottom: var(--spacing-md);
26
26
  }
27
- `},X?(0,e.jsx)(T.InputSelect,{id:"selection-field-product-category",label:p,disabled:a,value:(z=(u=y.categories)==null?void 0:u[0])!=null?z:"",options:Y,onChange:d=>{C({categories:d.target.value===""?[]:[d.target.value]})}}):(0,e.jsx)(qe,{loading:i||!1,id:"selection-field-product-category",label:p,onAdd:Ce,onRemove:pe,selectedValues:y.categories,values:se}),(0,e.jsx)("div",{css:R.css`
27
+ `},_?(0,e.jsx)(E.InputSelect,{id:"selection-field-product-category",label:p,disabled:a,value:(M=(u=y.categories)==null?void 0:u[0])!=null?M:"",options:X,onChange:d=>{P({categories:d.target.value===""?[]:[d.target.value]})}}):(0,e.jsx)(tt,{loading:i||!1,id:"selection-field-product-category",label:p,onAdd:Se,onRemove:le,selectedValues:y.categories,values:ne}),(0,e.jsx)("div",{css:R.css`
28
28
  display: flex;
29
29
  flex-wrap: wrap;
30
30
  column-gap: var(--spacing-lg);
31
31
  row-gap: var(--spacing-md);
32
- ${(0,T.mq)("md")} {
32
+ ${(0,E.mq)("md")} {
33
33
  flex-wrap: nowrap;
34
34
  }
35
- `},U?null:(0,e.jsx)("div",{css:R.css`
35
+ `},D?null:(0,e.jsx)("div",{css:R.css`
36
36
  width: 50%;
37
- `},(0,e.jsx)(T.InputSelect,{id:"brand",name:"brand",label:b,disabled:l,value:y.brand,onChange:j,options:[{value:"",label:"Choose..."},...J.map(d=>({value:d.id,label:d.name}))]})),(0,e.jsx)("div",{css:R.css`
37
+ `},(0,e.jsx)(E.InputSelect,{id:"brand",name:"brand",label:b,disabled:l,value:y.brand,onChange:Y,options:[{value:"",label:"Choose..."},...q.map(d=>({value:d.id,label:d.name}))]})),(0,e.jsx)("div",{css:R.css`
38
38
  flex-grow: 1;
39
39
  position: relative;
40
- `},(0,e.jsx)(T.Input,{id:"keyword-search",name:"keyword-search",label:"Keyword",value:y.keyword,placeholder:"Enter keyword",onChange:d=>C({keyword:d.target.value})}))),(0,e.jsx)("div",{css:R.css`
40
+ `},(0,e.jsx)(E.Input,{id:"keyword-search",name:"keyword-search",label:"Keyword",value:y.keyword,placeholder:"Enter keyword",onChange:d=>P({keyword:d.target.value})}))),(0,e.jsx)("div",{css:R.css`
41
41
  display: flex;
42
42
  flex-wrap: wrap;
43
43
  column-gap: var(--spacing-lg);
44
44
  row-gap: var(--spacing-md);
45
- ${(0,T.mq)("md")} {
45
+ ${(0,E.mq)("md")} {
46
46
  flex-wrap: nowrap;
47
47
  }
48
48
  `},(0,e.jsx)("div",{css:R.css`
49
49
  width: 100%;
50
- ${(0,T.mq)("md")} {
50
+ ${(0,E.mq)("md")} {
51
51
  width: 33.333333%;
52
52
  }
53
53
  position: relative;
54
- `},(0,e.jsx)(T.Input,{id:"count",name:"count",type:"number",min:1,step:1,value:y.count,onChange:d=>k(d.target.valueAsNumber),label:"Count"}),(0,e.jsx)("div",{css:R.css`
54
+ `},(0,e.jsx)(E.Input,{id:"count",name:"count",type:"number",min:1,step:1,value:y.count,onChange:d=>k(d.target.valueAsNumber),label:"Count"}),(0,e.jsx)("div",{css:R.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)(mr,{onCountChange:()=>k(y.count-1),countIcon:"decrement",disabled:y.count===1}),(0,e.jsx)(mr,{onCountChange:()=>k(y.count+1),countIcon:"increment"}))),Array.isArray(v)&&v.length>0?(0,e.jsx)("div",{css:R.css`
60
+ `},(0,e.jsx)(Cr,{onCountChange:()=>k(y.count-1),countIcon:"decrement",disabled:y.count===1}),(0,e.jsx)(Cr,{onCountChange:()=>k(y.count+1),countIcon:"increment"}))),Array.isArray(v)&&v.length>0?(0,e.jsx)("div",{css:R.css`
61
61
  flex-grow: 1;
62
- ${(0,T.mq)("md")} {
62
+ ${(0,E.mq)("md")} {
63
63
  width: 33.333333%;
64
64
  }
65
- `},(0,e.jsx)(T.InputSelect,{id:"sort",name:"sort",label:"Sort",value:y.sort,onChange:d=>C({sort:d.target.value}),options:[{value:"",label:"Select a sort"},...v.map(d=>({value:d.sortKey,label:d.name}))]})):null,Array.isArray(s)&&s.length>0?(0,e.jsx)("div",{css:R.css`
65
+ `},(0,e.jsx)(E.InputSelect,{id:"sort",name:"sort",label:"Sort",value:y.sort,onChange:d=>P({sort:d.target.value}),options:[{value:"",label:"Select a sort"},...v.map(d=>({value:d.sortKey,label:d.name}))]})):null,Array.isArray(s)&&s.length>0?(0,e.jsx)("div",{css:R.css`
66
66
  flex-grow: 1;
67
- `},(0,e.jsx)(T.InputSelect,{id:"sort-order",name:"sort-order",label:"Sort Order",value:y.sortOrder,onChange:d=>C({sortOrder:d.target.value}),options:s.map(d=>({value:d.sortOrderKey,label:d.name}))})):null),(0,e.jsx)("div",null,(0,e.jsx)("h3",{css:R.css`
67
+ `},(0,e.jsx)(E.InputSelect,{id:"sort-order",name:"sort-order",label:"Sort Order",value:y.sortOrder,onChange:d=>P({sortOrder:d.target.value}),options:s.map(d=>({value:d.sortOrderKey,label:d.name}))})):null),(0,e.jsx)("div",null,(0,e.jsx)("h3",{css:R.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)(je,{products:(K=le.value)==null?void 0:K.products}))))};function ur(t,n){var i;let o=[],r=n?`${n.name} > `:"",a={id:t.id.toString(),name:`${r}${t.name}`};return o.push(a),(i=t.children)==null||i.forEach(l=>{let f=ur(l,a);o.push(...f)}),o}function mr({onCountChange:t,countIcon:n,disabled:o}){return(0,e.jsx)("button",{css:R.css`
72
+ `},"Result Preview"),(0,e.jsx)(nt,{products:(H=de.value)==null?void 0:H.products}))))};function Pr(t,n){var i;let o=[],r=n?`${n.name} > `:"",a={id:t.id.toString(),name:`${r}${t.name}`};return o.push(a),(i=t.children)==null||i.forEach(l=>{let f=Pr(l,a);o.push(...f)}),o}function Cr({onCountChange:t,countIcon:n,disabled:o}){return(0,e.jsx)("button",{css:R.css`
73
73
  width: 2.25rem;
74
74
  height: 2.25rem;
75
75
  border: 1px solid var(--gray-300);
@@ -85,79 +85,75 @@ var Qr=Object.create;var Le=Object.defineProperty;var Wr=Object.getOwnPropertyDe
85
85
  cursor: not-allowed;
86
86
  opacity: 0.3;
87
87
  `:""}
88
- `,onClick:t,disabled:o},n==="increment"?(0,e.jsx)(xe,{css:R.css`
88
+ `,onClick:t,disabled:o},n==="increment"?(0,e.jsx)(Re,{css:R.css`
89
89
  width: 1rem;
90
90
  height: 1rem;
91
- `}):(0,e.jsx)(Ie,{css:R.css`
91
+ `}):(0,e.jsx)(xe,{css:R.css`
92
92
  width: 1rem;
93
93
  height: 1rem;
94
- `}))}var Ye=Q.default.createContext(void 0),Je=()=>{let t=(0,Q.useContext)(Ye);if(!t)throw new Error("useProductQueryContext must be used within a <ProductQueryContext> provider");return t};function H({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 L=require("@emotion/react"),gr=require("@uniformdev/design-system"),je=({products:t})=>{let{categories:n,logoIcon:o}=Je();return(0,e.jsx)(et.default.Fragment,null,(0,e.jsx)("p",{css:L.css`
94
+ `}))}var rt=$.default.createContext(void 0),ot=()=>{let t=(0,$.useContext)(rt);if(!t)throw new Error("useProductQueryContext must be used within a <ProductQueryContext> provider");return t};function O({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 it=require("@emotion/react"),Dr=require("@uniformdev/design-system");var U=require("@emotion/react"),Lr=U.css`
95
+ align-items: center;
96
+ background: var(--white);
97
+ border-radius: var(--rounded-base);
98
+ border: 2px solid var(--gray-300);
99
+ color: currentColor;
100
+ display: inline-flex;
101
+ justify-content: space-between;
102
+ padding: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) var(--spacing-base);
103
+ margin-left: auto;
104
+ text-decoration: none;
105
+ &:hover {
106
+ background: var(--gray-50);
107
+ }
108
+ `,Rr=U.css`
109
+ font-size: var(--fs-sm);
110
+ `,xr=U.css`
111
+ width: 2.25rem;
112
+ height: 2.25rem;
113
+ `,at=U.css`
114
+ margin-right: var(--spacing-lg);
115
+ font-size: var(--fs-sm);
116
+ `,kr=U.css`
117
+ border: 1px solid var(--gray-200);
118
+ border-radius: var(--rounded-md);
119
+ background: var(--gray-50);
120
+ margin: var(--spacing-base) 0;
121
+ `,Ir=U.css`
122
+ align-items: center;
123
+ display: flex;
124
+ flex-grow: 1;
125
+ gap: var(--spacing-base);
126
+ padding: var(--spacing-sm);
127
+ margin-right: var(--spacing-sm);
128
+ `,Er=U.css`
129
+ background: var(--gray-200);
130
+ width: 3.5rem;
131
+ height: 3.5rem;
132
+ object-fit: cover;
133
+ `,Tr=U.css`
134
+ background: var(--gray-100);
135
+ height: 3.5rem;
136
+ width: 3.5rem;
137
+ `,Mr=U.css`
138
+ margin-top: 0;
139
+ font-weight: var(--fw-bold);
140
+ font-size: var(--fs-sm);
141
+ width: calc(100% / 3);
142
+ `,Vr=U.css`
143
+ display: block;
144
+ font-weight: var(--fw-regular);
145
+ `;var nt=({products:t})=>{let{categories:n,logoIcon:o}=ot();return(0,e.jsx)(w.Fragment,null,(0,e.jsx)("p",{css:it.css`
95
146
  margin-bottom: var(--spacing-base);
96
- `},"Matching ",(t==null?void 0:t.length)||0," products"),(0,e.jsx)("ul",{css:[L.css`
147
+ `},"Matching ",(t==null?void 0:t.length)||0," products"),(0,e.jsx)("ul",{css:[it.css`
97
148
  max-height: 24rem;
98
149
  overflow-x: auto;
99
- `,gr.scrollbarStyles]},t==null?void 0:t.map((r,a)=>{var f,g;let[i]=(r==null?void 0:r.categories)||[],l=typeof i=="undefined"||!n||(f=n.find(v=>v.id===i.id))==null?void 0:f.name;return(0,e.jsx)("li",{key:`product-${r.id}`,css:L.css`
100
- border: 1px solid var(--gray-300);
101
- border-radius: var(--rounded-md);
102
- background-color: var(--gray-100);
103
- margin: var(--spacing-base) 0;
104
- `},(0,e.jsx)("div",{css:L.css`
105
- padding: var(--spacing-sm);
106
- display: flex;
107
- flex-grow: 1;
108
- margin-right: var(--spacing-sm);
109
- gap: var(--spacing-base);
110
- align-items: center;
111
- `},r.thumbnailUrl?(0,e.jsx)("img",{src:r.thumbnailUrl,alt:typeof r.title=="string"?r.title:r.name||`Product ${a}`,css:L.css`
112
- background-color: var(--gray-200);
113
- width: 3.5rem;
114
- height: 3.5rem;
115
- object-fit: cover;
116
- `}):(0,e.jsx)("div",{css:L.css`
117
- height: 3.5rem;
118
- width: 3.5rem;
119
- background-color: var(--gray-100);
120
- `}),(0,e.jsx)("h4",{css:L.css`
121
- font-weight: var(--fw-bold);
122
- width: 33.333333%;
123
- font-size: var(--fs-sm);
124
- margin-top: 0px;
125
- `},r.title||r.name,l&&(0,e.jsx)("span",{css:L.css`
126
- display: block;
127
- font-weight: var(--fw-regular);
128
- `},l)),r&&(0,e.jsx)(et.default.Fragment,null,(0,e.jsx)("p",{css:L.css`
129
- margin-right: var(--spacing-lg);
130
- font-size: var(--fs-sm);
131
- `},"SKU: ",r.sku||r.id,(0,e.jsx)("br",null)),r.price!==void 0?(0,e.jsx)("p",{css:L.css`
132
- margin-right: var(--spacing-lg);
133
- font-size: var(--fs-sm);
134
- `},(0,e.jsx)("span",{css:L.css`
135
- display: block;
136
- `},"Price: ",r.price)):null,r.editLink||r.url?(0,e.jsx)("a",{css:L.css`
137
- display: inline-flex;
138
- justify-content: space-between;
139
- align-items: center;
140
- padding: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) var(--spacing-base);
141
- background-color: var(--white);
142
- border-radius: var(--rounded-base);
143
- border: 2px solid var(--gray-400);
144
- margin-left: auto;
145
- &:hover {
146
- background-color: var(--gray-100);
147
- }
148
- `,href:(g=r.editLink)!=null?g:r.url,title:`Go to ${r.title||r.name}`,target:"_blank",rel:"noopener noreferrer"},(0,e.jsx)("span",{css:L.css`
149
- font-size: var(--fs-sm);
150
- margin-right: var(--spacing-sm);
151
- `},"Edit"),o?(0,e.jsx)(H,{src:o,alt:"Logo",css:L.css`
152
- width: 2.25rem;
153
- height: 2.25rem;
154
- `}):null):null)))})))};var ie=N(require("react"));var D=N(require("react"));var Ve={};sr(Ve,{Caution:()=>fr,Checkmark:()=>Me,ChevronDown:()=>Te,Close:()=>te,Danger:()=>vr,ExclamationPoint:()=>hr,Info:()=>re,Lightbulb:()=>br,MagnifyingGlass:()=>yr,MaximizeAlt:()=>Sr,Minus:()=>Ie,MoreVerticalAlt:()=>be,Plus:()=>xe});var no=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"})),fr=no;var ao=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"})),Me=ao;var io=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"})),Te=io;var so=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"}))),te=so;var co=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"})),vr=co;var lo=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"})),hr=lo;var po=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"})),re=po;var mo=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"})),br=mo;var uo=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"})))),yr=uo;var go=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"})),Sr=go;var fo=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"})),be=fo;var Rr=require("react-use"),Lr=require("uuid");var W=N(require("react"));function De(t,n){let o=window.open(t,"_blank"),r=setInterval(()=>{o!=null&&o.closed&&(clearInterval(r),n())},500)}var Cr=require("timeago.js");var V=require("@emotion/react"),wr=require("@uniformdev/design-system"),tt=V.css`
150
+ `,Dr.scrollbarStyles]},t==null?void 0:t.map((r,a)=>{var f,g;let[i]=(r==null?void 0:r.categories)||[],l=typeof i=="undefined"||!n||(f=n.find(v=>v.id===i.id))==null?void 0:f.name;return(0,e.jsx)("li",{key:`product-${r.id}`,css:kr},(0,e.jsx)("div",{css:Ir},r.thumbnailUrl?(0,e.jsx)("img",{src:r.thumbnailUrl,alt:typeof r.title=="string"?r.title:r.name||`Product ${a}`,css:Er}):(0,e.jsx)("div",{css:Tr}),(0,e.jsx)("h4",{css:Mr},r.title||r.name,l&&(0,e.jsx)("span",{css:Vr},l)),r&&(0,e.jsx)(w.Fragment,null,(0,e.jsx)("p",{css:at},"SKU: ",r.sku||r.id,(0,e.jsx)("br",null)),r.price!==void 0?(0,e.jsx)("p",{css:at},"Price: ",r.price):null,r.editLink||r.url?(0,e.jsx)("a",{css:Lr,href:(g=r.editLink)!=null?g:r.url,title:`Go to ${r.title||r.name}`,target:"_blank",rel:"noopener noreferrer"},(0,e.jsx)("span",{css:Rr},"Edit"),o?(0,e.jsx)(O,{src:o,alt:"Logo",css:xr}):null):null)))})))};var oe=j(require("react"));var T=j(require("react"));var Me={};hr(Me,{Caution:()=>zr,Checkmark:()=>Ie,ChevronDown:()=>Ee,Close:()=>Ur,Danger:()=>Gr,ExclamationPoint:()=>Ar,Info:()=>Te,Lightbulb:()=>Br,MagnifyingGlass:()=>Or,MaximizeAlt:()=>Hr,Minus:()=>xe,MoreVerticalAlt:()=>he,Plus:()=>Re});var Lo=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"})),zr=Lo;var Ro=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"})),Ie=Ro;var xo=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"})),Ee=xo;var ko=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"}))),Ur=ko;var Io=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"})),Gr=Io;var Eo=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"})),Ar=Eo;var To=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"})),Te=To;var Mo=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"})),Br=Mo;var Vo=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"})))),Or=Vo;var Do=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"})),Hr=Do;var zo=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"})),he=zo;var Nr=require("react-use"),Qr=require("uuid");var K=j(require("react"));function Ve(t,n){let o=window.open(t,"_blank"),r=setInterval(()=>{o!=null&&o.closed&&(clearInterval(r),n())},500)}var Fr=require("timeago.js");var V=require("@emotion/react"),$r=require("@uniformdev/design-system"),st=V.css`
155
151
  border: 1px solid var(--gray-200);
156
152
  background: var(--gray-50);
157
153
  border-radius: var(--rounded-base);
158
154
  display: flex;
159
155
  width: 100%;
160
- `,rt=V.css`
156
+ `,ct=V.css`
161
157
  align-items: center;
162
158
  display: flex;
163
159
  flex-grow: 1;
@@ -165,25 +161,22 @@ var Qr=Object.create;var Le=Object.defineProperty;var Wr=Object.getOwnPropertyDe
165
161
  margin-inline: 0 var(--spacing-sm);
166
162
  padding: var(--spacing-base) var(--spacing-base) var(--spacing-base) var(--spacing-lg);
167
163
  position: relative;
168
- `,ot=V.css`
164
+ `,dt=V.css`
169
165
  flex-grow: 1;
170
- `,nt=V.css`
166
+ `,lt=V.css`
171
167
  align-items: start;
172
168
  display: inline-flex;
173
169
  position: relative;
174
- `,at=V.css`
170
+ `,pt=V.css`
175
171
  color: var(--brand-secondary-1);
176
172
  font-size: var(--fs-base);
177
173
  font-weight: var(--fw-bold);
178
174
  line-height: 1;
179
175
  margin: 0;
180
- `,it=V.css`
176
+ `,mt=V.css`
181
177
  width: 1.5rem;
182
178
  height: 1.5rem;
183
- `,st=V.css`
184
- width: 1rem;
185
- height: 1rem;
186
- `,ct=V.css`
179
+ `,ut=V.css`
187
180
  background: var(--white);
188
181
  border-radius: var(--rounded-base);
189
182
  border-left: 4px solid var(--brand-secondary-3);
@@ -192,69 +185,69 @@ var Qr=Object.create;var Le=Object.defineProperty;var Wr=Object.getOwnPropertyDe
192
185
  padding: var(--spacing-base);
193
186
  z-index: var(--z-10);
194
187
  width: max-content;
195
- `,oe=V.css`
188
+ `,ee=V.css`
196
189
  font-size: var(--fs-sm);
197
- `,ge=V.css`
190
+ `,ue=V.css`
198
191
  font-weight: var(--fw-bold);
199
192
  margin-right: var(--spacing-sm);
200
- `,dt=V.css`
193
+ `,gt=V.css`
201
194
  display: flex;
202
195
  flex-direction: column;
203
196
  gap: var(--spacing-sm);
204
197
 
205
- ${(0,wr.mq)("md")} {
198
+ ${(0,$r.mq)("md")} {
206
199
  flex-direction: row;
207
200
  min-width: 200px;
208
201
  justify-content: end;
209
202
  }
210
- `,ze=V.css`
203
+ `,De=V.css`
211
204
  align-items: center;
212
205
  background: var(--white);
213
206
  border-radius: var(--rounded-base);
214
207
  border: 2px solid var(--gray-300);
208
+ color: currentColor;
215
209
  display: flex;
216
210
  gap: var(--spacing-sm);
217
211
  padding: var(--spacing-sm) var(--spacing-base);
218
212
  justify-content: space-between;
213
+ text-decoration: none;
219
214
 
220
215
  &:hover {
221
216
  background: var(--gray-50);
222
217
  }
223
- `;var $=require("@emotion/react");var lt=({selectedItem:t,logoIcon:n,onDeselect:o,onEditClosed:r})=>{var v;let a=(0,W.useRef)(null),i=(0,W.useRef)(null),[l,f]=(0,W.useState)(!1);(0,W.useEffect)(()=>{let s=b=>{a.current&&!a.current.contains(b.target)&&i.current&&!i.current.contains(b.target)&&f(!1)},p=()=>{f(!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)}},[i]);let g=()=>{var s;if(f(!l),i.current&&a.current){let p=(s=a==null?void 0:a.current)==null?void 0:s.getBoundingClientRect(),b=i.current.offsetWidth;i.current.style.top=`${p.top+30}px`,i.current.style.left=`${p.left-b+30}px`}};return(0,e.jsx)("div",{css:tt,key:t.id},(0,e.jsx)("div",{css:rt},(0,e.jsx)("div",{css:ot},(0,e.jsx)("div",{css:nt},(0,e.jsx)("h4",{css:[at,t.popoverData?$.css`
218
+ `;var F=require("@emotion/react");var ft=require("@uniformdev/design-system"),ze=require("react-icons/cg"),vt=({selectedItem:t,logoIcon:n,onDeselect:o,onEditClosed:r})=>{var v;let a=(0,K.useRef)(null),i=(0,K.useRef)(null),[l,f]=(0,K.useState)(!1);(0,K.useEffect)(()=>{let s=b=>{a.current&&!a.current.contains(b.target)&&i.current&&!i.current.contains(b.target)&&f(!1)},p=()=>{f(!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)}},[i]);let g=()=>{var s;if(f(!l),i.current&&a.current){let p=(s=a==null?void 0:a.current)==null?void 0:s.getBoundingClientRect(),b=i.current.offsetWidth;i.current.style.top=`${p.top+30}px`,i.current.style.left=`${p.left-b+30}px`}};return(0,e.jsx)("div",{css:st,key:t.id},(0,e.jsx)("div",{css:ct},(0,e.jsx)("div",{css:dt},(0,e.jsx)("div",{css:lt},(0,e.jsx)("h4",{css:[pt,t.popoverData?F.css`
224
219
  margin-bottom: var(--spacing-sm);
225
- `:""],title:`ID: ${t.id}`,"data-test-id":"entry-id"},t.title||t.id||""),t.popoverData?(0,e.jsx)(W.default.Fragment,null,(0,e.jsx)("button",{type:"button",ref:a,css:$.css`
220
+ `:""],title:`ID: ${t.id}`,"data-test-id":"entry-id"},t.title||t.id||""),t.popoverData?(0,e.jsx)(K.default.Fragment,null,(0,e.jsx)("button",{type:"button",ref:a,css:F.css`
226
221
  margin: calc(var(--spacing-xs) * -1) 0 calc(var(--spacing-xs) * -1) var(--spacing-sm);
227
- `,"aria-controls":"path-details","aria-expanded":l,onClick:g},(0,e.jsx)(re,{width:24,height:24,css:$.css`
228
- color: var(--gray-400);
229
- `})),(0,e.jsx)("div",{id:"path-details","aria-hidden":!l,ref:i,css:[ct,l?$.css`
222
+ `,"aria-controls":"path-details","aria-expanded":l,onClick:g},(0,e.jsx)(ft.Icon,{icon:ze.CgInfo,iconColor:"gray",size:24,css:F.css`
223
+ opacity: var(--opacity-75);
224
+ `})),(0,e.jsx)("div",{id:"path-details","aria-hidden":!l,ref:i,css:[ut,l?F.css`
230
225
  visibility: visible;
231
- `:$.css`
226
+ `:F.css`
232
227
  visibility: hidden;
233
- `]},Object.entries(t.popoverData).map(([s,p],b)=>(0,e.jsx)("div",{css:oe,key:b},(0,e.jsx)("span",{css:ge},s,":"),p)))):null),t.createdDate&&(0,e.jsx)("div",{css:oe},(0,e.jsx)("span",{css:ge},"Created:"),(0,Cr.format)((v=t.createdDate)!=null?v:0)),t.metadata?Object.entries(t.metadata).filter(([s])=>["type","status"].includes(s.toLocaleLowerCase())).map(([s,p])=>(0,e.jsx)("div",{css:[oe,$.css`
228
+ `]},Object.entries(t.popoverData).map(([s,p],b)=>(0,e.jsx)("div",{css:ee,key:b},(0,e.jsx)("span",{css:ue},s,":"),p)))):null),t.createdDate&&(0,e.jsx)("div",{css:ee},(0,e.jsx)("span",{css:ue},"Created:"),(0,Fr.format)((v=t.createdDate)!=null?v:0)),t.metadata?Object.entries(t.metadata).filter(([s])=>["type","status"].includes(s.toLocaleLowerCase())).map(([s,p])=>(0,e.jsx)("div",{css:[ee,F.css`
234
229
  order: 1;
235
- `],key:s},(0,e.jsx)("span",{css:ge},s,":"),p)):null,t.metadata?Object.entries(t.metadata).filter(([s])=>!["type","status"].includes(s.toLocaleLowerCase())).map(([s,p])=>(0,e.jsx)("div",{css:[oe,$.css`
230
+ `],key:s},(0,e.jsx)("span",{css:ue},s,":"),p)):null,t.metadata?Object.entries(t.metadata).filter(([s])=>!["type","status"].includes(s.toLocaleLowerCase())).map(([s,p])=>(0,e.jsx)("div",{css:[ee,F.css`
236
231
  order: 1;
237
- `],key:s},(0,e.jsx)("span",{css:[ge,$.css`
232
+ `],key:s},(0,e.jsx)("span",{css:[ue,F.css`
238
233
  order: 1;
239
- `]},s,":"),p)):null),(0,e.jsx)("div",{css:dt},t.editLink?(0,e.jsx)("a",{href:t.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",onClick:s=>{r&&(De(s.currentTarget.href,()=>r(t)),s.preventDefault())},css:ze},(0,e.jsx)("span",{css:oe},"Edit"),(0,e.jsx)(H,{src:n,css:it,alt:"Logo"})):null,(0,e.jsx)("button",{type:"button",onClick:()=>{o(t)},css:ze},(0,e.jsx)("span",{css:oe},"Unlink"),(0,e.jsx)(te,{css:[st,$.css`
240
- color: var(--brand-secondary-5);
241
- `]})))))};var _=N(require("react"));var ne=require("@emotion/react"),pt=ne.css`
234
+ `]},s,":"),p)):null),(0,e.jsx)("div",{css:gt},t.editLink?(0,e.jsx)("a",{href:t.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",onClick:s=>{r&&(Ve(s.currentTarget.href,()=>r(t)),s.preventDefault())},css:De},(0,e.jsx)("span",{css:ee},"Edit"),(0,e.jsx)(O,{src:n,css:mt,alt:"Logo"})):null,(0,e.jsx)("button",{type:"button",onClick:()=>{o(t)},css:De},(0,e.jsx)("span",{css:ee},"Unlink"),(0,e.jsx)(ft.Icon,{icon:ze.CgClose,iconColor:"red",size:16})))))};var N=j(require("react"));var te=require("@emotion/react"),ht=te.css`
242
235
  cursor: pointer;
243
236
  padding: var(--spacing-sm);
244
237
  position: relative;
245
238
  transition: background-color var(--duration-fast) var(--timing-ease-out),
246
239
  color var(--duration-fast) var(--timing-ease-out);
247
- `,mt=ne.css`
240
+ `,bt=te.css`
248
241
  padding-right: var(--spacing-lg);
249
- `,ut=ne.css`
242
+ `,yt=te.css`
250
243
  background: var(--brand-secondary-3);
251
244
  color: var(--white);
252
- `,Ue=ne.css`
245
+ `,Ue=te.css`
253
246
  font-size: var(--fs-xs);
254
- `,Ge=ne.css`
247
+ `,Ge=te.css`
255
248
  font-weight: var(--fw-bold);
256
249
  margin-right: var(--spacing-sm);
257
- `,gt=ne.css`
250
+ `,St=te.css`
258
251
  background: var(--white);
259
252
  border-left: 4px solid var(--brand-secondary-3);
260
253
  border-radius: var(--rounded-base);
@@ -266,20 +259,20 @@ var Qr=Object.create;var Le=Object.defineProperty;var Wr=Object.getOwnPropertyDe
266
259
  right: var(--spacing-xl);
267
260
  z-index: var(--z-10);
268
261
  width: max-content;
269
- `,ft=ne.css`
262
+ `,wt=te.css`
270
263
  position: absolute;
271
264
  inset: 0 var(--spacing-sm) 0 auto;
272
- `;var vt=require("@emotion/react"),ht=({result:t,isSelected:n,triggerSelection:o})=>{let r=(0,_.useRef)(null),a=(0,_.useRef)(null),[i,l]=(0,_.useState)(!1);(0,_.useEffect)(()=>{function g(v){r.current&&!r.current.contains(v.target)&&a.current&&!a.current.contains(v.target)&&l(!1)}return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[a]);let f=g=>{g.stopPropagation(),l(!i)};return(0,e.jsx)("div",{key:t.id,css:[pt,n?ut:void 0,t.popoverData?mt: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:ft,"aria-controls":"path-details",onClick:g=>f(g),"aria-expanded":i},(0,e.jsx)(re,{width:24,height:24})),(0,e.jsx)("div",{id:"path-details","aria-hidden":!i,ref:a,css:[gt,i?vt.css`
265
+ `;var Ct=require("@emotion/react"),Pt=({result:t,isSelected:n,triggerSelection:o})=>{let r=(0,N.useRef)(null),a=(0,N.useRef)(null),[i,l]=(0,N.useState)(!1);(0,N.useEffect)(()=>{function g(v){r.current&&!r.current.contains(v.target)&&a.current&&!a.current.contains(v.target)&&l(!1)}return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[a]);let f=g=>{g.stopPropagation(),l(!i)};return(0,e.jsx)("div",{key:t.id,css:[ht,n?yt:void 0,t.popoverData?bt:void 0],"data-value":t.id,role:"option",tabIndex:-1,onClick:()=>o()},t.title,t.popoverData&&n?(0,e.jsx)(N.default.Fragment,null,(0,e.jsx)("button",{type:"button",ref:r,css:wt,"aria-controls":"path-details",onClick:g=>f(g),"aria-expanded":i},(0,e.jsx)(Te,{width:24,height:24})),(0,e.jsx)("div",{id:"path-details","aria-hidden":!i,ref:a,css:[St,i?Ct.css`
273
266
  visibility: visible;
274
- `:vt.css`
267
+ `:Ct.css`
275
268
  visibility: hidden;
276
- `]},t.metadata&&Object.entries(t.metadata).map(([g,v],s)=>(0,e.jsx)("div",{css:Ue,key:s},(0,e.jsx)("span",{css:Ge},g,":"),v)),Object.entries(t.popoverData).map(([g,v],s)=>(0,e.jsx)("div",{css:Ue,key:s},(0,e.jsx)("span",{css:Ge},g,":"),v)))):null)};var fe=require("react-beautiful-dnd");var P=require("@emotion/react"),bt=P.css`
269
+ `]},t.metadata&&Object.entries(t.metadata).map(([g,v],s)=>(0,e.jsx)("div",{css:Ue,key:s},(0,e.jsx)("span",{css:Ge},g,":"),v)),Object.entries(t.popoverData).map(([g,v],s)=>(0,e.jsx)("div",{css:Ue,key:s},(0,e.jsx)("span",{css:Ge},g,":"),v)))):null)};var ge=require("react-beautiful-dnd");var L=require("@emotion/react"),Lt=L.css`
277
270
  background: var(--white);
278
271
  border: 1px solid var(--gray-300);
279
272
  border-radius: var(--rounded-base);
280
273
  padding: calc(var(--spacing-base) - 0.25rem) var(--spacing-sm);
281
274
  margin-bottom: var(--spacing-base);
282
- `,yt=P.css`
275
+ `,Rt=L.css`
283
276
  align-items: center;
284
277
  display: flex;
285
278
  position: relative;
@@ -287,7 +280,7 @@ var Qr=Object.create;var Le=Object.defineProperty;var Wr=Object.getOwnPropertyDe
287
280
  width: 100%;
288
281
  background-color: transparent;
289
282
  border: 0;
290
- `,St=P.css`
283
+ `,xt=L.css`
291
284
  color: var(--brand-secondary-1);
292
285
  display: block;
293
286
  font-weight: var(--fw-bold);
@@ -303,15 +296,15 @@ var Qr=Object.create;var Le=Object.defineProperty;var Wr=Object.getOwnPropertyDe
303
296
  background: var(--gray-100);
304
297
  outline: none;
305
298
  }
306
- `,wt=P.css`
299
+ `,kt=L.css`
307
300
  background: var(--white);
308
301
  border: 1px solid var(--gray-300);
309
302
  border-radius: var(--rounded-base);
310
303
  padding: calc(var(--spacing-base) - 0.25rem) var(--spacing-base);
311
304
  display: block;
312
- `,Ct=P.css`
305
+ `,It=L.css`
313
306
  display: none;
314
- `,Pt=P.css`
307
+ `,Et=L.css`
315
308
  overflow-y: auto;
316
309
  height: 16rem;
317
310
  margin-bottom: var(--spacing-base);
@@ -320,211 +313,204 @@ var Qr=Object.create;var Le=Object.defineProperty;var Wr=Object.getOwnPropertyDe
320
313
  & > :not(:last-child) {
321
314
  border-bottom: 1px solid var(--gray-200);
322
315
  }
323
- `,vo=P.css`
316
+ `,Uo=L.css`
324
317
  background-color: var(--gray-50);
325
318
  max-width: 33.33%;
326
- `,Rt=P.css`
319
+ `,Tt=L.css`
327
320
  align-items: center;
328
321
  display: flex;
329
322
  position: absolute;
330
323
  inset: 0 0 0 auto;
331
324
  pointer-events: none;
332
325
  padding-right: var(--spacing-sm);
333
- `,Lt=P.css`
326
+ `,Mt=L.css`
334
327
  color: var(--brand-secondary-1);
335
328
  width: 1.25rem;
336
329
  height: 1.25rem;
337
330
  transition: transform var(--duration-fast) var(--timing-ease-out);
338
331
  transform: rotate(0);
339
- `,ho=P.css`
332
+ `,Go=L.css`
340
333
  background: var(--white);
341
334
  color: var(--brand-secondary-1);
342
- `,kt=P.css`
335
+ `,Vt=L.css`
343
336
  position: relative;
344
337
  margin-block: var(--spacing-sm) 0;
345
338
 
346
339
  &:hover > span {
347
340
  opacity: 0.3;
348
341
  }
349
- `,xt=P.css`
342
+ `,Dt=L.css`
350
343
  align-items: center;
351
344
  display: flex;
352
345
  position: absolute;
353
346
  inset: 0 auto 0 0;
354
347
  margin-block: auto;
355
348
  opacity: 0;
356
- `,Ae=P.css`
349
+ `,Ae=L.css`
357
350
  color: var(--brand-secondary-1);
358
- `,It=P.css`
351
+ `,zt=L.css`
359
352
  position: absolute;
360
353
  left: 0.375rem;
361
- `,Be=P.css`
354
+ `,Be=L.css`
362
355
  width: calc(var(--spacing-lg) + var(--spacing-xs));
363
356
  height: calc(var(--spacing-lg) + var(--spacing-xs));
364
- `;var A=require("@emotion/react"),w=require("@uniformdev/design-system");var ce=require("react");function Pr(t,{delay:n=500,minDuration:o=200}={delay:500,minDuration:200}){let[r,a]=(0,ce.useState)("IDLE"),i=(0,ce.useRef)(void 0);return(0,ce.useEffect)(()=>{t&&r==="IDLE"&&(clearTimeout(i.current),i.current=setTimeout(()=>{if(!t)return a("IDLE");i.current=setTimeout(()=>{a("EXPIRE")},o),a("DISPLAY")},n),a("DELAY")),!t&&r!=="DISPLAY"&&(clearTimeout(i.current),a("IDLE"))},[t,r,n,o]),(0,ce.useEffect)(()=>()=>clearTimeout(i.current),[]),r==="DISPLAY"||r==="EXPIRE"}var bo=({searchText:t,selectedContentType:n})=>{let o="No content found";return n&&n!=="any"&&(o=`No ${n} content was found`),t&&(o=`${o} for keyword '${t}'.`),(0,e.jsx)(w.Callout,{type:"info"},o)},Et=({search:t,results:n,contentTypes:o,selectedItems:r,logoIcon:a,select:i,multiSelect:l,multiSelectId:f,rowComponent:g,selectedItemComponent:v,totalResults:s,resultsLoading:p,requireContentType:b,onAddNew:U,onEditClosed:X,onCancel:C,noResultsComponent:y,helpComponent:le,onSort:q,typeSelectorLabel:se="Content Type Select",typeSelectorAllTypesOptionText:Y="All content types",loadingIndicatorDelay:J=1e3})=>{var nr,ar,ir;let pe=()=>b?Array.isArray(o)&&o.length>0?o[0].id:"":"any",[j,k]=D.useState(""),[u,z]=D.useState(pe),[K,d]=D.useState(!1),[S,G]=D.useState([]),[Tr,er]=D.useState(!1),Fe=D.useRef(`x${(0,Lr.v4)()}`),Pe=(0,Rr.useThrottle)(j,750);D.useEffect(()=>{t(Pe,{count:5,offset:0,contentType:u==="any"?void 0:u})},[Pe,u]);let Vr=Pr(p,{delay:J}),Dr=c=>{S.some(h=>h.id===c.id)?G(h=>h.filter(ee=>ee.id!==c.id)):G(l?h=>[...h,c]:[c])},zr=r==null?void 0:r.map(c=>c.id+c.title).join(",");D.useEffect(()=>{Array.isArray(r)&&G(r)},[zr]);let Ur=()=>{z(pe()),k(""),G(r!=null&&r.length?r:[])},Gr=()=>{d(c=>!c),K||Ur()},tr=c=>{let h=(S==null?void 0:S.filter(ee=>ee.id!==c.id))||[];G(h),i(h,"")},Ar=c=>{c.preventDefault(),i(S,u),d(!1)},Br=c=>{c.preventDefault(),d(!1),C&&C()},Or=()=>{t(Pe,{count:5,offset:(n==null?void 0:n.length)||0,contentType:u==="any"?void 0:u}),er(!0);let c=setTimeout(()=>{er(!1)},750);return()=>clearTimeout(c)},Hr=!(r==null?void 0:r.length)||l,$r=g||ht,rr=v||lt,Fr=y||bo,or=a&&typeof a!="string"?a:null,Kr=or?(0,e.jsx)(or,{css:Be}):(0,e.jsx)("img",{src:a,alt:"Logo",css:Be}),Nr=c=>{var h,ee;if(c.destination&&c.source.droppableId===((h=c.destination)==null?void 0:h.droppableId)){let M=[...r||[]],[ve]=(ee=M==null?void 0:M.splice(c.source.index,1))!=null?ee:[];return M==null||M.splice(c.destination.index,0,ve),q&&(G(M),q==null||q(M)),M}};return(0,e.jsx)("div",{css:A.css`
357
+ `;var G=require("@emotion/react"),C=require("@uniformdev/design-system");var ae=require("react");function Kr(t,{delay:n=500,minDuration:o=200}={delay:500,minDuration:200}){let[r,a]=(0,ae.useState)("IDLE"),i=(0,ae.useRef)(void 0);return(0,ae.useEffect)(()=>{t&&r==="IDLE"&&(clearTimeout(i.current),i.current=setTimeout(()=>{if(!t)return a("IDLE");i.current=setTimeout(()=>{a("EXPIRE")},o),a("DISPLAY")},n),a("DELAY")),!t&&r!=="DISPLAY"&&(clearTimeout(i.current),a("IDLE"))},[t,r,n,o]),(0,ae.useEffect)(()=>()=>clearTimeout(i.current),[]),r==="DISPLAY"||r==="EXPIRE"}var Ao=({searchText:t,selectedContentType:n})=>{let o="No content found";return n&&n!=="any"&&(o=`No ${n} content was found`),t&&(o=`${o} for keyword '${t}'.`),(0,e.jsx)(C.Callout,{type:"info"},o)},Ut=({search:t,results:n,contentTypes:o,selectedItems:r,logoIcon:a,select:i,multiSelect:l,multiSelectId:f,rowComponent:g,selectedItemComponent:v,totalResults:s,resultsLoading:p,requireContentType:b,onAddNew:D,onEditClosed:_,onCancel:P,noResultsComponent:y,helpComponent:de,onSort:Z,typeSelectorLabel:ne="Content Type Select",typeSelectorAllTypesOptionText:X="All content types",loadingIndicatorDelay:q=1e3})=>{var gr,fr,vr;let le=()=>b?Array.isArray(o)&&o.length>0?o[0].id:"":"any",[Y,k]=T.useState(""),[u,M]=T.useState(le),[H,d]=T.useState(!1),[S,z]=T.useState([]),[qr,lr]=T.useState(!1),_e=T.useRef(`x${(0,Qr.v4)()}`),we=(0,Nr.useThrottle)(Y,750);T.useEffect(()=>{t(we,{count:5,offset:0,contentType:u==="any"?void 0:u})},[we,u]);let Yr=Kr(p,{delay:q}),Jr=c=>{S.some(h=>h.id===c.id)?z(h=>h.filter(J=>J.id!==c.id)):z(l?h=>[...h,c]:[c])},jr=r==null?void 0:r.map(c=>c.id+c.title).join(",");T.useEffect(()=>{Array.isArray(r)&&z(r)},[jr]);let eo=()=>{M(le()),k(""),z(r!=null&&r.length?r:[])},to=()=>{d(c=>!c),H||eo()},pr=c=>{let h=(S==null?void 0:S.filter(J=>J.id!==c.id))||[];z(h),i(h,"")},ro=c=>{c.preventDefault(),i(S,u),d(!1)},oo=c=>{c.preventDefault(),d(!1),P&&P()},no=()=>{t(we,{count:5,offset:(n==null?void 0:n.length)||0,contentType:u==="any"?void 0:u}),lr(!0);let c=setTimeout(()=>{lr(!1)},750);return()=>clearTimeout(c)},ao=!(r==null?void 0:r.length)||l,io=g||Pt,mr=v||vt,so=y||Ao,ur=a&&typeof a!="string"?a:null,co=ur?(0,e.jsx)(ur,{css:Be}):(0,e.jsx)("img",{src:a,alt:"Logo",css:Be}),lo=c=>{var h,J;if(c.destination&&c.source.droppableId===((h=c.destination)==null?void 0:h.droppableId)){let I=[...r||[]],[fe]=(J=I==null?void 0:I.splice(c.source.index,1))!=null?J:[];return I==null||I.splice(c.destination.index,0,fe),Z&&(z(I),Z==null||Z(I)),I}};return(0,e.jsx)("div",{css:G.css`
365
358
  width: 100%;
366
- `},(0,e.jsx)("div",{css:A.css`
359
+ `},(0,e.jsx)("div",{css:G.css`
367
360
  position: relative;
368
361
  margin-block: var(--spacing-base);
369
- `},Hr?(0,e.jsx)(D.Fragment,null,(0,e.jsx)("div",{css:bt,"data-test-id":"component-search"},(0,e.jsx)("button",{css:yt,onClick:Gr,type:"button","aria-haspopup":!0,"aria-expanded":K,"aria-controls":`entry-search-config-${Fe.current}`},Kr,(0,e.jsx)("span",{css:A.css`
362
+ `},ao?(0,e.jsx)(T.Fragment,null,(0,e.jsx)("div",{css:Lt,"data-test-id":"component-search"},(0,e.jsx)("button",{css:Rt,onClick:to,type:"button","aria-haspopup":!0,"aria-expanded":H,"aria-controls":`entry-search-config-${_e.current}`},co,(0,e.jsx)("span",{css:G.css`
370
363
  margin-left: var(--spacing-base);
371
- `},"Select"),(0,e.jsx)("span",{css:Rt},(0,e.jsx)(Te,{css:[Lt,K?A.css`
364
+ `},"Select"),(0,e.jsx)("span",{css:Tt},(0,e.jsx)(Ee,{css:[Mt,H?G.css`
372
365
  transform: rotate(180deg);
373
- `:void 0]})))),(0,e.jsx)("div",{id:`entry-search-config-${Fe.current}`,"aria-hidden":!K,css:[wt,K?void 0:Ct]},le||null,(0,e.jsx)("div",{css:A.css`
366
+ `:void 0]})))),(0,e.jsx)("div",{id:`entry-search-config-${_e.current}`,"aria-hidden":!H,css:[kt,H?void 0:It]},de||null,(0,e.jsx)("div",{css:G.css`
374
367
  display: flex;
375
368
  gap: calc(var(--spacing-base) - 0.25rem);
376
369
  margin-bottom: var(--spacing-base);
377
- `},(0,e.jsx)(w.InputSelect,{onChange:c=>z(c.target.value),value:u,label:se,showLabel:!1,options:[...b?[]:[{value:"any",label:Y}],...o?o.map(c=>({value:c.id,label:c.name})):[]]}),(0,e.jsx)("div",{css:A.css`
370
+ `},(0,e.jsx)(C.InputSelect,{onChange:c=>M(c.target.value),value:u,label:ne,showLabel:!1,options:[...b?[]:[{value:"any",label:X}],...o?o.map(c=>({value:c.id,label:c.name})):[]]}),(0,e.jsx)("div",{css:G.css`
378
371
  flex-grow: 1;
379
- `},(0,e.jsx)(w.InputKeywordSearch,{inputFieldName:"searchText",placeholder:"Enter keyword to narrow your results",onSearchTextChanged:k,disabledFieldSubmission:!0,value:j}))),(0,e.jsx)("div",{css:[Pt,w.scrollbarStyles],id:Fe.current,role:"listbox",tabIndex:0,"data-test-id":"entry-list"},(0,e.jsx)(w.LoadingOverlay,{isActive:Vr}),Array.isArray(n)&&n.length>0?n.map(c=>(0,e.jsx)($r,{key:c.id,isSelected:S.some(h=>h.id===c.id),result:c,triggerSelection:()=>Dr(c)})):(0,e.jsx)(Fr,{searchText:Pe||j,selectedContentType:(ar=(nr=o==null?void 0:o.find(c=>c.id===u))==null?void 0:nr.name)!=null?ar:u}),!p&&typeof s!="undefined"&&n&&(n==null?void 0:n.length)<s&&(0,e.jsx)("button",{type:"button",css:St,onClick:Or},Tr?(0,e.jsx)(w.LoadingIndicator,null):"Load More")),(0,e.jsx)("div",{css:A.css`
372
+ `},(0,e.jsx)(C.InputKeywordSearch,{inputFieldName:"searchText",placeholder:"Enter keyword to narrow your results",onSearchTextChanged:k,disabledFieldSubmission:!0,value:Y}))),(0,e.jsx)("div",{css:[Et,C.scrollbarStyles],id:_e.current,role:"listbox",tabIndex:0,"data-test-id":"entry-list"},(0,e.jsx)(C.LoadingOverlay,{isActive:Yr}),Array.isArray(n)&&n.length>0?n.map(c=>(0,e.jsx)(io,{key:c.id,isSelected:S.some(h=>h.id===c.id),result:c,triggerSelection:()=>Jr(c)})):(0,e.jsx)(so,{searchText:we||Y,selectedContentType:(fr=(gr=o==null?void 0:o.find(c=>c.id===u))==null?void 0:gr.name)!=null?fr:u}),!p&&typeof s!="undefined"&&n&&(n==null?void 0:n.length)<s&&(0,e.jsx)("button",{type:"button",css:xt,onClick:no},qr?(0,e.jsx)(C.LoadingIndicator,null):"Load More")),(0,e.jsx)("div",{css:G.css`
380
373
  display: flex;
381
374
  justify-content: space-between;
382
- `},(0,e.jsx)("div",null,U&&((ir=o==null?void 0:o.length)!=null?ir:0)>0?(0,e.jsx)(w.Menu,{menuLabel:"Add new menu",menuTrigger:(0,e.jsx)(w.Button,{buttonType:"secondary"},"Add New")},o==null?void 0:o.map(c=>(0,e.jsx)(w.MenuItem,{key:c.id,css:A.css`
375
+ `},(0,e.jsx)("div",null,D&&((vr=o==null?void 0:o.length)!=null?vr:0)>0?(0,e.jsx)(C.Menu,{menuLabel:"Add new menu",menuTrigger:(0,e.jsx)(C.Button,{buttonType:"secondary"},"Add New")},o==null?void 0:o.map(c=>(0,e.jsx)(C.MenuItem,{key:c.id,css:G.css`
383
376
  background: var(--white);
384
377
  color: var(--brand-secondary-1);
385
- `,onClick:()=>U(c)},c.name))):null),(0,e.jsx)("div",{css:A.css`
378
+ `,onClick:()=>D(c)},c.name))):null),(0,e.jsx)("div",{css:G.css`
386
379
  display: flex;
387
380
  gap: var(--spacing-base);
388
- `},(0,e.jsx)(w.Button,{buttonType:"unimportant",onClick:Br},"Cancel"),(0,e.jsx)(w.Button,{disabled:!S.length,onClick:Ar,"data-test-id":"entry-accept-button"},"Accept"))))):null,K?null:l?(0,e.jsx)(fe.DragDropContext,{onDragEnd:c=>Nr(c)},(0,e.jsx)(fe.Droppable,{droppableId:f||"canvas-multi-select"},c=>(0,e.jsx)("div",{...c.droppableProps,ref:c.innerRef,css:A.css`
381
+ `},(0,e.jsx)(C.Button,{buttonType:"unimportant",onClick:oo},"Cancel"),(0,e.jsx)(C.Button,{disabled:!S.length,onClick:ro,"data-test-id":"entry-accept-button"},"Accept"))))):null,H?null:l?(0,e.jsx)(ge.DragDropContext,{onDragEnd:c=>lo(c)},(0,e.jsx)(ge.Droppable,{droppableId:f||"canvas-multi-select"},c=>(0,e.jsx)("div",{...c.droppableProps,ref:c.innerRef,css:G.css`
389
382
  margin-block: var(--spacing-sm) 0;
390
- `},S==null?void 0:S.map((h,ee)=>{if(h!=null&&h.id)return(0,e.jsx)(fe.Draggable,{key:h.id,draggableId:h.id,index:ee},M=>(0,e.jsx)("div",{css:kt,ref:M.innerRef,...M.draggableProps,...M.dragHandleProps},(0,e.jsx)("span",{css:xt},(0,e.jsx)(be,{css:[Ae,It],width:24,height:24}),(0,e.jsx)(be,{css:Ae,width:24,height:24})),(0,e.jsx)(rr,{key:`selected-item-${h.id}`,logoIcon:a,selectedItem:h,onDeselect:ve=>tr(ve),onEditClosed:X?ve=>X(ve):void 0})))}),c.placeholder))):S==null?void 0:S.map(c=>(0,e.jsx)(rr,{key:`selected-item-${c.id}`,logoIcon:a,selectedItem:c,onDeselect:h=>tr(h),onEditClosed:X?h=>X(h):void 0}))))};var ae=require("@emotion/react"),Mt=ae.css`
383
+ `},S==null?void 0:S.map((h,J)=>{if(h!=null&&h.id)return(0,e.jsx)(ge.Draggable,{key:h.id,draggableId:h.id,index:J},I=>(0,e.jsx)("div",{css:Vt,ref:I.innerRef,...I.draggableProps,...I.dragHandleProps},(0,e.jsx)("span",{css:Dt},(0,e.jsx)(he,{css:[Ae,zt],width:24,height:24}),(0,e.jsx)(he,{css:Ae,width:24,height:24})),(0,e.jsx)(mr,{key:`selected-item-${h.id}`,logoIcon:a,selectedItem:h,onDeselect:fe=>pr(fe),onEditClosed:_?fe=>_(fe):void 0})))}),c.placeholder))):S==null?void 0:S.map(c=>(0,e.jsx)(mr,{key:`selected-item-${c.id}`,logoIcon:a,selectedItem:c,onDeselect:h=>pr(h),onEditClosed:_?h=>_(h):void 0}))))};var re=require("@emotion/react"),Gt=re.css`
391
384
  cursor: pointer;
392
385
  padding: var(--spacing-sm) 0;
393
386
  margin-right: var(--spacing-sm);
394
387
  position: relative;
395
388
  transition: background-color var(--duration-fast) var(--timing-ease-out),
396
389
  color var(--duration-fast) var(--timing-ease-out);
397
- `,Tt=ae.css`
390
+ `,At=re.css`
398
391
  border: 2px solid transparent;
399
392
  border-radius: var(--rounded-base);
400
393
  display: flex;
401
394
  align-items: center;
402
395
  gap: var(--spacing-base);
403
396
  padding: var(--spacing-sm) var(--spacing-xs);
404
- `,Vt=ae.css`
397
+ `,Bt=re.css`
405
398
  background-color: var(--green-50);
406
- `,Dt=ae.css`
399
+ `,Ot=re.css`
407
400
  font-size: var(--fs-sm);
408
401
  font-weight: var(--fw-bold);
409
402
  width: 50%;
410
- `,zt=ae.css`
403
+ `,Ht=re.css`
411
404
  font-weight: var(--fw-normal);
412
405
  display: block;
413
- `,Ut=ae.css`
406
+ `,$t=re.css`
414
407
  font-size: var(--fs-sm);
415
408
  > * {
416
409
  display: block;
417
410
  }
418
- `,Gt=ae.css`
411
+ `,Ft=re.css`
419
412
  display: block;
420
413
  height: 1.5rem;
421
414
  width: 1.5rem;
422
415
  color: var(--brand-secondary-3);
423
416
  margin-left: auto;
424
- `;var At=require("@emotion/react");function Bt({result:t,isSelected:n,triggerSelection:o}){var f;let{categories:r,logoIcon:a}=ye(),[i]=t.categories||[{id:"",name:""}],l=typeof i=="undefined"||!r||(f=r.find(g=>g.id===i.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:[Mt]},(0,e.jsx)("div",{css:[Tt,n?Vt:void 0]},t.thumbnailUrl?(0,e.jsx)("img",{src:t.thumbnailUrl,alt:`Thumbnail for ${t.title}`,css:At.css`
417
+ `;var Kt=require("@emotion/react");function Nt({result:t,isSelected:n,triggerSelection:o}){var f;let{categories:r,logoIcon:a}=be(),[i]=t.categories||[{id:"",name:""}],l=typeof i=="undefined"||!r||(f=r.find(g=>g.id===i.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:[Gt]},(0,e.jsx)("div",{css:[At,n?Bt:void 0]},t.thumbnailUrl?(0,e.jsx)("img",{src:t.thumbnailUrl,alt:`Thumbnail for ${t.title}`,css:Kt.css`
425
418
  background-color: var(--gray-200);
426
419
  width: 3rem;
427
420
  height: 3rem;
428
421
  object-fit: cover;
429
- `}):(0,e.jsx)(H,{src:a,alt:"Logo",css:At.css`
422
+ `}):(0,e.jsx)(O,{src:a,alt:"Logo",css:Kt.css`
430
423
  height: 2.25rem;
431
424
  width: 2.25rem;
432
- `}),(0,e.jsx)("h4",{css:[Dt]},t.title,l?(0,e.jsx)("span",{css:[zt]},l):null),(0,e.jsx)("p",{css:[Ut]},"SKU: ",t.sku||t.id,t.price!==void 0?(0,e.jsx)("span",null,t.price):null),n?(0,e.jsx)(Me,{css:[Gt]}):null))}var Se=require("@emotion/react"),kr=require("@uniformdev/design-system"),Ot=Se.css`
425
+ `}),(0,e.jsx)("h4",{css:[Ot]},t.title,l?(0,e.jsx)("span",{css:[Ht]},l):null),(0,e.jsx)("p",{css:[$t]},"SKU: ",t.sku||t.id,t.price!==void 0?(0,e.jsx)("span",null,t.price):null),n?(0,e.jsx)(Ie,{css:[Ft]}):null))}var Q=require("@emotion/react"),Qt=require("@uniformdev/design-system"),Wt=Q.css`
426
+ border: 1px solid var(--gray-200);
427
+ border-radius: var(--rounded-base);
428
+ background: var(--gray-50);
433
429
  display: flex;
434
430
  width: 100%;
435
- border: 1px solid var(--gray-300);
436
- border-radius: var(--rounded-base);
437
- background-color: var(--gray-100);
438
- margin: var(--spacing-base) 0;
439
- `,Ht=Se.css`
440
- padding: var(--spacing-base) 0 var(--spacing-base) var(--spacing-lg);
431
+ margin-block: var(--spacing-base) 0;
432
+ `,_t=Q.css`
433
+ align-items: center;
434
+ display: flex;
435
+ padding: var(--spacing-base) var(--spacing-base) var(--spacing-base) var(--spacing-lg);
441
436
  display: flex;
442
437
  flex-grow: 1;
443
- align-items: center;
444
- margin-right: var(--spacing-sm);
445
- gap: var(--spacing-base);
446
- `,$t=Se.css`
438
+ gap: var(--spacing-sm);
439
+ margin-inline: 0 var(--spacing-sm);
440
+ `,Zt=Q.css`
447
441
  display: flex;
448
442
  align-items: center;
449
443
  gap: var(--spacing-sm);
450
- ${(0,kr.mq)("lg")} {
444
+ flex-grow: 1;
445
+
446
+ ${(0,Qt.mq)("lg")} {
451
447
  width: 50%;
452
448
  margin-bottom: 0;
453
449
  }
454
- `,Oe=Se.css`
450
+ `,Oe=Q.css`
455
451
  background-color: var(--gray-200);
456
452
  width: 3.5rem;
457
453
  height: 3.5rem;
458
454
  object-fit: cover;
459
- `;var I=require("@emotion/react"),xr=require("@uniformdev/design-system");function Ft({selectedItem:t,onDeselect:n}){var l;let{categories:o,logoIcon:r}=ye(),[a]=t.categories||[{id:"",name:""}],i=typeof a=="undefined"||!o||(l=o.find(f=>f.id===a.id))==null?void 0:l.name;return(0,e.jsx)("div",{css:[Ot],key:t.id},(0,e.jsx)("article",{css:[Ht]},(0,e.jsx)("div",{css:[$t]},t.thumbnailUrl?(0,e.jsx)("img",{src:t.thumbnailUrl,alt:i,css:[Oe],loading:"lazy"}):(0,e.jsx)("div",{css:[Oe]}),(0,e.jsx)("div",{css:I.css`
455
+ `,He=Q.css`
456
+ align-items: center;
457
+ background: var(--white);
458
+ border-radius: var(--rounded-base);
459
+ border: 2px solid var(--gray-300);
460
+ color: currentColor;
461
+ display: flex;
462
+ gap: var(--spacing-sm);
463
+ padding: var(--spacing-sm) var(--spacing-base);
464
+ justify-content: space-between;
465
+ text-decoration: none;
466
+
467
+ &:hover {
468
+ background: var(--gray-50);
469
+ }
470
+ `,$e=Q.css`
471
+ font-size: var(--fs-sm);
472
+ `,Xt=Q.css`
473
+ display: block;
474
+ width: 1rem;
475
+ height: 1rem;
476
+ `,qt=Q.css`
477
+ display: flex;
478
+ flex-direction: column;
479
+ gap: var(--spacing-sm);
480
+
481
+ ${(0,Qt.mq)("md")} {
482
+ flex-direction: row;
483
+ min-width: 200px;
484
+ justify-content: end;
485
+ }
486
+ `;var ie=require("@emotion/react"),Fe=require("@uniformdev/design-system"),Wr=require("react-icons/cg");function Yt({selectedItem:t,onDeselect:n}){var l;let{categories:o,logoIcon:r}=be(),[a]=t.categories||[{id:"",name:""}],i=typeof a=="undefined"||!o||(l=o.find(f=>f.id===a.id))==null?void 0:l.name;return(0,e.jsx)("div",{css:[Wt],key:t.id},(0,e.jsx)("article",{css:[_t]},(0,e.jsx)("div",{css:[Zt]},t.thumbnailUrl?(0,e.jsx)("img",{src:t.thumbnailUrl,alt:i,css:[Oe],loading:"lazy"}):(0,e.jsx)("div",{css:[Oe]}),(0,e.jsx)("div",{css:ie.css`
460
487
  > :not(:last-child) {
461
488
  margin-bottom: var(--spacing-xs);
462
489
  }
463
- `},(0,e.jsx)("h4",{css:I.css`
490
+ `},(0,e.jsx)("h4",{css:ie.css`
464
491
  margin-top: 0px;
465
492
  font-weight: var(--fw-bold);
466
- `},t.title||t.id||"",i&&(0,e.jsx)("span",{css:I.css`
493
+ `},t.title||t.id||"",i&&(0,e.jsx)("span",{css:ie.css`
467
494
  display: block;
468
495
  font-weight: var(--fw-regular);
469
- `},i)),(0,e.jsx)("ul",{css:I.css`
496
+ `},i)),(0,e.jsx)("ul",{css:ie.css`
470
497
  font-size: var(--fs-sm);
471
- display: flex;
472
- gap: var(--spacing-base);
473
- `},(0,e.jsx)("li",null,(0,e.jsx)("span",{css:I.css`
498
+
499
+ ${(0,Fe.mq)("sm")} {
500
+ display: flex;
501
+ gap: var(--spacing-base);
502
+ }
503
+ `},(0,e.jsx)("li",null,(0,e.jsx)("span",{css:ie.css`
474
504
  margin-right: var(--spacing-xs);
475
- `},"SKU:"),t.sku||t.id),t.price!==void 0?(0,e.jsx)("li",null,(0,e.jsx)("span",{css:I.css`
505
+ `},"SKU:"),t.sku||t.id),t.price!==void 0?(0,e.jsx)("li",null,(0,e.jsx)("span",{css:ie.css`
476
506
  margin-right: var(--spacing-xs);
477
- `},"Price:"),(0,e.jsx)("span",null,t.price)):null))),(0,e.jsx)("div",{css:I.css`
478
- display: flex;
479
- flex-wrap: wrap;
480
- gap: var(--spacing-sm);
481
- justify-content: flex-end;
482
- margin-left: auto;
483
- ${(0,xr.mq)("md")} {
484
- align-items: center;
485
- }
486
- `},t.editLink?(0,e.jsx)("a",{href:t.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",css:I.css`
487
- display: inline-flex;
488
- justify-content: space-between;
489
- align-items: center;
490
- padding: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) var(--spacing-base);
491
- background-color: var(--white);
492
- border-radius: var(--rounded-base);
493
- border: 2px solid var(--gray-400);
494
- &:hover {
495
- background-color: var(--gray-100);
496
- }
497
- `},(0,e.jsx)("span",{css:I.css`
498
- margin-right: var(--spacing-sm);
499
- font-size: var(--fs-sm);
500
- `},"Edit"),(0,e.jsx)(H,{src:r,alt:"Logo",css:I.css`
501
- width: 1.75rem;
502
- height: 1.75rem;
503
- display: block;
504
- `})):null,(0,e.jsx)("button",{type:"button",onClick:()=>{n==null||n(t)},css:I.css`
505
- display: flex;
506
- justify-content: space-between;
507
- align-items: center;
508
- background-color: var(--white);
509
- border-radius: var(--rounded-base);
510
- border: 2px solid var(--gray-400);
511
- height: 2.5rem;
512
- padding: 0 var(--spacing-base);
513
- gap: var(--spacing-sm);
514
- &:hover {
515
- background-color: var(--gray-100);
516
- }
517
- `},(0,e.jsx)("span",{css:I.css`
518
- font-size: var(--fs-sm);
519
- `},"Unlink"),(0,e.jsx)(te,{css:I.css`
520
- color: var(--brand-secondary-5);
521
- `})))))}var Ir=require("@uniformdev/design-system"),He=require("react-use");function yo({selectedProducts:t,setSelectedProducts:n,onGetCategories:o,onSearchProducts:r,logoIcon:a,multiSelect:i,multiSelectId:l,selectedItemComponent:f,rowComponent:g,errorComponent:v,helpComponent:s,noResultsComponent:p,onSort:b,typeSelectorAllTypesOptionText:U="All categories",typeSelectorLabel:X="Select Category"}){var j;let{value:C,loading:y,error:le}=(0,He.useAsync)(async()=>await o(),[o]),q=C==null?void 0:C.map(k=>k.id).join(","),se=(0,ie.useMemo)(()=>C?C.map(u=>({id:u.id,name:u.name})):void 0,[q]),Y=(0,ie.useRef)(),[J,Ce]=(0,He.useAsyncFn)(async(k,u)=>{let z=await r({text:k,options:{limit:u==null?void 0:u.count,offset:u==null?void 0:u.offset,categoryId:u==null?void 0:u.contentType}});return(u==null?void 0:u.offset)===0&&(Y.current=[]),(Y.current=Y.current||[]).push(...z.products),z},[r]),pe=async k=>{await n(k)};return le||J.error?(0,e.jsx)(v||(({categoriesError:u,searchError:z})=>(0,e.jsx)(Ir.Callout,{type:"error"},"There was an error: ",(u==null?void 0:u.message)||(z==null?void 0:z.message))),{categoriesError:le,searchError:J.error}):(0,e.jsx)(Kt.Provider,{value:{categories:C,logoIcon:a}},(0,e.jsx)(Et,{search:Ce,results:Y.current,logoIcon:a,selectedItems:t,select:pe,multiSelectId:l||"product-search-multi-select",multiSelect:i,contentTypes:se,selectedItemComponent:f||Ft,rowComponent:g||Bt,totalResults:(j=J.value)==null?void 0:j.total,resultsLoading:J.loading||y,helpComponent:s,noResultsComponent:p,onSort:b,typeSelectorAllTypesOptionText:U,typeSelectorLabel:X}))}var Kt=ie.default.createContext(void 0),ye=()=>{let t=(0,ie.useContext)(Kt);if(!t)throw new Error("useProductSearchContext must be used within a <ProductSearchContext> provider");return t};var E=require("@emotion/react"),Er=require("@uniformdev/design-system"),Nt=E.css`
507
+ `},"Price:"),(0,e.jsx)("span",null,t.price)):null))),(0,e.jsx)("div",{css:qt},t.editLink?(0,e.jsx)("a",{href:t.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",css:He},(0,e.jsx)("span",{css:$e},"Edit"),(0,e.jsx)(O,{src:r,alt:"Logo",css:Xt})):null,(0,e.jsx)("button",{type:"button",onClick:()=>{n==null||n(t)},css:He},(0,e.jsx)("span",{css:$e},"Unlink"),(0,e.jsx)(Fe.Icon,{icon:Wr.CgClose,iconColor:"red",size:16})))))}var _r=require("@uniformdev/design-system"),Ke=require("react-use");function Bo({selectedProducts:t,setSelectedProducts:n,onGetCategories:o,onSearchProducts:r,logoIcon:a,multiSelect:i,multiSelectId:l,selectedItemComponent:f,rowComponent:g,errorComponent:v,helpComponent:s,noResultsComponent:p,onSort:b,typeSelectorAllTypesOptionText:D="All categories",typeSelectorLabel:_="Select Category"}){var Y;let{value:P,loading:y,error:de}=(0,Ke.useAsync)(async()=>await o(),[o]),Z=P==null?void 0:P.map(k=>k.id).join(","),ne=(0,oe.useMemo)(()=>P?P.map(u=>({id:u.id,name:u.name})):void 0,[Z]),X=(0,oe.useRef)(),[q,Se]=(0,Ke.useAsyncFn)(async(k,u)=>{let M=await r({text:k,options:{limit:u==null?void 0:u.count,offset:u==null?void 0:u.offset,categoryId:u==null?void 0:u.contentType}});return(u==null?void 0:u.offset)===0&&(X.current=[]),(X.current=X.current||[]).push(...M.products),M},[r]),le=async k=>{await n(k)};return de||q.error?(0,e.jsx)(v||(({categoriesError:u,searchError:M})=>(0,e.jsx)(_r.Callout,{type:"error"},"There was an error: ",(u==null?void 0:u.message)||(M==null?void 0:M.message))),{categoriesError:de,searchError:q.error}):(0,e.jsx)(Jt.Provider,{value:{categories:P,logoIcon:a}},(0,e.jsx)(Ut,{search:Se,results:X.current,logoIcon:a,selectedItems:t,select:le,multiSelectId:l||"product-search-multi-select",multiSelect:i,contentTypes:ne,selectedItemComponent:f||Yt,rowComponent:g||Nt,totalResults:(Y=q.value)==null?void 0:Y.total,resultsLoading:q.loading||y,helpComponent:s,noResultsComponent:p,onSort:b,typeSelectorAllTypesOptionText:D,typeSelectorLabel:_}))}var Jt=oe.default.createContext(void 0),be=()=>{let t=(0,oe.useContext)(Jt);if(!t)throw new Error("useProductSearchContext must be used within a <ProductSearchContext> provider");return t};var x=require("@emotion/react"),Zr=require("@uniformdev/design-system"),jt=x.css`
522
508
  border: 1px solid var(--gray-200);
523
509
  background: var(--gray-50);
524
510
  border-radius: var(--rounded-base);
525
511
  display: flex;
526
512
  width: 100%;
527
- `,Qt=E.css`
513
+ `,er=x.css`
528
514
  align-items: center;
529
515
  display: flex;
530
516
  flex-grow: 1;
@@ -532,25 +518,22 @@ var Qr=Object.create;var Le=Object.defineProperty;var Wr=Object.getOwnPropertyDe
532
518
  margin-inline: 0 var(--spacing-sm);
533
519
  padding: var(--spacing-base) var(--spacing-base) var(--spacing-base) var(--spacing-lg);
534
520
  position: relative;
535
- `,Wt=E.css`
521
+ `,tr=x.css`
536
522
  flex-grow: 1;
537
- `,_t=E.css`
523
+ `,rr=x.css`
538
524
  align-items: center;
539
525
  display: flex;
540
526
  position: relative;
541
- `,Zt=E.css`
527
+ `,or=x.css`
542
528
  color: var(--brand-secondary-1);
543
529
  font-size: var(--fs-base);
544
530
  font-weight: var(--fw-bold);
545
531
  line-height: 1;
546
532
  margin: 0;
547
- `,Xt=E.css`
533
+ `,nr=x.css`
548
534
  width: 1.5rem;
549
535
  height: 1.5rem;
550
- `,qt=E.css`
551
- width: 1rem;
552
- height: 1rem;
553
- `,Yt=E.css`
536
+ `,ar=x.css`
554
537
  background: var(--white);
555
538
  border-radius: var(--rounded-base);
556
539
  border-left: 4px solid var(--brand-secondary-3);
@@ -559,56 +542,60 @@ var Qr=Object.create;var Le=Object.defineProperty;var Wr=Object.getOwnPropertyDe
559
542
  padding: var(--spacing-base);
560
543
  z-index: var(--z-10);
561
544
  width: max-content;
562
- `,de=E.css`
545
+ `,se=x.css`
563
546
  font-size: var(--fs-sm);
564
- `,we=E.css`
547
+ `,ye=x.css`
565
548
  font-weight: var(--fw-bold);
566
549
  margin-right: var(--spacing-sm);
567
- `,Jt=E.css`
550
+ `,ir=x.css`
568
551
  display: flex;
569
552
  flex-direction: column;
570
553
  gap: var(--spacing-sm);
571
554
 
572
- ${(0,Er.mq)("md")} {
555
+ ${(0,Zr.mq)("md")} {
573
556
  flex-direction: row;
574
557
  justify-content: end;
575
558
  min-width: 200px;
576
559
  }
577
- `,$e=E.css`
560
+ `,Ne=x.css`
578
561
  align-items: center;
579
562
  background: var(--white);
580
563
  border-radius: var(--rounded-base);
581
564
  border: 2px solid var(--gray-300);
565
+ color: currentColor;
582
566
  display: flex;
583
567
  gap: var(--spacing-sm);
584
568
  padding: var(--spacing-sm) var(--spacing-base);
585
- justify-content: space-between;
569
+ justify-content: center;
570
+ text-decoration: none;
586
571
 
587
572
  &:hover {
588
573
  background: var(--gray-50);
589
574
  }
590
- `,jt=E.css`
575
+ `,sr=x.css`
591
576
  display: flex;
592
577
  margin-top: var(--spacing-sm);
593
- `;var Z=N(require("react"));var Mr=require("timeago.js");var F=require("@emotion/react");function So({selectedItem:t,onDeselect:n,onEditClosed:o,logoIcon:r,itemDetailsRendererComponent:a}){let i=(0,Z.useRef)(null),l=(0,Z.useRef)(null),[f,g]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>{let p=U=>{i.current&&!i.current.contains(U.target)&&l.current&&!l.current.contains(U.target)&&g(!1)},b=()=>{g(!1)};return window.addEventListener("resize",b,!0),document.addEventListener("scroll",p,!0),document.addEventListener("mousedown",p),()=>{window.removeEventListener("resize",b,!0),document.removeEventListener("scroll",p,!0),document.removeEventListener("mousedown",p)}},[l]);let v=()=>{var p;if(g(!f),l.current&&i.current){let b=(p=i==null?void 0:i.current)==null?void 0:p.getBoundingClientRect();l.current.style.top=`${b.top+30}px`}},s=a!=null?a:wo;return(0,e.jsx)("div",{css:[Nt,F.css`
578
+ gap: var(--spacing-sm);
579
+ `,cr=x.css`
580
+ background: none;
581
+ outline: none;
582
+ border: none;
583
+ margin: calc(var(--spacing-xs) * -1) 0 calc(var(--spacing-xs) * -1) var(--spacing-sm);
584
+ `,Qe=x.css`
585
+ display: block;
586
+ max-width: 100%;
587
+ min-width: 100px;
588
+ height: auto;
589
+ `;var W=j(require("react"));var We=require("react-icons/cg"),Xr=require("timeago.js");var ce=require("@emotion/react");var dr=require("@uniformdev/design-system");function Oo({selectedItem:t,onDeselect:n,onEditClosed:o,logoIcon:r,itemDetailsRendererComponent:a}){let i=(0,W.useRef)(null),l=(0,W.useRef)(null),[f,g]=(0,W.useState)(!1);(0,W.useEffect)(()=>{let p=D=>{i.current&&!i.current.contains(D.target)&&l.current&&!l.current.contains(D.target)&&g(!1)},b=()=>{g(!1)};return window.addEventListener("resize",b,!0),document.addEventListener("scroll",p,!0),document.addEventListener("mousedown",p),()=>{window.removeEventListener("resize",b,!0),document.removeEventListener("scroll",p,!0),document.removeEventListener("mousedown",p)}},[l]);let v=()=>{var p;if(g(!f),l.current&&i.current){let b=(p=i==null?void 0:i.current)==null?void 0:p.getBoundingClientRect();l.current.style.top=`${b.top+30}px`}},s=a!=null?a:Ho;return(0,e.jsx)("div",{css:[jt,ce.css`
594
590
  margin: 0 0 1rem 0;
595
- `],key:t.id},(0,e.jsx)("div",{css:Qt},(0,e.jsx)("div",{css:Wt},(0,e.jsx)("div",{css:_t},(0,e.jsx)("h4",{css:[Zt],title:`ID: ${t.id}`,"data-test-id":"dam-selected-item"},t.title||t.id||""),t.popoverData?(0,e.jsx)(Z.default.Fragment,null,(0,e.jsx)("button",{type:"button",ref:i,css:F.css`
596
- background: none;
597
- outline: none;
598
- border: none;
599
- margin: calc(var(--spacing-xs) * -1) 0 calc(var(--spacing-xs) * -1) var(--spacing-sm);
600
- `,"aria-controls":"path-details","aria-expanded":f,onClick:v},(0,e.jsx)(re,{width:24,height:24,css:F.css`
601
- color: var(--gray-400);
602
- `})),(0,e.jsx)("div",{id:"path-details","aria-hidden":!f,ref:l,css:[Yt,f?F.css`
591
+ `],key:t.id},(0,e.jsx)("div",{css:er},(0,e.jsx)("div",{css:tr},(0,e.jsx)("div",{css:rr},(0,e.jsx)("h4",{css:[or],title:`ID: ${t.id}`,"data-test-id":"dam-selected-item"},t.title||t.id||""),t.popoverData?(0,e.jsx)(W.default.Fragment,null,(0,e.jsx)("button",{type:"button",ref:i,css:cr,"aria-controls":"path-details","aria-expanded":f,onClick:v},(0,e.jsx)(dr.Icon,{icon:We.CgInfo,iconColor:"gray",size:24,css:ce.css`
592
+ opacity: var(--opacity-75);
593
+ `})),(0,e.jsx)("div",{id:"path-details","aria-hidden":!f,ref:l,css:[ar,f?ce.css`
603
594
  visibility: visible;
604
- `:F.css`
595
+ `:ce.css`
605
596
  visibility: hidden;
606
- `]},Object.entries(t.popoverData).map(([p,b],U)=>(0,e.jsx)("div",{css:de,key:U},(0,e.jsx)("span",{css:we},p,":"),b)))):null),(0,e.jsx)(s,{item:t})),(0,e.jsx)("div",{css:Jt},t.editLink?typeof t.editLink=="string"?(0,e.jsx)("a",{href:t.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",onClick:p=>{o&&(De(p.currentTarget.href,()=>o(t)),p.preventDefault())},css:$e},(0,e.jsx)("span",{css:de},"Edit"),r?(0,e.jsx)(H,{src:r,css:Xt,alt:"Logo"}):null):t.editLink:null,(0,e.jsx)("button",{type:"button",onClick:()=>{n(t)},css:$e},(0,e.jsx)("span",{css:de},"Unlink"),(0,e.jsx)(te,{css:[qt,F.css`
607
- color: var(--brand-secondary-5);
608
- `]})))))}function wo({item:t}){let n=null;return t.previewUrl&&typeof t.previewUrl=="string"?t.type==="image"?n=(0,e.jsx)("img",{src:t.previewUrl,alt:t.id,width:"200"}):t.type==="video"&&(n=(0,e.jsx)("video",{src:t.previewUrl,title:t.id,width:"200",controls:!0})):t.previewUrl&&typeof t.previewUrl!="string"&&(n=t.previewUrl),n||t.metadata?(0,e.jsx)("div",{css:jt},n?(0,e.jsx)("div",{css:F.css`
609
- margin-right: var(--spacing-sm);
610
- `},n):null,(0,e.jsx)("ul",null,t.metadata?Object.entries(t.metadata).map(([o,r])=>(0,e.jsx)("li",{css:[de,F.css`
597
+ `]},Object.entries(t.popoverData).map(([p,b],D)=>(0,e.jsx)("div",{css:se,key:D},(0,e.jsx)("span",{css:ye},p,":"),b)))):null),(0,e.jsx)(s,{item:t})),(0,e.jsx)("div",{css:ir},t.editLink?typeof t.editLink=="string"?(0,e.jsx)("a",{href:t.editLink,title:"edit",rel:"noopener noreferrer",target:"_blank",onClick:p=>{o&&(Ve(p.currentTarget.href,()=>o(t)),p.preventDefault())},css:Ne},(0,e.jsx)("span",{css:se},"Edit"),r?(0,e.jsx)(O,{src:r,css:nr,alt:"Logo"}):null):t.editLink:null,(0,e.jsx)("button",{type:"button",onClick:()=>{n(t)},css:Ne},(0,e.jsx)("span",{css:se},"Unlink"),(0,e.jsx)(dr.Icon,{icon:We.CgClose,iconColor:"red",size:16})))))}function Ho({item:t}){let n=null;return t.previewUrl&&typeof t.previewUrl=="string"?t.type==="image"?n=(0,e.jsx)("img",{src:t.previewUrl,alt:t.id,width:"200",css:Qe}):t.type==="video"&&(n=(0,e.jsx)("video",{src:t.previewUrl,title:t.id,width:"200",controls:!0,css:Qe})):t.previewUrl&&typeof t.previewUrl!="string"&&(n=t.previewUrl),n||t.metadata?(0,e.jsx)("div",{css:sr},n?(0,e.jsx)("div",null,n):null,(0,e.jsx)("ul",null,t.metadata?Object.entries(t.metadata).map(([o,r])=>(0,e.jsx)("li",{css:[se,ce.css`
611
598
  order: 1;
612
- `],key:o},(0,e.jsx)("span",{css:[we,F.css`
599
+ `],key:o},(0,e.jsx)("span",{css:[ye,ce.css`
613
600
  order: 1;
614
- `]},o,":"),r)):null,t.createdDate?(0,e.jsx)("li",{css:de},(0,e.jsx)("span",{css:we},"Date:"),(0,Mr.format)(t.createdDate)):null)):null}O(B,require("@uniformdev/mesh-sdk"),module.exports);var m=require("@uniformdev/design-system");0&&(module.exports={AddListButton,Button,Callout,DamSelectedItem,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,damSelectedItemCloseIcon,damSelectedItemContainer,damSelectedItemCopy,damSelectedItemDetails,damSelectedItemIcon,damSelectedItemInner,damSelectedItemLinkBtn,damSelectedItemLinkContainer,damSelectedItemMediaContainer,damSelectedItemPopover,damSelectedItemPopoverLabel,damSelectedItemSmallText,damSelectedItemTitle,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});
601
+ `]},o,":"),r)):null,t.createdDate?(0,e.jsx)("li",{css:se},(0,e.jsx)("span",{css:ye},"Date:"),(0,Xr.format)(t.createdDate)):null)):null}B(A,require("@uniformdev/mesh-sdk"),module.exports);var m=require("@uniformdev/design-system");0&&(module.exports={AddListButton,Button,Callout,DamSelectedItem,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,damSelectItemImage,damSelectedItemContainer,damSelectedItemCopy,damSelectedItemDetails,damSelectedItemIcon,damSelectedItemInfoBtn,damSelectedItemInner,damSelectedItemLinkBtn,damSelectedItemLinkContainer,damSelectedItemMediaContainer,damSelectedItemPopover,damSelectedItemPopoverLabel,damSelectedItemSmallText,damSelectedItemTitle,draggableContainer,draggableIcon,draggableIconOffset,draggableIconWrapper,entrySearchBtn,entrySearchConfig,entrySearchConfigHidden,entrySearchLoadMoreBtn,entrySearchResultList,entrySearchSelectIcon,entrySearchSelectImg,entrySearchSelectInput,entrySearchSelectOption,entrySearchWrapper,productSearchRowActiveIcon,productSearchRowCategory,productSearchRowContainer,productSearchRowContent,productSearchRowContentActive,productSearchRowDetails,productSearchRowTitle,productSelectedItemContainer,productSelectedItemContent,productSelectedItemDetails,productSelectedItemIcon,productSelectedItemImage,productSelectedItemLinkContainer,productedSelectedItemLinkBtn,productedSelectedItemSmallText,searchRowBtn,searchRowContainer,searchRowContainerActive,searchRowContainerWithPopover,searchRowPopover,searchRowText,searchRowTextSmall,selectItemLinkBtn,selectItemLinkContainer,selectItemPopover,selectItemPopoverLabel,selectItemSmallText,selectedItemContainer,selectedItemCopy,selectedItemDetails,selectedItemIcon,selectedItemInner,selectedItemTitle,useInitializeUniformMeshSdk,useProductQueryContext,useProductSearchContext,useUniformMeshLocation,useUniformMeshLocationContext,useUniformMeshSdk,useUniformMeshSdkContext});