@fluid-topics/ft-search-facet 0.3.62 → 0.3.64
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/build/ft-search-facet.js
CHANGED
|
@@ -20,6 +20,7 @@ export class FtSearchFacet extends withI18n(FtSearchComponent) {
|
|
|
20
20
|
super(...arguments);
|
|
21
21
|
this.facetId = "";
|
|
22
22
|
this.maxValues = 7;
|
|
23
|
+
this.raiseSelectedOptions = false;
|
|
23
24
|
this.facets = [];
|
|
24
25
|
}
|
|
25
26
|
setSearchStateManager(stateManager) {
|
|
@@ -34,15 +35,15 @@ export class FtSearchFacet extends withI18n(FtSearchComponent) {
|
|
|
34
35
|
let facet = this.facets.find(f => f.key == this.facetId);
|
|
35
36
|
if (facet) {
|
|
36
37
|
return html `
|
|
37
|
-
<div class="ft-search-facet--label">
|
|
38
|
-
<ft-typography variant="button">${facet.label}</ft-typography>
|
|
38
|
+
<div part="label" class="ft-search-facet--label">
|
|
39
|
+
<ft-typography variant="button" part="label-text">${facet.label}</ft-typography>
|
|
39
40
|
</div>
|
|
40
41
|
<ft-filter
|
|
41
42
|
part="filter"
|
|
42
43
|
.exportpartsPrefixes=${["filter"]}
|
|
43
44
|
id="${this.facetId}"
|
|
44
45
|
?multivalued=${facet.multiSelectionable}
|
|
45
|
-
raiseSelectedOptions
|
|
46
|
+
?raiseSelectedOptions=${this.raiseSelectedOptions}
|
|
46
47
|
.options=${convertFacetToFilterOptions(facet)}
|
|
47
48
|
.displayedValuesLimit=${this.maxValues}
|
|
48
49
|
filterPlaceHolder="${searchFacetContext.messages.filterInputPlaceHolder(facet.label)}"
|
|
@@ -81,6 +82,9 @@ __decorate([
|
|
|
81
82
|
__decorate([
|
|
82
83
|
property({ type: Number })
|
|
83
84
|
], FtSearchFacet.prototype, "maxValues", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
property({ type: Boolean })
|
|
87
|
+
], FtSearchFacet.prototype, "raiseSelectedOptions", void 0);
|
|
84
88
|
__decorate([
|
|
85
89
|
redux({ store: "search" })
|
|
86
90
|
], FtSearchFacet.prototype, "request", void 0);
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* @license
|
|
5
5
|
* Copyright 2017 Google LLC
|
|
6
6
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
-
*/;var a;const h=window,p=h.trustedTypes,c=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,f=`lit$${(Math.random()+"").slice(9)}$`,d="?"+f,u=`<${d}>`,v=document,b=(t="")=>v.createComment(t),
|
|
7
|
+
*/;var a;const h=window,p=h.trustedTypes,c=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,f=`lit$${(Math.random()+"").slice(9)}$`,d="?"+f,u=`<${d}>`,v=document,b=(t="")=>v.createComment(t),x=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,$=/>/g,w=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),k=/'/g,S=/"/g,z=/^(?:script|style|textarea|title)$/i,O=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),C=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),j=new WeakMap,I=v.createTreeWalker(v,129,null,!1),M=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=y;for(let i=0;i<e;i++){const e=t[i];let l,a,h=-1,p=0;for(;p<e.length&&(r.lastIndex=p,a=r.exec(e),null!==a);)p=r.lastIndex,r===y?"!--"===a[1]?r=m:void 0!==a[1]?r=$:void 0!==a[2]?(z.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=w):void 0!==a[3]&&(r=w):r===w?">"===a[0]?(r=null!=s?s:y,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?w:'"'===a[3]?S:k):r===S||r===k?r=w:r===m||r===$?r=y:(r=w,s=void 0);const c=r===w&&t[i+1].startsWith("/>")?" ":"";n+=r===y?e+u:h>=0?(o.push(l),e.slice(0,h)+"$lit$"+e.slice(h)+f+c):e+f+(-2===h?(o.push(void 0),i):c)}const l=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==c?c.createHTML(l):l,o]};class E{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,h]=M(t,i);if(this.el=E.createElement(a,e),I.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=I.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(f)){const e=h[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(f),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?D:"?"===i[1]?F:"@"===i[1]?_:T})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(z.test(o.tagName)){const t=o.textContent.split(f),i=t.length-1;if(i>0){o.textContent=p?p.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],b()),I.nextNode(),l.push({type:2,index:++s});o.append(t[i],b())}}}else if(8===o.nodeType)if(o.data===d)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(f,t+1));)l.push({type:7,index:s}),t+=f.length-1}s++}}static createElement(t,i){const e=v.createElement("template");return e.innerHTML=t,e}}function L(t,i,e=t,o){var s,n,r,l;if(i===C)return i;let a=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const h=x(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=L(t,a._$AS(t,i.values),a,o)),i}class N{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:v).importNode(e,!0);I.currentNode=s;let n=I.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new A(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new R(n,this,t)),this.u.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=I.nextNode(),r++)}return s}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class A{constructor(t,i,e,o){var s;this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=L(this,t,i),x(t)?t===B||null==t||""===t?(this._$AH!==B&&this._$AR(),this._$AH=B):t!==this._$AH&&t!==C&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>g(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==B&&x(this._$AH)?this._$AA.nextSibling.data=t:this.T(v.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=E.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.p(e);else{const t=new N(s,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=j.get(t.strings);return void 0===i&&j.set(t.strings,i=new E(t)),i}k(t){g(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new A(this.O(b()),this.O(b()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cm=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class T{constructor(t,i,e,o,s){this.type=1,this._$AH=B,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=B}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=L(this,t,i,0),n=!x(t)||t!==this._$AH&&t!==C,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=L(this,o[e+r],i,r),l===C&&(l=this._$AH[r]),n||(n=!x(l)||l!==this._$AH[r]),l===B?t=B:t!==B&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class D extends T{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===B?void 0:t}}const U=p?p.emptyScript:"";class F extends T{constructor(){super(...arguments),this.type=4}j(t){t&&t!==B?this.element.setAttribute(this.name,U):this.element.removeAttribute(this.name)}}class _ extends T{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=L(this,t,i,0))&&void 0!==e?e:B)===C)return;const o=this._$AH,s=t===B&&o!==B||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==B&&(o===B||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class R{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){L(this,t)}}const P=h.litHtmlPolyfillSupport;null==P||P(E,A),(null!==(a=h.litHtmlVersions)&&void 0!==a?a:h.litHtmlVersions=[]).push("2.4.0");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t._$litStatic$},W=t=>({_$litStatic$:t,r:V}),Z=new Map,K=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=i[h];h<o&&void 0!==(n=e[h],s=H(n));)a+=s+i[++h],p=!0;l.push(n),r.push(a),h++}if(h===o&&r.push(i[o]),p){const t=r.join("$$lit$$");void 0===(i=Z.get(t))&&(r.raw=r,Z.set(t,i=r)),e=l}return t(i,...e)})(O);var G;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(G||(G={}));const q=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),X=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),Y={fontFamily:X,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},J=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",q),Q=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",Y.fontSize,"20px"),tt=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",Y.fontWeight,"normal"),it=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",Y.letterSpacing,"0.15px"),et=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",Y.lineHeight,"1.2"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",Y.textTransform,"inherit"),st=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",q),nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",Y.fontSize,"14px"),rt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",Y.fontWeight,"normal"),lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",Y.letterSpacing,"0.105px"),at=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",Y.lineHeight,"1.7"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",Y.textTransform,"inherit"),pt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",X),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",Y.fontSize,"16px"),ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",Y.fontWeight,"600"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",Y.letterSpacing,"0.144px"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",Y.lineHeight,"1.5"),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",Y.textTransform,"inherit"),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",X),
|
|
13
|
+
const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t._$litStatic$},W=t=>({_$litStatic$:t,r:V}),Z=new Map,K=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=i[h];h<o&&void 0!==(n=e[h],s=H(n));)a+=s+i[++h],p=!0;l.push(n),r.push(a),h++}if(h===o&&r.push(i[o]),p){const t=r.join("$$lit$$");void 0===(i=Z.get(t))&&(r.raw=r,Z.set(t,i=r)),e=l}return t(i,...e)})(O);var G;!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(G||(G={}));const q=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),X=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),Y={fontFamily:X,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},J=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",q),Q=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",Y.fontSize,"20px"),tt=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",Y.fontWeight,"normal"),it=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",Y.letterSpacing,"0.15px"),et=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",Y.lineHeight,"1.2"),ot=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",Y.textTransform,"inherit"),st=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",q),nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",Y.fontSize,"14px"),rt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",Y.fontWeight,"normal"),lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",Y.letterSpacing,"0.105px"),at=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",Y.lineHeight,"1.7"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",Y.textTransform,"inherit"),pt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",X),ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",Y.fontSize,"16px"),ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",Y.fontWeight,"600"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",Y.letterSpacing,"0.144px"),ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",Y.lineHeight,"1.5"),vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",Y.textTransform,"inherit"),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",X),xt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",Y.fontSize,"14px"),gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",Y.fontWeight,"normal"),yt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",Y.letterSpacing,"0.098px"),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",Y.lineHeight,"1.7"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",Y.textTransform,"inherit"),wt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",X),kt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",Y.fontSize,"16px"),St=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",Y.fontWeight,"normal"),zt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",Y.letterSpacing,"0.496px"),Ot=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",Y.lineHeight,"1.5"),Ct=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",Y.textTransform,"inherit"),Bt={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",X),fontSize:i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",Y.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",Y.fontWeight,"normal"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",Y.letterSpacing,"0.252px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",Y.lineHeight,"1.4"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",Y.textTransform,"inherit")},jt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",X),It=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",Y.fontSize,"12px"),Mt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",Y.fontWeight,"normal"),Et=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",Y.letterSpacing,"0.396px"),Lt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",Y.lineHeight,"1.33"),Nt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",Y.textTransform,"inherit"),At=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",X),Tt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",Y.fontSize,"10px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",Y.fontWeight,"normal"),Ut=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",Y.letterSpacing,"0.33px"),Ft=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",Y.lineHeight,"1.6"),_t=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",Y.textTransform,"inherit"),Rt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",X),Pt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",Y.fontSize,"10px"),Vt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",Y.fontWeight,"normal"),Ht=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",Y.letterSpacing,"1.5px"),Wt=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",Y.lineHeight,"1.6"),Zt=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",Y.textTransform,"uppercase"),Kt={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",X),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",Y.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",Y.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",Y.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",Y.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",Y.textTransform,"uppercase")},Gt=e.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
15
|
font-family: ${J};
|
|
16
16
|
font-size: ${Q};
|
|
@@ -40,8 +40,8 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
40
40
|
`,Yt=e.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
42
|
font-family: ${bt};
|
|
43
|
-
font-size: ${
|
|
44
|
-
font-weight: ${
|
|
43
|
+
font-size: ${xt};
|
|
44
|
+
font-weight: ${gt};
|
|
45
45
|
letter-spacing: ${yt};
|
|
46
46
|
line-height: ${mt};
|
|
47
47
|
text-transform: ${$t};
|
|
@@ -58,16 +58,16 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
58
58
|
}
|
|
59
59
|
`,Qt=e.css`
|
|
60
60
|
.ft-typography--body2 {
|
|
61
|
-
font-family: ${
|
|
62
|
-
font-size: ${
|
|
63
|
-
font-weight: ${
|
|
64
|
-
letter-spacing: ${
|
|
65
|
-
line-height: ${
|
|
66
|
-
text-transform: ${
|
|
61
|
+
font-family: ${Bt.fontFamily};
|
|
62
|
+
font-size: ${Bt.fontSize};
|
|
63
|
+
font-weight: ${Bt.fontWeight};
|
|
64
|
+
letter-spacing: ${Bt.letterSpacing};
|
|
65
|
+
line-height: ${Bt.lineHeight};
|
|
66
|
+
text-transform: ${Bt.textTransform};
|
|
67
67
|
}
|
|
68
68
|
`,ti=e.css`
|
|
69
69
|
.ft-typography--caption {
|
|
70
|
-
font-family: ${
|
|
70
|
+
font-family: ${jt};
|
|
71
71
|
font-size: ${It};
|
|
72
72
|
font-weight: ${Mt};
|
|
73
73
|
letter-spacing: ${Et};
|
|
@@ -201,7 +201,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
201
201
|
opacity: ${hi.opacityContentOnSurfacePressed};
|
|
202
202
|
transform: translate(-50%, -50%) scale(1);
|
|
203
203
|
}
|
|
204
|
-
`;var
|
|
204
|
+
`;var xi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class gi extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new i.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new i.Debouncer(10),this.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),n=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
|
|
205
205
|
<style>
|
|
206
206
|
.ft-ripple .ft-ripple--effect,
|
|
207
207
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -218,7 +218,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
218
218
|
<div class="ft-ripple--background"></div>
|
|
219
219
|
<div class="ft-ripple--effect"></div>
|
|
220
220
|
</div>
|
|
221
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}))}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}
|
|
221
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}))}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}gi.elementDefinitions={},gi.styles=bi,xi([o.property({type:Boolean})],gi.prototype,"primary",void 0),xi([o.property({type:Boolean})],gi.prototype,"secondary",void 0),xi([o.property({type:Boolean})],gi.prototype,"unbounded",void 0),xi([o.property({type:Boolean})],gi.prototype,"activated",void 0),xi([o.property({type:Boolean})],gi.prototype,"selected",void 0),xi([o.property({type:Boolean})],gi.prototype,"disabled",void 0),xi([o.state()],gi.prototype,"hovered",void 0),xi([o.state()],gi.prototype,"focused",void 0),xi([o.state()],gi.prototype,"pressed",void 0),xi([o.state()],gi.prototype,"rippling",void 0),xi([o.state()],gi.prototype,"rippleSize",void 0),xi([o.state()],gi.prototype,"originX",void 0),xi([o.state()],gi.prototype,"originY",void 0),xi([o.query(".ft-ripple")],gi.prototype,"ripple",void 0),xi([o.query(".ft-ripple--effect")],gi.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(gi);const yi=i.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),mi=i.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),$i=i.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),wi=i.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),ki=i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusS,"Design system"),Si=i.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),zi=e.css`
|
|
222
222
|
.ft-tooltip--container {
|
|
223
223
|
display: block;
|
|
224
224
|
position: relative;
|
|
@@ -268,7 +268,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
268
268
|
</div>
|
|
269
269
|
</div>
|
|
270
270
|
</div>
|
|
271
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${i.width}px, ${Si})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}Ci.elementDefinitions={"ft-typography":ri},Ci.styles=zi,Oi([o.property()],Ci.prototype,"text",void 0),Oi([o.property({type:Boolean})],Ci.prototype,"manual",void 0),Oi([o.property({type:Boolean})],Ci.prototype,"inline",void 0),Oi([o.property({type:Number})],Ci.prototype,"delay",void 0),Oi([o.property()],Ci.prototype,"position",void 0),Oi([o.queryAssignedNodes("",!0)],Ci.prototype,"slotNodes",void 0),Oi([o.query(".ft-tooltip--container")],Ci.prototype,"container",void 0),Oi([o.query("slot")],Ci.prototype,"target",void 0),Oi([o.query(".ft-tooltip")],Ci.prototype,"tooltip",void 0),Oi([o.query(".ft-tooltip--content")],Ci.prototype,"tooltipContent",void 0),Oi([o.state()],Ci.prototype,"visible",void 0),i.customElement("ft-tooltip")(Ci);const
|
|
271
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=0);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${i.width}px, ${Si})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}Ci.elementDefinitions={"ft-typography":ri},Ci.styles=zi,Oi([o.property()],Ci.prototype,"text",void 0),Oi([o.property({type:Boolean})],Ci.prototype,"manual",void 0),Oi([o.property({type:Boolean})],Ci.prototype,"inline",void 0),Oi([o.property({type:Number})],Ci.prototype,"delay",void 0),Oi([o.property()],Ci.prototype,"position",void 0),Oi([o.queryAssignedNodes("",!0)],Ci.prototype,"slotNodes",void 0),Oi([o.query(".ft-tooltip--container")],Ci.prototype,"container",void 0),Oi([o.query("slot")],Ci.prototype,"target",void 0),Oi([o.query(".ft-tooltip")],Ci.prototype,"tooltip",void 0),Oi([o.query(".ft-tooltip--content")],Ci.prototype,"tooltipContent",void 0),Oi([o.state()],Ci.prototype,"visible",void 0),i.customElement("ft-tooltip")(Ci);const Bi={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},ji=e.css`
|
|
272
272
|
:host {
|
|
273
273
|
line-height: 0;
|
|
274
274
|
}
|
|
@@ -277,8 +277,8 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
277
277
|
display: inline-block;
|
|
278
278
|
position: relative;
|
|
279
279
|
|
|
280
|
-
width: ${
|
|
281
|
-
height: ${
|
|
280
|
+
width: ${Bi.size};
|
|
281
|
+
height: ${Bi.size};
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
.ft-loader div {
|
|
@@ -287,7 +287,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
287
287
|
width: 25%;
|
|
288
288
|
height: 25%;
|
|
289
289
|
border-radius: 50%;
|
|
290
|
-
background: ${
|
|
290
|
+
background: ${Bi.color};
|
|
291
291
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
292
292
|
}
|
|
293
293
|
|
|
@@ -334,7 +334,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
334
334
|
transform: translate(0, 0);
|
|
335
335
|
}
|
|
336
336
|
100% {
|
|
337
|
-
transform: translate(calc(0.35 * ${
|
|
337
|
+
transform: translate(calc(0.35 * ${Bi.size}), 0);
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
`;class Ii extends i.FtLitElement{render(){return e.html`
|
|
@@ -344,7 +344,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
344
344
|
<div></div>
|
|
345
345
|
<div></div>
|
|
346
346
|
</div>
|
|
347
|
-
`}}var Mi,Ei;Ii.styles=
|
|
347
|
+
`}}var Mi,Ei;Ii.styles=ji,i.customElement("ft-loader")(Ii),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(Mi||(Mi={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Ei||(Ei={})),new Map([...["abw"].map((t=>[t,Ei.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,Ei.AUDIO])),...["avi"].map((t=>[t,Ei.AVI])),...["chm","xhs"].map((t=>[t,Ei.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,Ei.CODE])),...["csv"].map((t=>[t,Ei.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ei.DITA])),...["epub"].map((t=>[t,Ei.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ei.EXCEL])),...["flac"].map((t=>[t,Ei.FLAC])),...["gif"].map((t=>[t,Ei.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ei.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ei.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Ei.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ei.JPEG])),...["json"].map((t=>[t,Ei.JSON])),...["m4a","m4p"].map((t=>[t,Ei.M4A])),...["mov","qt"].map((t=>[t,Ei.MOV])),...["mp3"].map((t=>[t,Ei.MP3])),...["mp4","m4v"].map((t=>[t,Ei.MP4])),...["ogg","oga"].map((t=>[t,Ei.OGG])),...["pdf","ps"].map((t=>[t,Ei.PDF])),...["png"].map((t=>[t,Ei.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ei.POWERPOINT])),...["rar"].map((t=>[t,Ei.RAR])),...["stp"].map((t=>[t,Ei.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ei.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,Ei.VIDEO])),...["wav"].map((t=>[t,Ei.WAV])),...["wma"].map((t=>[t,Ei.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ei.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ei.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ei.YAML])),...["zip"].map((t=>[t,Ei.ZIP]))]);const Li={size:i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},Ni=e.css`
|
|
348
348
|
:host, i.ft-icon {
|
|
349
349
|
display: inline-flex;
|
|
350
350
|
align-items: center;
|
|
@@ -516,8 +516,8 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
ft-loader {
|
|
519
|
-
${i.setVariable(
|
|
520
|
-
${i.setVariable(
|
|
519
|
+
${i.setVariable(Bi.size,Fi.iconSize)};
|
|
520
|
+
${i.setVariable(Bi.color,"var(--ft-button-internal-color)")};
|
|
521
521
|
}
|
|
522
522
|
`];var Hi=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Wi extends i.FtLitElement{constructor(){super(...arguments),this.role="button",this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.iconVariant=Ai.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
523
523
|
<button part="button"
|
|
@@ -542,7 +542,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
542
542
|
</ft-tooltip>
|
|
543
543
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
544
544
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
545
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Wi.elementDefinitions={"ft-ripple":
|
|
545
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Wi.elementDefinitions={"ft-ripple":gi,"ft-tooltip":Ci,"ft-typography":ri,"ft-icon":Di,"ft-loader":Ii},Wi.styles=[i.safariEllipsisFix,Vi],Hi([o.property({type:String,reflect:!0})],Wi.prototype,"role",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"primary",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"outlined",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"disabled",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"dense",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"round",void 0),Hi([o.property({type:String})],Wi.prototype,"label",void 0),Hi([o.property({type:String})],Wi.prototype,"icon",void 0),Hi([o.property({type:String})],Wi.prototype,"iconVariant",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"trailingIcon",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"loading",void 0),Hi([o.property({type:String})],Wi.prototype,"tooltipPosition",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"hideTooltip",void 0),Hi([o.property({type:Boolean})],Wi.prototype,"forceTooltip",void 0),Hi([o.query(".ft-button")],Wi.prototype,"button",void 0),Hi([o.query(".ft-button--label slot")],Wi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Wi);const Zi=i.FtCssVariableFactory.extend("--ft-checkbox-text-color",i.designSystemVariables.colorOnSurfaceHigh),Ki=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),Gi=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),qi=i.FtCssVariableFactory.extend("--ft-checkbox-border-color",i.designSystemVariables.colorOnSurfaceMedium),Xi=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),Yi=e.css`
|
|
546
546
|
* {
|
|
547
547
|
box-sizing: border-box;
|
|
548
548
|
}
|
|
@@ -645,7 +645,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
645
645
|
<slot></slot>
|
|
646
646
|
</ft-typography>
|
|
647
647
|
</label>
|
|
648
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}}Qi.elementDefinitions={"ft-ripple":
|
|
648
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}}Qi.elementDefinitions={"ft-ripple":gi,"ft-typography":ri},Qi.styles=Yi,Ji([o.property()],Qi.prototype,"name",void 0),Ji([o.property({type:Boolean,reflect:!0})],Qi.prototype,"checked",void 0),Ji([o.property({type:Boolean})],Qi.prototype,"indeterminate",void 0),Ji([o.property({type:Boolean})],Qi.prototype,"disabled",void 0),Ji([o.query(".ft-checkbox")],Qi.prototype,"container",void 0),Ji([o.query("ft-ripple")],Qi.prototype,"ripple",void 0),i.customElement("ft-checkbox")(Qi);const te=i.FtCssVariableFactory.extend("--ft-radio-text-color",i.designSystemVariables.colorOnSurfaceHigh),ie=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),ee=(i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),i.FtCssVariableFactory.extend("--ft-radio-border-color",i.designSystemVariables.colorOnSurfaceMedium)),oe=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),se=e.css`
|
|
649
649
|
* {
|
|
650
650
|
box-sizing: border-box;
|
|
651
651
|
}
|
|
@@ -749,7 +749,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
749
749
|
</ft-typography>
|
|
750
750
|
</label>
|
|
751
751
|
</div>
|
|
752
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new re(this.value,this.checked))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new re(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}le.elementDefinitions={"ft-ripple":
|
|
752
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new re(this.value,this.checked))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new re(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}le.elementDefinitions={"ft-ripple":gi,"ft-typography":ri},le.styles=se,ne([o.property()],le.prototype,"value",void 0),ne([o.property()],le.prototype,"name",void 0),ne([o.property({type:Boolean,reflect:!0})],le.prototype,"checked",void 0),ne([o.property({type:Boolean})],le.prototype,"disabled",void 0),ne([o.query(".ft-radio")],le.prototype,"container",void 0),ne([o.query("ft-ripple")],le.prototype,"ripple",void 0),ne([o.query("input")],le.prototype,"input",void 0);const ae=e.css`
|
|
753
753
|
:host {
|
|
754
754
|
display: contents;
|
|
755
755
|
}
|
|
@@ -759,7 +759,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
759
759
|
@keydown=${this.onKeyDown}
|
|
760
760
|
@focusin=${this.focusCurrentValue}
|
|
761
761
|
></slot>
|
|
762
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((i=>i.checked=t.detail.value===i.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let i=this.findFtRadio(t),e=this.radioButtons.indexOf(i)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let i=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[i>this.radioButtons.length-1?0:i].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}pe.elementDefinitions={},pe.styles=ae,he([o.property()],pe.prototype,"name",void 0),he([o.queryAssignedElements()],pe.prototype,"radioButtons",void 0),i.customElement("ft-radio")(le),i.customElement("ft-radio-group")(pe);const ce={borderRadiusM:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusM,"Design system"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:i.FtCssVariableFactory.external(
|
|
762
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((i=>i.checked=t.detail.value===i.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let i=this.findFtRadio(t),e=this.radioButtons.indexOf(i)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let i=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[i>this.radioButtons.length-1?0:i].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}pe.elementDefinitions={},pe.styles=ae,he([o.property()],pe.prototype,"name",void 0),he([o.queryAssignedElements()],pe.prototype,"radioButtons",void 0),i.customElement("ft-radio")(le),i.customElement("ft-radio-group")(pe);const ce={borderRadiusM:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusM,"Design system"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:i.FtCssVariableFactory.external(Bt.fontFamily,"Body2 typography"),fontSize:i.FtCssVariableFactory.external(Bt.fontSize,"Body2 typography"),fontWeight:i.FtCssVariableFactory.external(Bt.fontWeight,"Body2 typography"),letterSpacing:i.FtCssVariableFactory.external(Bt.letterSpacing,"Body2 typography"),lineHeight:i.FtCssVariableFactory.external(Bt.lineHeight,"Body2 typography"),textTransform:i.FtCssVariableFactory.external(Bt.textTransform,"Body2 typography")},fe=e.css`
|
|
763
763
|
.ft-filter-level--container {
|
|
764
764
|
display: flex;
|
|
765
765
|
flex-direction: column;
|
|
@@ -889,7 +889,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
889
889
|
@change=${t=>t.stopPropagation()}>
|
|
890
890
|
${t.renderOption?t.renderOption:t.label}
|
|
891
891
|
</ft-radio>
|
|
892
|
-
`}onRadioKeyUp(t,i){i.selected&&" "===t.key&&this.optionsChanged(t,i)}optionsChanged(t,i){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:i}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}ue.elementDefinitions={"ft-button":Wi,"ft-ripple":
|
|
892
|
+
`}onRadioKeyUp(t,i){i.selected&&" "===t.key&&this.optionsChanged(t,i)}optionsChanged(t,i){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:i}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}ue.elementDefinitions={"ft-button":Wi,"ft-ripple":gi,"ft-typography":ri,"ft-checkbox":Qi,"ft-icon":Di,"ft-radio":le},ue.styles=fe,de([o.property({type:String})],ue.prototype,"id",void 0),de([o.property({type:Object})],ue.prototype,"parent",void 0),de([o.property({type:Array})],ue.prototype,"options",void 0),de([o.property({type:Boolean})],ue.prototype,"multivalued",void 0),de([o.property({type:Boolean})],ue.prototype,"disabled",void 0),de([o.property({type:Boolean})],ue.prototype,"hideSelectedOptions",void 0),de([o.property({type:Boolean})],ue.prototype,"preventNavigation",void 0),de([o.property({type:String})],ue.prototype,"filter",void 0),de([o.property({type:String})],ue.prototype,"moreValuesButtonLabel",void 0),de([o.property({type:String})],ue.prototype,"noValuesLabel",void 0),de([o.property({type:Number})],ue.prototype,"displayedValuesLimit",void 0),de([o.query(".ft-filter-level--container")],ue.prototype,"container",void 0),de([o.state()],ue.prototype,"displayedPages",void 0);const ve={buttonsColor:i.FtCssVariableFactory.extend("--ft-snap-scroll-buttons-color",i.designSystemVariables.colorPrimary),buttonsZIndex:i.FtCssVariableFactory.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:i.FtCssVariableFactory.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system")},be=e.css`
|
|
893
893
|
.ft-snap-scroll {
|
|
894
894
|
box-sizing: border-box;
|
|
895
895
|
position: relative;
|
|
@@ -1014,7 +1014,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1014
1014
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1015
1015
|
background-color: ${ve.colorSurface};
|
|
1016
1016
|
}
|
|
1017
|
-
`;var
|
|
1017
|
+
`;var xe=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class ge extends CustomEvent{constructor(t,i){super("current-element-change",{detail:{index:t,element:i}})}}class ye extends i.FtLitElement{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new i.Debouncer(200),this.updateScrollDebouncer=new i.Debouncer(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let i=this.elements[t];if(i){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,e=this.contentSlot[this.scrollAttribute]+this.prevSize;(i[this.offsetAttribute]<e||i[this.offsetAttribute]+i[this.sizeAttribute]>t)&&this.scrollToElement(i)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=n.classMap({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":i.isSafari}),o=this.controls&&this.withScroll;return e.html`
|
|
1018
1018
|
<div part="container" class="${t}">
|
|
1019
1019
|
<ft-button
|
|
1020
1020
|
class="ft-snap-scroll--previous"
|
|
@@ -1038,7 +1038,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1038
1038
|
@click=${this.next}
|
|
1039
1039
|
></ft-button>
|
|
1040
1040
|
</div>
|
|
1041
|
-
`}updated(t){var i;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(i=this.listenedContainer)||void 0===i||i.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
1041
|
+
`}updated(t){var i;super.updated(t),this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer!==this.contentSlot&&(this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(i=this.listenedContainer)||void 0===i||i.addEventListener("scroll",this.updateScrollCallback))),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new ge(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const i=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<i&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var i,e;t&&(this.horizontal?null===(i=this.contentSlot)||void 0===i||i.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(e=this.contentSlot)||void 0===e||e.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,i;this.elements=null!==(i=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==i?i:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let i=0;i<this.elements.length;i++)(t<0||this.getDistanceFromStart(this.elements[i])<this.getDistanceFromStart(this.elements[t]))&&(t=i);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const i=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-i)}}ye.elementDefinitions={"ft-button":Wi},ye.styles=be,xe([o.property({type:Boolean})],ye.prototype,"horizontal",void 0),xe([o.property({type:Boolean})],ye.prototype,"hideScrollbar",void 0),xe([o.property({type:Boolean})],ye.prototype,"controls",void 0),xe([o.property({type:Boolean})],ye.prototype,"limitSize",void 0),xe([o.state()],ye.prototype,"elements",void 0),xe([o.state()],ye.prototype,"currentElement",void 0),xe([o.state()],ye.prototype,"withScroll",void 0),xe([o.state()],ye.prototype,"startReached",void 0),xe([o.state()],ye.prototype,"endReached",void 0),xe([o.query(".ft-snap-scroll--content")],ye.prototype,"contentSlot",void 0),i.customElement("ft-snap-scroll")(ye);const me=i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),$e=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),we=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),ke=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),Se=i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),ze=i.FtCssVariableFactory.external(i.designSystemVariables.transitionDuration,"Design system"),Oe=i.FtCssVariableFactory.external(i.designSystemVariables.transitionTimingFunction,"Design system"),Ce=[ti,e.css`
|
|
1042
1042
|
:host {
|
|
1043
1043
|
display: flex;
|
|
1044
1044
|
max-height: 100%;
|
|
@@ -1150,7 +1150,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1150
1150
|
slot {
|
|
1151
1151
|
display: none;
|
|
1152
1152
|
}
|
|
1153
|
-
`];var
|
|
1153
|
+
`];var Be=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class je extends CustomEvent{constructor(t){super("change",{detail:t})}}class Ie extends i.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new i.Debouncer(300),this.changeDebouncer=new i.Debouncer(10)}get flatOptions(){return li(this.options,(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){var t,i;const o=this.flatOptions.some((t=>t.selected)),s=this.withScroll||this.filter||null!==(i=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==i&&i,n=this.filterPlaceHolder.replace("{0}",this.label);return e.html`
|
|
1154
1154
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1155
1155
|
part="container">
|
|
1156
1156
|
${this.label||o?e.html`
|
|
@@ -1220,25 +1220,25 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1220
1220
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1221
1221
|
noValuesLabel="${this.noValuesLabel}"
|
|
1222
1222
|
></ft-filter-level>
|
|
1223
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var i;t.stopPropagation();const e=this.flatOptions.find((i=>i.value===t.detail.value));e.selected=!e.selected;const o=t=>{var i;t!==e&&(t.selected=!1),null===(i=t.subOptions)||void 0===i||i.forEach(o)};this.multivalued?null===(i=e.subOptions)||void 0===i||i.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.dispatchEvent(new
|
|
1223
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var i;t.stopPropagation();const e=this.flatOptions.find((i=>i.value===t.detail.value));e.selected=!e.selected;const o=t=>{var i;t!==e&&(t.selected=!1),null===(i=t.subOptions)||void 0===i||i.forEach(o)};this.multivalued?null===(i=e.subOptions)||void 0===i||i.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.dispatchEvent(new je(this.selectedValues)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,i;this.filter=null!==(i=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==i?i:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}Ie.elementDefinitions={"ft-button":Wi,"ft-filter-level":ue,"ft-snap-scroll":ye,"ft-typography":ri},Ie.styles=Ce,Be([o.property({type:String})],Ie.prototype,"id",void 0),Be([o.property({type:String})],Ie.prototype,"label",void 0),Be([o.property({type:String})],Ie.prototype,"filterPlaceHolder",void 0),Be([o.property({type:String})],Ie.prototype,"clearButtonLabel",void 0),Be([o.property({type:String})],Ie.prototype,"moreValuesButtonLabel",void 0),Be([o.property({type:String})],Ie.prototype,"noValuesLabel",void 0),Be([i.jsonProperty([])],Ie.prototype,"options",void 0),Be([o.property({type:Boolean})],Ie.prototype,"multivalued",void 0),Be([o.property({type:Boolean})],Ie.prototype,"disabled",void 0),Be([o.property({type:Boolean})],Ie.prototype,"raiseSelectedOptions",void 0),Be([o.property({type:Number})],Ie.prototype,"displayedValuesLimit",void 0),Be([o.property({type:Boolean})],Ie.prototype,"hideClearButton",void 0),Be([o.query(".ft-filter--slot")],Ie.prototype,"slotElement",void 0),Be([o.query(".ft-filter--container")],Ie.prototype,"container",void 0),Be([o.query(".ft-filter--values")],Ie.prototype,"valuesContainer",void 0),Be([o.query(".ft-filter--levels")],Ie.prototype,"levelsContainer",void 0),Be([o.query(".ft-filter--levels ft-filter-level:last-child")],Ie.prototype,"lastLevel",void 0),Be([o.query(".ft-filter--filter input")],Ie.prototype,"filterInput",void 0),Be([o.queryAll(".ft-filter--levels ft-filter-level")],Ie.prototype,"levels",void 0),Be([o.state()],Ie.prototype,"withScroll",void 0),Be([o.state()],Ie.prototype,"filter",void 0),Be([o.state()],Ie.prototype,"slideIn",void 0),Be([o.state()],Ie.prototype,"slideOut",void 0);var Me=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ee extends i.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1224
1224
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1225
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Ee.elementDefinitions={},Me([o.property({type:String})],Ee.prototype,"label",void 0),Me([o.property({type:Object,converter:t=>t})],Ee.prototype,"value",void 0),Me([o.property({type:Boolean,reflect:!0})],Ee.prototype,"selected",void 0),Me([o.property({type:Object})],Ee.prototype,"subOptions",void 0),Me([i.jsonProperty({})],Ee.prototype,"renderOption",void 0),Me([o.query(".ft-filter-option--slot")],Ee.prototype,"slotElement",void 0),i.customElement("ft-filter")(Ie),i.customElement("ft-filter-option")(Ee);
|
|
1226
|
-
`,_e=e.
|
|
1227
|
-
`,Re=i.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,i)=>{t.baseUrl=i.payload},setApiIntegrationIdentifier:(t,i)=>{t.apiIntegrationIdentifier=i.payload},setUiLocale:(t,i)=>{t.uiLocale=i.payload},setAvailableUiLocales:(t,i)=>{t.availableUiLocales=i.payload},setEditorMode:(t,i)=>{t.editorMode=i.payload},setNoCustom:(t,i)=>{t.noCustom=i.payload},setNoCustomComponent:(t,i)=>{t.noCustomComponent=i.payload},setSession:(t,i)=>{t.session=i.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class Pe{static build(t){const{baseUrl:i,apiIntegrationIdentifier:e}=Re.getState(),o=null!=t?t:e;if(i&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(i,o,!0)}static get(t){var i;return null!=t?Pe.build(t):null!==(i=Pe.API)&&void 0!==i?i:Pe.API=Pe.build()}static await(t){return new Promise((i=>{let e=Pe.get(t);if(e)i(e);else{const o=Re.subscribe((()=>{e=Pe.get(t),e&&(o(),i(e))}))}}))}}var Ve;const He=Symbol("clearAfterUnitTest");class We{constructor(t){this.apiProvider=t,this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={},this.currentUiLocale="",this[Ve]=()=>{this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={}},this.currentUiLocale=Re.getState().uiLocale,Re.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Re.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const i=t.name.toLowerCase();this.cache.setFinal(i,t),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var o;if(t=t.toLowerCase(),Object.keys(e).length>0){const s={...null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},...e};i.deepEqual(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...o){var s,n,r;t=t.toLowerCase(),this.fetchContext(t);const l=null!==(n=null===(s=this.cache.getNow(t))||void 0===s?void 0:s.messages)&&void 0!==n?n:{};return new i.ParametrizedLabelResolver(null!==(r=this.defaultMessages[t])&&void 0!==r?r:{},l).resolve(e,...o)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(async()=>{var i;return await(null===(i=this.apiProvider())||void 0===i?void 0:i.getFluidTopicsMessageContext(this.currentUiLocale,t))})),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,i){var e;return t=t.toLowerCase(),this.listeners[t]=null!==(e=this.listeners[t])&&void 0!==e?e:new Set,this.listeners[t].add(i),()=>{var e;return null===(e=this.listeners[t])||void 0===e?void 0:e.delete(i)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>i.delay(0).then((()=>t())).catch((()=>null)))))}}Ve=He,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new We(Pe.get));const Ze=window.FluidTopicsI18nService;var Ke=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ge extends i.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>Pe.get(),this.cache=new i.CacheRegistry,this.cleanSessionDebouncer=new i.Debouncer}render(){return e.html`
|
|
1225
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Ee.elementDefinitions={},Me([o.property({type:String})],Ee.prototype,"label",void 0),Me([o.property({type:Object,converter:t=>t})],Ee.prototype,"value",void 0),Me([o.property({type:Boolean,reflect:!0})],Ee.prototype,"selected",void 0),Me([o.property({type:Object})],Ee.prototype,"subOptions",void 0),Me([i.jsonProperty({})],Ee.prototype,"renderOption",void 0),Me([o.query(".ft-filter-option--slot")],Ee.prototype,"slotElement",void 0),i.customElement("ft-filter")(Ie),i.customElement("ft-filter-option")(Ee);const Le=e.css`
|
|
1226
|
+
`,Ne=i.FtReduxStore.get({name:"ft-app-info",reducers:{setBaseUrl:(t,i)=>{t.baseUrl=i.payload},setApiIntegrationIdentifier:(t,i)=>{t.apiIntegrationIdentifier=i.payload},setUiLocale:(t,i)=>{t.uiLocale=i.payload},setAvailableUiLocales:(t,i)=>{t.availableUiLocales=i.payload},setEditorMode:(t,i)=>{t.editorMode=i.payload},setNoCustom:(t,i)=>{t.noCustom=i.payload},setNoCustomComponent:(t,i)=>{t.noCustomComponent=i.payload},setSession:(t,i)=>{t.session=i.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class Ae{static build(t){const{baseUrl:i,apiIntegrationIdentifier:e}=Ne.getState(),o=null!=t?t:e;if(i&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(i,o,!0)}static get(t){var i;return null!=t?Ae.build(t):null!==(i=Ae.API)&&void 0!==i?i:Ae.API=Ae.build()}static await(t){return new Promise((i=>{let e=Ae.get(t);if(e)i(e);else{const o=Ne.subscribe((()=>{e=Ae.get(t),e&&(o(),i(e))}))}}))}}var Te;const De=Symbol("clearAfterUnitTest");class Ue{constructor(t){this.apiProvider=t,this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={},this.currentUiLocale="",this[Te]=()=>{this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={}},this.currentUiLocale=Ne.getState().uiLocale,Ne.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Ne.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const i=t.name.toLowerCase();this.cache.setFinal(i,t),this.notify(i)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var o;if(t=t.toLowerCase(),Object.keys(e).length>0){const s={...null!==(o=this.defaultMessages[t])&&void 0!==o?o:{},...e};i.deepEqual(this.defaultMessages[t],s)||(this.defaultMessages[t]=s,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...o){var s,n,r;t=t.toLowerCase(),this.fetchContext(t);const l=null!==(n=null===(s=this.cache.getNow(t))||void 0===s?void 0:s.messages)&&void 0!==n?n:{};return new i.ParametrizedLabelResolver(null!==(r=this.defaultMessages[t])&&void 0!==r?r:{},l).resolve(e,...o)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(async()=>{var i;return await(null===(i=this.apiProvider())||void 0===i?void 0:i.getFluidTopicsMessageContext(this.currentUiLocale,t))})),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,i){var e;return t=t.toLowerCase(),this.listeners[t]=null!==(e=this.listeners[t])&&void 0!==e?e:new Set,this.listeners[t].add(i),()=>{var e;return null===(e=this.listeners[t])||void 0===e?void 0:e.delete(i)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>i.delay(0).then((()=>t())).catch((()=>null)))))}}Te=De,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new Ue(Ae.get));const Fe=window.FluidTopicsI18nService;var _e=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Re extends i.FtLitElement{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>Ae.get(),this.cache=new i.CacheRegistry,this.cleanSessionDebouncer=new i.Debouncer}render(){return e.html`
|
|
1228
1227
|
<slot></slot>
|
|
1229
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&
|
|
1228
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&Ne.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&Ne.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&Ne.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&Ne.actions.setNoCustom(this.noCustom),t.has("editorMode")&&Ne.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&Ne.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&Ne.actions.setSession(this.session),t.has("availableUiLocales")&&Ne.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>Fe.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const i=await t.getCurrentSession();return i.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),i.idleTimeoutInMillis),i}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}Re.elementDefinitions={},Re.styles=Le,_e([o.property()],Re.prototype,"baseUrl",void 0),_e([o.property()],Re.prototype,"apiIntegrationIdentifier",void 0),_e([o.property()],Re.prototype,"uiLocale",void 0),_e([i.jsonProperty([])],Re.prototype,"availableUiLocales",void 0),_e([o.property({type:Boolean})],Re.prototype,"editorMode",void 0),_e([o.property({type:Boolean})],Re.prototype,"noCustom",void 0),_e([o.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Re.prototype,"noCustomComponent",void 0),_e([o.property({type:Boolean})],Re.prototype,"withManualResources",void 0),_e([i.jsonProperty([])],Re.prototype,"messageContexts",void 0),_e([i.jsonProperty(void 0)],Re.prototype,"session",void 0),_e([o.property({type:Object})],Re.prototype,"apiProvider",void 0),i.customElement("ft-app-context")(Re);var Pe=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ve extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const He=Symbol("registerInterval");class We extends(function(t){var i;class e extends t{constructor(){super(...arguments),this[i]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[He]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[He]):this.dispatchEvent(new Ve)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return i=He,Pe([o.state()],e.prototype,"stateManager",void 0),e}(i.FtLitElementRedux)){}function Ze(t){return t.rootNodes.map((t=>Ke(t)))}function Ke(t){return{label:t.label,value:t.value,selected:t.selected,subOptions:t.childNodes.map((t=>Ke(t)))}}const Ge=e.css`
|
|
1229
|
+
`,qe=Symbol("i18nProperties"),Xe=Symbol("i18nUnsubs");function Ye(t){var i;return i=Xe,class extends t{constructor(){super(...arguments),this[i]=new Map}i18n(t,i,...e){var o;if("string"==typeof t)return Fe.resolveMessage(t,i,...e);const s=null!==(o=t.args)&&void 0!==o?o:t.argsProvider?t.argsProvider(this):[];return Fe.resolveMessage(t.context,t.key,...s)}onI18nUpdate(t){var i;null===(i=this[qe])||void 0===i||i.forEach(((i,e)=>{i.context.toLowerCase()===t.toLowerCase()&&(this[e]=this.i18n(i))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var i;super.updated(t),null===(i=this[qe])||void 0===i||i.forEach(((t,i)=>{null!=t.argsProvider&&(this[i]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[qe]&&new Set([...this[qe].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,i){t=t.toLowerCase(),this[Xe].has(t)||this[Xe].set(t,Fe.subscribe(t,(()=>this.onI18nUpdate(t)))),Fe.prepareContext(t,null!=i?i:{})}addI18nContext(t,i){this.addI18nMessages(t.name,i)}disconnectedCallback(){super.disconnectedCallback(),this[Xe].forEach((t=>t())),this[Xe].clear()}}}class Je extends(Ye(i.FtLitElement)){}class Qe extends(Ye(i.FtLitElementRedux)){}var to=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class io extends Je{render(){return this.key&&this.context?e.html`
|
|
1230
1230
|
<span class="ft-i18n">${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}</span>
|
|
1231
|
-
`:e.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}io.elementDefinitions={},io.styles=
|
|
1232
|
-
<div class="ft-search-facet--label">
|
|
1233
|
-
<ft-typography variant="button">${t.label}</ft-typography>
|
|
1231
|
+
`:e.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}io.elementDefinitions={},io.styles=Ge,to([o.property()],io.prototype,"context",void 0),to([o.property()],io.prototype,"key",void 0),to([i.jsonProperty([])],io.prototype,"args",void 0),to([o.property()],io.prototype,"defaultMessage",void 0);class eo{constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,i)=>{const e=i;return t=>({context:this.name,key:e,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,i)=>(...t)=>Fe.resolveMessage(this.name,i,...t)})}static build(t){return new eo(t)}static fromGwt(t){return new eo(t)}}i.customElement("ft-i18n")(io);const oo=eo.build("designedSearchFacet");var so=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class no extends(Ye(We)){constructor(){super(...arguments),this.facetId="",this.maxValues=7,this.raiseSelectedOptions=!1,this.facets=[]}setSearchStateManager(t){super.setSearchStateManager(t),this.facetId&&t.addFacet(this.facetId),this.addI18nContext(oo),this.addStore(Ne)}render(){let t=this.facets.find((t=>t.key==this.facetId));return t?e.html`
|
|
1232
|
+
<div part="label" class="ft-search-facet--label">
|
|
1233
|
+
<ft-typography variant="button" part="label-text">${t.label}</ft-typography>
|
|
1234
1234
|
</div>
|
|
1235
1235
|
<ft-filter
|
|
1236
1236
|
part="filter"
|
|
1237
1237
|
.exportpartsPrefixes=${["filter"]}
|
|
1238
1238
|
id="${this.facetId}"
|
|
1239
1239
|
?multivalued=${t.multiSelectionable}
|
|
1240
|
-
raiseSelectedOptions
|
|
1241
|
-
.options=${
|
|
1240
|
+
?raiseSelectedOptions=${this.raiseSelectedOptions}
|
|
1241
|
+
.options=${Ze(t)}
|
|
1242
1242
|
.displayedValuesLimit=${this.maxValues}
|
|
1243
1243
|
filterPlaceHolder="${oo.messages.filterInputPlaceHolder(t.label)}"
|
|
1244
1244
|
clearButtonLabel="${oo.messages.clearFilterButton()}"
|
|
@@ -1246,4 +1246,4 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1246
1246
|
noValuesLabel="${oo.messages.noFilterValuesAvailable()}"
|
|
1247
1247
|
@change=${this.onFacetValueSelected}
|
|
1248
1248
|
></ft-filter>
|
|
1249
|
-
`:!this.facetId&&this.editorMode?e.html`${oo.messages.noMetadataSelected()}`:e.nothing}updated(t){var i;super.updated(t),t.has("facetId")&&(null===(i=this.stateManager)||void 0===i||i.replaceFacet(t.get("facetId"),this.facetId))}onFacetValueSelected(t){var i;null===(i=this.stateManager)||void 0===i||i.setFilter(this.facetId,t.detail)}}no.elementDefinitions={"ft-filter":Ie,"ft-typography":ri},no.styles=l,so([o.property()],no.prototype,"facetId",void 0),so([o.property({type:Number})],no.prototype,"maxValues",void 0),so([i.redux({store:"search"})],no.prototype,"request",void 0),so([i.redux({store:"search"})],no.prototype,"facets",void 0),so([i.redux({store:
|
|
1249
|
+
`:!this.facetId&&this.editorMode?e.html`${oo.messages.noMetadataSelected()}`:e.nothing}updated(t){var i;super.updated(t),t.has("facetId")&&(null===(i=this.stateManager)||void 0===i||i.replaceFacet(t.get("facetId"),this.facetId))}onFacetValueSelected(t){var i;null===(i=this.stateManager)||void 0===i||i.setFilter(this.facetId,t.detail)}}no.elementDefinitions={"ft-filter":Ie,"ft-typography":ri},no.styles=l,so([o.property()],no.prototype,"facetId",void 0),so([o.property({type:Number})],no.prototype,"maxValues",void 0),so([o.property({type:Boolean})],no.prototype,"raiseSelectedOptions",void 0),so([i.redux({store:"search"})],no.prototype,"request",void 0),so([i.redux({store:"search"})],no.prototype,"facets",void 0),so([i.redux({store:Ne.name})],no.prototype,"editorMode",void 0),i.customElement("ft-search-facet")(no),t.FtSearchFacet=no,t.FtSearchFacetCssVariables={},t.styles=l,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|
|
@@ -1353,23 +1353,23 @@ class yr extends Lo{constructor(t){if(super(t),this.it=tt,t.type!==Po)throw Erro
|
|
|
1353
1353
|
></ft-filter-level>
|
|
1354
1354
|
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.dispatchEvent(new gn(this.selectedValues)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}xn.elementDefinitions={"ft-button":Ar,"ft-filter-level":on,"ft-snap-scroll":an,"ft-typography":Ao},xn.styles=bn,yn([n({type:String})],xn.prototype,"id",void 0),yn([n({type:String})],xn.prototype,"label",void 0),yn([n({type:String})],xn.prototype,"filterPlaceHolder",void 0),yn([n({type:String})],xn.prototype,"clearButtonLabel",void 0),yn([n({type:String})],xn.prototype,"moreValuesButtonLabel",void 0),yn([n({type:String})],xn.prototype,"noValuesLabel",void 0),yn([p([])],xn.prototype,"options",void 0),yn([n({type:Boolean})],xn.prototype,"multivalued",void 0),yn([n({type:Boolean})],xn.prototype,"disabled",void 0),yn([n({type:Boolean})],xn.prototype,"raiseSelectedOptions",void 0),yn([n({type:Number})],xn.prototype,"displayedValuesLimit",void 0),yn([n({type:Boolean})],xn.prototype,"hideClearButton",void 0),yn([a(".ft-filter--slot")],xn.prototype,"slotElement",void 0),yn([a(".ft-filter--container")],xn.prototype,"container",void 0),yn([a(".ft-filter--values")],xn.prototype,"valuesContainer",void 0),yn([a(".ft-filter--levels")],xn.prototype,"levelsContainer",void 0),yn([a(".ft-filter--levels ft-filter-level:last-child")],xn.prototype,"lastLevel",void 0),yn([a(".ft-filter--filter input")],xn.prototype,"filterInput",void 0),yn([function(t){return l({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],xn.prototype,"levels",void 0),yn([s()],xn.prototype,"withScroll",void 0),yn([s()],xn.prototype,"filter",void 0),yn([s()],xn.prototype,"slideIn",void 0),yn([s()],xn.prototype,"slideOut",void 0);var mn=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class wn extends kt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return Y`
|
|
1355
1355
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1356
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}wn.elementDefinitions={},mn([n({type:String})],wn.prototype,"label",void 0),mn([n({type:Object,converter:t=>t})],wn.prototype,"value",void 0),mn([n({type:Boolean,reflect:!0})],wn.prototype,"selected",void 0),mn([n({type:Object})],wn.prototype,"subOptions",void 0),mn([p({})],wn.prototype,"renderOption",void 0),mn([a(".ft-filter-option--slot")],wn.prototype,"slotElement",void 0),d("ft-filter")(xn),d("ft-filter-option")(wn);
|
|
1357
|
-
`,Nn=
|
|
1358
|
-
`,Mn=ci.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class Rn{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=Mn.getState(),o=null!=t?t:i;if(e&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,o,!0)}static get(t){var e;return null!=t?Rn.build(t):null!==(e=Rn.API)&&void 0!==e?e:Rn.API=Rn.build()}static await(t){return new Promise((e=>{let i=Rn.get(t);if(i)e(i);else{const o=Mn.subscribe((()=>{i=Rn.get(t),i&&(o(),e(i))}))}}))}}var zn;const An=Symbol("clearAfterUnitTest");class Bn{constructor(t){this.apiProvider=t,this.defaultMessages={},this.cache=new i,this.listeners={},this.currentUiLocale="",this[zn]=()=>{this.defaultMessages={},this.cache=new i,this.listeners={}},this.currentUiLocale=Mn.getState().uiLocale,Mn.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=Mn.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const o={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};u(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var o,r,n;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(r=null===(o=this.cache.getNow(t))||void 0===o?void 0:o.messages)&&void 0!==r?r:{};return new jt(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},s).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(async()=>{var e;return await(null===(e=this.apiProvider())||void 0===e?void 0:e.getFluidTopicsMessageContext(this.currentUiLocale,t))})),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>{return(e=0,new Promise((t=>setTimeout(t,e)))).then((()=>t())).catch((()=>null));var e})))}}zn=An,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new Bn(Rn.get));const Un=window.FluidTopicsI18nService;var Pn=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class Fn extends kt{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>Rn.get(),this.cache=new i,this.cleanSessionDebouncer=new o}render(){return Y`
|
|
1356
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}wn.elementDefinitions={},mn([n({type:String})],wn.prototype,"label",void 0),mn([n({type:Object,converter:t=>t})],wn.prototype,"value",void 0),mn([n({type:Boolean,reflect:!0})],wn.prototype,"selected",void 0),mn([n({type:Object})],wn.prototype,"subOptions",void 0),mn([p({})],wn.prototype,"renderOption",void 0),mn([a(".ft-filter-option--slot")],wn.prototype,"slotElement",void 0),d("ft-filter")(xn),d("ft-filter-option")(wn);const $n=w`
|
|
1357
|
+
`,On=ci.get({name:"ft-app-info",reducers:{setBaseUrl:(t,e)=>{t.baseUrl=e.payload},setApiIntegrationIdentifier:(t,e)=>{t.apiIntegrationIdentifier=e.payload},setUiLocale:(t,e)=>{t.uiLocale=e.payload},setAvailableUiLocales:(t,e)=>{t.availableUiLocales=e.payload},setEditorMode:(t,e)=>{t.editorMode=e.payload},setNoCustom:(t,e)=>{t.noCustom=e.payload},setNoCustomComponent:(t,e)=>{t.noCustomComponent=e.payload},setSession:(t,e)=>{t.session=e.payload}},initialState:{uiLocale:document.documentElement.lang||"en-US",availableUiLocales:[],editorMode:!1,noCustom:!1,noCustomComponent:!1}});class kn{static build(t){const{baseUrl:e,apiIntegrationIdentifier:i}=On.getState(),o=null!=t?t:i;if(e&&o&&window.fluidtopics)return new window.fluidtopics.FluidTopicsApi(e,o,!0)}static get(t){var e;return null!=t?kn.build(t):null!==(e=kn.API)&&void 0!==e?e:kn.API=kn.build()}static await(t){return new Promise((e=>{let i=kn.get(t);if(i)e(i);else{const o=On.subscribe((()=>{i=kn.get(t),i&&(o(),e(i))}))}}))}}var Sn;const Cn=Symbol("clearAfterUnitTest");class jn{constructor(t){this.apiProvider=t,this.defaultMessages={},this.cache=new i,this.listeners={},this.currentUiLocale="",this[Sn]=()=>{this.defaultMessages={},this.cache=new i,this.listeners={}},this.currentUiLocale=On.getState().uiLocale,On.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=On.getState();this.currentUiLocale!==t&&(this.currentUiLocale=t,this.cache.clearAll(),this.notifyAll())}addContext(t){const e=t.name.toLowerCase();this.cache.setFinal(e,t),this.notify(e)}getAllContexts(){return this.cache.resolvedValues()}async prepareContext(t,e){var i;if(t=t.toLowerCase(),Object.keys(e).length>0){const o={...null!==(i=this.defaultMessages[t])&&void 0!==i?i:{},...e};u(this.defaultMessages[t],o)||(this.defaultMessages[t]=o,await this.notify(t))}await this.fetchContext(t)}resolveMessage(t,e,...i){var o,r,n;t=t.toLowerCase(),this.fetchContext(t);const s=null!==(r=null===(o=this.cache.getNow(t))||void 0===o?void 0:o.messages)&&void 0!==r?r:{};return new jt(null!==(n=this.defaultMessages[t])&&void 0!==n?n:{},s).resolve(e,...i)}async fetchContext(t){if(!this.cache.has(t))try{await this.cache.get(t,(async()=>{var e;return await(null===(e=this.apiProvider())||void 0===e?void 0:e.getFluidTopicsMessageContext(this.currentUiLocale,t))})),await this.notify(t)}catch(t){console.error(t)}}subscribe(t,e){var i;return t=t.toLowerCase(),this.listeners[t]=null!==(i=this.listeners[t])&&void 0!==i?i:new Set,this.listeners[t].add(e),()=>{var i;return null===(i=this.listeners[t])||void 0===i?void 0:i.delete(e)}}async notifyAll(){await Promise.all(Object.keys(this.listeners).map((t=>this.notify(t))))}async notify(t){null!=this.listeners[t]&&await Promise.all([...this.listeners[t].values()].map((t=>{return(e=0,new Promise((t=>setTimeout(t,e)))).then((()=>t())).catch((()=>null));var e})))}}Sn=Cn,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new jn(kn.get));const En=window.FluidTopicsI18nService;var Nn=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class Mn extends kt{constructor(){super(...arguments),this.apiIntegrationIdentifier="ft-integration",this.uiLocale="en-US",this.availableUiLocales=[],this.editorMode=!1,this.noCustom=!1,this.noCustomComponent=!1,this.withManualResources=!1,this.messageContexts=[],this.apiProvider=()=>kn.get(),this.cache=new i,this.cleanSessionDebouncer=new o}render(){return Y`
|
|
1359
1358
|
<slot></slot>
|
|
1360
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&
|
|
1359
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&On.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&On.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&On.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&On.actions.setNoCustom(this.noCustom),t.has("editorMode")&&On.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&On.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&On.actions.setSession(this.session),t.has("availableUiLocales")&&On.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>En.addContext(t))),setTimeout((()=>this.updateIfNeeded()))}async updateIfNeeded(){const t=this.apiProvider();!this.withManualResources&&t&&(null==this.session&&(this.session=await this.cache.get("session",(async()=>{const e=await t.getCurrentSession();return e.idleTimeoutInMillis>0&&this.cleanSessionDebouncer.run((()=>{this.cache.clear("session"),this.session=void 0}),e.idleTimeoutInMillis),e}))),null==this.availableUiLocales&&(this.availableUiLocales=await this.cache.get("availableUiLocales",(()=>t.getAvailableUiLocales()))))}}Mn.elementDefinitions={},Mn.styles=$n,Nn([n()],Mn.prototype,"baseUrl",void 0),Nn([n()],Mn.prototype,"apiIntegrationIdentifier",void 0),Nn([n()],Mn.prototype,"uiLocale",void 0),Nn([p([])],Mn.prototype,"availableUiLocales",void 0),Nn([n({type:Boolean})],Mn.prototype,"editorMode",void 0),Nn([n({type:Boolean})],Mn.prototype,"noCustom",void 0),Nn([n({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],Mn.prototype,"noCustomComponent",void 0),Nn([n({type:Boolean})],Mn.prototype,"withManualResources",void 0),Nn([p([])],Mn.prototype,"messageContexts",void 0),Nn([p(void 0)],Mn.prototype,"session",void 0),Nn([n({type:Object})],Mn.prototype,"apiProvider",void 0),d("ft-app-context")(Mn);var Rn=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class zn extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const An=Symbol("registerInterval");class Bn extends(function(t){var e;class i extends t{constructor(){super(...arguments),this[e]=0}setSearchStateManager(t){this.clearStateManager(),this.stateManager=t,this.addStore(t.store,"search")}clearStateManager(){this.stateManager&&(this.removeStore(this.stateManager.store),this.stateManager=void 0)}connectedCallback(){super.connectedCallback(),this[An]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[An]):this.dispatchEvent(new zn)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return e=An,Rn([s()],i.prototype,"stateManager",void 0),i}(li)){}function Un(t){return t.rootNodes.map((t=>Pn(t)))}function Pn(t){return{label:t.label,value:t.value,selected:t.selected,subOptions:t.childNodes.map((t=>Pn(t)))}}const Fn=w`
|
|
1360
|
+
`,Ln=Symbol("i18nProperties"),Dn=Symbol("i18nUnsubs");function In(t){var e;return e=Dn,class extends t{constructor(){super(...arguments),this[e]=new Map}i18n(t,e,...i){var o;if("string"==typeof t)return En.resolveMessage(t,e,...i);const r=null!==(o=t.args)&&void 0!==o?o:t.argsProvider?t.argsProvider(this):[];return En.resolveMessage(t.context,t.key,...r)}onI18nUpdate(t){var e;null===(e=this[Ln])||void 0===e||e.forEach(((e,i)=>{e.context.toLowerCase()===t.toLowerCase()&&(this[i]=this.i18n(e))})),setTimeout((()=>this.requestUpdate()),0)}updated(t){var e;super.updated(t),null===(e=this[Ln])||void 0===e||e.forEach(((t,e)=>{null!=t.argsProvider&&(this[e]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[Ln]&&new Set([...this[Ln].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,e){t=t.toLowerCase(),this[Dn].has(t)||this[Dn].set(t,En.subscribe(t,(()=>this.onI18nUpdate(t)))),En.prepareContext(t,null!=e?e:{})}addI18nContext(t,e){this.addI18nMessages(t.name,e)}disconnectedCallback(){super.disconnectedCallback(),this[Dn].forEach((t=>t())),this[Dn].clear()}}}class Tn extends(In(kt)){}class _n extends(In(li)){}var Wn=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class Hn extends Tn{render(){return this.key&&this.context?Y`
|
|
1361
1361
|
<span class="ft-i18n">${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}</span>
|
|
1362
|
-
`:tt}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}Hn.elementDefinitions={},Hn.styles=
|
|
1363
|
-
<div class="ft-search-facet--label">
|
|
1364
|
-
<ft-typography variant="button">${t.label}</ft-typography>
|
|
1362
|
+
`:tt}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}Hn.elementDefinitions={},Hn.styles=Fn,Wn([n()],Hn.prototype,"context",void 0),Wn([n()],Hn.prototype,"key",void 0),Wn([p([])],Hn.prototype,"args",void 0),Wn([n()],Hn.prototype,"defaultMessage",void 0);class Kn{constructor(t){this.name=t,this.properties=new Proxy({},{get:(t,e)=>{const i=e;return t=>({context:this.name,key:i,args:"function"==typeof t?void 0:t,argsProvider:"function"==typeof t?t:void 0})}}),this.messages=new Proxy({},{get:(t,e)=>(...t)=>En.resolveMessage(this.name,e,...t)})}static build(t){return new Kn(t)}static fromGwt(t){return new Kn(t)}}d("ft-i18n")(Hn);const Vn=Kn.build("designedSearchFacet");var Zn=function(t,e,i,o){for(var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(r=t[l])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class qn extends(In(Bn)){constructor(){super(...arguments),this.facetId="",this.maxValues=7,this.raiseSelectedOptions=!1,this.facets=[]}setSearchStateManager(t){super.setSearchStateManager(t),this.facetId&&t.addFacet(this.facetId),this.addI18nContext(Vn),this.addStore(On)}render(){let t=this.facets.find((t=>t.key==this.facetId));return t?Y`
|
|
1363
|
+
<div part="label" class="ft-search-facet--label">
|
|
1364
|
+
<ft-typography variant="button" part="label-text">${t.label}</ft-typography>
|
|
1365
1365
|
</div>
|
|
1366
1366
|
<ft-filter
|
|
1367
1367
|
part="filter"
|
|
1368
1368
|
.exportpartsPrefixes=${["filter"]}
|
|
1369
1369
|
id="${this.facetId}"
|
|
1370
1370
|
?multivalued=${t.multiSelectionable}
|
|
1371
|
-
raiseSelectedOptions
|
|
1372
|
-
.options=${
|
|
1371
|
+
?raiseSelectedOptions=${this.raiseSelectedOptions}
|
|
1372
|
+
.options=${Un(t)}
|
|
1373
1373
|
.displayedValuesLimit=${this.maxValues}
|
|
1374
1374
|
filterPlaceHolder="${Vn.messages.filterInputPlaceHolder(t.label)}"
|
|
1375
1375
|
clearButtonLabel="${Vn.messages.clearFilterButton()}"
|
|
@@ -1377,4 +1377,4 @@ class yr extends Lo{constructor(t){if(super(t),this.it=tt,t.type!==Po)throw Erro
|
|
|
1377
1377
|
noValuesLabel="${Vn.messages.noFilterValuesAvailable()}"
|
|
1378
1378
|
@change=${this.onFacetValueSelected}
|
|
1379
1379
|
></ft-filter>
|
|
1380
|
-
`:!this.facetId&&this.editorMode?Y`${Vn.messages.noMetadataSelected()}`:tt}updated(t){var e;super.updated(t),t.has("facetId")&&(null===(e=this.stateManager)||void 0===e||e.replaceFacet(t.get("facetId"),this.facetId))}onFacetValueSelected(t){var e;null===(e=this.stateManager)||void 0===e||e.setFilter(this.facetId,t.detail)}}qn.elementDefinitions={"ft-filter":xn,"ft-typography":Ao},qn.styles=pi,Zn([n()],qn.prototype,"facetId",void 0),Zn([n({type:Number})],qn.prototype,"maxValues",void 0),Zn([si({store:"search"})],qn.prototype,"request",void 0),Zn([si({store:"search"})],qn.prototype,"facets",void 0),Zn([si({store:
|
|
1380
|
+
`:!this.facetId&&this.editorMode?Y`${Vn.messages.noMetadataSelected()}`:tt}updated(t){var e;super.updated(t),t.has("facetId")&&(null===(e=this.stateManager)||void 0===e||e.replaceFacet(t.get("facetId"),this.facetId))}onFacetValueSelected(t){var e;null===(e=this.stateManager)||void 0===e||e.setFilter(this.facetId,t.detail)}}qn.elementDefinitions={"ft-filter":xn,"ft-typography":Ao},qn.styles=pi,Zn([n()],qn.prototype,"facetId",void 0),Zn([n({type:Number})],qn.prototype,"maxValues",void 0),Zn([n({type:Boolean})],qn.prototype,"raiseSelectedOptions",void 0),Zn([si({store:"search"})],qn.prototype,"request",void 0),Zn([si({store:"search"})],qn.prototype,"facets",void 0),Zn([si({store:On.name})],qn.prototype,"editorMode",void 0),d("ft-search-facet")(qn),t.FtSearchFacet=qn,t.FtSearchFacetCssVariables={},t.styles=pi,Object.defineProperty(t,"W",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-facet",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.64",
|
|
4
4
|
"description": "Search facet for integrated search component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-filter": "0.3.
|
|
23
|
-
"@fluid-topics/ft-i18n": "0.3.
|
|
24
|
-
"@fluid-topics/ft-search-context": "0.3.
|
|
25
|
-
"@fluid-topics/ft-typography": "0.3.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-filter": "0.3.64",
|
|
23
|
+
"@fluid-topics/ft-i18n": "0.3.64",
|
|
24
|
+
"@fluid-topics/ft-search-context": "0.3.64",
|
|
25
|
+
"@fluid-topics/ft-typography": "0.3.64",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "0.3.64",
|
|
27
27
|
"lit": "2.2.8"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@fluid-topics/public-api": "1.0.32"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "4f42c34c49255250cddf729582cc01c17b334857"
|
|
36
36
|
}
|