@coveops/abi 0.1.0 → 0.2.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.
@@ -0,0 +1 @@
1
+ import{r as t,h as i,g as s,f as n}from"./p-0ae1e588.js";import{i as o,n as e,D as a}from"./p-63fd8dcd.js";import{w as h}from"./p-38555fec.js";const r=class{constructor(i){t(this,i),this.pagerUnsubscribe=()=>{},this.statusUnsubscribe=()=>{},this.i18nUnsubscribe=()=>{}}async connectedCallback(){try{await h(),this.bindings=await o(this.host);const t=e(this.bindings.engine);this.pagerController=a(this.bindings.engine),this.statusUnsubscribe=t.subscribe((()=>this.statusState=t.state)),this.pagerUnsubscribe=this.pagerController.subscribe((()=>this.pagerState=this.pagerController.state));const i=()=>n(this);this.bindings.i18n.on("languageChanged",i),this.i18nUnsubscribe=()=>this.bindings.i18n.off("languageChanged",i)}catch(t){console.error(t),this.error=t}}disconnectedCallback(){this.pagerUnsubscribe(),this.statusUnsubscribe(),this.i18nUnsubscribe()}get pages(){return this.pagerState.currentPages.map((t=>this.buildPage(t)))}buildPage(t){const s=this.pagerController.isCurrentPage(t);return i("button",{onClick:()=>{this.pagerController.selectPage(t)}},s?"✓ ":"",t.toLocaleString(this.bindings.i18n.language))}get previous(){return i("button",{onClick:()=>{this.pagerController.previousPage()}},i("atomic-text",{value:"previous"}))}get next(){return i("button",{onClick:()=>{this.pagerController.nextPage()}},i("atomic-text",{value:"next"}))}render(){return this.error?i("p",null,"Error when initializing the component, please view the console for more information."):this.bindings&&this.statusState.hasResults?i("nav",null,this.pagerState.hasPreviousPage&&this.previous,this.pages,this.pagerState.hasNextPage&&this.next):void 0}get host(){return s(this)}};r.style="nav{width:300px;display:flex;justify-content:space-around}button{color:var(--atomic-on-primary);background-color:var(--atomic-primary)}";export{r as sample_component}
@@ -0,0 +1 @@
1
+ import{r as t,h as s,g as i,H as o}from"./p-0ae1e588.js";import{b as e,c,i as n,F as a}from"./p-63fd8dcd.js";class l extends Error{constructor(t){super(`The "${t}" element must be the child of an "atomic-result" element.`)}}const h=class{constructor(s){t(this,s),this.closeFAQModal=()=>{this.modalElement.setAttribute("is-open","false"),this.modalElement.querySelector("#btn-done").removeEventListener("click",this.closeFAQModal)}}async connectedCallback(){var t,s;try{this.bindings=await n(this.host),this.result=await(s=this.host,new Promise(((t,i)=>{const o=e("atomic/resolveResult",(s=>t(s)));s.dispatchEvent(o),c(s,"atomic-result")||i(new l(s.nodeName.toLowerCase()))}))),this.modalElement=null===(t=this.bindings)||void 0===t?void 0:t.interfaceElement.querySelector("#faq-modal")}catch(t){console.error(t),this.host.remove()}}openFAQModal(t){var s,i,o,e;if(this.bindings){const{logClickEvent:s}=a(this.bindings.engine);this.bindings.engine.dispatch(s({evt:"documentQuickview",result:t}))}this.modalElement.source=this.host,this.modalElement.querySelector("[slot=header]").children[0].innerHTML="Question: "+((null===(s=this.result)||void 0===s?void 0:s.title)||"");const c=this.modalElement.querySelector("[slot=body]");c.innerHTML="";const n=document.createElement("div");n.style.display="flex",n.style.gap="16px";const l=document.createElement("div");l.innerText="Answer:",n.appendChild(l);const h=(null===(i=this.result)||void 0===i?void 0:i.raw.answer)||"",r=document.createElement("div");r.innerHTML=h,n.appendChild(r),c.appendChild(n);const d=document.createElement("div");d.innerHTML="Category: "+((null===(o=this.result)||void 0===o?void 0:o.raw.category)||""),c.appendChild(d);const u=document.createElement("div"),m=(null===(e=this.result)||void 0===e?void 0:e.raw.newmoreinfo)||"";u.innerHTML=`Link: <a href="${m}" target="_blank">${m}</a>`,c.appendChild(u),this.modalElement.querySelector("#faq-modal-close").addEventListener("click",this.closeFAQModal),this.modalElement.setAttribute("is-open","true")}render(){if(this.result)return s(o,{className:"clickable-host",onClick:()=>this.openFAQModal(this.result)},this.result.title)}get host(){return i(this)}};h.style="b{color:var(--atomic-primary)}";export{h as faq_popup_component}
@@ -1,4 +1,4 @@
1
- <atomic-search-interface fields-to-include='[
1
+ <atomic-search-interface id="search" fields-to-include='[
2
2
  "sfcaseid", "sfppcustomlinkcpplinkurlc", "sfcaseppstatus", "sfcaseppstatusc", "sfcasestatus",
3
3
  "sfppcustomlinkcppiconc", "sfcasenumber", "sfcaseppprocessc", "sfppleaveabsencecppactiontypec",
4
4
  "sfppleaveabsencecppactionreasonc", "sfppleaveabsencecppenddatecfq", "sfppleaveabsencecppenddatecfy",