@solace-health/ui 0.10.316 → 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 +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- 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;
|
|
@@ -1851,7 +1851,7 @@ The mask that was received is: ${JSON.stringify(C)}`);return C.map(t=>t instance
|
|
|
1851
1851
|
.ant-input-search-button {
|
|
1852
1852
|
border-left: none;
|
|
1853
1853
|
}
|
|
1854
|
-
`,fg=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}},cg=["places"],mg=({label:C="",formOptions:e={},isLabelBold:t=!0,addressType:o="city",streetFieldName:r="street",cityFieldName:i="city",stateFieldName:s="state",zipFieldName:a="zip",cityWithStateFieldName:l="city_with_state",latFieldName:p="lat",longFieldName:L="long",fullAddressFieldName:d="fullAddress",placeholder:c=""})=>{let f=reactHookForm.useFormContext(),{suggestions:{data:m=[]},setValue:M,clearSuggestions:B}=Km__default.default({requestOptions:{...["city","city_with_state"].includes(o)?{types:["locality","postal_code"]}:{},componentRestrictions:{country:"us"}}}),_;switch(o){case"city":_=i;break;case"full":_=d;break;case"city_with_state":_=l;break;default:return null}let H=k=>{M(k),!(k.length<=3)&&(f.setValue(s,""),o==="full"&&(f.setValue(a,""),f.setValue(i,"")),f.trigger(_));},P=k=>{typeof k=="string"&&(M(k,!1),B(),!(k.length<=2)&&Km.getGeocode({address:k}).then(u=>{let{city:b,state:y,street:O,zip:K,lat:R,long:C1}=fg(u[0]),m1=[_,i,s];f.setValue(i,b),f.setValue(s,y),o==="full"&&(f.setValue(r,O),f.setValue(a,K),m1.push(r,a)),o==="city_with_state"&&f.setValue(l,`${b}, ${y}`),f.setValue(p,R),f.setValue(L,C1),f.setValue(d,k),f.trigger(m1);}).catch(u=>console.error(`Google Maps API error: ${u}`)));};return jsxRuntime.jsxs(p1,{vertical:!0,style:{width:"100%"},children:[jsxRuntime.jsx(q,{label:C,isLabelBold:t,required:!!e.required}),jsxRuntime.jsx(reactHookForm.Controller,{render:({field:k})=>{let{ref:u,...b}=k;return jsxRuntime.jsx(antd.AutoComplete,{onSearch:H,options:m.map(y=>({label:y.description,value:y.description})),onSelect:P,...b,children:jsxRuntime.jsx(dg,{size:"large",placeholder:c})})},name:_,rules:{...e},control:f.control}),f.formState.errors[_]&&jsxRuntime.jsx(N,{text:f.formState.errors[_]?.message,includeIcon:!1})]})},gg=({api_key:C,...e})=>{let{isLoaded:t}=api.useLoadScript({googleMapsApiKey:C||process.env.GOOGLE_MAPS_API_KEY||"",libraries:cg});return t?jsxRuntime.jsx(mg,{...e}):null},mn=gg;var xg=$__default.default(antd.TimePicker)`
|
|
1854
|
+
`,fg=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}},cg=["places"],mg=({label:C="",formOptions:e={},isLabelBold:t=!0,addressType:o="city",streetFieldName:r="street",cityFieldName:i="city",stateFieldName:s="state",zipFieldName:a="zip",cityWithStateFieldName:l="city_with_state",latFieldName:p="lat",longFieldName:L="long",fullAddressFieldName:d="fullAddress",placeholder:c=""})=>{let f=reactHookForm.useFormContext(),{suggestions:{data:m=[]},setValue:M,clearSuggestions:B}=Km__default.default({requestOptions:{...["city","city_with_state"].includes(o)?{types:["locality","postal_code"]}:{},componentRestrictions:{country:"us"}}}),_;switch(o){case"city":_=i;break;case"full":_=d;break;case"city_with_state":_=l;break;default:return null}let H=k=>{M(k),!(k.length<=3)&&(f.setValue(s,""),o==="full"&&(f.setValue(a,""),f.setValue(i,"")),f.trigger(_));},P=k=>{typeof k=="string"&&(M(k,!1),B(),!(k.length<=2)&&Km.getGeocode({address:k}).then(u=>{let{city:b,state:y,street:O,zip:K,lat:R,long:C1}=fg(u[0]),m1=[_,i,s];f.setValue(i,b),f.setValue(s,y),o==="full"&&(f.setValue(r,O),f.setValue(a,K),m1.push(r,a)),o==="city_with_state"&&f.setValue(l,`${b}, ${y}`),f.setValue(p,R),f.setValue(L,C1),f.setValue(d,k),f.trigger(m1);}).catch(u=>console.error(`Google Maps API error: ${u}`)));};return jsxRuntime.jsxs(p1,{vertical:!0,style:{width:"100%"},children:[jsxRuntime.jsx(q,{label:C,isLabelBold:t,required:!!e.required}),jsxRuntime.jsx(reactHookForm.Controller,{render:({field:k})=>{let{ref:u,...b}=k;return jsxRuntime.jsx(antd.AutoComplete,{onSearch:H,options:m.map(y=>({label:y.description,value:y.description})),onSelect:P,...b,children:jsxRuntime.jsx(dg,{size:"large",placeholder:c})})},name:_,rules:{...e},control:f.control}),f.formState.errors[_]&&jsxRuntime.jsx(N,{text:f.formState.errors[_]?.message,includeIcon:!1})]})},gg=({api_key:C,...e})=>{let{isLoaded:t}=api.useLoadScript({googleMapsApiKey:C||process.env.GOOGLE_MAPS_API_KEY||"",libraries:cg});return t?jsxRuntime.jsx(mg,{...e}):null},mn=gg;var xg=$__default.default(antd.TimePicker)`
|
|
1855
1855
|
height: 50px;
|
|
1856
1856
|
border-color: #424242;
|
|
1857
1857
|
`,yg=({onChange:C=()=>null,format:e="h:mma",ref:t=void 0,...o})=>jsxRuntime.jsx(xg,{use12Hours:!0,format:e,onChange:C,...o,ref:t}),S6=yg;var Vg=$__default.default.div`
|