@solace-health/ui 0.10.317 → 0.10.318
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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1839,7 +1839,7 @@ The mask that was received is: ${JSON.stringify(C)}`);return C.map(t=>t instance
|
|
|
1839
1839
|
stroke: ${({color:C})=>C||"#fff"};
|
|
1840
1840
|
}
|
|
1841
1841
|
}
|
|
1842
|
-
`,_6=({color:C=void 0,size:e="sm"})=>jsxRuntime.jsx(qm,{color:C,size:e,children:jsxRuntime.jsx("div",{className:"loader",children:jsxRuntime.jsx("svg",{className:"circular-loader",viewBox:"25 25 50 50",children:jsxRuntime.jsx("circle",{className:"loader-path",cx:"50",cy:"50",r:"20",fill:"none"})})})});var Cg=C=>{let e="",t="",o="",r="",i="";C.address_components.forEach(p=>{p.types.some(L=>{switch(L){case"locality":return e=p.short_name,!0;case"administrative_area_level_1":return t=p.short_name,!0;case"street_number":return o=p.short_name,!0;case"route":return r=p.short_name,!0;case"postal_code":return i=p.short_name,!0;default:return !1}});});let s=C.geometry.location.lat(),a=C.geometry.location.lng(),l=`${o} ${r}`;return {city:e,state:t,street:l,zip:i,lat:s,long:a}},eg=({handleSelect:C,option:e,value:t})=>{let{description:o}=e,r=o===t,i=o.replace(", USA","");return jsxRuntime.jsx(sn,{isCurrent:r,onClick:()=>C(i),children:jsxRuntime.jsx(w.Body,{size:"lg",children:i})})},tg=["places"],og=({label:C="",details:e="",formOptions:t={},previewOnly:o=!1,isLabelBold:r=!0,locationType:i="city",streetFieldName:s="street",cityFieldName:a="city",stateFieldName:l="state",zipFieldName:p="zip",cityWithStateFieldName:L="city_with_state",placeholder:d="",containerStyle:c={},errorMessage:f="This field is required",hasError:m=!1,style:M={},className:B=""})=>{let _=ac.useRef(),[H,P]=ac.useState(!1),[k,u]=ac.useState(!1),b=reactHookForm.useFormContext(),y;switch(i){case"city":y=a;break;case"full":y=s;break;case"city_with_state":y=L;break;default:return null}let O=web.useSpring(H?{opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:150}}:{opacity:0,transform:"translate(0px, -2px)",display:"none",config:{duration:150}});ac.useEffect(()=>{let x=I=>{H&&_.current&&!_.current.contains(I.target)&&P(!1);};return document.addEventListener("mousedown",I=>x(I)),()=>{document.removeEventListener("mousedown",I=>x(I));}},[H]);let K=b.getValues(y)?`${b.getValues(y)}, ${b.getValues(l)}`:"",{value:R,suggestions:{data:C1,loading:m1},setValue:g,clearSuggestions:v}=Km__default.default({requestOptions:{...["city","city_with_state"].includes(i)?{types:["locality","postal_code"]}:{},componentRestrictions:{country:"us"}}});ac.useEffect(()=>{if(m1){u(m1);return}setTimeout(()=>{u(m1);},2e3);},[m1]);let D=web.useSpring(k?{opacity:1,transform:"translate(0px, 0px)",config:{duration:400}}:{opacity:0,transform:"translate(5px, 0px)",config:{duration:200}}),U=x=>{g(x.target.value),b.setValue(l,""),i==="full"&&(b.setValue(p,""),b.setValue(a,"")),b.trigger(y),x.target.value.length>=3&&P(!0);},A=x=>{g(x,!1),v(),!(x.length<=2)&&Km.getGeocode({address:x}).then(I=>{let{city:X,state:Y,street:J,zip:S1,lat:y1,long:L2}=Cg(I[0]),v7=[y,a,l];b.setValue(a,X),b.setValue(l,Y),i==="full"&&(b.setValue(s,J),b.setValue(p,S1),v7.push(s,p)),i==="city_with_state"&&b.setValue(L,`${X}, ${Y}`),b.setValue("lat",y1),b.setValue("long",L2),b.trigger(v7);}).catch(I=>console.error(`Google Maps API error: ${I}`));},G=x=>{x.code==="Enter"&&x.preventDefault();};return jsxRuntime.jsxs(tn,{style:M,className:B,children:[jsxRuntime.jsx(q,{label:C,isLabelBold:r,required:!!t.required,details:e}),o?jsxRuntime.jsx(ln,{size:"md",children:K||"N/A"}):jsxRuntime.jsxs(on,{style:c,children:[jsxRuntime.jsx(an,{onKeyDown:G,type:"text",placeholder:d,...b.register(y,{...t,onChange:U})}),C1.length>0&&jsxRuntime.jsx(rn,{style:O,ref:_,children:C1.map(x=>jsxRuntime.jsx(eg,{handleSelect:A,option:x,value:R},x.description))}),jsxRuntime.jsx(nn,{style:D,children:jsxRuntime.jsx(_6,{size:"sm"})})]}),m&&jsxRuntime.jsx(N,{text:f,includeIcon:!1})]})},cn=({api_key:C,...e})=>{let{isLoaded:t}=api.useLoadScript({googleMapsApiKey:C||process.env.GOOGLE_MAPS_API_KEY||"",libraries:tg});return t?jsxRuntime.jsx(og,{...e}):null};var dg=$__default.default(antd.Input.Search)`
|
|
1842
|
+
`,_6=({color:C=void 0,size:e="sm"})=>jsxRuntime.jsx(qm,{color:C,size:e,children:jsxRuntime.jsx("div",{className:"loader",children:jsxRuntime.jsx("svg",{className:"circular-loader",viewBox:"25 25 50 50",children:jsxRuntime.jsx("circle",{className:"loader-path",cx:"50",cy:"50",r:"20",fill:"none"})})})});var Cg=C=>{let e="",t="",o="",r="",i="";C.address_components.forEach(p=>{p.types.some(L=>{switch(L){case"locality":return e=p.short_name,!0;case"sublocality":return e=e||p.short_name,!0;case"administrative_area_level_1":return t=p.short_name,!0;case"street_number":return o=p.short_name,!0;case"route":return r=p.short_name,!0;case"postal_code":return i=p.short_name,!0;default:return !1}});});let s=C.geometry.location.lat(),a=C.geometry.location.lng(),l=`${o} ${r}`;return {city:e,state:t,street:l,zip:i,lat:s,long:a}},eg=({handleSelect:C,option:e,value:t})=>{let{description:o}=e,r=o===t,i=o.replace(", USA","");return jsxRuntime.jsx(sn,{isCurrent:r,onClick:()=>C(i),children:jsxRuntime.jsx(w.Body,{size:"lg",children:i})})},tg=["places"],og=({label:C="",details:e="",formOptions:t={},previewOnly:o=!1,isLabelBold:r=!0,locationType:i="city",streetFieldName:s="street",cityFieldName:a="city",stateFieldName:l="state",zipFieldName:p="zip",cityWithStateFieldName:L="city_with_state",placeholder:d="",containerStyle:c={},errorMessage:f="This field is required",hasError:m=!1,style:M={},className:B=""})=>{let _=ac.useRef(),[H,P]=ac.useState(!1),[k,u]=ac.useState(!1),b=reactHookForm.useFormContext(),y;switch(i){case"city":y=a;break;case"full":y=s;break;case"city_with_state":y=L;break;default:return null}let O=web.useSpring(H?{opacity:1,transform:"translate(0px, 0px)",display:"block",config:{duration:150}}:{opacity:0,transform:"translate(0px, -2px)",display:"none",config:{duration:150}});ac.useEffect(()=>{let x=I=>{H&&_.current&&!_.current.contains(I.target)&&P(!1);};return document.addEventListener("mousedown",I=>x(I)),()=>{document.removeEventListener("mousedown",I=>x(I));}},[H]);let K=b.getValues(y)?`${b.getValues(y)}, ${b.getValues(l)}`:"",{value:R,suggestions:{data:C1,loading:m1},setValue:g,clearSuggestions:v}=Km__default.default({requestOptions:{...["city","city_with_state"].includes(i)?{types:["locality","postal_code"]}:{},componentRestrictions:{country:"us"}}});ac.useEffect(()=>{if(m1){u(m1);return}setTimeout(()=>{u(m1);},2e3);},[m1]);let D=web.useSpring(k?{opacity:1,transform:"translate(0px, 0px)",config:{duration:400}}:{opacity:0,transform:"translate(5px, 0px)",config:{duration:200}}),U=x=>{g(x.target.value),b.setValue(l,""),i==="full"&&(b.setValue(p,""),b.setValue(a,"")),b.trigger(y),x.target.value.length>=3&&P(!0);},A=x=>{g(x,!1),v(),!(x.length<=2)&&Km.getGeocode({address:x}).then(I=>{let{city:X,state:Y,street:J,zip:S1,lat:y1,long:L2}=Cg(I[0]),v7=[y,a,l];b.setValue(a,X),b.setValue(l,Y),i==="full"&&(b.setValue(s,J),b.setValue(p,S1),v7.push(s,p)),i==="city_with_state"&&b.setValue(L,`${X}, ${Y}`),b.setValue("lat",y1),b.setValue("long",L2),b.trigger(v7);}).catch(I=>console.error(`Google Maps API error: ${I}`));},G=x=>{x.code==="Enter"&&x.preventDefault();};return jsxRuntime.jsxs(tn,{style:M,className:B,children:[jsxRuntime.jsx(q,{label:C,isLabelBold:r,required:!!t.required,details:e}),o?jsxRuntime.jsx(ln,{size:"md",children:K||"N/A"}):jsxRuntime.jsxs(on,{style:c,children:[jsxRuntime.jsx(an,{onKeyDown:G,type:"text",placeholder:d,...b.register(y,{...t,onChange:U})}),C1.length>0&&jsxRuntime.jsx(rn,{style:O,ref:_,children:C1.map(x=>jsxRuntime.jsx(eg,{handleSelect:A,option:x,value:R},x.description))}),jsxRuntime.jsx(nn,{style:D,children:jsxRuntime.jsx(_6,{size:"sm"})})]}),m&&jsxRuntime.jsx(N,{text:f,includeIcon:!1})]})},cn=({api_key:C,...e})=>{let{isLoaded:t}=api.useLoadScript({googleMapsApiKey:C||process.env.GOOGLE_MAPS_API_KEY||"",libraries:tg});return t?jsxRuntime.jsx(og,{...e}):null};var dg=$__default.default(antd.Input.Search)`
|
|
1843
1843
|
.ant-input,
|
|
1844
1844
|
.ant-input-search-button {
|
|
1845
1845
|
height: 48px;
|