@fluid-topics/ft-search-bar 0.1.9 → 0.1.12
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/converters.d.ts +1 -0
- package/build/converters.js +5 -0
- package/build/ft-search-bar.js +12 -12
- package/build/ft-search-bar.light.js +29 -27
- package/build/ft-search-bar.min.js +65 -63
- package/package.json +14 -14
package/build/converters.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ export declare function getLabelFromValue(value: string): string | undefined;
|
|
|
7
7
|
export declare function getBreadcrumbFromValue(value: string): string;
|
|
8
8
|
export declare function selectedValues(facet: FtFilterProperties): Array<string>;
|
|
9
9
|
export declare function facetToFilter(facet: FtSearchFacet): FtFilterProperties;
|
|
10
|
+
export declare function getSelectedValues(facet: FtSearchFacet): Array<string>;
|
|
10
11
|
//# sourceMappingURL=converters.d.ts.map
|
package/build/converters.js
CHANGED
|
@@ -54,4 +54,9 @@ export function facetToFilter(facet) {
|
|
|
54
54
|
options: facet.rootNodes.map(n => facetEntryToOption(n, false))
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
+
export function getSelectedValues(facet) {
|
|
58
|
+
return flatDeep(facet.rootNodes, n => n.selected ? [] : n.childNodes)
|
|
59
|
+
.filter(n => n.selected)
|
|
60
|
+
.map(n => n.value);
|
|
61
|
+
}
|
|
57
62
|
//# sourceMappingURL=converters.js.map
|
package/build/ft-search-bar.js
CHANGED
|
@@ -11,7 +11,7 @@ import { classMap } from "lit/directives/class-map.js";
|
|
|
11
11
|
import { customElement, Debouncer, FtLitElement, jsonProperty, ParametrizedLabelResolver } from "@fluid-topics/ft-wc-utils";
|
|
12
12
|
import { FtSizeCategory, FtSizeWatcher } from "@fluid-topics/ft-size-watcher";
|
|
13
13
|
import { FtTypography, FtTypographyBody2 } from "@fluid-topics/ft-typography";
|
|
14
|
-
import { facetToFilter, getBreadcrumbFromValue, getLabelFromValue, selectedValues, serializeRequest } from "./converters";
|
|
14
|
+
import { facetToFilter, getBreadcrumbFromValue, getLabelFromValue, getSelectedValues, selectedValues, serializeRequest } from "./converters";
|
|
15
15
|
import { FtFilter, FtFilterOption } from "@fluid-topics/ft-filter";
|
|
16
16
|
import { FtIcon, FtIcons, FtIconVariants, resolveFileFormatIcon, } from "@fluid-topics/ft-icon";
|
|
17
17
|
import { FtAccordion, FtAccordionItem } from "@fluid-topics/ft-accordion";
|
|
@@ -267,7 +267,7 @@ let FtSearchBar = class FtSearchBar extends FtLitElement {
|
|
|
267
267
|
raiseSelectedOptions
|
|
268
268
|
.options=${filter.options}
|
|
269
269
|
.displayedValuesLimit=${10}
|
|
270
|
-
@change=${(e) => this.setFilter(filter.id,
|
|
270
|
+
@change=${(e) => this.setFilter(filter.id, e.detail)}
|
|
271
271
|
></ft-filter>
|
|
272
272
|
</ft-accordion-item>
|
|
273
273
|
`;
|
|
@@ -431,7 +431,7 @@ let FtSearchBar = class FtSearchBar extends FtLitElement {
|
|
|
431
431
|
raiseSelectedOptions
|
|
432
432
|
.options=${filter.options}
|
|
433
433
|
.displayedValuesLimit=${10}
|
|
434
|
-
@change=${(e) => this.setFilter(filter.id,
|
|
434
|
+
@change=${(e) => this.setFilter(filter.id, e.detail)}
|
|
435
435
|
></ft-filter>
|
|
436
436
|
`;
|
|
437
437
|
})}
|
|
@@ -439,7 +439,7 @@ let FtSearchBar = class FtSearchBar extends FtLitElement {
|
|
|
439
439
|
`;
|
|
440
440
|
}
|
|
441
441
|
renderSelectedFacets() {
|
|
442
|
-
if (!this.hasLocaleSelector && this.
|
|
442
|
+
if (!this.hasLocaleSelector && !this.hasFacets) {
|
|
443
443
|
return null;
|
|
444
444
|
}
|
|
445
445
|
const useSnapScroll = (!this.isMobile && this.dense) || (this.isMobile && this.mobileMenuOpen);
|
|
@@ -452,9 +452,10 @@ let FtSearchBar = class FtSearchBar extends FtLitElement {
|
|
|
452
452
|
${(this.getLocaleLabel(this.contentLocale))}
|
|
453
453
|
</ft-chip>
|
|
454
454
|
` : null}
|
|
455
|
-
${repeat(this.
|
|
456
|
-
|
|
457
|
-
|
|
455
|
+
${repeat(this.facets, facet => facet.key, facet => {
|
|
456
|
+
const values = getSelectedValues(facet);
|
|
457
|
+
return repeat(values, value => {
|
|
458
|
+
let label = facet.label + ": " + getBreadcrumbFromValue(value);
|
|
458
459
|
const chip = html `
|
|
459
460
|
<ft-chip
|
|
460
461
|
part="selected-filters"
|
|
@@ -464,8 +465,8 @@ let FtSearchBar = class FtSearchBar extends FtLitElement {
|
|
|
464
465
|
icon=${this.isMobile ? nothing : "close"}
|
|
465
466
|
label="${label}"
|
|
466
467
|
title=${useSnapScroll ? label : nothing}
|
|
467
|
-
@click=${() => this.openMobileFilters(
|
|
468
|
-
@icon-click=${() => this.setFilter(
|
|
468
|
+
@click=${() => this.openMobileFilters(facet.key)}
|
|
469
|
+
@icon-click=${() => this.setFilter(facet.key, values.filter(v => v !== value))}>
|
|
469
470
|
${getLabelFromValue(value)}
|
|
470
471
|
</ft-chip>
|
|
471
472
|
`;
|
|
@@ -752,7 +753,7 @@ let FtSearchBar = class FtSearchBar extends FtLitElement {
|
|
|
752
753
|
.map(l => l.label)
|
|
753
754
|
.pop()) !== null && _a !== void 0 ? _a : locale;
|
|
754
755
|
}
|
|
755
|
-
setFilter(key,
|
|
756
|
+
setFilter(key, selectedValues) {
|
|
756
757
|
let newFilters = this.searchFilters.filter(f => f.key !== key);
|
|
757
758
|
this.facets.forEach(facet => {
|
|
758
759
|
if (facet.key === key) {
|
|
@@ -762,7 +763,6 @@ let FtSearchBar = class FtSearchBar extends FtLitElement {
|
|
|
762
763
|
if (selectedValues.length) {
|
|
763
764
|
newFilters.push({
|
|
764
765
|
key: key,
|
|
765
|
-
label: label,
|
|
766
766
|
negative: false,
|
|
767
767
|
values: selectedValues
|
|
768
768
|
});
|
|
@@ -775,7 +775,7 @@ let FtSearchBar = class FtSearchBar extends FtLitElement {
|
|
|
775
775
|
if (request.contentLocale != null) {
|
|
776
776
|
this.contentLocale = request.contentLocale;
|
|
777
777
|
}
|
|
778
|
-
this.searchFilters = request.filters
|
|
778
|
+
this.searchFilters = request.filters;
|
|
779
779
|
}
|
|
780
780
|
}
|
|
781
781
|
clearFilters() {
|
|
@@ -135,7 +135,7 @@ const q=t=>({_$litStatic$:t}),G=new Map,K=(t=>(e,...i)=>{var o;const r=i.length;
|
|
|
135
135
|
</${q(this.element)}>
|
|
136
136
|
`:K`
|
|
137
137
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
138
|
-
`}};function Jt(t,e){return t.flatMap((t=>[t,...Jt(e(t),e)]))}function Yt(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Qt(t,e){return{label:t.label,selected:!e&&t.selected,subOptions:t.childNodes.map((e=>Qt(e,t.selected))),value:t.value}}function te(t){return{id:t.key,label:t.label,multivalued:t.multiSelectionable,options:t.rootNodes.map((t=>Qt(t,!1)))}}
|
|
138
|
+
`}};function Jt(t,e){return t.flatMap((t=>[t,...Jt(e(t),e)]))}function Yt(t){return t.startsWith('"')&&t.endsWith('"')?t.replace(/(^"+)|("+$)/g,""):t}function Qt(t,e){return{label:t.label,selected:!e&&t.selected,subOptions:t.childNodes.map((e=>Qt(e,t.selected))),value:t.value}}function te(t){return{id:t.key,label:t.label,multivalued:t.multiSelectionable,options:t.rootNodes.map((t=>Qt(t,!1)))}}X([i.property()],Xt.prototype,"element",void 0),X([i.property()],Xt.prototype,"variant",void 0),Xt=X([a.customElement("ft-typography")],Xt);
|
|
139
139
|
/*! *****************************************************************************
|
|
140
140
|
Copyright (c) Microsoft Corporation.
|
|
141
141
|
|
|
@@ -149,7 +149,8 @@ const q=t=>({_$litStatic$:t}),G=new Map,K=(t=>(e,...i)=>{var o;const r=i.length;
|
|
|
149
149
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
150
150
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
151
151
|
PERFORMANCE OF THIS SOFTWARE.
|
|
152
|
-
***************************************************************************** */
|
|
152
|
+
***************************************************************************** */
|
|
153
|
+
var ee=function(t,e){return ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},ee(t,e)};function ie(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}ee(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var oe=function(){return oe=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},oe.apply(this,arguments)};function re(t,e,i,o){for(var r,a=arguments.length,c=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,n=t.length-1;n>=0;n--)(r=t[n])&&(c=(a<3?r(c):a>3?r(e,i,c):r(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c}function ae(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],o=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}
|
|
153
154
|
/**
|
|
154
155
|
* @license
|
|
155
156
|
* Copyright 2018 Google Inc.
|
|
@@ -654,7 +655,7 @@ const Ie=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-wei
|
|
|
654
655
|
</ft-tooltip>
|
|
655
656
|
`}resolveIcon(){return this.loading?e.html`
|
|
656
657
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
657
|
-
<mwc-icon>${this.icon}</mwc-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){
|
|
658
|
+
<mwc-icon>${this.icon}</mwc-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}};Qe.elementDefinitions={"ft-ripple":Fe,"ft-tooltip":He,"ft-typography":Xt,"mwc-icon":Re,"ft-loader":Ze},qe([i.property({type:Boolean})],Qe.prototype,"primary",void 0),qe([i.property({type:Boolean})],Qe.prototype,"outlined",void 0),qe([i.property({type:Boolean})],Qe.prototype,"disabled",void 0),qe([i.property({type:Boolean})],Qe.prototype,"dense",void 0),qe([i.property({type:Boolean})],Qe.prototype,"round",void 0),qe([i.property({type:String})],Qe.prototype,"label",void 0),qe([i.property({type:String})],Qe.prototype,"icon",void 0),qe([i.property({type:Boolean})],Qe.prototype,"trailingIcon",void 0),qe([i.property({type:Boolean})],Qe.prototype,"loading",void 0),qe([i.property({type:String})],Qe.prototype,"tooltipPosition",void 0),qe([i.query(".ft-button")],Qe.prototype,"button",void 0),qe([i.query(".ft-button--label slot")],Qe.prototype,"slottedContent",void 0),Qe=qe([a.customElement("ft-button")],Qe);
|
|
658
659
|
/**
|
|
659
660
|
* @license
|
|
660
661
|
* Copyright 2017 Google Inc.
|
|
@@ -901,23 +902,23 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
901
902
|
<mwc-formfield label="${t.label}">
|
|
902
903
|
<mwc-checkbox
|
|
903
904
|
reducedTouchTarget
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
@change=${e=>this.
|
|
905
|
+
.checked=${t.selected}
|
|
906
|
+
.disabled=${this.disabled}
|
|
907
|
+
.indeterminate=${Jt(null!==(i=t.subOptions)&&void 0!==i?i:[],(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]})).some((t=>t.selected))}
|
|
908
|
+
@change=${e=>this.optionsChanged(e,t)}
|
|
908
909
|
></mwc-checkbox>
|
|
909
910
|
</mwc-formfield>
|
|
910
|
-
`}
|
|
911
|
+
`}buildMonoValuedOption(t){return e.html`
|
|
911
912
|
<mwc-formfield label="${t.label}">
|
|
912
913
|
<mwc-radio
|
|
913
914
|
reducedTouchTarget
|
|
914
915
|
name="${this.id}"
|
|
915
916
|
?checked=${t.selected}
|
|
916
917
|
?disabled=${this.disabled}
|
|
917
|
-
@click=${e=>this.
|
|
918
|
+
@click=${e=>this.optionsChanged(e,t)}
|
|
918
919
|
></mwc-radio>
|
|
919
920
|
</mwc-formfield>
|
|
920
|
-
`}
|
|
921
|
+
`}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}};vi.elementDefinitions={"ft-button":Qe,"ft-ripple":Fe,"ft-typography":Xt,"mwc-checkbox":Ee,"mwc-formfield":ci,"mwc-icon":Re,"mwc-radio":mi},bi([i.property({type:String})],vi.prototype,"id",void 0),bi([i.property({type:Object})],vi.prototype,"parent",void 0),bi([i.property({type:Array})],vi.prototype,"options",void 0),bi([i.property({type:Boolean})],vi.prototype,"multivalued",void 0),bi([i.property({type:Boolean})],vi.prototype,"disabled",void 0),bi([i.property({type:Boolean})],vi.prototype,"hideSelectedOptions",void 0),bi([i.property({type:Boolean})],vi.prototype,"preventNavigation",void 0),bi([i.property({type:String})],vi.prototype,"filter",void 0),bi([i.property({type:String})],vi.prototype,"moreValuesButtonLabel",void 0),bi([i.property({type:Number})],vi.prototype,"displayedValuesLimit",void 0),bi([i.query(".ft-filter-level--container")],vi.prototype,"container",void 0),bi([i.state()],vi.prototype,"displayedPages",void 0),vi=bi([a.customElement("ft-filter-level")],vi);var xi=function(t,e,i,o){for(var r,a=arguments.length,c=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,n=t.length-1;n>=0;n--)(r=t[n])&&(c=(a<3?r(c):a>3?r(e,i,c):r(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};const yi={buttonsColor:a.FtCssVariable.extend("--ft-snap-scroll-buttons-color",a.designSystemVariables.colorPrimary),buttonsZIndex:a.FtCssVariable.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:a.FtCssVariable.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:a.FtCssVariable.external(a.designSystemVariables.colorSurface,"Design system")};class ki extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}let $i=class extends a.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 a.Debouncer(200),this.updateScrollDebouncer=new a.Debouncer(100)}getStyles(){return e.css`
|
|
921
922
|
.ft-snap-scroll {
|
|
922
923
|
box-sizing: border-box;
|
|
923
924
|
position: relative;
|
|
@@ -1067,8 +1068,8 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1067
1068
|
></ft-button>
|
|
1068
1069
|
</div>
|
|
1069
1070
|
`}updated(t){var e;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===(e=this.listenedContainer)||void 0===e||e.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 ki(this.currentElement,this.elements[this.currentElement]))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,i;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(i=this.contentSlot)||void 0===i||i.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);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 e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}};$i.elementDefinitions={"ft-button":Qe},xi([i.property({type:Boolean})],$i.prototype,"horizontal",void 0),xi([i.property({type:Boolean})],$i.prototype,"hideScrollbar",void 0),xi([i.property({type:Boolean})],$i.prototype,"controls",void 0),xi([i.property({type:Boolean})],$i.prototype,"limitSize",void 0),xi([i.state()],$i.prototype,"elements",void 0),xi([i.state()],$i.prototype,"currentElement",void 0),xi([i.state()],$i.prototype,"withScroll",void 0),xi([i.state()],$i.prototype,"startReached",void 0),xi([i.state()],$i.prototype,"endReached",void 0),xi([i.query(".ft-snap-scroll--content")],$i.prototype,"contentSlot",void 0),$i=xi([a.customElement("ft-snap-scroll")],$i);var _i=function(t,e,i,o){for(var r,a=arguments.length,c=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,n=t.length-1;n>=0;n--)(r=t[n])&&(c=(a<3?r(c):a>3?r(e,i,c):r(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};let wi=class extends a.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}getTemplate(){return e.html`
|
|
1070
|
-
<slot @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1071
|
-
`}updateSubOptionsFromSlot(t){
|
|
1071
|
+
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1072
|
+
`}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}))}};wi.elementDefinitions={},_i([i.property({type:String})],wi.prototype,"label",void 0),_i([i.property({type:Object,converter:t=>t})],wi.prototype,"value",void 0),_i([i.property({type:Boolean,reflect:!0})],wi.prototype,"selected",void 0),_i([i.property({type:Object})],wi.prototype,"subOptions",void 0),_i([i.query(".ft-filter-option--slot")],wi.prototype,"slotElement",void 0),wi=_i([a.customElement("ft-filter-option")],wi);var zi=function(t,e,i,o){for(var r,a=arguments.length,c=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,n=t.length-1;n>=0;n--)(r=t[n])&&(c=(a<3?r(c):a>3?r(e,i,c):r(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};const Si=a.FtCssVariable.external(a.designSystemVariables.colorOutline,"Design system"),Oi=a.FtCssVariable.external(a.designSystemVariables.colorOnSurface,"Design system"),Ci=a.FtCssVariable.external(a.designSystemVariables.colorOnSurfaceMedium,"Design system"),Bi=a.FtCssVariable.external(a.designSystemVariables.colorPrimary,"Design system"),Ei=a.FtCssVariable.external(a.designSystemVariables.colorSurface,"Design system"),Ti=a.FtCssVariable.external(a.designSystemVariables.transitionDuration,"Design system"),Ai=a.FtCssVariable.external(a.designSystemVariables.transitionTimingFunction,"Design system");class Fi extends CustomEvent{constructor(t){super("change",{detail:t})}}let Ii=class extends a.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new a.Debouncer(300),this.changeDebouncer=new a.Debouncer(10)}getStyles(){return[qt,e.css`
|
|
1072
1073
|
:host {
|
|
1073
1074
|
display: flex;
|
|
1074
1075
|
max-height: 100%;
|
|
@@ -1198,8 +1199,9 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1198
1199
|
<div class="ft-filter--values">
|
|
1199
1200
|
${this.renderLevels()}
|
|
1200
1201
|
</div>
|
|
1201
|
-
<slot
|
|
1202
|
-
@
|
|
1202
|
+
<slot class="ft-filter--slot"
|
|
1203
|
+
@slotchange=${this.updateOptionsFromSlot}
|
|
1204
|
+
@option-change=${this.optionsChanged}></slot>
|
|
1203
1205
|
</div>
|
|
1204
1206
|
`}update(t){if(super.update(t),t.has("options")){const t=new Set(this.flatOptions.map((t=>t.value)));this.displayedLevels=this.displayedLevels.filter((e=>t.has(e)))}}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),this.valuesContainer&&this.scrollResizeObserver.observe(this.valuesContainer),this.container&&this.scrollResizeObserver.observe(this.container),t.has("options")&&(this.updateScroll(),null===(e=this.levelsContainer)||void 0===e||e.scrollToIndex(this.displayedLevels.length)),t.has("slideIn")&&this.slideIn&&setTimeout((()=>{var t;null===(t=this.levelsContainer)||void 0===t||t.next(),this.slideIn=void 0}),0),t.has("slideOut")&&this.slideOut&&(null===(i=this.levelsContainer)||void 0===i||i.previous(),setTimeout((()=>{this.displayedLevels.pop(),this.slideOut=void 0}),300))}renderLevels(){const t=this.flatOptions,i=t.filter((t=>t.selected)),o=this.slideIn||this.slideOut?this.displayedLevels.length-2:this.displayedLevels.length-1,r=o<0?"ft-filter--level-center":"ft-filter--level-left";return e.html`
|
|
1205
1207
|
${this.raiseSelectedOptions&&i.length>0?e.html`
|
|
@@ -1237,7 +1239,7 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
1237
1239
|
@display-level=${this.onDisplayLevel}
|
|
1238
1240
|
part="values"
|
|
1239
1241
|
></ft-filter-level>
|
|
1240
|
-
`}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){if(t.stopPropagation(),!this.multivalued){const e=i=>{var o;i.value!==t.detail.value&&(i.selected=!1),null===(o=i.subOptions)||void 0===o||o.forEach(e)};this.options.forEach(e)}this.optionsChanged()}optionsChanged(){var t;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new Fi(e)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}updateOptionsFromSlot(t){const e=t.composedPath()[0];this.options=e.assignedElements().map((t=>t))}onFilterChange(t){const e=t.composedPath()[0];this.filter=e.value}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}};var Ri,Di;Ii.elementDefinitions={"ft-button":Qe,"ft-filter-level":vi,"ft-snap-scroll":$i,"ft-typography":Xt},zi([i.property({type:String})],Ii.prototype,"id",void 0),zi([i.property({type:String})],Ii.prototype,"label",void 0),zi([i.property({type:String})],Ii.prototype,"filterPlaceHolder",void 0),zi([i.property({type:String})],Ii.prototype,"clearButtonLabel",void 0),zi([i.property({type:String})],Ii.prototype,"moreValuesButtonLabel",void 0),zi([i.property({type:Array})],Ii.prototype,"options",void 0),zi([i.property({type:Boolean})],Ii.prototype,"multivalued",void 0),zi([i.property({type:Boolean})],Ii.prototype,"disabled",void 0),zi([i.property({type:Boolean})],Ii.prototype,"raiseSelectedOptions",void 0),zi([i.property({type:Number})],Ii.prototype,"displayedValuesLimit",void 0),zi([i.query(".ft-filter--container")],Ii.prototype,"container",void 0),zi([i.query(".ft-filter--values")],Ii.prototype,"valuesContainer",void 0),zi([i.query(".ft-filter--levels")],Ii.prototype,"levelsContainer",void 0),zi([i.query(".ft-filter--levels ft-filter-level:last-child")],Ii.prototype,"lastLevel",void 0),zi([i.queryAll(".ft-filter--levels ft-filter-level")],Ii.prototype,"levels",void 0),zi([i.state()],Ii.prototype,"withScroll",void 0),zi([i.state()],Ii.prototype,"filter",void 0),zi([i.state()],Ii.prototype,"slideIn",void 0),zi([i.state()],Ii.prototype,"slideOut",void 0),Ii=zi([a.customElement("ft-filter")],Ii),function(t){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.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",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="\f06e",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=""}(Ri||(Ri={})),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=""}(Di||(Di={}));const Li=new Map([...["abw"].map((t=>[t,Di.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,Di.AUDIO])),...["avi"].map((t=>[t,Di.AVI])),...["chm","xhs"].map((t=>[t,Di.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,Di.CODE])),...["csv"].map((t=>[t,Di.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Di.DITA])),...["epub"].map((t=>[t,Di.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Di.EXCEL])),...["flac"].map((t=>[t,Di.FLAC])),...["gif"].map((t=>[t,Di.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Di.GZIP])),...["html","htm","xhtml"].map((t=>[t,Di.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,Di.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Di.JPEG])),...["json"].map((t=>[t,Di.JSON])),...["m4a","m4p"].map((t=>[t,Di.M4A])),...["mov","qt"].map((t=>[t,Di.MOV])),...["mp3"].map((t=>[t,Di.MP3])),...["mp4","m4v"].map((t=>[t,Di.MP4])),...["ogg","oga"].map((t=>[t,Di.OGG])),...["pdf","ps"].map((t=>[t,Di.PDF])),...["png"].map((t=>[t,Di.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Di.POWERPOINT])),...["rar"].map((t=>[t,Di.RAR])),...["stp"].map((t=>[t,Di.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Di.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,Di.VIDEO])),...["wav"].map((t=>[t,Di.WAV])),...["wma"].map((t=>[t,Di.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Di.WORD])),...["xml","xsl","rdf"].map((t=>[t,Di.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Di.YAML])),...["zip"].map((t=>[t,Di.ZIP]))]),ji=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);var Mi,Pi=function(t,e,i,o){for(var r,a=arguments.length,c=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,n=t.length-1;n>=0;n--)(r=t[n])&&(c=(a<3?r(c):a>3?r(e,i,c):r(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format"}(Mi||(Mi={}));const Ni=a.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),Hi=a.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",a.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),Ui=a.FtCssVariable.extend("--ft-icon-file-format-font-family",a.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime")),Vi=e.css`
|
|
1242
|
+
`}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;const e=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new Fi(e)),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(t){const e=t.composedPath()[0];this.filter=e.value}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}};var Ri,Di;Ii.elementDefinitions={"ft-button":Qe,"ft-filter-level":vi,"ft-snap-scroll":$i,"ft-typography":Xt},zi([i.property({type:String})],Ii.prototype,"id",void 0),zi([i.property({type:String})],Ii.prototype,"label",void 0),zi([i.property({type:String})],Ii.prototype,"filterPlaceHolder",void 0),zi([i.property({type:String})],Ii.prototype,"clearButtonLabel",void 0),zi([i.property({type:String})],Ii.prototype,"moreValuesButtonLabel",void 0),zi([a.jsonProperty([])],Ii.prototype,"options",void 0),zi([i.property({type:Boolean})],Ii.prototype,"multivalued",void 0),zi([i.property({type:Boolean})],Ii.prototype,"disabled",void 0),zi([i.property({type:Boolean})],Ii.prototype,"raiseSelectedOptions",void 0),zi([i.property({type:Number})],Ii.prototype,"displayedValuesLimit",void 0),zi([i.query(".ft-filter--slot")],Ii.prototype,"slotElement",void 0),zi([i.query(".ft-filter--container")],Ii.prototype,"container",void 0),zi([i.query(".ft-filter--values")],Ii.prototype,"valuesContainer",void 0),zi([i.query(".ft-filter--levels")],Ii.prototype,"levelsContainer",void 0),zi([i.query(".ft-filter--levels ft-filter-level:last-child")],Ii.prototype,"lastLevel",void 0),zi([i.queryAll(".ft-filter--levels ft-filter-level")],Ii.prototype,"levels",void 0),zi([i.state()],Ii.prototype,"withScroll",void 0),zi([i.state()],Ii.prototype,"filter",void 0),zi([i.state()],Ii.prototype,"slideIn",void 0),zi([i.state()],Ii.prototype,"slideOut",void 0),Ii=zi([a.customElement("ft-filter")],Ii),function(t){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.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",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="\f06e",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=""}(Ri||(Ri={})),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=""}(Di||(Di={}));const Li=new Map([...["abw"].map((t=>[t,Di.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,Di.AUDIO])),...["avi"].map((t=>[t,Di.AVI])),...["chm","xhs"].map((t=>[t,Di.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,Di.CODE])),...["csv"].map((t=>[t,Di.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Di.DITA])),...["epub"].map((t=>[t,Di.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Di.EXCEL])),...["flac"].map((t=>[t,Di.FLAC])),...["gif"].map((t=>[t,Di.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Di.GZIP])),...["html","htm","xhtml"].map((t=>[t,Di.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,Di.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Di.JPEG])),...["json"].map((t=>[t,Di.JSON])),...["m4a","m4p"].map((t=>[t,Di.M4A])),...["mov","qt"].map((t=>[t,Di.MOV])),...["mp3"].map((t=>[t,Di.MP3])),...["mp4","m4v"].map((t=>[t,Di.MP4])),...["ogg","oga"].map((t=>[t,Di.OGG])),...["pdf","ps"].map((t=>[t,Di.PDF])),...["png"].map((t=>[t,Di.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Di.POWERPOINT])),...["rar"].map((t=>[t,Di.RAR])),...["stp"].map((t=>[t,Di.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Di.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,Di.VIDEO])),...["wav"].map((t=>[t,Di.WAV])),...["wma"].map((t=>[t,Di.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Di.WORD])),...["xml","xsl","rdf"].map((t=>[t,Di.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Di.YAML])),...["zip"].map((t=>[t,Di.ZIP]))]),ji=new Map([["application/msword","application/doc"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","application/dotx"],["application/vnd.ms-word.document.macroEnabled.12","application/docm"],["application/vnd.ms-word.template.macroEnabled.12","application/dotm"],["application/vnd.ms-excel","application/xls"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","application/xltx"],["application/vnd.ms-excel.sheet.macroEnabled.12","application/xlsm"],["application/vnd.ms-excel.template.macroEnabled.12","application/xltm"],["application/vnd.ms-excel.addin.macroEnabled.12","application/xlam"],["application/vnd.ms-excel.sheet.binary.macroEnabled.12","application/xlsb"],["application/vnd.ms-powerpoint","application/ppt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pptx"],["application/vnd.openxmlformats-officedocument.presentationml.template","application/potx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","application/ppsx"],["application/vnd.ms-powerpoint.addin.macroEnabled.12","application/ppam"],["application/vnd.ms-powerpoint.presentation.macroEnabled.12","application/pptm"],["application/vnd.ms-powerpoint.template.macroEnabled.12","application/potm"],["application/vnd.ms-powerpoint.slideshow.macroEnabled.12","application/ppsm"],["application/vnd.ms-access","application/mdb"]]);var Mi,Pi=function(t,e,i,o){for(var r,a=arguments.length,c=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,n=t.length-1;n>=0;n--)(r=t[n])&&(c=(a<3?r(c):a>3?r(e,i,c):r(e,i))||c);return a>3&&c&&Object.defineProperty(e,i,c),c};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format"}(Mi||(Mi={}));const Ni=a.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),Hi=a.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",a.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),Ui=a.FtCssVariable.extend("--ft-icon-file-format-font-family",a.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime")),Vi=e.css`
|
|
1241
1243
|
.ft-icon--fluid-topics {
|
|
1242
1244
|
font-family: ${Hi}, ft-icons, fticons, sans-serif;
|
|
1243
1245
|
font-size: ${Ni};
|
|
@@ -2210,7 +2212,7 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2210
2212
|
raiseSelectedOptions
|
|
2211
2213
|
.options=${i.options}
|
|
2212
2214
|
.displayedValuesLimit=${10}
|
|
2213
|
-
@change=${t=>this.setFilter(i.id,
|
|
2215
|
+
@change=${t=>this.setFilter(i.id,t.detail)}
|
|
2214
2216
|
></ft-filter>
|
|
2215
2217
|
</ft-accordion-item>
|
|
2216
2218
|
`}))}
|
|
@@ -2336,11 +2338,11 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2336
2338
|
raiseSelectedOptions
|
|
2337
2339
|
.options=${i.options}
|
|
2338
2340
|
.displayedValuesLimit=${10}
|
|
2339
|
-
@change=${t=>this.setFilter(i.id,
|
|
2341
|
+
@change=${t=>this.setFilter(i.id,t.detail)}
|
|
2340
2342
|
></ft-filter>
|
|
2341
2343
|
`}))}
|
|
2342
2344
|
</ft-snap-scroll>
|
|
2343
|
-
`:e.nothing}renderSelectedFacets(){if(!this.hasLocaleSelector
|
|
2345
|
+
`:e.nothing}renderSelectedFacets(){if(!this.hasLocaleSelector&&!this.hasFacets)return null;const t=!this.isMobile&&this.dense||this.isMobile&&this.mobileMenuOpen,i=e.html`
|
|
2344
2346
|
${this.hasLocaleSelector&&(this.hasFacets||this.isMobile)?e.html`
|
|
2345
2347
|
<ft-chip part="selected-filters"
|
|
2346
2348
|
?dense=${this.dense&&!this.isMobile}
|
|
@@ -2349,24 +2351,24 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2349
2351
|
${this.getLocaleLabel(this.contentLocale)}
|
|
2350
2352
|
</ft-chip>
|
|
2351
2353
|
`:null}
|
|
2352
|
-
${o.repeat(this.
|
|
2354
|
+
${o.repeat(this.facets,(t=>t.key),(i=>{const r=function(t){return Jt(t.rootNodes,(t=>t.selected?[]:t.childNodes)).filter((t=>t.selected)).map((t=>t.value))}(i);return o.repeat(r,(o=>{let a=i.label+": "+function(t){return Yt(t).split("|").join(" > ")}(o);const c=e.html`
|
|
2353
2355
|
<ft-chip
|
|
2354
2356
|
part="selected-filters"
|
|
2355
2357
|
?dense=${this.dense&&!this.isMobile}
|
|
2356
2358
|
?clickable=${this.isMobile}
|
|
2357
2359
|
?removable=${!this.isMobile}
|
|
2358
2360
|
icon=${this.isMobile?e.nothing:"close"}
|
|
2359
|
-
label="${
|
|
2360
|
-
title=${t?
|
|
2361
|
+
label="${a}"
|
|
2362
|
+
title=${t?a:e.nothing}
|
|
2361
2363
|
@click=${()=>this.openMobileFilters(i.key)}
|
|
2362
|
-
@icon-click=${()=>this.setFilter(i.key,
|
|
2364
|
+
@icon-click=${()=>this.setFilter(i.key,r.filter((t=>t!==o)))}>
|
|
2363
2365
|
${function(t){return Yt(t).split("|").pop()}(o)}
|
|
2364
2366
|
</ft-chip>
|
|
2365
|
-
`;return t?
|
|
2366
|
-
<ft-tooltip inline text="${
|
|
2367
|
-
${
|
|
2367
|
+
`;return t?c:e.html`
|
|
2368
|
+
<ft-tooltip inline text="${a}">
|
|
2369
|
+
${c}
|
|
2368
2370
|
</ft-tooltip>
|
|
2369
|
-
`}))))}
|
|
2371
|
+
`}))}))}
|
|
2370
2372
|
${this.isMobile?e.html`
|
|
2371
2373
|
<ft-chip part="selected-filters"
|
|
2372
2374
|
icon="add"
|
|
@@ -2427,4 +2429,4 @@ const ui=e.css`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc(
|
|
|
2427
2429
|
<ft-icon variant="${i}" part="suggestion-icon">
|
|
2428
2430
|
${o}
|
|
2429
2431
|
</ft-icon>
|
|
2430
|
-
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var e,i,o;if(t.has("labels")&&(this.labelResolver=new a.ParametrizedLabelResolver(_o,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0){const i=t=>this.availableContentLocales.some((e=>e.lang===t));i(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&i(t.get("contentLocale"))?t.get("contentLocale"):null===(e=this.availableContentLocales[0])||void 0===e?void 0:e.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(i=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==i?i:"[]")),t.has("selectedPreset")){const t=this.presets.find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(o=this.presets.find((t=>this.compareRequests(t,this.request))))||void 0===o?void 0:o.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&this.setApi(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new zo(this.request))}contentAvailableCallback(t){var e,i,o;if(super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded){null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet)));const t=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);t&&(t.active=!0),this.scrollToFacet=void 0}}initApi(){null==this.api&&(this.setApi(),setTimeout((()=>this.initApi()),100))}setApi(){this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier):void 0}updateFacets(){this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{var t,e;this.facets=null!==(e=await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets)).catch((()=>[]))))&&void 0!==e?e:[],this.facets.forEach((t=>this.knownFacetLabels[t.key]=t.label)),this.facetsLoaded=!0}))):this.facets=[]}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.dispatchEvent(new wo(this.request)),this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}saveRecentSearches(){window.localStorage.setItem(this.recentSearchesStorageKey,JSON.stringify(this.recentSearches))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}getLocaleLabel(t){var e;return null!==(e=this.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}setFilter(t,e
|
|
2432
|
+
`}openMobileFilters(t){this.isMobile&&(this.mobileMenuOpen=!0,this.displayFacets=!0,this.scrollToFacet=t)}async firstUpdated(t){var e,i;super.firstUpdated(t),this.initApi(),this.availableContentLocales=null!==(i=await(null===(e=this.api)||void 0===e?void 0:e.getAvailableSearchLocales().then((t=>t.contentLocales)).catch((()=>[]))))&&void 0!==i?i:[]}update(t){var e,i,o;if(t.has("labels")&&(this.labelResolver=new a.ParametrizedLabelResolver(_o,this.labels)),t.has("sizeCategory")&&(this.mobileMenuOpen=!1,this.displayFacets=this.displayFacets&&!this.isMobile),super.update(t),(t.has("availableContentLocales")||t.has("contentLocale"))&&this.availableContentLocales.length>0){const i=t=>this.availableContentLocales.some((e=>e.lang===t));i(this.contentLocale)||(this.contentLocale=t.has("contentLocale")&&i(t.get("contentLocale"))?t.get("contentLocale"):null===(e=this.availableContentLocales[0])||void 0===e?void 0:e.lang)}if(t.has("baseUrl")&&this.baseUrl&&(this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.replace(/\/$/,"")),this.recentSearches=JSON.parse(null!==(i=window.localStorage.getItem(this.recentSearchesStorageKey))&&void 0!==i?i:"[]")),t.has("selectedPreset")){const t=this.presets.find((t=>t.name===this.selectedPreset));t&&!this.compareRequests(this.request,t)&&this.setFiltersFromPreset(t)}["contentLocale","searchFilters"].some((e=>t.has(e)))&&(this.selectedPreset=null===(o=this.presets.find((t=>this.compareRequests(t,this.request))))||void 0===o?void 0:o.name),["baseUrl","apiIntegrationIdentifier"].some((e=>t.has(e)))&&this.setApi(),["uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateFacets(),["query","uiLocale","contentLocale","searchFilters","displayedFilters","api"].some((e=>t.has(e)))&&this.updateSuggestions(),["query","uiLocale","contentLocale","searchFilters"].some((e=>t.has(e)))&&this.dispatchEvent(new zo(this.request))}contentAvailableCallback(t){var e,i,o;if(super.contentAvailableCallback(t),t.has("displayFacets")&&this.displayFacets&&(null===(e=this.floatingContainer)||void 0===e||e.focus()),null!=this.scrollToFacet&&this.facetsLoaded){null===(i=this.scrollingFiltersContainer)||void 0===i||i.scrollIndexIntoView(this.facets.findIndex((t=>t.key===this.scrollToFacet)));const t=null===(o=this.shadowRoot)||void 0===o?void 0:o.querySelector(`ft-accordion-item[data-facet-key="${this.scrollToFacet}"]`);t&&(t.active=!0),this.scrollToFacet=void 0}}initApi(){null==this.api&&(this.setApi(),setTimeout((()=>this.initApi()),100))}setApi(){this.api=window.fluidtopics?new window.fluidtopics.FluidTopicsApi(this.baseUrl,this.apiIntegrationIdentifier):void 0}updateFacets(){this.facetsRequest.length>0?(this.facetsLoaded=!1,this.updateFacetsDebouncer.run((async()=>{var t,e;this.facets=null!==(e=await(null===(t=this.api)||void 0===t?void 0:t.search({...this.request,query:""}).then((t=>t.facets)).catch((()=>[]))))&&void 0!==e?e:[],this.facets.forEach((t=>this.knownFacetLabels[t.key]=t.label)),this.facetsLoaded=!0}))):this.facets=[]}updateSuggestions(){this.suggestionsLoaded=!1,this.suggestDebouncer.run((async()=>{this.suggestions=this.api&&this.query.length>2?await this.api.getSuggestions(this.suggestRequest).then((t=>t.suggestions)).catch((()=>[])):[],this.suggestionsLoaded=!0}))}onSearchBarKeyUp(t){const e=t.composedPath()[0];this.query=e.value,"Enter"===t.key&&this.launchSearch()}onSearchBarKeyDown(t){var e,i;switch(t.key){case"Escape":this.mobileMenuOpen=!1,null===(e=this.input)||void 0===e||e.blur();break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),null===(i=this.firstSuggestion)||void 0===i||i.focus()}}onFloatingContainerKeyUp(t){var e;"Escape"===t.key&&(this.displayFacets=!1,null===(e=this.filtersOpener)||void 0===e||e.focus())}setQuery(t){this.input&&(this.input.value=t),this.query=t}onSuggestClick(t,e){t.ctrlKey||t.metaKey||this.onSuggestSelected(t,e)}onSuggestKeyUp(t,e){"Enter"!==t.key&&" "!==t.key||this.onSuggestSelected(t,e)}onSuggestSelected(t,e){t.preventDefault(),this.setQuery(e),this.launchSearch()}launchSearch(){if(this.query){let t=this.recentSearches.filter((t=>t.toLowerCase()!==this.query.toLowerCase())).filter(((t,e)=>e<20));this.recentSearches=[this.query,...t],this.saveRecentSearches()}this.dispatchEvent(new wo(this.request)),this.mobileMenuOpen=!1,this.displayFacets=!1,this.focus()}saveRecentSearches(){window.localStorage.setItem(this.recentSearchesStorageKey,JSON.stringify(this.recentSearches))}connectedCallback(){super.connectedCallback(),document.addEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("focusin",this.closeFloatingContainer),document.addEventListener("click",this.closeFloatingContainer)}updateSize(t){this.sizeCategory=t.detail.category}getLocaleLabel(t){var e;return null!==(e=this.availableContentLocales.filter((e=>{var i;return(null!==(i=e.lang)&&void 0!==i?i:"").toLowerCase()===(null!=t?t:"").toLowerCase()})).map((t=>t.label)).pop())&&void 0!==e?e:t}setFilter(t,e){let i=this.searchFilters.filter((e=>e.key!==t));this.facets.forEach((i=>{i.key===t&&Jt(i.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=e.includes(t.value)))})),e.length&&i.push({key:t,negative:!1,values:e}),this.searchFilters=i,this.scrollToFacet=t}setFiltersFromPreset(t){null!=t&&(null!=t.contentLocale&&(this.contentLocale=t.contentLocale),this.searchFilters=t.filters)}clearFilters(){this.facets.forEach((t=>Jt(t.rootNodes,(t=>t.childNodes)).forEach((t=>t.selected=!1)))),this.searchFilters=[];const t=this.facets[0];this.scrollToFacet=null==t?void 0:t.key}removeRecentSearch(t,e){var i,o,r,a;t.preventDefault(),t.stopPropagation();const c=null!==(a=null!==(o=null===(i=this.focusedSuggestion)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:null===(r=this.focusedSuggestion)||void 0===r?void 0:r.nextElementSibling)&&void 0!==a?a:this.input;null==c||c.focus(),this.recentSearches=this.recentSearches.filter((t=>t.toLowerCase()!==e.toLowerCase())),this.saveRecentSearches()}onSuggestKeyDown(t){var e,i,o,r,a,c;switch(t.key){case"ArrowUp":null===(o=null!==(i=null===(e=this.focusedSuggestion)||void 0===e?void 0:e.previousElementSibling)&&void 0!==i?i:this.lastSuggestion)||void 0===o||o.focus(),t.preventDefault(),t.stopPropagation();break;case"ArrowDown":null===(c=null!==(a=null===(r=this.focusedSuggestion)||void 0===r?void 0:r.nextElementSibling)&&void 0!==a?a:this.firstSuggestion)||void 0===c||c.focus(),t.preventDefault(),t.stopPropagation()}}},t.FtSearchBar.elementDefinitions={"ft-accordion":Qi,"ft-accordion-item":Ji,"ft-button":Qe,"ft-chip":so,"ft-filter":Ii,"ft-filter-option":wi,"ft-icon":qi,"ft-ripple":Fe,"ft-select":bo,"ft-select-option":uo,"ft-size-watcher":p,"ft-snap-scroll":$i,"ft-tooltip":He,"ft-typography":Xt,"mwc-icon":Re},$o([i.property({type:Boolean})],t.FtSearchBar.prototype,"dense",void 0),$o([i.property({type:String})],t.FtSearchBar.prototype,"baseUrl",void 0),$o([i.property({type:String})],t.FtSearchBar.prototype,"apiIntegrationIdentifier",void 0),$o([i.property({type:String})],t.FtSearchBar.prototype,"contentLocale",void 0),$o([i.state()],t.FtSearchBar.prototype,"availableContentLocales",void 0),$o([i.property({type:String})],t.FtSearchBar.prototype,"uiLocale",void 0),$o([a.jsonProperty({})],t.FtSearchBar.prototype,"labels",void 0),$o([a.jsonProperty([])],t.FtSearchBar.prototype,"displayedFilters",void 0),$o([a.jsonProperty([])],t.FtSearchBar.prototype,"presets",void 0),$o([i.property({type:String,reflect:!0})],t.FtSearchBar.prototype,"selectedPreset",void 0),$o([i.property()],t.FtSearchBar.prototype,"searchRequestSerializer",void 0),$o([i.state()],t.FtSearchBar.prototype,"searchFilters",void 0),$o([i.state()],t.FtSearchBar.prototype,"sizeCategory",void 0),$o([i.state()],t.FtSearchBar.prototype,"displayFacets",void 0),$o([i.state()],t.FtSearchBar.prototype,"mobileMenuOpen",void 0),$o([i.state()],t.FtSearchBar.prototype,"facets",void 0),$o([i.query(".ft-search-bar--container")],t.FtSearchBar.prototype,"container",void 0),$o([i.query(".ft-search-bar--filters-opener")],t.FtSearchBar.prototype,"filtersOpener",void 0),$o([i.query(".ft-search-bar--floating-panel")],t.FtSearchBar.prototype,"floatingContainer",void 0),$o([i.query("ft-snap-scroll.ft-search-bar--filters-container")],t.FtSearchBar.prototype,"scrollingFiltersContainer",void 0),$o([i.query(".ft-search-bar--input")],t.FtSearchBar.prototype,"input",void 0),$o([i.state()],t.FtSearchBar.prototype,"query",void 0),$o([i.state()],t.FtSearchBar.prototype,"suggestions",void 0),$o([i.state()],t.FtSearchBar.prototype,"suggestionsLoaded",void 0),$o([i.state()],t.FtSearchBar.prototype,"recentSearches",void 0),$o([i.state()],t.FtSearchBar.prototype,"scrollToFacet",void 0),$o([i.query(".ft-search-bar--suggestion:first-child")],t.FtSearchBar.prototype,"firstSuggestion",void 0),$o([i.query(".ft-search-bar--suggestion:focus-within")],t.FtSearchBar.prototype,"focusedSuggestion",void 0),$o([i.query(".ft-search-bar--suggestion:last-child")],t.FtSearchBar.prototype,"lastSuggestion",void 0),$o([i.state()],t.FtSearchBar.prototype,"api",void 0),t.FtSearchBar=$o([a.customElement("ft-search-bar")],t.FtSearchBar),t.DEFAULT_LABELS=_o,t.FtSearchBarCssVariables=go,t.LaunchSearchEvent=wo,t.SearchStateChangeEvent=zo,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.wcUtils,ftGlobals.litStyleMap,ftGlobals.litUnsafeHTML);
|