@hiver/connector-agent 4.3.2-hotfixAsyncSelect-beta.2 → 4.3.2-hotfixAsyncSelect-beta.3

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
@@ -12540,7 +12540,7 @@ function tE({ stackIndex: e, isScrollTarget: t, ...n }) {
12540
12540
  (Z = n.onInputChange) == null || Z.call(n, M, B), B.action === "input-change" && I && (s(M), o([]), M || (c(!0), m(M, x)));
12541
12541
  }, w = (M) => {
12542
12542
  var B;
12543
- s(""), c(!0), v == null || v(i, x, !1), (B = n.onBlur) == null || B.call(n, M);
12543
+ s(""), (B = n.onBlur) == null || B.call(n, M);
12544
12544
  }, A = (M) => {
12545
12545
  var B;
12546
12546
  (B = n.onFocus) == null || B.call(n, M), !l && d && (o([]), c(!0), v == null || v(i, x, !1));
package/index.umd.js CHANGED
@@ -660,7 +660,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
660
660
  white-space: nowrap;
661
661
  overflow: hidden;
662
662
  text-overflow: ellipsis;
663
- `,bE=(e,t)=>{const n=_.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},a0=e=>k.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}));function yE(e){return C.jsx(an.DropdownIndicator,{...e,children:C.jsx(v.Icon,{children:e.selectProps.menuIsOpen?C.jsx(v.icons.ArrowDropUp,{}):C.jsx(v.icons.ArrowDropDown,{})})})}const vE=e=>C.jsxs(v.Stack,{direction:"row",flexWrap:"nowrap",alignItems:"center",width:"100%",children:[C.jsx(v.Stack,{flexShrink:0,children:C.jsx(a0,{width:14,height:14,fill:"rgb(80, 109, 255)"})}),C.jsxs(mE,{color:"rgb(80, 109, 255)",fontSize:"12px",fontWeight:500,children:["Create ",e]})]});function CE({stackIndex:e,isScrollTarget:t,...n}){const[r,o]=_.useState([]),[s,i]=_.useState(""),[c,l]=_.useState(!1),a=_.useRef(),{isMulti:u,createOption:h,loadOptions:g,isApiSearchEnabled:x=!1,isInfiniteScrollable:b=!1,loadOptionsOnFocus:d=!1}=n,{getValue:f,closeMenuOnScroll:p}=t0({options:r,isMulti:u,isScrollTarget:t}),y=(B,j,X)=>(a.current&&a.current.abort("stale data"),a.current=new AbortController,g==null?void 0:g(B,j,X,a.current)),m=bE((B,j)=>{if(i(B),r.length>0&&!x){const Y=r.filter(q=>q&&typeof q=="object"&&"label"in q&&typeof q.label=="string"?q.label.toLowerCase().includes(B.toLowerCase()):!1);j(Y);return}const X=Y=>{j(Y),o(Y)};y==null||y(B,X,!1)},300),E=(B,j)=>{l(!1),!(j&&"isError"in j&&j.isError)&&o(B)},I=B=>{var j;(j=n.onMenuScrollToBottom)==null||j.call(n,B),b&&g&&!c&&(l(!0),y(s,E,!0))},w=(B,j)=>{var X;(X=n.onInputChange)==null||X.call(n,B,j),j.action==="input-change"&&x&&(i(B),o([]),B||(l(!0),m(B,E)))},A=B=>{var j;i(""),l(!0),y==null||y(s,E,!1),(j=n.onBlur)==null||j.call(n,B)},S=B=>{var j;(j=n.onFocus)==null||j.call(n,B),!c&&d&&(o([]),l(!0),y==null||y(s,E,!1))},T=B=>j=>{var Y;const X=j.find(q=>q.label===B);!n.isMulti&&X&&((Y=n.onChange)==null||Y.call(n,X,{action:"select-option",name:n.name,option:X})),o(j),l(!1)},D=B=>{l(!0),h==null||h(B,T(B))},F=()=>{l(!0),y==null||y(s,E,!1)},R=h?gE:dE;return C.jsx(R,{...n,menuShouldScrollIntoView:!1,value:n.value?f(n.value):null,isDisabled:n.disabled,loadOptions:m,onMenuScrollToBottom:I,onInputChange:w,onBlur:A,onFocus:S,onMenuOpen:F,isLoading:c,defaultOptions:r.length?r:n.defaultOptions||!1,styles:e0(n.styles,e),components:{ClearIndicator:Kf,DropdownIndicator:yE,IndicatorSeparator:()=>null,Option:Uf},closeMenuOnScroll:p,...h?{formatCreateLabel:vE,createOptionPosition:"first",allowCreateWhileLoading:!1,onCreateOption:D,options:r}:null})}const _r="table-cell-form-field",Qs="60px",$s="24px",IE=v.styled(v.Box)`
663
+ `,bE=(e,t)=>{const n=_.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},a0=e=>k.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}));function yE(e){return C.jsx(an.DropdownIndicator,{...e,children:C.jsx(v.Icon,{children:e.selectProps.menuIsOpen?C.jsx(v.icons.ArrowDropUp,{}):C.jsx(v.icons.ArrowDropDown,{})})})}const vE=e=>C.jsxs(v.Stack,{direction:"row",flexWrap:"nowrap",alignItems:"center",width:"100%",children:[C.jsx(v.Stack,{flexShrink:0,children:C.jsx(a0,{width:14,height:14,fill:"rgb(80, 109, 255)"})}),C.jsxs(mE,{color:"rgb(80, 109, 255)",fontSize:"12px",fontWeight:500,children:["Create ",e]})]});function CE({stackIndex:e,isScrollTarget:t,...n}){const[r,o]=_.useState([]),[s,i]=_.useState(""),[c,l]=_.useState(!1),a=_.useRef(),{isMulti:u,createOption:h,loadOptions:g,isApiSearchEnabled:x=!1,isInfiniteScrollable:b=!1,loadOptionsOnFocus:d=!1}=n,{getValue:f,closeMenuOnScroll:p}=t0({options:r,isMulti:u,isScrollTarget:t}),y=(B,j,X)=>(a.current&&a.current.abort("stale data"),a.current=new AbortController,g==null?void 0:g(B,j,X,a.current)),m=bE((B,j)=>{if(i(B),r.length>0&&!x){const Y=r.filter(q=>q&&typeof q=="object"&&"label"in q&&typeof q.label=="string"?q.label.toLowerCase().includes(B.toLowerCase()):!1);j(Y);return}const X=Y=>{j(Y),o(Y)};y==null||y(B,X,!1)},300),E=(B,j)=>{l(!1),!(j&&"isError"in j&&j.isError)&&o(B)},I=B=>{var j;(j=n.onMenuScrollToBottom)==null||j.call(n,B),b&&g&&!c&&(l(!0),y(s,E,!0))},w=(B,j)=>{var X;(X=n.onInputChange)==null||X.call(n,B,j),j.action==="input-change"&&x&&(i(B),o([]),B||(l(!0),m(B,E)))},A=B=>{var j;i(""),(j=n.onBlur)==null||j.call(n,B)},S=B=>{var j;(j=n.onFocus)==null||j.call(n,B),!c&&d&&(o([]),l(!0),y==null||y(s,E,!1))},T=B=>j=>{var Y;const X=j.find(q=>q.label===B);!n.isMulti&&X&&((Y=n.onChange)==null||Y.call(n,X,{action:"select-option",name:n.name,option:X})),o(j),l(!1)},D=B=>{l(!0),h==null||h(B,T(B))},F=()=>{l(!0),y==null||y(s,E,!1)},R=h?gE:dE;return C.jsx(R,{...n,menuShouldScrollIntoView:!1,value:n.value?f(n.value):null,isDisabled:n.disabled,loadOptions:m,onMenuScrollToBottom:I,onInputChange:w,onBlur:A,onFocus:S,onMenuOpen:F,isLoading:c,defaultOptions:r.length?r:n.defaultOptions||!1,styles:e0(n.styles,e),components:{ClearIndicator:Kf,DropdownIndicator:yE,IndicatorSeparator:()=>null,Option:Uf},closeMenuOnScroll:p,...h?{formatCreateLabel:vE,createOptionPosition:"first",allowCreateWhileLoading:!1,onCreateOption:D,options:r}:null})}const _r="table-cell-form-field",Qs="60px",$s="24px",IE=v.styled(v.Box)`
664
664
  width: 100%;
665
665
  `,xE=v.styled(v.Box)`
666
666
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-agent",
3
- "version": "4.3.2-hotfixAsyncSelect-beta.2",
3
+ "version": "4.3.2-hotfixAsyncSelect-beta.3",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",