@fluid-topics/ft-search-facet 0.3.66 → 0.3.68
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.light.js +110 -99
- package/build/ft-search-facet.min.js +101 -90
- package/package.json +7 -7
|
@@ -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,
|
|
7
|
+
*/;var a;const h=window,p=h.trustedTypes,c=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,d=`lit$${(Math.random()+"").slice(9)}$`,f="?"+d,u=`<${f}>`,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"),j=Symbol.for("lit-nothing"),B=new WeakMap,I=v.createTreeWalker(v,129,null,!1),E=(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)+d+c):e+d+(-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 M{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]=E(t,i);if(this.el=M.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(d)){const e=h[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(d),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(d),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===f)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(d,t+1));)l.push({type:7,index:s}),t+=d.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 P(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=j,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===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):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!==j&&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=M.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=B.get(t.strings);return void 0===i&&B.set(t.strings,i=new M(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=j,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=j}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===j?t=j:t!==j&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===j?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===j?void 0:t}}const U=p?p.emptyScript:"";class F extends T{constructor(){super(...arguments),this.type=4}j(t){t&&t!==j?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:j)===C)return;const o=this._$AH,s=t===j&&o!==j||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==j&&(o===j||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 P{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 R=h.litHtmlPolyfillSupport;null==R||R(M,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(""),
|
|
13
|
+
const V=Symbol.for(""),Z=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t._$litStatic$},H=t=>({_$litStatic$:t,r:V}),W=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=Z(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=W.get(t))&&(r.raw=r,W.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"),dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",Y.fontWeight,"600"),ft=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"),jt={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")},Bt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",X),It=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",Y.fontSize,"12px"),Et=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",Y.fontWeight,"normal"),Mt=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"),Pt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",X),Rt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",Y.fontSize,"10px"),Vt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",Y.fontWeight,"normal"),Zt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",Y.letterSpacing,"1.5px"),Ht=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",Y.lineHeight,"1.6"),Wt=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};
|
|
@@ -32,8 +32,8 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
33
|
font-family: ${pt};
|
|
34
34
|
font-size: ${ct};
|
|
35
|
-
font-weight: ${
|
|
36
|
-
letter-spacing: ${
|
|
35
|
+
font-weight: ${dt};
|
|
36
|
+
letter-spacing: ${ft};
|
|
37
37
|
line-height: ${ut};
|
|
38
38
|
text-transform: ${vt};
|
|
39
39
|
}
|
|
@@ -69,8 +69,8 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
69
69
|
.ft-typography--caption {
|
|
70
70
|
font-family: ${Bt};
|
|
71
71
|
font-size: ${It};
|
|
72
|
-
font-weight: ${
|
|
73
|
-
letter-spacing: ${
|
|
72
|
+
font-weight: ${Et};
|
|
73
|
+
letter-spacing: ${Mt};
|
|
74
74
|
line-height: ${Lt};
|
|
75
75
|
text-transform: ${Nt};
|
|
76
76
|
}
|
|
@@ -85,12 +85,12 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
85
85
|
}
|
|
86
86
|
`,ei=e.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
89
|
-
font-size: ${
|
|
88
|
+
font-family: ${Pt};
|
|
89
|
+
font-size: ${Rt};
|
|
90
90
|
font-weight: ${Vt};
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
93
|
-
text-transform: ${
|
|
91
|
+
letter-spacing: ${Zt};
|
|
92
|
+
line-height: ${Ht};
|
|
93
|
+
text-transform: ${Wt};
|
|
94
94
|
}
|
|
95
95
|
`,oi=e.css`
|
|
96
96
|
.ft-typography--button {
|
|
@@ -106,13 +106,13 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
106
106
|
vertical-align: inherit;
|
|
107
107
|
}
|
|
108
108
|
`;var ni=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 ri extends i.FtLitElement{constructor(){super(...arguments),this.variant=G.body1}render(){return this.element?K`
|
|
109
|
-
<${
|
|
109
|
+
<${H(this.element)}
|
|
110
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
111
|
<slot></slot>
|
|
112
|
-
</${
|
|
112
|
+
</${H(this.element)}>
|
|
113
113
|
`:K`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}function li(t,i){return t.flatMap((t=>[t,...li(i(t),i)]))}ri.styles=[Gt,qt,Xt,Yt,Jt,Qt,ti,ii,ei,oi,si],ni([o.property()],ri.prototype,"element",void 0),ni([o.property()],ri.prototype,"variant",void 0),i.customElement("ft-typography")(ri);const ai=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),hi={color:ai,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",ai),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},pi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),ci=pi,
|
|
115
|
+
`}}function li(t,i){return t.flatMap((t=>[t,...li(i(t),i)]))}ri.styles=[Gt,qt,Xt,Yt,Jt,Qt,ti,ii,ei,oi,si],ni([o.property()],ri.prototype,"element",void 0),ni([o.property()],ri.prototype,"variant",void 0),i.customElement("ft-typography")(ri);const ai=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),hi={color:ai,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",ai),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},pi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),ci=pi,di=i.FtCssVariableFactory.extend("--ft-ripple-background-color",pi),fi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),ui=fi,vi=i.FtCssVariableFactory.extend("--ft-ripple-background-color",fi),bi=e.css`
|
|
116
116
|
:host {
|
|
117
117
|
display: contents;
|
|
118
118
|
}
|
|
@@ -150,7 +150,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
153
|
-
background-color: ${
|
|
153
|
+
background-color: ${di};
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
@@ -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
|
|
347
|
+
`}}var Ei,Mi;Ii.styles=Bi,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=""}(Ei||(Ei={})),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=""}(Mi||(Mi={})),new Map([...["abw"].map((t=>[t,Mi.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,Mi.AUDIO])),...["avi"].map((t=>[t,Mi.AVI])),...["chm","xhs"].map((t=>[t,Mi.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,Mi.CODE])),...["csv"].map((t=>[t,Mi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Mi.DITA])),...["epub"].map((t=>[t,Mi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Mi.EXCEL])),...["flac"].map((t=>[t,Mi.FLAC])),...["gif"].map((t=>[t,Mi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Mi.GZIP])),...["html","htm","xhtml"].map((t=>[t,Mi.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,Mi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Mi.JPEG])),...["json"].map((t=>[t,Mi.JSON])),...["m4a","m4p"].map((t=>[t,Mi.M4A])),...["mov","qt"].map((t=>[t,Mi.MOV])),...["mp3"].map((t=>[t,Mi.MP3])),...["mp4","m4v"].map((t=>[t,Mi.MP4])),...["ogg","oga"].map((t=>[t,Mi.OGG])),...["pdf","ps"].map((t=>[t,Mi.PDF])),...["png"].map((t=>[t,Mi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Mi.POWERPOINT])),...["rar"].map((t=>[t,Mi.RAR])),...["stp"].map((t=>[t,Mi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Mi.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,Mi.VIDEO])),...["wav"].map((t=>[t,Mi.WAV])),...["wma"].map((t=>[t,Mi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Mi.WORD])),...["xml","xsl","rdf"].map((t=>[t,Mi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Mi.YAML])),...["zip"].map((t=>[t,Mi.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;
|
|
@@ -396,7 +396,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
396
396
|
${r.unsafeHTML(this.resolvedIcon)}
|
|
397
397
|
<slot ?hidden=${o}></slot>
|
|
398
398
|
</i>
|
|
399
|
-
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case Ai.file_format:this.resolvedIcon=null!==(t=
|
|
399
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case Ai.file_format:this.resolvedIcon=null!==(t=Mi[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Ai.material:this.resolvedIcon=this.value||e.nothing;break;default:this.resolvedIcon=null!==(i=Ei[o.replace("-","_").toUpperCase()])&&void 0!==i?i:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Di.elementDefinitions={},Di.styles=Ni,Ti([o.property()],Di.prototype,"variant",void 0),Ti([o.property()],Di.prototype,"value",void 0),Ti([o.state()],Di.prototype,"resolvedIcon",void 0),Ti([o.query("slot")],Di.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Di);const Ui=i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Fi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Ui,fontSize:i.FtCssVariableFactory.extend("--ft-button-font-size",Kt.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariableFactory.extend("--ft-button-ripple-color",Ui),verticalPadding:i.FtCssVariableFactory.create("--ft-button-vertical-padding","SIZE","6px"),horizontalPadding:i.FtCssVariableFactory.create("--ft-button-horizontal-padding","SIZE","8px"),iconPadding:i.FtCssVariableFactory.create("--ft-button-icon-padding","SIZE","8px"),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},_i=i.FtCssVariableFactory.extend("--ft-button-primary-color",i.FtCssVariableFactory.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Pi={backgroundColor:i.FtCssVariableFactory.extend("--ft-button-primary-background-color",i.FtCssVariableFactory.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:_i,rippleColor:i.FtCssVariableFactory.extend("--ft-button-primary-ripple-color",_i)},Ri=i.FtCssVariableFactory.extend("--ft-button-dense-border-radius",i.FtCssVariableFactory.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM)),Vi=i.FtCssVariableFactory.create("--ft-button-dense-vertical-padding","SIZE","2px"),Zi=i.FtCssVariableFactory.create("--ft-button-dense-horizontal-padding","SIZE","4px"),Hi=i.FtCssVariableFactory.create("--ft-button-dense-icon-padding","SIZE","4px"),Wi=[i.noTextSelect,e.css`
|
|
400
400
|
:host {
|
|
401
401
|
display: inline-block;
|
|
402
402
|
max-width: 100%;
|
|
@@ -435,34 +435,46 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
435
435
|
box-sizing: border-box;
|
|
436
436
|
border: none;
|
|
437
437
|
pointer-events: auto;
|
|
438
|
+
gap: ${Fi.iconPadding};
|
|
438
439
|
|
|
439
440
|
--ft-button-internal-line-height: calc(${Fi.fontSize} + 2px);
|
|
440
441
|
--ft-button-internal-color: ${Fi.color};
|
|
441
442
|
${i.setVariable(Li.size,Fi.iconSize)};
|
|
442
|
-
--ft-button-internal-vertical-padding: 6px;
|
|
443
|
-
--ft-button-internal-horizontal-padding: 8px;
|
|
444
443
|
${i.setVariable(hi.color,Fi.rippleColor)};
|
|
445
444
|
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Fi.iconSize});
|
|
446
445
|
|
|
447
446
|
border-radius: ${Fi.borderRadius};
|
|
448
|
-
padding:
|
|
447
|
+
padding: ${Fi.verticalPadding} ${Fi.horizontalPadding};
|
|
449
448
|
background-color: ${Fi.backgroundColor};
|
|
450
449
|
color: var(--ft-button-internal-color);
|
|
451
450
|
-webkit-mask-image: radial-gradient(white, black);
|
|
452
451
|
}
|
|
453
452
|
|
|
453
|
+
.ft-button.ft-button--outlined {
|
|
454
|
+
border: 1px solid var(--ft-button-internal-color);
|
|
455
|
+
padding: calc(${Fi.verticalPadding} - 1px) calc(${Fi.horizontalPadding} - 1px);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.ft-button.ft-button--dense {
|
|
459
|
+
padding: ${Vi} ${Zi};
|
|
460
|
+
border-radius: ${Ri};
|
|
461
|
+
gap: ${Hi};
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.ft-button.ft-button--dense.ft-button--outlined {
|
|
465
|
+
padding: calc(${Vi} - 1px) calc(${Zi} - 1px);
|
|
466
|
+
}
|
|
467
|
+
|
|
454
468
|
.ft-button:not([disabled]):hover {
|
|
455
469
|
cursor: pointer;
|
|
456
470
|
}
|
|
457
471
|
|
|
458
|
-
.ft-button--
|
|
459
|
-
--ft-button-internal-
|
|
460
|
-
--ft-button-internal-horizontal-padding: 4px;
|
|
461
|
-
border-radius: ${Pi};
|
|
472
|
+
.ft-button--round {
|
|
473
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${Fi.verticalPadding});
|
|
462
474
|
}
|
|
463
475
|
|
|
464
|
-
.ft-button--round {
|
|
465
|
-
border-radius: calc(var(--ft-button-internal-content-height) / 2 +
|
|
476
|
+
.ft-button--round.ft-button--dense {
|
|
477
|
+
border-radius: calc(var(--ft-button-internal-content-height) / 2 + ${Vi});
|
|
466
478
|
}
|
|
467
479
|
|
|
468
480
|
.ft-button[disabled] {
|
|
@@ -471,14 +483,9 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
471
483
|
}
|
|
472
484
|
|
|
473
485
|
.ft-button.ft-button--primary {
|
|
474
|
-
background-color: ${
|
|
475
|
-
--ft-button-internal-color: ${
|
|
476
|
-
${i.setVariable(hi.color,
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
.ft-button.ft-button--outlined {
|
|
480
|
-
border: 1px solid var(--ft-button-internal-color);
|
|
481
|
-
padding: calc(var(--ft-button-internal-vertical-padding) - 1px) calc(var(--ft-button-internal-horizontal-padding) - 1px);
|
|
486
|
+
background-color: ${Pi.backgroundColor};
|
|
487
|
+
--ft-button-internal-color: ${Pi.color};
|
|
488
|
+
${i.setVariable(hi.color,Pi.rippleColor)};
|
|
482
489
|
}
|
|
483
490
|
|
|
484
491
|
.ft-button:focus {
|
|
@@ -491,11 +498,10 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
491
498
|
white-space: nowrap;
|
|
492
499
|
text-overflow: ellipsis;
|
|
493
500
|
display: block;
|
|
494
|
-
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
495
501
|
${i.setVariable(Kt.fontSize,"1em")};
|
|
496
502
|
${i.setVariable(Kt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
497
503
|
}
|
|
498
|
-
|
|
504
|
+
|
|
499
505
|
.ft-button--label[hidden] {
|
|
500
506
|
display: none;
|
|
501
507
|
}
|
|
@@ -506,8 +512,13 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
506
512
|
}
|
|
507
513
|
|
|
508
514
|
.ft-button--label[hidden] + ft-icon {
|
|
509
|
-
margin: 0 calc(
|
|
510
|
-
padding: 0
|
|
515
|
+
margin: 0 calc(${Fi.horizontalPadding} * -1);
|
|
516
|
+
padding: 0 ${Fi.verticalPadding};
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.ft-button--dense .ft-button--label[hidden] + ft-icon {
|
|
520
|
+
margin: 0 calc(${Zi} * -1);
|
|
521
|
+
padding: 0 ${Vi};
|
|
511
522
|
}
|
|
512
523
|
|
|
513
524
|
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
@@ -519,7 +530,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
519
530
|
${i.setVariable(ji.size,Fi.iconSize)};
|
|
520
531
|
${i.setVariable(ji.color,"var(--ft-button-internal-color)")};
|
|
521
532
|
}
|
|
522
|
-
`];var
|
|
533
|
+
`];var Ki=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.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
534
|
<button part="button"
|
|
524
535
|
class="${n.classMap(t)}"
|
|
525
536
|
aria-label="${this.getLabel()}"
|
|
@@ -542,14 +553,14 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
542
553
|
</ft-tooltip>
|
|
543
554
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
544
555
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?e.html`
|
|
545
|
-
<ft-icon part="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}}
|
|
556
|
+
<ft-icon part="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}}Gi.elementDefinitions={"ft-ripple":gi,"ft-tooltip":Ci,"ft-typography":ri,"ft-icon":Di,"ft-loader":Ii},Gi.styles=[i.safariEllipsisFix,Wi],Ki([o.property({type:String,reflect:!0})],Gi.prototype,"role",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"primary",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"outlined",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"disabled",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"dense",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"round",void 0),Ki([o.property({type:String})],Gi.prototype,"label",void 0),Ki([o.property({type:String})],Gi.prototype,"icon",void 0),Ki([o.property({type:String})],Gi.prototype,"iconVariant",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"trailingIcon",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"loading",void 0),Ki([o.property({type:String})],Gi.prototype,"tooltipPosition",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"hideTooltip",void 0),Ki([o.property({type:Boolean})],Gi.prototype,"forceTooltip",void 0),Ki([o.query(".ft-button")],Gi.prototype,"button",void 0),Ki([o.query(".ft-button--label slot")],Gi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Gi);const qi=i.FtCssVariableFactory.extend("--ft-checkbox-text-color",i.designSystemVariables.colorOnSurfaceHigh),Xi=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),Yi=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),Ji=i.FtCssVariableFactory.extend("--ft-checkbox-border-color",i.designSystemVariables.colorOnSurfaceMedium),Qi=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),te=e.css`
|
|
546
557
|
* {
|
|
547
558
|
box-sizing: border-box;
|
|
548
559
|
}
|
|
549
560
|
|
|
550
561
|
.ft-checkbox {
|
|
551
562
|
box-sizing: border-box;
|
|
552
|
-
color: ${
|
|
563
|
+
color: ${qi};
|
|
553
564
|
|
|
554
565
|
display: inline-flex;
|
|
555
566
|
align-items: center;
|
|
@@ -557,7 +568,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
557
568
|
}
|
|
558
569
|
|
|
559
570
|
.ft-checkbox--disabled {
|
|
560
|
-
color: ${
|
|
571
|
+
color: ${Qi};
|
|
561
572
|
}
|
|
562
573
|
|
|
563
574
|
input {
|
|
@@ -581,26 +592,26 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
581
592
|
|
|
582
593
|
.ft-checkbox--box {
|
|
583
594
|
display: flex;
|
|
584
|
-
border: 2px solid ${
|
|
595
|
+
border: 2px solid ${Ji};
|
|
585
596
|
border-radius: 2px;
|
|
586
597
|
|
|
587
598
|
width: 18px;
|
|
588
599
|
height: 18px;
|
|
589
600
|
|
|
590
|
-
color: ${
|
|
601
|
+
color: ${Yi};
|
|
591
602
|
}
|
|
592
603
|
|
|
593
604
|
|
|
594
605
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
595
606
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
596
|
-
border-color: ${
|
|
597
|
-
background-color: ${
|
|
607
|
+
border-color: ${Xi};
|
|
608
|
+
background-color: ${Xi};
|
|
598
609
|
}
|
|
599
610
|
|
|
600
611
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
601
|
-
border-color: ${
|
|
612
|
+
border-color: ${Qi};
|
|
602
613
|
background-color: transparent;
|
|
603
|
-
color: ${
|
|
614
|
+
color: ${Qi};
|
|
604
615
|
}
|
|
605
616
|
|
|
606
617
|
.ft-checkbox--checkmark {
|
|
@@ -619,7 +630,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
619
630
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
620
631
|
opacity: 1;
|
|
621
632
|
}
|
|
622
|
-
`;var
|
|
633
|
+
`;var ie=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.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return e.html`
|
|
623
634
|
<label class="${n.classMap(t)}" for="checkbox-input">
|
|
624
635
|
<div class="ft-checkbox--box-container">
|
|
625
636
|
<ft-ripple
|
|
@@ -645,14 +656,14 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
645
656
|
<slot></slot>
|
|
646
657
|
</ft-typography>
|
|
647
658
|
</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)}}
|
|
659
|
+
`}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)}}ee.elementDefinitions={"ft-ripple":gi,"ft-typography":ri},ee.styles=te,ie([o.property()],ee.prototype,"name",void 0),ie([o.property({type:Boolean,reflect:!0})],ee.prototype,"checked",void 0),ie([o.property({type:Boolean})],ee.prototype,"indeterminate",void 0),ie([o.property({type:Boolean})],ee.prototype,"disabled",void 0),ie([o.query(".ft-checkbox")],ee.prototype,"container",void 0),ie([o.query("ft-ripple")],ee.prototype,"ripple",void 0),i.customElement("ft-checkbox")(ee);const oe=i.FtCssVariableFactory.extend("--ft-radio-text-color",i.designSystemVariables.colorOnSurfaceHigh),se=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),ne=(i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),i.FtCssVariableFactory.extend("--ft-radio-border-color",i.designSystemVariables.colorOnSurfaceMedium)),re=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),le=e.css`
|
|
649
660
|
* {
|
|
650
661
|
box-sizing: border-box;
|
|
651
662
|
}
|
|
652
663
|
|
|
653
664
|
.ft-radio {
|
|
654
665
|
box-sizing: border-box;
|
|
655
|
-
color: ${
|
|
666
|
+
color: ${oe};
|
|
656
667
|
|
|
657
668
|
display: inline-flex;
|
|
658
669
|
align-items: center;
|
|
@@ -660,7 +671,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
660
671
|
}
|
|
661
672
|
|
|
662
673
|
.ft-radio--disabled {
|
|
663
|
-
color: ${
|
|
674
|
+
color: ${re};
|
|
664
675
|
}
|
|
665
676
|
|
|
666
677
|
input {
|
|
@@ -683,7 +694,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
683
694
|
}
|
|
684
695
|
|
|
685
696
|
.ft-radio--box {
|
|
686
|
-
border: 2px solid ${
|
|
697
|
+
border: 2px solid ${ne};
|
|
687
698
|
border-radius: 50%;
|
|
688
699
|
|
|
689
700
|
display: flex;
|
|
@@ -696,7 +707,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
696
707
|
|
|
697
708
|
.ft-radio--box:after {
|
|
698
709
|
content: " ";
|
|
699
|
-
background-color: ${
|
|
710
|
+
background-color: ${se};
|
|
700
711
|
|
|
701
712
|
border-radius: 50%;
|
|
702
713
|
|
|
@@ -708,7 +719,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
708
719
|
}
|
|
709
720
|
|
|
710
721
|
.ft-radio--checked .ft-radio--box {
|
|
711
|
-
border-color: ${
|
|
722
|
+
border-color: ${se};
|
|
712
723
|
}
|
|
713
724
|
|
|
714
725
|
|
|
@@ -717,14 +728,14 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
717
728
|
}
|
|
718
729
|
|
|
719
730
|
.ft-radio--disabled .ft-radio--box {
|
|
720
|
-
border-color: ${
|
|
731
|
+
border-color: ${re};
|
|
721
732
|
background-color: transparent;
|
|
722
733
|
}
|
|
723
734
|
|
|
724
735
|
.ft-radio--disabled .ft-radio--box:after {
|
|
725
|
-
background-color: ${
|
|
736
|
+
background-color: ${re};
|
|
726
737
|
}
|
|
727
|
-
`;var
|
|
738
|
+
`;var ae=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 he extends CustomEvent{constructor(t,i){super("change",{detail:{value:t,checked:i},bubbles:!0,composed:!0})}}class pe extends i.FtLitElement{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return e.html`
|
|
728
739
|
<div class="${n.classMap(t)}">
|
|
729
740
|
<div class="ft-radio--box-container">
|
|
730
741
|
<ft-ripple
|
|
@@ -749,17 +760,17 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
749
760
|
</ft-typography>
|
|
750
761
|
</label>
|
|
751
762
|
</div>
|
|
752
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
763
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new he(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 he(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}pe.elementDefinitions={"ft-ripple":gi,"ft-typography":ri},pe.styles=le,ae([o.property()],pe.prototype,"value",void 0),ae([o.property()],pe.prototype,"name",void 0),ae([o.property({type:Boolean,reflect:!0})],pe.prototype,"checked",void 0),ae([o.property({type:Boolean})],pe.prototype,"disabled",void 0),ae([o.query(".ft-radio")],pe.prototype,"container",void 0),ae([o.query("ft-ripple")],pe.prototype,"ripple",void 0),ae([o.query("input")],pe.prototype,"input",void 0);const ce=e.css`
|
|
753
764
|
:host {
|
|
754
765
|
display: contents;
|
|
755
766
|
}
|
|
756
|
-
`;var
|
|
767
|
+
`;var de=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 fe extends i.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return e.html`
|
|
757
768
|
<slot @slotchange=${this.onSlotChange}
|
|
758
769
|
@change=${this.onChange}
|
|
759
770
|
@keydown=${this.onKeyDown}
|
|
760
771
|
@focusin=${this.focusCurrentValue}
|
|
761
772
|
></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)}}
|
|
773
|
+
`}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)}}fe.elementDefinitions={},fe.styles=ce,de([o.property()],fe.prototype,"name",void 0),de([o.queryAssignedElements()],fe.prototype,"radioButtons",void 0),i.customElement("ft-radio")(pe),i.customElement("ft-radio-group")(fe);const ue={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(jt.fontFamily,"Body2 typography"),fontSize:i.FtCssVariableFactory.external(jt.fontSize,"Body2 typography"),fontWeight:i.FtCssVariableFactory.external(jt.fontWeight,"Body2 typography"),letterSpacing:i.FtCssVariableFactory.external(jt.letterSpacing,"Body2 typography"),lineHeight:i.FtCssVariableFactory.external(jt.lineHeight,"Body2 typography"),textTransform:i.FtCssVariableFactory.external(jt.textTransform,"Body2 typography")},ve=e.css`
|
|
763
774
|
.ft-filter-level--container {
|
|
764
775
|
display: flex;
|
|
765
776
|
flex-direction: column;
|
|
@@ -773,14 +784,14 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
773
784
|
flex-shrink: 0;
|
|
774
785
|
text-decoration: none;
|
|
775
786
|
position: relative;
|
|
776
|
-
border-radius: ${
|
|
787
|
+
border-radius: ${ue.borderRadiusM};
|
|
777
788
|
overflow: hidden;
|
|
778
789
|
display: flex;
|
|
779
790
|
align-items: center;
|
|
780
791
|
padding: 4px 4px;
|
|
781
792
|
gap: 4px;
|
|
782
793
|
cursor: pointer;
|
|
783
|
-
color: ${
|
|
794
|
+
color: ${ue.colorOnSurface};
|
|
784
795
|
}
|
|
785
796
|
|
|
786
797
|
.ft-filter-level--go-back:focus {
|
|
@@ -809,7 +820,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
809
820
|
}
|
|
810
821
|
|
|
811
822
|
ft-button {
|
|
812
|
-
${i.setVariable(Fi.color,
|
|
823
|
+
${i.setVariable(Fi.color,ue.colorOnSurface)};
|
|
813
824
|
}
|
|
814
825
|
|
|
815
826
|
ft-radio, ft-checkbox {
|
|
@@ -823,9 +834,9 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
823
834
|
|
|
824
835
|
.ft-filter-level--no-values {
|
|
825
836
|
margin: 10px 0;
|
|
826
|
-
color: ${
|
|
837
|
+
color: ${ue.colorOnSurfaceMedium};
|
|
827
838
|
}
|
|
828
|
-
`;var
|
|
839
|
+
`;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 xe extends i.FtLitElement{constructor(){super(...arguments),this.id="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,i;return null!==(i=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==i?i:0}render(){let t=[...this.options];this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const i=t.slice(0,this.limit);return e.html`
|
|
829
840
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
830
841
|
${null==this.parent?null:e.html`
|
|
831
842
|
<div tabindex="0"
|
|
@@ -889,7 +900,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
889
900
|
@change=${t=>t.stopPropagation()}>
|
|
890
901
|
${t.renderOption?t.renderOption:t.label}
|
|
891
902
|
</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}))}}
|
|
903
|
+
`}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}))}}xe.elementDefinitions={"ft-button":Gi,"ft-ripple":gi,"ft-typography":ri,"ft-checkbox":ee,"ft-icon":Di,"ft-radio":pe},xe.styles=ve,be([o.property({type:String})],xe.prototype,"id",void 0),be([o.property({type:Object})],xe.prototype,"parent",void 0),be([o.property({type:Array})],xe.prototype,"options",void 0),be([o.property({type:Boolean})],xe.prototype,"multivalued",void 0),be([o.property({type:Boolean})],xe.prototype,"disabled",void 0),be([o.property({type:Boolean})],xe.prototype,"hideSelectedOptions",void 0),be([o.property({type:Boolean})],xe.prototype,"preventNavigation",void 0),be([o.property({type:String})],xe.prototype,"filter",void 0),be([o.property({type:String})],xe.prototype,"moreValuesButtonLabel",void 0),be([o.property({type:String})],xe.prototype,"noValuesLabel",void 0),be([o.property({type:Number})],xe.prototype,"displayedValuesLimit",void 0),be([o.query(".ft-filter-level--container")],xe.prototype,"container",void 0),be([o.state()],xe.prototype,"displayedPages",void 0);const ge={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")},ye=e.css`
|
|
893
904
|
.ft-snap-scroll {
|
|
894
905
|
box-sizing: border-box;
|
|
895
906
|
position: relative;
|
|
@@ -924,7 +935,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
924
935
|
flex-wrap: nowrap;
|
|
925
936
|
align-items: flex-start;
|
|
926
937
|
justify-content: flex-start;
|
|
927
|
-
gap: ${
|
|
938
|
+
gap: ${ge.gap};
|
|
928
939
|
}
|
|
929
940
|
|
|
930
941
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -967,11 +978,11 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
967
978
|
.ft-snap-scroll--next {
|
|
968
979
|
position: absolute;
|
|
969
980
|
display: flex;
|
|
970
|
-
z-index: ${
|
|
981
|
+
z-index: ${ge.buttonsZIndex};
|
|
971
982
|
opacity: 1;
|
|
972
983
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
973
984
|
${i.setVariable(Fi.backgroundColor,"transparent")};
|
|
974
|
-
${i.setVariable(Fi.color,
|
|
985
|
+
${i.setVariable(Fi.color,ge.buttonsColor)};
|
|
975
986
|
}
|
|
976
987
|
|
|
977
988
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -984,37 +995,37 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
984
995
|
top: 0;
|
|
985
996
|
left: -1px;
|
|
986
997
|
bottom: 0;
|
|
987
|
-
background: linear-gradient(to right, ${
|
|
998
|
+
background: linear-gradient(to right, ${ge.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
988
999
|
}
|
|
989
1000
|
|
|
990
1001
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
991
1002
|
top: -1px;
|
|
992
1003
|
left: 0;
|
|
993
1004
|
right: 0;
|
|
994
|
-
background: linear-gradient(to bottom, ${
|
|
1005
|
+
background: linear-gradient(to bottom, ${ge.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
995
1006
|
}
|
|
996
1007
|
|
|
997
1008
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
998
1009
|
top: 0;
|
|
999
1010
|
right: -1px;
|
|
1000
1011
|
bottom: 0;
|
|
1001
|
-
background: linear-gradient(to left, ${
|
|
1012
|
+
background: linear-gradient(to left, ${ge.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1002
1013
|
}
|
|
1003
1014
|
|
|
1004
1015
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1005
1016
|
left: 0;
|
|
1006
1017
|
right: 0;
|
|
1007
1018
|
bottom: -1px;
|
|
1008
|
-
background: linear-gradient(to top, ${
|
|
1019
|
+
background: linear-gradient(to top, ${ge.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1009
1020
|
}
|
|
1010
1021
|
|
|
1011
1022
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1012
1023
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1013
1024
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1014
1025
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1015
|
-
background-color: ${
|
|
1026
|
+
background-color: ${ge.colorSurface};
|
|
1016
1027
|
}
|
|
1017
|
-
`;var
|
|
1028
|
+
`;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 $e extends CustomEvent{constructor(t,i){super("current-element-change",{detail:{index:t,element:i}})}}class we 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
1029
|
<div part="container" class="${t}">
|
|
1019
1030
|
<ft-button
|
|
1020
1031
|
class="ft-snap-scroll--previous"
|
|
@@ -1038,7 +1049,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1038
1049
|
@click=${this.next}
|
|
1039
1050
|
></ft-button>
|
|
1040
1051
|
</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
|
|
1052
|
+
`}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 $e(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)}}we.elementDefinitions={"ft-button":Gi},we.styles=ye,me([o.property({type:Boolean})],we.prototype,"horizontal",void 0),me([o.property({type:Boolean})],we.prototype,"hideScrollbar",void 0),me([o.property({type:Boolean})],we.prototype,"controls",void 0),me([o.property({type:Boolean})],we.prototype,"limitSize",void 0),me([o.state()],we.prototype,"elements",void 0),me([o.state()],we.prototype,"currentElement",void 0),me([o.state()],we.prototype,"withScroll",void 0),me([o.state()],we.prototype,"startReached",void 0),me([o.state()],we.prototype,"endReached",void 0),me([o.query(".ft-snap-scroll--content")],we.prototype,"contentSlot",void 0),i.customElement("ft-snap-scroll")(we);const ke=i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),Se=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),ze=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),Oe=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),Ce=i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),je=i.FtCssVariableFactory.external(i.designSystemVariables.transitionDuration,"Design system"),Be=i.FtCssVariableFactory.external(i.designSystemVariables.transitionTimingFunction,"Design system"),Ie=[ti,e.css`
|
|
1042
1053
|
:host {
|
|
1043
1054
|
display: flex;
|
|
1044
1055
|
max-height: 100%;
|
|
@@ -1051,7 +1062,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1051
1062
|
flex-direction: column;
|
|
1052
1063
|
max-height: 100%;
|
|
1053
1064
|
max-width: 100%;
|
|
1054
|
-
color: ${
|
|
1065
|
+
color: ${Se};
|
|
1055
1066
|
}
|
|
1056
1067
|
|
|
1057
1068
|
.ft-filter--header {
|
|
@@ -1087,8 +1098,8 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1087
1098
|
padding: 0 10px;
|
|
1088
1099
|
overflow: hidden;
|
|
1089
1100
|
height: 32px;
|
|
1090
|
-
transition: height ${
|
|
1091
|
-
margin ${
|
|
1101
|
+
transition: height ${je} ${Be},
|
|
1102
|
+
margin ${je} ${Be};
|
|
1092
1103
|
transition-delay: 500ms;
|
|
1093
1104
|
}
|
|
1094
1105
|
|
|
@@ -1101,15 +1112,15 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1101
1112
|
display: block;
|
|
1102
1113
|
width: 100%;
|
|
1103
1114
|
border-radius: 4px;
|
|
1104
|
-
border: 1px solid ${
|
|
1115
|
+
border: 1px solid ${ke};
|
|
1105
1116
|
padding: 4px;
|
|
1106
|
-
background-color: ${
|
|
1107
|
-
color: ${
|
|
1108
|
-
outline-color: ${
|
|
1117
|
+
background-color: ${Ce};
|
|
1118
|
+
color: ${Se};
|
|
1119
|
+
outline-color: ${Oe};
|
|
1109
1120
|
}
|
|
1110
1121
|
|
|
1111
1122
|
input::placeholder {
|
|
1112
|
-
color: ${
|
|
1123
|
+
color: ${ze};
|
|
1113
1124
|
}
|
|
1114
1125
|
|
|
1115
1126
|
input:placeholder-shown {
|
|
@@ -1125,7 +1136,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1125
1136
|
}
|
|
1126
1137
|
|
|
1127
1138
|
.ft-filter--separator {
|
|
1128
|
-
border-top: 1px solid ${
|
|
1139
|
+
border-top: 1px solid ${ke};
|
|
1129
1140
|
margin: 4px 10px;
|
|
1130
1141
|
}
|
|
1131
1142
|
|
|
@@ -1150,7 +1161,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1150
1161
|
slot {
|
|
1151
1162
|
display: none;
|
|
1152
1163
|
}
|
|
1153
|
-
`];var
|
|
1164
|
+
`];var Ee=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 Me extends CustomEvent{constructor(t){super("change",{detail:t})}}class Le 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
1165
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1155
1166
|
part="container">
|
|
1156
1167
|
${this.label||o?e.html`
|
|
@@ -1220,15 +1231,15 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1220
1231
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1221
1232
|
noValuesLabel="${this.noValuesLabel}"
|
|
1222
1233
|
></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
|
|
1234
|
+
`}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 Me(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)}}Le.elementDefinitions={"ft-button":Gi,"ft-filter-level":xe,"ft-snap-scroll":we,"ft-typography":ri},Le.styles=Ie,Ee([o.property({type:String})],Le.prototype,"id",void 0),Ee([o.property({type:String})],Le.prototype,"label",void 0),Ee([o.property({type:String})],Le.prototype,"filterPlaceHolder",void 0),Ee([o.property({type:String})],Le.prototype,"clearButtonLabel",void 0),Ee([o.property({type:String})],Le.prototype,"moreValuesButtonLabel",void 0),Ee([o.property({type:String})],Le.prototype,"noValuesLabel",void 0),Ee([i.jsonProperty([])],Le.prototype,"options",void 0),Ee([o.property({type:Boolean})],Le.prototype,"multivalued",void 0),Ee([o.property({type:Boolean})],Le.prototype,"disabled",void 0),Ee([o.property({type:Boolean})],Le.prototype,"raiseSelectedOptions",void 0),Ee([o.property({type:Number})],Le.prototype,"displayedValuesLimit",void 0),Ee([o.property({type:Boolean})],Le.prototype,"hideClearButton",void 0),Ee([o.query(".ft-filter--slot")],Le.prototype,"slotElement",void 0),Ee([o.query(".ft-filter--container")],Le.prototype,"container",void 0),Ee([o.query(".ft-filter--values")],Le.prototype,"valuesContainer",void 0),Ee([o.query(".ft-filter--levels")],Le.prototype,"levelsContainer",void 0),Ee([o.query(".ft-filter--levels ft-filter-level:last-child")],Le.prototype,"lastLevel",void 0),Ee([o.query(".ft-filter--filter input")],Le.prototype,"filterInput",void 0),Ee([o.queryAll(".ft-filter--levels ft-filter-level")],Le.prototype,"levels",void 0),Ee([o.state()],Le.prototype,"withScroll",void 0),Ee([o.state()],Le.prototype,"filter",void 0),Ee([o.state()],Le.prototype,"slideIn",void 0),Ee([o.state()],Le.prototype,"slideOut",void 0);var Ne=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 Ae extends i.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1224
1235
|
<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}))}}
|
|
1226
|
-
`,
|
|
1236
|
+
`}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}))}}Ae.elementDefinitions={},Ne([o.property({type:String})],Ae.prototype,"label",void 0),Ne([o.property({type:Object,converter:t=>t})],Ae.prototype,"value",void 0),Ne([o.property({type:Boolean,reflect:!0})],Ae.prototype,"selected",void 0),Ne([o.property({type:Object})],Ae.prototype,"subOptions",void 0),Ne([i.jsonProperty({})],Ae.prototype,"renderOption",void 0),Ne([o.query(".ft-filter-option--slot")],Ae.prototype,"slotElement",void 0),i.customElement("ft-filter")(Le),i.customElement("ft-filter-option")(Ae);const Te=e.css`
|
|
1237
|
+
`,De=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 Ue{static build(t){const{baseUrl:i,apiIntegrationIdentifier:e}=De.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?Ue.build(t):null!==(i=Ue.API)&&void 0!==i?i:Ue.API=Ue.build()}static await(t){return new Promise((i=>{let e=Ue.get(t);if(e)i(e);else{const o=De.subscribe((()=>{e=Ue.get(t),e&&(o(),i(e))}))}}))}}var Fe;const _e=Symbol("clearAfterUnitTest");class Pe{constructor(t){this.messageContextProvider=t,this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={},this.currentUiLocale="",this[Fe]=()=>{this.defaultMessages={},this.cache=new i.CacheRegistry,this.listeners={}},this.currentUiLocale=De.getState().uiLocale,De.subscribe((()=>this.clearWhenUiLocaleChanges()))}clearWhenUiLocaleChanges(){const{uiLocale:t}=De.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,(()=>this.messageContextProvider(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)))))}}Fe=_e,null==window.FluidTopicsI18nService&&(window.FluidTopicsI18nService=new Pe((async(t,i)=>(await Ue.await()).getFluidTopicsMessageContext(t,i)))),null==window.FluidTopicsCustomI18nService&&(window.FluidTopicsCustomI18nService=new Pe((async(t,i)=>(await Ue.await()).getCustomMessageContext(t,i))));const Re=window.FluidTopicsI18nService,Ve=window.FluidTopicsCustomI18nService;var Ze=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 He 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=()=>Ue.get(),this.cache=new i.CacheRegistry,this.cleanSessionDebouncer=new i.Debouncer}render(){return e.html`
|
|
1227
1238
|
<slot></slot>
|
|
1228
|
-
`}updated(t){super.updated(t),t.has("baseUrl")&&
|
|
1229
|
-
`;var
|
|
1239
|
+
`}updated(t){super.updated(t),t.has("baseUrl")&&De.actions.setBaseUrl(this.baseUrl),t.has("apiIntegrationIdentifier")&&De.actions.setApiIntegrationIdentifier(this.apiIntegrationIdentifier),t.has("uiLocale")&&De.actions.setUiLocale(this.uiLocale),t.has("noCustom")&&De.actions.setNoCustom(this.noCustom),t.has("editorMode")&&De.actions.setEditorMode(this.editorMode),t.has("noCustomComponent")&&De.actions.setNoCustomComponent(this.noCustomComponent),t.has("session")&&De.actions.setSession(this.session),t.has("availableUiLocales")&&De.actions.setAvailableUiLocales(Array.isArray(this.availableUiLocales)?this.availableUiLocales:[]),t.has("messageContexts")&&null!=this.messageContexts&&this.messageContexts.forEach((t=>Re.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()))))}}He.elementDefinitions={},He.styles=Te,Ze([o.property()],He.prototype,"baseUrl",void 0),Ze([o.property()],He.prototype,"apiIntegrationIdentifier",void 0),Ze([o.property()],He.prototype,"uiLocale",void 0),Ze([i.jsonProperty([])],He.prototype,"availableUiLocales",void 0),Ze([o.property({type:Boolean})],He.prototype,"editorMode",void 0),Ze([o.property({type:Boolean})],He.prototype,"noCustom",void 0),Ze([o.property({converter:{fromAttribute:t=>"false"!==t&&("true"===t||null!=t&&t)}})],He.prototype,"noCustomComponent",void 0),Ze([o.property({type:Boolean})],He.prototype,"withManualResources",void 0),Ze([i.jsonProperty([])],He.prototype,"messageContexts",void 0),Ze([i.jsonProperty(void 0)],He.prototype,"session",void 0),Ze([o.property({type:Object})],He.prototype,"apiProvider",void 0),i.customElement("ft-app-context")(He);var We=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 Ke extends Event{constructor(){super("register-ft-search-component",{bubbles:!0,composed:!0})}}const Ge=Symbol("registerInterval");class qe 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[Ge]=window.setInterval((()=>this.tryToRegisterToContext()),50)}tryToRegisterToContext(){null!=this.stateManager?window.clearInterval(this[Ge]):this.dispatchEvent(new Ke)}disconnectedCallback(){super.disconnectedCallback(),this.clearStateManager()}}return i=Ge,We([o.state()],e.prototype,"stateManager",void 0),e}(i.FtLitElementRedux)){}function Xe(t){return t.rootNodes.map((t=>Ye(t)))}function Ye(t){return{label:t.label,value:t.value,selected:t.selected,subOptions:t.childNodes.map((t=>Ye(t)))}}const Je=e.css`
|
|
1240
|
+
`;var Qe=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};const to=Symbol("i18nProperties"),io=Symbol("i18nUnsubs");function eo(t){var i;class e extends t{constructor(){super(...arguments),this.useCustomMessageContexts=!1,this[i]=new Map}get i18nService(){return this.useCustomMessageContexts?Ve:Re}i18n(t,i,...e){var o;if("string"==typeof t)return this.i18nService.resolveMessage(t,i,...e);const s=null!==(o=t.args)&&void 0!==o?o:t.argsProvider?t.argsProvider(this):[];return this.i18nService.resolveMessage(t.context,t.key,...s)}onI18nUpdate(t){var i;null===(i=this[to])||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[to])||void 0===i||i.forEach(((t,i)=>{null!=t.argsProvider&&(this[i]=this.i18n(t))}))}connectedCallback(){super.connectedCallback(),null!=this[to]&&new Set([...this[to].values()].map((t=>t.context))).forEach((t=>this.addI18nMessages(t)))}addI18nMessages(t,i){t=t.toLowerCase(),this[io].has(t)||this[io].set(t,this.i18nService.subscribe(t,(()=>this.onI18nUpdate(t)))),this.i18nService.prepareContext(t,null!=i?i:{})}addI18nContext(t,i){this.addI18nMessages(t.name,i)}disconnectedCallback(){super.disconnectedCallback(),this[io].forEach((t=>t())),this[io].clear()}}return i=io,Qe([o.property({type:Boolean})],e.prototype,"useCustomMessageContexts",void 0),e}class oo extends(eo(i.FtLitElement)){}class so extends(eo(i.FtLitElementRedux)){}var no=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 ro extends so{constructor(){super(),this.editorMode=!1,this.addStore(De)}render(){return this.key&&this.context?e.html`
|
|
1230
1241
|
<span class="ft-i18n">${this.i18n(this.context,this.key,...Array.isArray(this.args)?this.args:[])}</span>
|
|
1231
|
-
`:this.editorMode?"Select a context and a label key.":e.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}
|
|
1242
|
+
`:this.editorMode?"Select a context and a label key.":e.nothing}update(t){super.update(t),this.context&&this.key&&this.defaultMessage&&this.addI18nMessages(this.context,{[this.key]:this.defaultMessage})}}ro.elementDefinitions={},ro.styles=Je,no([i.redux()],ro.prototype,"editorMode",void 0),no([o.property()],ro.prototype,"context",void 0),no([o.property()],ro.prototype,"key",void 0),no([i.jsonProperty([])],ro.prototype,"args",void 0),no([o.property()],ro.prototype,"defaultMessage",void 0);class lo{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)=>Re.resolveMessage(this.name,i,...t)})}static build(t){return new lo(t)}static fromGwt(t){return new lo(t)}}i.customElement("ft-i18n")(ro);const ao=lo.build("designedSearchFacet");var ho=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 po extends(eo(qe)){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(ao),this.addStore(De)}render(){let t=this.facets.find((t=>t.key==this.facetId));return t?e.html`
|
|
1232
1243
|
<ft-filter
|
|
1233
1244
|
part="filter"
|
|
1234
1245
|
label="${t.label}"
|
|
@@ -1236,12 +1247,12 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
|
|
|
1236
1247
|
id="${this.facetId}"
|
|
1237
1248
|
?multivalued=${t.multiSelectionable}
|
|
1238
1249
|
?raiseSelectedOptions=${this.raiseSelectedOptions}
|
|
1239
|
-
.options=${
|
|
1250
|
+
.options=${Xe(t)}
|
|
1240
1251
|
.displayedValuesLimit=${this.maxValues}
|
|
1241
|
-
filterPlaceHolder="${
|
|
1242
|
-
clearButtonLabel="${
|
|
1243
|
-
moreValuesButtonLabel="${
|
|
1244
|
-
noValuesLabel="${
|
|
1252
|
+
filterPlaceHolder="${ao.messages.filterInputPlaceHolder(t.label)}"
|
|
1253
|
+
clearButtonLabel="${ao.messages.clearFilterButton()}"
|
|
1254
|
+
moreValuesButtonLabel="${ao.messages.displayMoreFilterValuesButton()}"
|
|
1255
|
+
noValuesLabel="${ao.messages.noFilterValuesAvailable()}"
|
|
1245
1256
|
@change=${this.onFacetValueSelected}
|
|
1246
1257
|
></ft-filter>
|
|
1247
|
-
`:!this.facetId&&this.editorMode?e.html`${
|
|
1258
|
+
`:!this.facetId&&this.editorMode?e.html`${ao.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)}}po.elementDefinitions={"ft-filter":Le,"ft-typography":ri},po.styles=l,ho([o.property()],po.prototype,"facetId",void 0),ho([o.property({type:Number})],po.prototype,"maxValues",void 0),ho([o.property({type:Boolean})],po.prototype,"raiseSelectedOptions",void 0),ho([i.redux({store:"search"})],po.prototype,"request",void 0),ho([i.redux({store:"search"})],po.prototype,"facets",void 0),ho([i.redux({store:De.name})],po.prototype,"editorMode",void 0),i.customElement("ft-search-facet")(po),t.FtSearchFacet=po,t.FtSearchFacetCssVariables={},t.styles=l,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|