@hiver/connector-agent 4.22.11-authCta-beta.1 → 4.22.11-authCta-beta.2

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
@@ -17636,6 +17636,11 @@ const CS = () => `att-${Date.now()}-${++hS}`, FS = ({
17636
17636
  type: G.type,
17637
17637
  min: G.min,
17638
17638
  max: G.max,
17639
+ // Keep the browser's saved Hiver login out of connector fields. Chrome withholds an
17640
+ // autofilled password from the page until the user interacts, so the field looks
17641
+ // filled while the form state (and the submit gate) still sees it empty.
17642
+ // `off` is ignored for password inputs; `new-password` is what Chrome honours there.
17643
+ autoComplete: G.type === "password" ? "new-password" : "off",
17639
17644
  ...G.inputProps
17640
17645
  }
17641
17646
  }
package/index.umd.js CHANGED
@@ -2215,7 +2215,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2215
2215
  transform: translate(5px, 0);
2216
2216
  height: 34px;
2217
2217
  width: 34px;
2218
- `,$S=e=>I.createElement("svg",{width:"8px",height:"8px",viewBox:"8.59 6 7.41 12",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"})),mr=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:u,stackIndex:r,isScrollTarget:o,onValidationError:s,inputChangeHandler:i,selectChangeHandler:c,dateChangeHandler:l,tableChangeHandler:D,checkboxChangeHandler:d,attachmentChangeHandler:E,attachmentUploadHandler:b,attachmentToastHandler:C,...p})=>{const{validation:A,helperText:h,id:m,label:F,name:x,type:B,validateOnBlur:S=!0,validateOnChange:v=!0,isRequired:w,labelSpacing:k=1,showGlobalLoader:M=!1,hideHelperText:_=!1,meta:{isExpandable:T=B==="table",isExpanded:L=!0}={}}=p,[N,O]=g.useState(!1),[P,z]=g.useState(""),[V,G]=g.useState(L);g.useEffect(()=>{B!=="table"&&(N||U(p.value,!1))},[N,p.value]),g.useEffect(()=>{B==="table"||!N||U(p.value,v)},[p.value]);const R=H=>{var Y;H&&!N&&O(!0),(Y=p.onFocus)==null||Y.call(p,H)};function U(H,Y=!0,q){let K="";const De=H==null||H===""||Array.isArray(H)&&H.length===0;if((A!=null&&A.isRequired||w)&&(K=De?mf:"",De&&typeof(A==null?void 0:A.isRequired)=="function")){const oe=A.isRequired(H);oe&&typeof oe=="boolean"?K=mf:oe&&(K=oe)}let ge={id:m,name:x,label:F};if(p.type==="date"?ge={...ge,disableFuture:p.disableFuture,disablePast:p.disablePast}:p.type==="number"?ge={...ge,min:p.min,max:p.max}:p.type==="text"&&p.multiline&&(ge={...ge,maxCharacters:p.maxCharacters}),H&&!K&&(A!=null&&A.validate)){const oe=A.validate(H,{...ge,...q});typeof oe=="boolean"&&oe===!1?K=Vv:typeof oe=="string"&&(K=oe)}Y&&z(K),s==null||s(x,K,Y)}const X=H=>{var Y;N||O(!0),(Y=p.onBlur)==null||Y.call(p,H),N&&S&&U(p.value)},te=()=>_?null:p.helperText?a.jsx(r8,{children:h}):N&&P?a.jsx(r8,{className:"helper--error",children:P}):null,ie=H=>{H&&!N&&O(!0),i==null||i(H),N&&v&&U(H.target.value)},W=(H,Y)=>{H&&!N&&O(!0),d==null||d(H,Y),N&&v&&U(Y)},ee=(H,Y)=>{c==null||c(H,Y),H&&!N&&O(!0),N&&v&&(Array.isArray(H)?U(H):H&&typeof H=="object"&&"value"in H&&U(H.value))},ce=(H,Y)=>{l==null||l(x,H,Y),H&&!N&&O(!0),N&&v&&U(H)},he=H=>{D==null||D(x,H)},re=H=>{E==null||E(x,H),N||O(!0),v&&U(H)},we=(H,Y)=>{s==null||s(H,Y),z(typeof Y=="string"?Y:"")},Ae=H=>{G(Y=>!Y)},J=H=>{if(M)return a.jsx(f.Skeleton,{variant:"rounded",height:34.69,animation:"wave"});switch(H.type){case"select":return a.jsx(u8,{children:a.jsx(Fa,{...H,stackIndex:r,isScrollTarget:o,className:`formField__select ${P&&N?"formField__select--error":""} ${H.className||""}`,classNamePrefix:"hiverFormField",onBlur:X,onChange:ee,onFocus:R,menuPortalTarget:n})});case"async-select":return a.jsx(u8,{children:a.jsx(tw,{...H,stackIndex:r,isScrollTarget:o,className:`formField__select ${P&&N?"formField__select--error":""} ${H.className||""}`,classNamePrefix:"hiverFormField",onBlur:X,onChange:ee,onFocus:R,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return a.jsx(lw,{...H,label:void 0,onBlur:X,onFocus:R,onChange:ce,error:!!(P&&N)});case"table":return a.jsx(Do,{...H,value:H.value,onChange:he,onFocus:R,onValidationError:we,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:r});case"attachment":return a.jsx(VS,{name:x,value:H.value,meta:H.meta,isRequired:w,onChange:re,upload:b,onToast:C});case"checkbox":return a.jsx(w2,{...H,checked:!!H.value,onChange:W,onFocus:R,onBlur:X,styleOverrides:{marginTop:"2px"}});default:return a.jsx(JS,{variant:"outlined",fullWidth:!0,id:m,...H,value:H.value,label:void 0,onBlur:X,onChange:ie,onFocus:R,error:!!(P&&N),inputProps:{type:H.type,min:H.min,max:H.max,...H.inputProps}})}};return a.jsxs(US,{spacing:k,useFlexGap:!0,...T&&{className:`expandable ${V?"open":"close"}`},children:[a.jsx(V2,{label:F,htmlFor:m,isRequired:!!(A!=null&&A.isRequired)||w,prefixNode:T?a.jsx(qS,{children:a.jsx($S,{className:"arrow-icon"})}):null,...T&&{onClick:()=>Ae()}}),a.jsxs(YS,{className:"input-wrapper",children:[a.jsx(f.Tooltip,{title:p.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:J(p)}),u!=null&&u.icon?a.jsx(f.Tooltip,{title:u.toolTipText,placement:"bottom",children:a.jsx(KS,{className:"form--sideIcon",children:u==null?void 0:u.icon})}):null]}),te()]})},eI=f.styled(f.Stack)`
2218
+ `,$S=e=>I.createElement("svg",{width:"8px",height:"8px",viewBox:"8.59 6 7.41 12",xmlns:"http://www.w3.org/2000/svg",...e},I.createElement("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"})),mr=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:u,stackIndex:r,isScrollTarget:o,onValidationError:s,inputChangeHandler:i,selectChangeHandler:c,dateChangeHandler:l,tableChangeHandler:D,checkboxChangeHandler:d,attachmentChangeHandler:E,attachmentUploadHandler:b,attachmentToastHandler:C,...p})=>{const{validation:A,helperText:h,id:m,label:F,name:x,type:B,validateOnBlur:S=!0,validateOnChange:v=!0,isRequired:w,labelSpacing:k=1,showGlobalLoader:M=!1,hideHelperText:_=!1,meta:{isExpandable:T=B==="table",isExpanded:L=!0}={}}=p,[N,O]=g.useState(!1),[P,z]=g.useState(""),[V,G]=g.useState(L);g.useEffect(()=>{B!=="table"&&(N||U(p.value,!1))},[N,p.value]),g.useEffect(()=>{B==="table"||!N||U(p.value,v)},[p.value]);const R=H=>{var Y;H&&!N&&O(!0),(Y=p.onFocus)==null||Y.call(p,H)};function U(H,Y=!0,q){let K="";const De=H==null||H===""||Array.isArray(H)&&H.length===0;if((A!=null&&A.isRequired||w)&&(K=De?mf:"",De&&typeof(A==null?void 0:A.isRequired)=="function")){const oe=A.isRequired(H);oe&&typeof oe=="boolean"?K=mf:oe&&(K=oe)}let ge={id:m,name:x,label:F};if(p.type==="date"?ge={...ge,disableFuture:p.disableFuture,disablePast:p.disablePast}:p.type==="number"?ge={...ge,min:p.min,max:p.max}:p.type==="text"&&p.multiline&&(ge={...ge,maxCharacters:p.maxCharacters}),H&&!K&&(A!=null&&A.validate)){const oe=A.validate(H,{...ge,...q});typeof oe=="boolean"&&oe===!1?K=Vv:typeof oe=="string"&&(K=oe)}Y&&z(K),s==null||s(x,K,Y)}const X=H=>{var Y;N||O(!0),(Y=p.onBlur)==null||Y.call(p,H),N&&S&&U(p.value)},te=()=>_?null:p.helperText?a.jsx(r8,{children:h}):N&&P?a.jsx(r8,{className:"helper--error",children:P}):null,ie=H=>{H&&!N&&O(!0),i==null||i(H),N&&v&&U(H.target.value)},W=(H,Y)=>{H&&!N&&O(!0),d==null||d(H,Y),N&&v&&U(Y)},ee=(H,Y)=>{c==null||c(H,Y),H&&!N&&O(!0),N&&v&&(Array.isArray(H)?U(H):H&&typeof H=="object"&&"value"in H&&U(H.value))},ce=(H,Y)=>{l==null||l(x,H,Y),H&&!N&&O(!0),N&&v&&U(H)},he=H=>{D==null||D(x,H)},re=H=>{E==null||E(x,H),N||O(!0),v&&U(H)},we=(H,Y)=>{s==null||s(H,Y),z(typeof Y=="string"?Y:"")},Ae=H=>{G(Y=>!Y)},J=H=>{if(M)return a.jsx(f.Skeleton,{variant:"rounded",height:34.69,animation:"wave"});switch(H.type){case"select":return a.jsx(u8,{children:a.jsx(Fa,{...H,stackIndex:r,isScrollTarget:o,className:`formField__select ${P&&N?"formField__select--error":""} ${H.className||""}`,classNamePrefix:"hiverFormField",onBlur:X,onChange:ee,onFocus:R,menuPortalTarget:n})});case"async-select":return a.jsx(u8,{children:a.jsx(tw,{...H,stackIndex:r,isScrollTarget:o,className:`formField__select ${P&&N?"formField__select--error":""} ${H.className||""}`,classNamePrefix:"hiverFormField",onBlur:X,onChange:ee,onFocus:R,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return a.jsx(lw,{...H,label:void 0,onBlur:X,onFocus:R,onChange:ce,error:!!(P&&N)});case"table":return a.jsx(Do,{...H,value:H.value,onChange:he,onFocus:R,onValidationError:we,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:r});case"attachment":return a.jsx(VS,{name:x,value:H.value,meta:H.meta,isRequired:w,onChange:re,upload:b,onToast:C});case"checkbox":return a.jsx(w2,{...H,checked:!!H.value,onChange:W,onFocus:R,onBlur:X,styleOverrides:{marginTop:"2px"}});default:return a.jsx(JS,{variant:"outlined",fullWidth:!0,id:m,...H,value:H.value,label:void 0,onBlur:X,onChange:ie,onFocus:R,error:!!(P&&N),inputProps:{type:H.type,min:H.min,max:H.max,autoComplete:H.type==="password"?"new-password":"off",...H.inputProps}})}};return a.jsxs(US,{spacing:k,useFlexGap:!0,...T&&{className:`expandable ${V?"open":"close"}`},children:[a.jsx(V2,{label:F,htmlFor:m,isRequired:!!(A!=null&&A.isRequired)||w,prefixNode:T?a.jsx(qS,{children:a.jsx($S,{className:"arrow-icon"})}):null,...T&&{onClick:()=>Ae()}}),a.jsxs(YS,{className:"input-wrapper",children:[a.jsx(f.Tooltip,{title:p.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:J(p)}),u!=null&&u.icon?a.jsx(f.Tooltip,{title:u.toolTipText,placement:"bottom",children:a.jsx(KS,{className:"form--sideIcon",children:u==null?void 0:u.icon})}):null]}),te()]})},eI=f.styled(f.Stack)`
2219
2219
  & .authform__section-title {
2220
2220
  margin-top: 32px;
2221
2221
  margin-bottom: -12px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-agent",
3
- "version": "4.22.11-authCta-beta.1",
3
+ "version": "4.22.11-authCta-beta.2",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",