@fluid-topics/ft-search-results 1.1.95 → 1.1.97

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.
@@ -146,7 +146,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:e.extend("--ft-conte
146
146
  <a href="${this.result?ja(this.result):""}" @click=${this.onResultClick} target="${Ka(this.result,(t=this.stateManager)===null||t===void 0?void 0:t.openExternalDocumentInNewTab)}">
147
147
  <ft-typography variant="title" part="text">${(0,Ga.unsafeHTML)(this.selectTitle(this.result))}</ft-typography>
148
148
  </a>
149
- `:zt.nothing}onResultClick(){this.dispatchEvent(new Wt(this.result,this.rank))}selectTitle(t){switch(t.type){case"MAP":return t.map.htmlTitle;case"DOCUMENT":return t.document.htmlTitle;case"TOPIC":return t.topic.htmlTitle}return""}};Ge.elementDefinitions={"ft-typography":X};Ge.styles=Ln;(0,Va.customElement)("ft-search-result-title")(Ge);var Qa=O(T());var Jr=O(B());var Za=O(B()),qa=O(T()),fs={highlightBackgroundColor:qa.FtCssVariableFactory.create("--ft-sra-highlight-background-color","","COLOR","transparent")},Ya=Za.css`
149
+ `:zt.nothing}onResultClick(){this.dispatchEvent(new Wt(this.result,this.rank))}selectTitle(t){switch(t.type){case"MAP":return t.map.htmlTitle;case"DOCUMENT":return t.document.htmlTitle;case"TOPIC":return t.topic.htmlTitle}return""}contentAvailableCallback(t){super.contentAvailableCallback(t),this.shadowRoot.querySelectorAll(".kwicmatch").forEach(o=>o.setAttribute("part","kwicmatch"))}};Ge.elementDefinitions={"ft-typography":X};Ge.styles=Ln;(0,Va.customElement)("ft-search-result-title")(Ge);var Qa=O(T());var Jr=O(B());var Za=O(B()),qa=O(T()),fs={highlightBackgroundColor:qa.FtCssVariableFactory.create("--ft-sra-highlight-background-color","","COLOR","transparent")},Ya=Za.css`
150
150
  .kwicmatch {
151
151
  font-weight: 700;
152
152
  background-color: ${fs.highlightBackgroundColor};
@@ -159,7 +159,7 @@ Also for action icons.`,s.colorGray200),contentGlobalSubtle:e.extend("--ft-conte
159
159
  display: none !important;
160
160
  }
161
161
  </style>
162
- `}selectAbstract(t){switch(t.type){case"MAP":return t.map.htmlExcerpt;case"DOCUMENT":return t.document.htmlExcerpt;case"TOPIC":return t.topic.htmlExcerpt}return""}};Ve.elementDefinitions={"ft-typography":X};Ve.styles=Ya;(0,Qa.customElement)("ft-search-result-abstract")(Ve);var oi=O(T());var Gt=O(B()),Vt=O($()),Zt=O(T());var Ja=O(B());var ei=Ja.css`
162
+ `}selectAbstract(t){switch(t.type){case"MAP":return t.map.htmlExcerpt;case"DOCUMENT":return t.document.htmlExcerpt;case"TOPIC":return t.topic.htmlExcerpt}return""}contentAvailableCallback(t){super.contentAvailableCallback(t),this.shadowRoot.querySelectorAll(".kwicmatch").forEach(o=>o.setAttribute("part","kwicmatch"))}};Ve.elementDefinitions={"ft-typography":X};Ve.styles=Ya;(0,Qa.customElement)("ft-search-result-abstract")(Ve);var oi=O(T());var Gt=O(B()),Vt=O($()),Zt=O(T());var Ja=O(B());var ei=Ja.css`
163
163
  `;var jt=O(T());var ri=O($()),hs=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},eo=Symbol("i18nAttributes"),Ht=Symbol("i18nProperties"),st=Symbol("i18nUnsubs");function Kt(r){var t;class o extends r{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[t]=new Map}get i18nService(){return this.useCustomMessageContexts?Po:Ae}i18n(a,i,...c){var u;if(typeof a=="string")return this.i18nService.resolveMessage(a,i,...c);let d=(u=a.args)!==null&&u!==void 0?u:a.argsProvider?a.argsProvider(this):[];return this.i18nService.resolveMessage(a.context,a.key,...d)}onI18nUpdate(a){var i,c;(i=this[eo])===null||i===void 0||i.forEach((u,d)=>{var p;let h=this.getI18nAttributeValue(d);((p=h?.context)===null||p===void 0?void 0:p.toLowerCase())===a.toLowerCase()&&this.updateI18nAttributeMessage(d,h,u)}),(c=this[Ht])===null||c===void 0||c.forEach((u,d)=>{u.context.toLowerCase()===a.toLowerCase()&&(this[d]=this.i18n(u))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(a,i,c){this[a]={...i,message:this.i18n({context:i.context,key:i.key,...c})}}update(a){var i,c;super.update(a),(i=this[eo])===null||i===void 0||i.forEach((u,d)=>{let p=this.getI18nAttributeValue(d);p?.context&&p.key&&(a.has(d)||u.argsProvider!=null)&&(a.has(d)&&this.addI18nContext(p.context),this.updateI18nAttributeMessage(d,p,u))}),(c=this[Ht])===null||c===void 0||c.forEach((u,d)=>{u.argsProvider!=null&&(this[d]=this.i18n(u))})}getI18nAttributeValue(a){return this[a]}connectedCallback(){var a,i,c,u;super.connectedCallback(),new Set([...(i=(a=this[Ht])===null||a===void 0?void 0:a.values())!==null&&i!==void 0?i:[],...[...(u=(c=this[eo])===null||c===void 0?void 0:c.keys())!==null&&u!==void 0?u:[]].map(d=>this.getI18nAttributeValue(d))].map(d=>d?.context)).forEach(d=>d&&this.addI18nMessages(d))}addI18nMessages(a,i){a=a.toLowerCase(),this[st].has(a)||this[st].set(a,this.i18nService.subscribe(a,()=>this.onI18nUpdate(a))),this.i18nService.prepareContext(a,i??{}),this.onI18nUpdate(a)}addI18nContext(a,i){this.addI18nMessages(typeof a=="string"?a:a.name,i)}disconnectedCallback(){super.disconnectedCallback(),this[st].forEach(a=>a()),this[st].clear()}}return t=st,hs([(0,ri.property)({type:Boolean})],o.prototype,"useCustomMessageContexts",void 0),o}var ti=class extends Kt(jt.FtLitElement){},$t=class extends Kt(jt.FtLitElementRedux){};var ct=function(r,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,t,o,n);else for(var u=r.length-1;u>=0;u--)(c=r[u])&&(i=(a<3?c(i):a>3?c(t,o,i):c(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Q=class extends $t{constructor(){super(),this.editorMode=!1,this.addStore(w)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":Gt.nothing:Gt.html`
164
164
  <span class="ft-i18n">
165
165
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
@@ -191,7 +191,7 @@ Also for action icons.`,u.colorGray200),contentGlobalSubtle:o.extend("--ft-conte
191
191
  <a href="${this.result?Dc(this.result):""}" @click=${this.onResultClick} target="${Bc(this.result,(e=this.stateManager)===null||e===void 0?void 0:e.openExternalDocumentInNewTab)}">
192
192
  <ft-typography variant="title" part="text">${Qt(this.selectTitle(this.result))}</ft-typography>
193
193
  </a>
194
- `:B}onResultClick(){this.dispatchEvent(new go(this.result,this.rank))}selectTitle(e){switch(e.type){case"MAP":return e.map.htmlTitle;case"DOCUMENT":return e.document.htmlTitle;case"TOPIC":return e.topic.htmlTitle}return""}};Ft.elementDefinitions={"ft-typography":ae};Ft.styles=bc;Z("ft-search-result-title")(Ft);var Bd={highlightBackgroundColor:o.create("--ft-sra-highlight-background-color","","COLOR","transparent")},Wc=P`
194
+ `:B}onResultClick(){this.dispatchEvent(new go(this.result,this.rank))}selectTitle(e){switch(e.type){case"MAP":return e.map.htmlTitle;case"DOCUMENT":return e.document.htmlTitle;case"TOPIC":return e.topic.htmlTitle}return""}contentAvailableCallback(e){super.contentAvailableCallback(e),this.shadowRoot.querySelectorAll(".kwicmatch").forEach(r=>r.setAttribute("part","kwicmatch"))}};Ft.elementDefinitions={"ft-typography":ae};Ft.styles=bc;Z("ft-search-result-title")(Ft);var Bd={highlightBackgroundColor:o.create("--ft-sra-highlight-background-color","","COLOR","transparent")},Wc=P`
195
195
  .kwicmatch {
196
196
  font-weight: 700;
197
197
  background-color: ${Bd.highlightBackgroundColor};
@@ -204,7 +204,7 @@ Also for action icons.`,u.colorGray200),contentGlobalSubtle:o.extend("--ft-conte
204
204
  display: none !important;
205
205
  }
206
206
  </style>
207
- `}selectAbstract(e){switch(e.type){case"MAP":return e.map.htmlExcerpt;case"DOCUMENT":return e.document.htmlExcerpt;case"TOPIC":return e.topic.htmlExcerpt}return""}};Mt.elementDefinitions={"ft-typography":ae};Mt.styles=Wc;Z("ft-search-result-abstract")(Mt);var zc=P`
207
+ `}selectAbstract(e){switch(e.type){case"MAP":return e.map.htmlExcerpt;case"DOCUMENT":return e.document.htmlExcerpt;case"TOPIC":return e.topic.htmlExcerpt}return""}contentAvailableCallback(e){super.contentAvailableCallback(e),this.shadowRoot.querySelectorAll(".kwicmatch").forEach(r=>r.setAttribute("part","kwicmatch"))}};Mt.elementDefinitions={"ft-typography":ae};Mt.styles=Wc;Z("ft-search-result-abstract")(Mt);var zc=P`
208
208
  `;var Wd=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},Vi=Symbol("i18nAttributes"),yo=Symbol("i18nProperties"),gr=Symbol("i18nUnsubs");function xo(t){var e;class r extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[e]=new Map}get i18nService(){return this.useCustomMessageContexts?gc:wt}i18n(i,a,...s){var c;if(typeof i=="string")return this.i18nService.resolveMessage(i,a,...s);let l=(c=i.args)!==null&&c!==void 0?c:i.argsProvider?i.argsProvider(this):[];return this.i18nService.resolveMessage(i.context,i.key,...l)}onI18nUpdate(i){var a,s;(a=this[Vi])===null||a===void 0||a.forEach((c,l)=>{var d;let f=this.getI18nAttributeValue(l);((d=f?.context)===null||d===void 0?void 0:d.toLowerCase())===i.toLowerCase()&&this.updateI18nAttributeMessage(l,f,c)}),(s=this[yo])===null||s===void 0||s.forEach((c,l)=>{c.context.toLowerCase()===i.toLowerCase()&&(this[l]=this.i18n(c))}),setTimeout(()=>this.requestUpdate(),0)}updateI18nAttributeMessage(i,a,s){this[i]={...a,message:this.i18n({context:a.context,key:a.key,...s})}}update(i){var a,s;super.update(i),(a=this[Vi])===null||a===void 0||a.forEach((c,l)=>{let d=this.getI18nAttributeValue(l);d?.context&&d.key&&(i.has(l)||c.argsProvider!=null)&&(i.has(l)&&this.addI18nContext(d.context),this.updateI18nAttributeMessage(l,d,c))}),(s=this[yo])===null||s===void 0||s.forEach((c,l)=>{c.argsProvider!=null&&(this[l]=this.i18n(c))})}getI18nAttributeValue(i){return this[i]}connectedCallback(){var i,a,s,c;super.connectedCallback(),new Set([...(a=(i=this[yo])===null||i===void 0?void 0:i.values())!==null&&a!==void 0?a:[],...[...(c=(s=this[Vi])===null||s===void 0?void 0:s.keys())!==null&&c!==void 0?c:[]].map(l=>this.getI18nAttributeValue(l))].map(l=>l?.context)).forEach(l=>l&&this.addI18nMessages(l))}addI18nMessages(i,a){i=i.toLowerCase(),this[gr].has(i)||this[gr].set(i,this.i18nService.subscribe(i,()=>this.onI18nUpdate(i))),this.i18nService.prepareContext(i,a??{}),this.onI18nUpdate(i)}addI18nContext(i,a){this.addI18nMessages(typeof i=="string"?i:i.name,a)}disconnectedCallback(){super.disconnectedCallback(),this[gr].forEach(i=>i()),this[gr].clear()}}return e=gr,Wd([I({type:Boolean})],r.prototype,"useCustomMessageContexts",void 0),r}var Hc=class extends xo(H){},bo=class extends xo(fe){};var yr=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},se=class extends bo{constructor(){super(),this.editorMode=!1,this.addStore(L)}render(){return!this.key||!this.context?this.editorMode?"Select a context and a label key.":B:K`
209
209
  <span class="ft-i18n">
210
210
  ${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-results",
3
- "version": "1.1.95",
3
+ "version": "1.1.97",
4
4
  "description": "Search result list for integrated search component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,12 +19,12 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-search-result-context": "1.1.95",
23
- "@fluid-topics/ft-wc-utils": "1.1.95",
22
+ "@fluid-topics/ft-search-result-context": "1.1.97",
23
+ "@fluid-topics/ft-wc-utils": "1.1.97",
24
24
  "lit": "3.1.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@fluid-topics/public-api": "1.0.73"
28
28
  },
29
- "gitHead": "4c1f271fccd8c64eba90bc7f1a72d6e0ca5ba01d"
29
+ "gitHead": "05bb09e5672b741ee38202a13eb0ed087cd24b0c"
30
30
  }