@hiver/connector-admin 4.22.3-authCta-beta.1 → 4.22.3-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
@@ -15944,6 +15944,11 @@ const Y8 = () => `att-${Date.now()}-${++z8}`, J8 = ({
15944
15944
  type: H.type,
15945
15945
  min: H.min,
15946
15946
  max: H.max,
15947
+ // Keep the browser's saved Hiver login out of connector fields. Chrome withholds an
15948
+ // autofilled password from the page until the user interacts, so the field looks
15949
+ // filled while the form state (and the submit gate) still sees it empty.
15950
+ // `off` is ignored for password inputs; `new-password` is what Chrome honours there.
15951
+ autoComplete: H.type === "password" ? "new-password" : "off",
15947
15952
  ...H.inputProps
15948
15953
  }
15949
15954
  }
package/index.umd.js CHANGED
@@ -737,7 +737,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
737
737
  transform: translate(5px, 0);
738
738
  height: 34px;
739
739
  width: 34px;
740
- `,P8=e=>S.createElement("svg",{width:"8px",height:"8px",viewBox:"8.59 6 7.41 12",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"})),Pg=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:r,stackIndex:o,isScrollTarget:A,onValidationError:a,inputChangeHandler:i,selectChangeHandler:s,dateChangeHandler:c,tableChangeHandler:u,checkboxChangeHandler:d,attachmentChangeHandler:B,attachmentUploadHandler:h,attachmentToastHandler:I,...E})=>{const{validation:C,helperText:Q,id:p,label:f,name:m,type:v,validateOnBlur:w=!0,validateOnChange:x=!0,isRequired:y,labelSpacing:T=1,showGlobalLoader:O=!1,hideHelperText:M=!1,meta:{isExpandable:L=v==="table",isExpanded:F=!0}={}}=E,[_,V]=b.useState(!1),[k,K]=b.useState(""),[Ae,q]=b.useState(F);b.useEffect(()=>{v!=="table"&&(_||G(E.value,!1))},[_,E.value]),b.useEffect(()=>{v==="table"||!_||G(E.value,x)},[E.value]);const P=W=>{var ne;W&&!_&&V(!0),(ne=E.onFocus)==null||ne.call(E,W)};function G(W,ne=!0,ue){let Se="";const Ee=W==null||W===""||Array.isArray(W)&&W.length===0;if((C!=null&&C.isRequired||y)&&(Se=Ee?Gc:"",Ee&&typeof(C==null?void 0:C.isRequired)=="function")){const we=C.isRequired(W);we&&typeof we=="boolean"?Se=Gc:we&&(Se=we)}let _e={id:p,name:m,label:f};if(E.type==="date"?_e={..._e,disableFuture:E.disableFuture,disablePast:E.disablePast}:E.type==="number"?_e={..._e,min:E.min,max:E.max}:E.type==="text"&&E.multiline&&(_e={..._e,maxCharacters:E.maxCharacters}),W&&!Se&&(C!=null&&C.validate)){const we=C.validate(W,{..._e,...ue});typeof we=="boolean"&&we===!1?Se=i9:typeof we=="string"&&(Se=we)}ne&&K(Se),a==null||a(m,Se,ne)}const Y=W=>{var ne;_||V(!0),(ne=E.onBlur)==null||ne.call(E,W),_&&w&&G(E.value)},Z=()=>M?null:E.helperText?l.jsx(eh,{children:Q}):_&&k?l.jsx(eh,{className:"helper--error",children:k}):null,de=W=>{W&&!_&&V(!0),i==null||i(W),_&&x&&G(W.target.value)},Ie=(W,ne)=>{W&&!_&&V(!0),d==null||d(W,ne),_&&x&&G(ne)},U=(W,ne)=>{s==null||s(W,ne),W&&!_&&V(!0),_&&x&&(Array.isArray(W)?G(W):W&&typeof W=="object"&&"value"in W&&G(W.value))},ee=(W,ne)=>{c==null||c(m,W,ne),W&&!_&&V(!0),_&&x&&G(W)},le=W=>{u==null||u(m,W)},fe=W=>{B==null||B(m,W),_||V(!0),x&&G(W)},te=(W,ne)=>{a==null||a(W,ne),K(typeof ne=="string"?ne:"")},Fe=W=>{q(ne=>!ne)},J=W=>{if(O)return l.jsx(g.Skeleton,{variant:"rounded",height:34.69,animation:"wave"});switch(W.type){case"select":return l.jsx($B,{children:l.jsx(_B,{...W,stackIndex:o,isScrollTarget:A,className:`formField__select ${k&&_?"formField__select--error":""} ${W.className||""}`,classNamePrefix:"hiverFormField",onBlur:Y,onChange:U,onFocus:P,menuPortalTarget:n})});case"async-select":return l.jsx($B,{children:l.jsx(p9,{...W,stackIndex:o,isScrollTarget:A,className:`formField__select ${k&&_?"formField__select--error":""} ${W.className||""}`,classNamePrefix:"hiverFormField",onBlur:Y,onChange:U,onFocus:P,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return l.jsx(S9,{...W,label:void 0,onBlur:Y,onFocus:P,onChange:ee,error:!!(k&&_)});case"table":return l.jsx(zB,{...W,value:W.value,onChange:le,onFocus:P,onValidationError:te,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:o});case"attachment":return l.jsx(w8,{name:m,value:W.value,meta:W.meta,isRequired:y,onChange:fe,upload:h,onToast:I});case"checkbox":return l.jsx(GB,{...W,checked:!!W.value,onChange:Ie,onFocus:P,onBlur:Y,styleOverrides:{marginTop:"2px"}});default:return l.jsx(O8,{variant:"outlined",fullWidth:!0,id:p,...W,value:W.value,label:void 0,onBlur:Y,onChange:de,onFocus:P,error:!!(k&&_),inputProps:{type:W.type,min:W.min,max:W.max,...W.inputProps}})}};return l.jsxs(_8,{spacing:T,useFlexGap:!0,...L&&{className:`expandable ${Ae?"open":"close"}`},children:[l.jsx(HB,{label:f,htmlFor:p,isRequired:!!(C!=null&&C.isRequired)||y,prefixNode:L?l.jsx(M8,{children:l.jsx(P8,{className:"arrow-icon"})}):null,...L&&{onClick:()=>Fe()}}),l.jsxs(F8,{className:"input-wrapper",children:[l.jsx(g.Tooltip,{title:E.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:J(E)}),r!=null&&r.icon?l.jsx(g.Tooltip,{title:r.toolTipText,placement:"bottom",children:l.jsx(L8,{className:"form--sideIcon",children:r==null?void 0:r.icon})}):null]}),Z()]})},N8=g.styled(g.Stack)`
740
+ `,P8=e=>S.createElement("svg",{width:"8px",height:"8px",viewBox:"8.59 6 7.41 12",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"})),Pg=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:r,stackIndex:o,isScrollTarget:A,onValidationError:a,inputChangeHandler:i,selectChangeHandler:s,dateChangeHandler:c,tableChangeHandler:u,checkboxChangeHandler:d,attachmentChangeHandler:B,attachmentUploadHandler:h,attachmentToastHandler:I,...E})=>{const{validation:C,helperText:Q,id:p,label:f,name:m,type:v,validateOnBlur:w=!0,validateOnChange:x=!0,isRequired:y,labelSpacing:T=1,showGlobalLoader:O=!1,hideHelperText:M=!1,meta:{isExpandable:L=v==="table",isExpanded:F=!0}={}}=E,[_,V]=b.useState(!1),[k,K]=b.useState(""),[Ae,q]=b.useState(F);b.useEffect(()=>{v!=="table"&&(_||G(E.value,!1))},[_,E.value]),b.useEffect(()=>{v==="table"||!_||G(E.value,x)},[E.value]);const P=W=>{var ne;W&&!_&&V(!0),(ne=E.onFocus)==null||ne.call(E,W)};function G(W,ne=!0,ue){let Se="";const Ee=W==null||W===""||Array.isArray(W)&&W.length===0;if((C!=null&&C.isRequired||y)&&(Se=Ee?Gc:"",Ee&&typeof(C==null?void 0:C.isRequired)=="function")){const we=C.isRequired(W);we&&typeof we=="boolean"?Se=Gc:we&&(Se=we)}let _e={id:p,name:m,label:f};if(E.type==="date"?_e={..._e,disableFuture:E.disableFuture,disablePast:E.disablePast}:E.type==="number"?_e={..._e,min:E.min,max:E.max}:E.type==="text"&&E.multiline&&(_e={..._e,maxCharacters:E.maxCharacters}),W&&!Se&&(C!=null&&C.validate)){const we=C.validate(W,{..._e,...ue});typeof we=="boolean"&&we===!1?Se=i9:typeof we=="string"&&(Se=we)}ne&&K(Se),a==null||a(m,Se,ne)}const Y=W=>{var ne;_||V(!0),(ne=E.onBlur)==null||ne.call(E,W),_&&w&&G(E.value)},Z=()=>M?null:E.helperText?l.jsx(eh,{children:Q}):_&&k?l.jsx(eh,{className:"helper--error",children:k}):null,de=W=>{W&&!_&&V(!0),i==null||i(W),_&&x&&G(W.target.value)},Ie=(W,ne)=>{W&&!_&&V(!0),d==null||d(W,ne),_&&x&&G(ne)},U=(W,ne)=>{s==null||s(W,ne),W&&!_&&V(!0),_&&x&&(Array.isArray(W)?G(W):W&&typeof W=="object"&&"value"in W&&G(W.value))},ee=(W,ne)=>{c==null||c(m,W,ne),W&&!_&&V(!0),_&&x&&G(W)},le=W=>{u==null||u(m,W)},fe=W=>{B==null||B(m,W),_||V(!0),x&&G(W)},te=(W,ne)=>{a==null||a(W,ne),K(typeof ne=="string"?ne:"")},Fe=W=>{q(ne=>!ne)},J=W=>{if(O)return l.jsx(g.Skeleton,{variant:"rounded",height:34.69,animation:"wave"});switch(W.type){case"select":return l.jsx($B,{children:l.jsx(_B,{...W,stackIndex:o,isScrollTarget:A,className:`formField__select ${k&&_?"formField__select--error":""} ${W.className||""}`,classNamePrefix:"hiverFormField",onBlur:Y,onChange:U,onFocus:P,menuPortalTarget:n})});case"async-select":return l.jsx($B,{children:l.jsx(p9,{...W,stackIndex:o,isScrollTarget:A,className:`formField__select ${k&&_?"formField__select--error":""} ${W.className||""}`,classNamePrefix:"hiverFormField",onBlur:Y,onChange:U,onFocus:P,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return l.jsx(S9,{...W,label:void 0,onBlur:Y,onFocus:P,onChange:ee,error:!!(k&&_)});case"table":return l.jsx(zB,{...W,value:W.value,onChange:le,onFocus:P,onValidationError:te,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:o});case"attachment":return l.jsx(w8,{name:m,value:W.value,meta:W.meta,isRequired:y,onChange:fe,upload:h,onToast:I});case"checkbox":return l.jsx(GB,{...W,checked:!!W.value,onChange:Ie,onFocus:P,onBlur:Y,styleOverrides:{marginTop:"2px"}});default:return l.jsx(O8,{variant:"outlined",fullWidth:!0,id:p,...W,value:W.value,label:void 0,onBlur:Y,onChange:de,onFocus:P,error:!!(k&&_),inputProps:{type:W.type,min:W.min,max:W.max,autoComplete:W.type==="password"?"new-password":"off",...W.inputProps}})}};return l.jsxs(_8,{spacing:T,useFlexGap:!0,...L&&{className:`expandable ${Ae?"open":"close"}`},children:[l.jsx(HB,{label:f,htmlFor:p,isRequired:!!(C!=null&&C.isRequired)||y,prefixNode:L?l.jsx(M8,{children:l.jsx(P8,{className:"arrow-icon"})}):null,...L&&{onClick:()=>Fe()}}),l.jsxs(F8,{className:"input-wrapper",children:[l.jsx(g.Tooltip,{title:E.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:J(E)}),r!=null&&r.icon?l.jsx(g.Tooltip,{title:r.toolTipText,placement:"bottom",children:l.jsx(L8,{className:"form--sideIcon",children:r==null?void 0:r.icon})}):null]}),Z()]})},N8=g.styled(g.Stack)`
741
741
  & .authform__section-title {
742
742
  margin-top: 32px;
743
743
  margin-bottom: -12px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-admin",
3
- "version": "4.22.3-authCta-beta.1",
3
+ "version": "4.22.3-authCta-beta.2",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",