@meetelise/chat 1.22.13 → 1.22.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.22.13",
3
+ "version": "1.22.14",
4
4
  "description": "",
5
5
  "main": "public/dist/index.js",
6
6
  "type": "module",
@@ -4654,7 +4654,7 @@ otherwise there's some empty space at the bottom of the button, which interferes
4654
4654
  position: fixed;
4655
4655
  bottom: 0;
4656
4656
  }
4657
- `,Ao([le({type:String})],Co.prototype,"buildingSlug",void 0),Ao([le({type:String})],Co.prototype,"orgSlug",void 0),Ao([le({type:Object})],Co.prototype,"launcherStyles",void 0),Ao([le()],Co.prototype,"mobileStyles",void 0),Ao([le({type:Boolean})],Co.prototype,"isMinimized",void 0),Ao([le({type:String})],Co.prototype,"brandColor",void 0),Ao([le({type:String})],Co.prototype,"backgroundColor",void 0),Ao([ue()],Co.prototype,"chatId",void 0),Ao([ue()],Co.prototype,"analytics",void 0),Ao([ue()],Co.prototype,"launcher",void 0),Ao([ue()],Co.prototype,"building",void 0),Ao([ue()],Co.prototype,"designConcept",void 0),Ao([ue()],Co.prototype,"leadSources",void 0),Ao([ue()],Co.prototype,"currentLeadSource",void 0),Ao([ue()],Co.prototype,"featureFlagShowDropdown",void 0),Ao([ue()],Co.prototype,"phoneNumberForSource",void 0),Ao([ue()],Co.prototype,"hasMounted",void 0),Ao([ue()],Co.prototype,"hideLauncher",void 0),Ao([ue()],Co.prototype,"isLoading",void 0),Ao([ue()],Co.prototype,"showTourNextToChat",void 0),Ao([ue()],Co.prototype,"displayPubnubChat",void 0),Ao([ue()],Co.prototype,"myPubnub",void 0),Ao([ue()],Co.prototype,"LeadSourceClient",void 0),Ao([le({type:Number})],Co.prototype,"right",void 0),Ao([le({type:Number})],Co.prototype,"bottom",void 0),Ao([le({type:Number})],Co.prototype,"top",void 0),Ao([le({type:Number})],Co.prototype,"left",void 0),Ao([le({attribute:!0})],Co.prototype,"overrideRentgrata",void 0),Ao([le({attribute:!0})],Co.prototype,"widgetType",void 0),Ao([le()],Co.prototype,"onWidgetLoaded",void 0),Ao([le({attribute:!0})],Co.prototype,"onSstClose",void 0),Ao([ue()],Co.prototype,"enabledChatWidgets",void 0),Ao([ue()],Co.prototype,"webchatConfigHasAutoOpenChat",void 0),Ao([ue()],Co.prototype,"requiresConsent",void 0),Ao([ue()],Co.prototype,"hideMobileFeatures",void 0),Ao([ue()],Co.prototype,"privacyPolicyUrl",void 0),Co=Ao([ae("me-chat")],Co);const Oo=e=>{for(const t of e){const e=document.getElementById(t);if(e)return e}return null},Io=async(e,i,n)=>{var r;if(!i||!e)return;const o=await async function(e){if(!e)return!1;try{return(await t().get(Ki(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-use-override-contact-us-form",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(i);if(!o)return;const a=Oo(["myContactForm","contactus","fpa-myContactForm","contact-form"]);let s;if(!(a&&a instanceof HTMLFormElement)){const t=document.querySelector("form");return void(window.location.pathname.toLowerCase().includes("contactus")&&No(i,e,"Could not find form",t?{id:t.id}:void 0))}try{if(a.parentElement&&"scheduleTourForm"===a.parentElement.id)return No(i,e,"Form is apart of schedule tour form!")}catch(e){console.error("error",e)}for(let e=0;e<a.elements.length;e++){const t=a.elements[e];if("button"===t.tagName.toLowerCase()&&"fakebutton"===t.getAttribute("data-selenium-id")){s=t;break}if("fpa-contact-submit"===t.getAttribute("id")){s=t;break}}if(!s)return No(i,e,"Could not find submit button");const l=()=>({firstName:Oo(["firstname","txtName","fpa-firstname","Form_FirstName"]),lastName:Oo(["lastname","txtName2","fpa-lastname","Form_LastName"]),email:Oo(["email","txtEmail","fpa-email","Form_Email"]),phone:Oo(["phonenumber","txtPhone","fpa-phonenumber","Form_Phone"]),message:Oo(["message","txtComments","fpa-email","Form_Message"])});if(Object.values(l()).some((e=>null===e))){const t=Object.entries(l()).filter((([,e])=>null===e)).map((([e])=>e));return No(i,e,"Missing the following form elements: "+t.join(", "))}const u=s.textContent,d=s.cloneNode(!0);null===(r=s.parentNode)||void 0===r||r.replaceChild(d,s),d.onclick=async function(t){if(Object.values(l()).forEach((e=>{"true"!==(null==e?void 0:e.getAttribute("aria-required"))||e.value||(e.className="form-control required is-invalid")})),!Object.values(l()).every((e=>null!==e&&!("true"===e.getAttribute("aria-required")&&!e.value)&&("email"!==e.id&&"phonenumber"!==e.id||"true"!==e.getAttribute("aria-invalid")))))return;t.preventDefault(),d.textContent="Processing request...",d.disabled=!0;const r={};Object.entries(l()).forEach((([e,t])=>r[e]=null==t?void 0:t.value));const o=await Sn(e,i);if(!o)return No(i,e,"Could not find building"),null;const s={email_address:r.email,first_name:r.firstName,last_name:r.lastName,phone_number:r.phone,first_message:r.message,building_id:o.id,is_external_form:!0,lead_sources:[...new Set(n?[n,fn(e)]:[fn(e)])]},c=JSON.stringify(s);fetch("https://app.meetelise.com/platformApi/state/create/contactMe",{method:"POST",headers:{"Content-Type":"application/json","building-slug":i,"org-slug":e},body:c}).then((e=>{if(!e.ok)throw new Error(`HTTP error ${e.status}`);return a&&a.reset(),Object.values(l()).forEach((e=>{e&&(e.disabled=!0)})),d.textContent="Submitted",d.disabled=!0,e.json()})).catch((()=>{d.textContent=u}))}},No=(e,t,i,n)=>{const r=JSON.stringify({orgSlug:t,buildingSlug:e,reason:i,url:window.location.href,formIdInfo:n});fetch("https://app.meetelise.com/platformApi/webchat/form-override-error",{method:"POST",headers:{"Content-Type":"application/json","building-slug":e,"org-slug":t},body:r})},Eo=l`
4657
+ `,Ao([le({type:String})],Co.prototype,"buildingSlug",void 0),Ao([le({type:String})],Co.prototype,"orgSlug",void 0),Ao([le({type:Object})],Co.prototype,"launcherStyles",void 0),Ao([le()],Co.prototype,"mobileStyles",void 0),Ao([le({type:Boolean})],Co.prototype,"isMinimized",void 0),Ao([le({type:String})],Co.prototype,"brandColor",void 0),Ao([le({type:String})],Co.prototype,"backgroundColor",void 0),Ao([ue()],Co.prototype,"chatId",void 0),Ao([ue()],Co.prototype,"analytics",void 0),Ao([ue()],Co.prototype,"launcher",void 0),Ao([ue()],Co.prototype,"building",void 0),Ao([ue()],Co.prototype,"designConcept",void 0),Ao([ue()],Co.prototype,"leadSources",void 0),Ao([ue()],Co.prototype,"currentLeadSource",void 0),Ao([ue()],Co.prototype,"featureFlagShowDropdown",void 0),Ao([ue()],Co.prototype,"phoneNumberForSource",void 0),Ao([ue()],Co.prototype,"hasMounted",void 0),Ao([ue()],Co.prototype,"hideLauncher",void 0),Ao([ue()],Co.prototype,"isLoading",void 0),Ao([ue()],Co.prototype,"showTourNextToChat",void 0),Ao([ue()],Co.prototype,"displayPubnubChat",void 0),Ao([ue()],Co.prototype,"myPubnub",void 0),Ao([ue()],Co.prototype,"LeadSourceClient",void 0),Ao([le({type:Number})],Co.prototype,"right",void 0),Ao([le({type:Number})],Co.prototype,"bottom",void 0),Ao([le({type:Number})],Co.prototype,"top",void 0),Ao([le({type:Number})],Co.prototype,"left",void 0),Ao([le({attribute:!0})],Co.prototype,"overrideRentgrata",void 0),Ao([le({attribute:!0})],Co.prototype,"widgetType",void 0),Ao([le()],Co.prototype,"onWidgetLoaded",void 0),Ao([le({attribute:!0})],Co.prototype,"onSstClose",void 0),Ao([ue()],Co.prototype,"enabledChatWidgets",void 0),Ao([ue()],Co.prototype,"webchatConfigHasAutoOpenChat",void 0),Ao([ue()],Co.prototype,"requiresConsent",void 0),Ao([ue()],Co.prototype,"hideMobileFeatures",void 0),Ao([ue()],Co.prototype,"privacyPolicyUrl",void 0),Co=Ao([ae("me-chat")],Co);const Oo=e=>{for(const t of e){const e=document.getElementById(t);if(e)return e}return null},Io=async(e,i,n)=>{var r;if(!i||!e)return;const o=await async function(e){if(!e)return!1;try{return(await t().get(Ki(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-use-override-contact-us-form",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(i);if(!o)return;const a=Oo(["myContactForm","contactus","fpa-myContactForm"]);let s;if(!(a&&a instanceof HTMLFormElement)){const t=document.querySelector("form");return void(window.location.pathname.toLowerCase().includes("contactus")&&No(i,e,"Could not find form",t?{id:t.id}:void 0))}try{if(a.parentElement&&"scheduleTourForm"===a.parentElement.id)return No(i,e,"Form is apart of schedule tour form!")}catch(e){console.error("error",e)}for(let e=0;e<a.elements.length;e++){const t=a.elements[e];if("button"===t.tagName.toLowerCase()&&"fakebutton"===t.getAttribute("data-selenium-id")){s=t;break}if("fpa-contact-submit"===t.getAttribute("id")){s=t;break}}if(!s)return No(i,e,"Could not find submit button");const l=()=>({firstName:Oo(["firstname","txtName","fpa-firstname","Form_FirstName"]),lastName:Oo(["lastname","txtName2","fpa-lastname","Form_LastName"]),email:Oo(["email","txtEmail","fpa-email","Form_Email"]),phone:Oo(["phonenumber","txtPhone","fpa-phonenumber","Form_Phone"]),message:Oo(["message","txtComments","fpa-email","Form_Message"])});if(Object.values(l()).some((e=>null===e))){const t=Object.entries(l()).filter((([,e])=>null===e)).map((([e])=>e));return No(i,e,"Missing the following form elements: "+t.join(", "))}const u=s.textContent,d=s.cloneNode(!0);null===(r=s.parentNode)||void 0===r||r.replaceChild(d,s),d.onclick=async function(t){if(Object.values(l()).forEach((e=>{"true"!==(null==e?void 0:e.getAttribute("aria-required"))||e.value||(e.className="form-control required is-invalid")})),!Object.values(l()).every((e=>null!==e&&!("true"===e.getAttribute("aria-required")&&!e.value)&&("email"!==e.id&&"phonenumber"!==e.id||"true"!==e.getAttribute("aria-invalid")))))return;t.preventDefault(),d.textContent="Processing request...",d.disabled=!0;const r={};Object.entries(l()).forEach((([e,t])=>r[e]=null==t?void 0:t.value));const o=await Sn(e,i);if(!o)return No(i,e,"Could not find building"),null;const s={email_address:r.email,first_name:r.firstName,last_name:r.lastName,phone_number:r.phone,first_message:r.message,building_id:o.id,is_external_form:!0,lead_sources:[...new Set(n?[n,fn(e)]:[fn(e)])]},c=JSON.stringify(s);fetch("https://app.meetelise.com/platformApi/state/create/contactMe",{method:"POST",headers:{"Content-Type":"application/json","building-slug":i,"org-slug":e},body:c}).then((e=>{if(!e.ok)throw new Error(`HTTP error ${e.status}`);return a&&a.reset(),Object.values(l()).forEach((e=>{e&&(e.disabled=!0)})),d.textContent="Submitted",d.disabled=!0,e.json()})).catch((()=>{d.textContent=u}))}},No=(e,t,i,n)=>{const r=JSON.stringify({orgSlug:t,buildingSlug:e,reason:i,url:window.location.href,formIdInfo:n});fetch("https://app.meetelise.com/platformApi/webchat/form-override-error",{method:"POST",headers:{"Content-Type":"application/json","building-slug":e,"org-slug":t},body:r})},Eo=l`
4658
4658
  .chat-launcher {
4659
4659
  position: fixed;
4660
4660
  }
@@ -956,7 +956,6 @@ const overrideContactUsForm = async (
956
956
  "myContactForm",
957
957
  "contactus",
958
958
  "fpa-myContactForm",
959
- "contact-form",
960
959
  ]);
961
960
  let btn = undefined;
962
961