@hiver/connector-admin 4.22.2 → 4.22.3-authCta-beta.0

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
@@ -15788,7 +15788,9 @@ const AD = () => `att-${Date.now()}-${++oD}`, iD = ({
15788
15788
  } = C, [T, j] = q(!1), [X, ce] = q(""), [Ae, Z] = q(D);
15789
15789
  xe(() => {
15790
15790
  v !== "table" && (T || H(C.value, !1));
15791
- }, [T, C.value]);
15791
+ }, [T, C.value]), xe(() => {
15792
+ v === "table" || !T || H(C.value, b);
15793
+ }, [C.value]);
15792
15794
  const L = (W) => {
15793
15795
  var le;
15794
15796
  W && !T && j(!0), (le = C.onFocus) == null || le.call(C, W);
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
- `,Z9=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"})),vg=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:r,stackIndex:o,isScrollTarget:A,onValidationError:a,inputChangeHandler:i,selectChangeHandler:s,dateChangeHandler:c,tableChangeHandler:l,checkboxChangeHandler:d,attachmentChangeHandler:h,attachmentUploadHandler:Q,attachmentToastHandler:I,...E})=>{const{validation:C,helperText:B,id:p,label:f,name:m,type:v,validateOnBlur:w=!0,validateOnChange:x=!0,isRequired:y,labelSpacing:T=1,showGlobalLoader:M=!1,hideHelperText:_=!1,meta:{isExpandable:V=v==="table",isExpanded:F=!0}={}}=E,[O,j]=b.useState(!1),[Z,se]=b.useState(""),[oe,q]=b.useState(F);b.useEffect(()=>{v!=="table"&&(O||W(E.value,!1))},[O,E.value]);const P=z=>{var ce;z&&!O&&j(!0),(ce=E.onFocus)==null||ce.call(E,z)};function W(z,ce=!0,Ee){let we="";const He=z==null||z===""||Array.isArray(z)&&z.length===0;if((C!=null&&C.isRequired||y)&&(we=He?Fc:"",He&&typeof(C==null?void 0:C.isRequired)=="function")){const Pe=C.isRequired(z);Pe&&typeof Pe=="boolean"?we=Fc:Pe&&(we=Pe)}let Ne={id:p,name:m,label:f};if(E.type==="date"?Ne={...Ne,disableFuture:E.disableFuture,disablePast:E.disablePast}:E.type==="number"?Ne={...Ne,min:E.min,max:E.max}:E.type==="text"&&E.multiline&&(Ne={...Ne,maxCharacters:E.maxCharacters}),z&&!we&&(C!=null&&C.validate)){const Pe=C.validate(z,{...Ne,...Ee});typeof Pe=="boolean"&&Pe===!1?we=h6:typeof Pe=="string"&&(we=Pe)}ce&&se(we),a==null||a(m,we,ce)}const k=z=>{var ce;O||j(!0),(ce=E.onBlur)==null||ce.call(E,z),O&&w&&W(E.value)},G=()=>_?null:E.helperText?u.jsx(DB,{children:B}):O&&Z?u.jsx(DB,{className:"helper--error",children:Z}):null,re=z=>{z&&!O&&j(!0),i==null||i(z),O&&x&&W(z.target.value)},le=(z,ce)=>{z&&!O&&j(!0),d==null||d(z,ce),O&&x&&W(ce)},ie=(z,ce)=>{s==null||s(z,ce),z&&!O&&j(!0),O&&x&&(Array.isArray(z)?W(z):z&&typeof z=="object"&&"value"in z&&W(z.value))},K=(z,ce)=>{c==null||c(m,z,ce),z&&!O&&j(!0),O&&x&&W(z)},ge=z=>{l==null||l(m,z)},ye=z=>{h==null||h(m,z),O||j(!0),x&&W(z)},de=(z,ce)=>{a==null||a(z,ce),se(typeof ce=="string"?ce:"")},Me=z=>{q(ce=>!ce)},X=z=>{if(M)return u.jsx(g.Skeleton,{variant:"rounded",height:34.69,animation:"wave"});switch(z.type){case"select":return u.jsx(TB,{children:u.jsx(lB,{...z,stackIndex:o,isScrollTarget:A,className:`formField__select ${Z&&O?"formField__select--error":""} ${z.className||""}`,classNamePrefix:"hiverFormField",onBlur:k,onChange:ie,onFocus:P,menuPortalTarget:n})});case"async-select":return u.jsx(TB,{children:u.jsx(O6,{...z,stackIndex:o,isScrollTarget:A,className:`formField__select ${Z&&O?"formField__select--error":""} ${z.className||""}`,classNamePrefix:"hiverFormField",onBlur:k,onChange:ie,onFocus:P,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return u.jsx(V6,{...z,label:void 0,onBlur:k,onFocus:P,onChange:K,error:!!(Z&&O)});case"table":return u.jsx(QB,{...z,value:z.value,onChange:ge,onFocus:P,onValidationError:de,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:o});case"attachment":return u.jsx(j9,{name:m,value:z.value,meta:z.meta,isRequired:y,onChange:ye,upload:Q,onToast:I});case"checkbox":return u.jsx(pB,{...z,checked:!!z.value,onChange:le,onFocus:P,onBlur:k,styleOverrides:{marginTop:"2px"}});default:return u.jsx(W9,{variant:"outlined",fullWidth:!0,id:p,...z,value:z.value,label:void 0,onBlur:k,onChange:re,onFocus:P,error:!!(Z&&O),inputProps:{type:z.type,min:z.min,max:z.max,...z.inputProps}})}};return u.jsxs(J9,{spacing:T,useFlexGap:!0,...V&&{className:`expandable ${oe?"open":"close"}`},children:[u.jsx(BB,{label:f,htmlFor:p,isRequired:!!(C!=null&&C.isRequired)||y,prefixNode:V?u.jsx(Y9,{children:u.jsx(Z9,{className:"arrow-icon"})}):null,...V&&{onClick:()=>Me()}}),u.jsxs(z9,{className:"input-wrapper",children:[u.jsx(g.Tooltip,{title:E.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:X(E)}),r!=null&&r.icon?u.jsx(g.Tooltip,{title:r.toolTipText,placement:"bottom",children:u.jsx(X9,{className:"form--sideIcon",children:r==null?void 0:r.icon})}):null]}),G()]})},U9=g.styled(g.Stack)`
740
+ `,Z9=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"})),vg=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:r,stackIndex:o,isScrollTarget:A,onValidationError:a,inputChangeHandler:i,selectChangeHandler:s,dateChangeHandler:c,tableChangeHandler:l,checkboxChangeHandler:d,attachmentChangeHandler:h,attachmentUploadHandler:Q,attachmentToastHandler:I,...E})=>{const{validation:C,helperText:B,id:p,label:f,name:m,type:v,validateOnBlur:w=!0,validateOnChange:x=!0,isRequired:y,labelSpacing:T=1,showGlobalLoader:M=!1,hideHelperText:_=!1,meta:{isExpandable:V=v==="table",isExpanded:F=!0}={}}=E,[O,j]=b.useState(!1),[Z,se]=b.useState(""),[oe,q]=b.useState(F);b.useEffect(()=>{v!=="table"&&(O||W(E.value,!1))},[O,E.value]),b.useEffect(()=>{v==="table"||!O||W(E.value,x)},[E.value]);const P=z=>{var ce;z&&!O&&j(!0),(ce=E.onFocus)==null||ce.call(E,z)};function W(z,ce=!0,Ee){let we="";const He=z==null||z===""||Array.isArray(z)&&z.length===0;if((C!=null&&C.isRequired||y)&&(we=He?Fc:"",He&&typeof(C==null?void 0:C.isRequired)=="function")){const Pe=C.isRequired(z);Pe&&typeof Pe=="boolean"?we=Fc:Pe&&(we=Pe)}let Ne={id:p,name:m,label:f};if(E.type==="date"?Ne={...Ne,disableFuture:E.disableFuture,disablePast:E.disablePast}:E.type==="number"?Ne={...Ne,min:E.min,max:E.max}:E.type==="text"&&E.multiline&&(Ne={...Ne,maxCharacters:E.maxCharacters}),z&&!we&&(C!=null&&C.validate)){const Pe=C.validate(z,{...Ne,...Ee});typeof Pe=="boolean"&&Pe===!1?we=h6:typeof Pe=="string"&&(we=Pe)}ce&&se(we),a==null||a(m,we,ce)}const k=z=>{var ce;O||j(!0),(ce=E.onBlur)==null||ce.call(E,z),O&&w&&W(E.value)},G=()=>_?null:E.helperText?u.jsx(DB,{children:B}):O&&Z?u.jsx(DB,{className:"helper--error",children:Z}):null,re=z=>{z&&!O&&j(!0),i==null||i(z),O&&x&&W(z.target.value)},le=(z,ce)=>{z&&!O&&j(!0),d==null||d(z,ce),O&&x&&W(ce)},ie=(z,ce)=>{s==null||s(z,ce),z&&!O&&j(!0),O&&x&&(Array.isArray(z)?W(z):z&&typeof z=="object"&&"value"in z&&W(z.value))},K=(z,ce)=>{c==null||c(m,z,ce),z&&!O&&j(!0),O&&x&&W(z)},ge=z=>{l==null||l(m,z)},ye=z=>{h==null||h(m,z),O||j(!0),x&&W(z)},de=(z,ce)=>{a==null||a(z,ce),se(typeof ce=="string"?ce:"")},Me=z=>{q(ce=>!ce)},X=z=>{if(M)return u.jsx(g.Skeleton,{variant:"rounded",height:34.69,animation:"wave"});switch(z.type){case"select":return u.jsx(TB,{children:u.jsx(lB,{...z,stackIndex:o,isScrollTarget:A,className:`formField__select ${Z&&O?"formField__select--error":""} ${z.className||""}`,classNamePrefix:"hiverFormField",onBlur:k,onChange:ie,onFocus:P,menuPortalTarget:n})});case"async-select":return u.jsx(TB,{children:u.jsx(O6,{...z,stackIndex:o,isScrollTarget:A,className:`formField__select ${Z&&O?"formField__select--error":""} ${z.className||""}`,classNamePrefix:"hiverFormField",onBlur:k,onChange:ie,onFocus:P,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return u.jsx(V6,{...z,label:void 0,onBlur:k,onFocus:P,onChange:K,error:!!(Z&&O)});case"table":return u.jsx(QB,{...z,value:z.value,onChange:ge,onFocus:P,onValidationError:de,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:o});case"attachment":return u.jsx(j9,{name:m,value:z.value,meta:z.meta,isRequired:y,onChange:ye,upload:Q,onToast:I});case"checkbox":return u.jsx(pB,{...z,checked:!!z.value,onChange:le,onFocus:P,onBlur:k,styleOverrides:{marginTop:"2px"}});default:return u.jsx(W9,{variant:"outlined",fullWidth:!0,id:p,...z,value:z.value,label:void 0,onBlur:k,onChange:re,onFocus:P,error:!!(Z&&O),inputProps:{type:z.type,min:z.min,max:z.max,...z.inputProps}})}};return u.jsxs(J9,{spacing:T,useFlexGap:!0,...V&&{className:`expandable ${oe?"open":"close"}`},children:[u.jsx(BB,{label:f,htmlFor:p,isRequired:!!(C!=null&&C.isRequired)||y,prefixNode:V?u.jsx(Y9,{children:u.jsx(Z9,{className:"arrow-icon"})}):null,...V&&{onClick:()=>Me()}}),u.jsxs(z9,{className:"input-wrapper",children:[u.jsx(g.Tooltip,{title:E.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:X(E)}),r!=null&&r.icon?u.jsx(g.Tooltip,{title:r.toolTipText,placement:"bottom",children:u.jsx(X9,{className:"form--sideIcon",children:r==null?void 0:r.icon})}):null]}),G()]})},U9=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.2",
3
+ "version": "4.22.3-authCta-beta.0",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",