@hiver/connector-admin 4.11.0-oneClickAuto-beta.5 → 4.11.0-oneClickAuto-beta.6

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/index.es.js CHANGED
@@ -28283,7 +28283,7 @@ const Zd = (e) => !!e && typeof e == "object" && "value" in e && "label" in e, $
28283
28283
  };
28284
28284
  }, e2 = (e) => e ? {
28285
28285
  label: `${e.name} > ${e.option.label}`,
28286
- value: `{{${e.id}.${e.option.value}}}`
28286
+ value: `{{${e.name}.${e.option.label}}}`
28287
28287
  } : null, Vk = /\{\{([^}]*)\}\}/g, Gk = /^[a-zA-Z0-9._]+$/, Hk = "Invalid variable format. Please check inserted variables.", Wk = (e) => {
28288
28288
  if (!e) return;
28289
28289
  const t = e.matchAll(Vk);
package/index.umd.js CHANGED
@@ -1385,7 +1385,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1385
1385
  width: 40px;
1386
1386
  height: 40px;
1387
1387
  }
1388
- `,Pk=e=>_.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),_.createElement("g",{clipPath:"url(#clip0_7787_114457)"},_.createElement("path",{d:"M17.1981 2.86633C9.28704 2.86633 2.86646 9.28691 2.86646 17.198C2.86646 25.1091 9.28704 31.5296 17.1981 31.5296C25.1092 31.5296 31.5298 25.1091 31.5298 17.198C31.5298 9.28691 25.1092 2.86633 17.1981 2.86633ZM14.3318 23.6472V10.7487L22.9308 17.198L14.3318 23.6472Z",fill:"#4D596C"})),_.createElement("defs",null,_.createElement("clipPath",{id:"clip0_7787_114457"},_.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),Am=({aspectRatio:e="auto",...t})=>{const[n,r]=m.useState(!1);return n?null:c.jsxs(kk,{aspectRatio:e,children:[c.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),c.jsx(Pk,{className:"play-icon"})]})};g.styled(({className:e,...t})=>c.jsx(g.Tooltip,{...t,classes:{popper:e}}))(({tooltipStyle:e,arrowStyle:t})=>({[`& .${g.tooltipClasses.arrow}`]:{...t},[`& .${g.tooltipClasses.tooltip}`]:{...e}}));function Mk(e){return!!e.interfaceDetails||!!e.searchInterfaceDetails}const BC=e=>!!e&&typeof e=="object"&&"value"in e&&"label"in e,sm=e=>typeof e=="string"&&e.startsWith("{{")&&e.endsWith("}}")&&e.includes("."),jk=e=>{if(!e||!sm(e.value))return null;const t=String(e.value).replace(/\{|\}/g,"").split("."),n=e.label.split(".");return{name:n[0],id:t[0],option:{label:n[1],value:t[1]}}},am=e=>e?{label:`${e.name} > ${e.option.label}`,value:`{{${e.id}.${e.option.value}}}`}:null,Vk=/\{\{([^}]*)\}\}/g,Gk=/^[a-zA-Z0-9._]+$/,Hk="Invalid variable format. Please check inserted variables.",Wk=e=>{if(!e)return;const t=e.matchAll(Vk);for(const[,n]of[...t])if(!Gk.test(n))return Hk},zk=({argsMap:e,optionalArgsMap:t,data:n})=>{const{args:r,enabled:o}=m.useMemo(()=>{const A={};for(const s in e){const a=e[s],i=n[a];if(!i)return{args:{},enabled:!1};A[s]=BC(i)?i.value:i}for(const s in t){const a=t[s],i=n[a];A[s]=BC(i)?i.value:i,A[s]||(A[s]=null)}return{args:A,enabled:!0}},[e,t,n]);return{args:r,enabled:o}},Yk=({args:e,enabled:t,searchTerm:n,pagination:r,queryKey:o,debounceTime:A=500,fetchOptions:s})=>{const[a,i]=m.useState({args:e,enabled:t,searchTerm:n,pagination:r});m.useEffect(()=>{const B=setTimeout(()=>{i({args:e,enabled:t,searchTerm:n,pagination:r})},A);return()=>clearTimeout(B)},[e,t,n,r,A]);const l=m.useMemo(()=>{var B,Q;return{searchTerm:a.searchTerm,limit:((B=a.pagination)==null?void 0:B.limit)??10,enabled:((Q=a.pagination)==null?void 0:Q.enabled)??!1}},[a]),{data:u,isLoading:d,isError:f,isFetching:p,isFetchingNextPage:I,hasNextPage:C,fetchNextPage:E}=p3({queryKey:["fetch-options",o,a.args,l],queryFn:({pageParam:B})=>s({args:a.args,pagination:{...l,pageNumber:B}}),getNextPageParam:(B,Q)=>B.hasMore?Q.length+1:void 0,initialPageParam:1,enabled:a.enabled,refetchOnMount:!0});return{options:m.useMemo(()=>(u==null?void 0:u.pages.flatMap(B=>B.options))??[],[u]),isLoading:d,isError:f,isFetching:p,isFetchingNextPage:I,hasNextPage:C,fetchNextPage:E}},pC=e=>e instanceof Element,Jk=({onIntersect:e,threshold:t,rootMargin:n,enabled:r=!0})=>{const[o,A]=m.useState(!1),s=m.useRef(null),a=m.useRef(null),i=m.useRef(e);i.current=e;const l=m.useCallback(d=>{pC(d)&&(a.current||(a.current=new IntersectionObserver(f=>{var I;const p=f[f.length-1];p.isIntersecting&&((I=i.current)==null||I.call(i,p))},{root:d,threshold:t,rootMargin:n}),A(!0)))},[t,n]),u=m.useCallback(d=>{var f,p;pC(s.current)&&((f=a.current)==null||f.unobserve(s.current)),pC(d)&&r&&o&&((p=a.current)==null||p.observe(d))},[r,o]);return m.useEffect(()=>()=>{a.current&&(a.current.disconnect(),a.current=null)},[]),{parentRef:l,childRef:u}},im=({value:e,interfaceDetails:t,formData:n,fieldKey:r,hasApiSearch:o,fetchOptions:A})=>{var Q;const[s,a]=m.useState(""),{selectedOption:i,selectedValue:l}=m.useMemo(()=>BC(e)?{selectedOption:e,selectedValue:e.value}:{selectedOption:null,selectedValue:e},[e]),{args:u,enabled:d}=zk({argsMap:t==null?void 0:t.args,optionalArgsMap:t==null?void 0:t.optionalArgs,data:n}),f=Yk({args:u,enabled:d,queryKey:r,searchTerm:o?s:"",pagination:t==null?void 0:t.pagination,fetchOptions:A}),p=f.options,I=!!((Q=t==null?void 0:t.pagination)!=null&&Q.enabled),C=I&&!!f.hasNextPage,E=Jk({onIntersect:()=>f.fetchNextPage(),threshold:.1,enabled:C}),h=m.useMemo(()=>{let y=p;i&&(y=[i],y.push(...p.filter(v=>v.value!==i.value)));const b=s.trim().toLowerCase();return!b||o?y:y.filter(v=>String(v.label).toLowerCase().includes(b))},[p,s,i,o]),B=m.useMemo(()=>{const y={};for(const b of p)y[b.value]=b.label;return y},[p]);return{selectedOption:i,selectedValue:l,search:s,optionsProps:f,observerProps:E,filteredOptions:h,labelsMap:B,paginationEnabled:I,setSearch:a}},Xk=e=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:10,viewBox:"0 0 12 10",fill:"none",...e},_.createElement("path",{d:"M4.0001 8.0299L1.2201 5.2499L0.273438 6.1899L4.0001 9.91656L12.0001 1.91656L11.0601 0.976562L4.0001 8.0299Z"})),qk={borderRadius:"8px",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",mt:.5,backgroundColor:"#FFFFFF"},Zk={maxHeight:280,overflow:"auto",paddingTop:0,paddingBottom:1},Uk={lineHeight:1,padding:"12px 12px 8px",backgroundColor:"#FFFFFF"},$k={display:"flex",alignItems:"center",gap:"4px",padding:"8px",border:"1px solid #ECEFF6",borderRadius:"6px",width:"100%",boxSizing:"border-box"},Kk={flex:1,minWidth:0,fontSize:13,lineHeight:"18px","& .MuiInputBase-input":{padding:0,"&::placeholder":{color:"#97A3B7",opacity:1}}},eP={fontSize:"14px",width:"100%",minWidth:200,height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"},"& .MuiSelect-select":{display:"flex",alignItems:"center",paddingLeft:"12px",paddingRight:"8px"},"& .MuiSelect-icon":{color:"#97A3B7"}},tP=e=>({fontSize:14,lineHeight:"18px",minHeight:36,py:.75,pl:1,pr:1.5,mx:1,borderRadius:"4px",color:"#343C45",backgroundColor:e?"#F6F8FC":"transparent","&:hover":{backgroundColor:"#F6F8FC"},"&.Mui-selected":{backgroundColor:"#F6F8FC","&:hover":{backgroundColor:"#F6F8FC"}}}),nP=g.styled(g.Box)`
1388
+ `,Pk=e=>_.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),_.createElement("g",{clipPath:"url(#clip0_7787_114457)"},_.createElement("path",{d:"M17.1981 2.86633C9.28704 2.86633 2.86646 9.28691 2.86646 17.198C2.86646 25.1091 9.28704 31.5296 17.1981 31.5296C25.1092 31.5296 31.5298 25.1091 31.5298 17.198C31.5298 9.28691 25.1092 2.86633 17.1981 2.86633ZM14.3318 23.6472V10.7487L22.9308 17.198L14.3318 23.6472Z",fill:"#4D596C"})),_.createElement("defs",null,_.createElement("clipPath",{id:"clip0_7787_114457"},_.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),Am=({aspectRatio:e="auto",...t})=>{const[n,r]=m.useState(!1);return n?null:c.jsxs(kk,{aspectRatio:e,children:[c.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),c.jsx(Pk,{className:"play-icon"})]})};g.styled(({className:e,...t})=>c.jsx(g.Tooltip,{...t,classes:{popper:e}}))(({tooltipStyle:e,arrowStyle:t})=>({[`& .${g.tooltipClasses.arrow}`]:{...t},[`& .${g.tooltipClasses.tooltip}`]:{...e}}));function Mk(e){return!!e.interfaceDetails||!!e.searchInterfaceDetails}const BC=e=>!!e&&typeof e=="object"&&"value"in e&&"label"in e,sm=e=>typeof e=="string"&&e.startsWith("{{")&&e.endsWith("}}")&&e.includes("."),jk=e=>{if(!e||!sm(e.value))return null;const t=String(e.value).replace(/\{|\}/g,"").split("."),n=e.label.split(".");return{name:n[0],id:t[0],option:{label:n[1],value:t[1]}}},am=e=>e?{label:`${e.name} > ${e.option.label}`,value:`{{${e.name}.${e.option.label}}}`}:null,Vk=/\{\{([^}]*)\}\}/g,Gk=/^[a-zA-Z0-9._]+$/,Hk="Invalid variable format. Please check inserted variables.",Wk=e=>{if(!e)return;const t=e.matchAll(Vk);for(const[,n]of[...t])if(!Gk.test(n))return Hk},zk=({argsMap:e,optionalArgsMap:t,data:n})=>{const{args:r,enabled:o}=m.useMemo(()=>{const A={};for(const s in e){const a=e[s],i=n[a];if(!i)return{args:{},enabled:!1};A[s]=BC(i)?i.value:i}for(const s in t){const a=t[s],i=n[a];A[s]=BC(i)?i.value:i,A[s]||(A[s]=null)}return{args:A,enabled:!0}},[e,t,n]);return{args:r,enabled:o}},Yk=({args:e,enabled:t,searchTerm:n,pagination:r,queryKey:o,debounceTime:A=500,fetchOptions:s})=>{const[a,i]=m.useState({args:e,enabled:t,searchTerm:n,pagination:r});m.useEffect(()=>{const B=setTimeout(()=>{i({args:e,enabled:t,searchTerm:n,pagination:r})},A);return()=>clearTimeout(B)},[e,t,n,r,A]);const l=m.useMemo(()=>{var B,Q;return{searchTerm:a.searchTerm,limit:((B=a.pagination)==null?void 0:B.limit)??10,enabled:((Q=a.pagination)==null?void 0:Q.enabled)??!1}},[a]),{data:u,isLoading:d,isError:f,isFetching:p,isFetchingNextPage:I,hasNextPage:C,fetchNextPage:E}=p3({queryKey:["fetch-options",o,a.args,l],queryFn:({pageParam:B})=>s({args:a.args,pagination:{...l,pageNumber:B}}),getNextPageParam:(B,Q)=>B.hasMore?Q.length+1:void 0,initialPageParam:1,enabled:a.enabled,refetchOnMount:!0});return{options:m.useMemo(()=>(u==null?void 0:u.pages.flatMap(B=>B.options))??[],[u]),isLoading:d,isError:f,isFetching:p,isFetchingNextPage:I,hasNextPage:C,fetchNextPage:E}},pC=e=>e instanceof Element,Jk=({onIntersect:e,threshold:t,rootMargin:n,enabled:r=!0})=>{const[o,A]=m.useState(!1),s=m.useRef(null),a=m.useRef(null),i=m.useRef(e);i.current=e;const l=m.useCallback(d=>{pC(d)&&(a.current||(a.current=new IntersectionObserver(f=>{var I;const p=f[f.length-1];p.isIntersecting&&((I=i.current)==null||I.call(i,p))},{root:d,threshold:t,rootMargin:n}),A(!0)))},[t,n]),u=m.useCallback(d=>{var f,p;pC(s.current)&&((f=a.current)==null||f.unobserve(s.current)),pC(d)&&r&&o&&((p=a.current)==null||p.observe(d))},[r,o]);return m.useEffect(()=>()=>{a.current&&(a.current.disconnect(),a.current=null)},[]),{parentRef:l,childRef:u}},im=({value:e,interfaceDetails:t,formData:n,fieldKey:r,hasApiSearch:o,fetchOptions:A})=>{var Q;const[s,a]=m.useState(""),{selectedOption:i,selectedValue:l}=m.useMemo(()=>BC(e)?{selectedOption:e,selectedValue:e.value}:{selectedOption:null,selectedValue:e},[e]),{args:u,enabled:d}=zk({argsMap:t==null?void 0:t.args,optionalArgsMap:t==null?void 0:t.optionalArgs,data:n}),f=Yk({args:u,enabled:d,queryKey:r,searchTerm:o?s:"",pagination:t==null?void 0:t.pagination,fetchOptions:A}),p=f.options,I=!!((Q=t==null?void 0:t.pagination)!=null&&Q.enabled),C=I&&!!f.hasNextPage,E=Jk({onIntersect:()=>f.fetchNextPage(),threshold:.1,enabled:C}),h=m.useMemo(()=>{let y=p;i&&(y=[i],y.push(...p.filter(v=>v.value!==i.value)));const b=s.trim().toLowerCase();return!b||o?y:y.filter(v=>String(v.label).toLowerCase().includes(b))},[p,s,i,o]),B=m.useMemo(()=>{const y={};for(const b of p)y[b.value]=b.label;return y},[p]);return{selectedOption:i,selectedValue:l,search:s,optionsProps:f,observerProps:E,filteredOptions:h,labelsMap:B,paginationEnabled:I,setSearch:a}},Xk=e=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:10,viewBox:"0 0 12 10",fill:"none",...e},_.createElement("path",{d:"M4.0001 8.0299L1.2201 5.2499L0.273438 6.1899L4.0001 9.91656L12.0001 1.91656L11.0601 0.976562L4.0001 8.0299Z"})),qk={borderRadius:"8px",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",mt:.5,backgroundColor:"#FFFFFF"},Zk={maxHeight:280,overflow:"auto",paddingTop:0,paddingBottom:1},Uk={lineHeight:1,padding:"12px 12px 8px",backgroundColor:"#FFFFFF"},$k={display:"flex",alignItems:"center",gap:"4px",padding:"8px",border:"1px solid #ECEFF6",borderRadius:"6px",width:"100%",boxSizing:"border-box"},Kk={flex:1,minWidth:0,fontSize:13,lineHeight:"18px","& .MuiInputBase-input":{padding:0,"&::placeholder":{color:"#97A3B7",opacity:1}}},eP={fontSize:"14px",width:"100%",minWidth:200,height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"},"& .MuiSelect-select":{display:"flex",alignItems:"center",paddingLeft:"12px",paddingRight:"8px"},"& .MuiSelect-icon":{color:"#97A3B7"}},tP=e=>({fontSize:14,lineHeight:"18px",minHeight:36,py:.75,pl:1,pr:1.5,mx:1,borderRadius:"4px",color:"#343C45",backgroundColor:e?"#F6F8FC":"transparent","&:hover":{backgroundColor:"#F6F8FC"},"&.Mui-selected":{backgroundColor:"#F6F8FC","&:hover":{backgroundColor:"#F6F8FC"}}}),nP=g.styled(g.Box)`
1389
1389
  height: 28px;
1390
1390
  width: 28px;
1391
1391
  border-radius: 50%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-admin",
3
- "version": "4.11.0-oneClickAuto-beta.5",
3
+ "version": "4.11.0-oneClickAuto-beta.6",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",