@fluid-topics/ft-search-type 1.1.61 → 1.1.63
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-type.light.js +45 -42
- package/build/ft-search-type.min.js +91 -88
- package/package.json +3 -3
|
@@ -1082,58 +1082,59 @@ const M=Symbol.for(""),j=t=>{if(t?.r===M)return t?._$litStatic$},_=t=>({_$litSta
|
|
|
1082
1082
|
margin: 10px 0;
|
|
1083
1083
|
color: ${ki.colorOnSurfaceMedium};
|
|
1084
1084
|
}
|
|
1085
|
-
`;var Ui=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Li extends o.FtLitElement{constructor(){super(...arguments),this.filterId="",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,o;return null!==(o=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==o?o: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 o=t.slice(0,this.limit);return e.html`
|
|
1085
|
+
`;var Ui=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Li extends o.FtLitElement{constructor(){super(...arguments),this.filterId="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.displayCount=!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,o;return null!==(o=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==o?o: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 o=t.slice(0,this.limit);return e.html`
|
|
1086
1086
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
1087
1087
|
${null==this.parent?null:e.html`
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1088
|
+
<div tabindex="0"
|
|
1089
|
+
part="controls go-back"
|
|
1090
|
+
class="ft-filter-level--go-back"
|
|
1091
|
+
?disabled=${this.disabled}
|
|
1092
|
+
@keyup=${this.goBackOnKeyPress}
|
|
1093
|
+
@click=${this.goBackOnClick}>
|
|
1094
|
+
<ft-ripple></ft-ripple>
|
|
1095
|
+
<ft-icon>thin_arrow_left</ft-icon>
|
|
1096
|
+
<ft-typography variant="body2">${this.parent.label}</ft-typography>
|
|
1097
|
+
</div>
|
|
1098
|
+
`}
|
|
1099
1099
|
${0===this.options.length&&this.noValuesLabel?e.html`
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1100
|
+
<ft-typography class="ft-filter-level--no-values" element="span" variant="body2">
|
|
1101
|
+
${this.noValuesLabel}
|
|
1102
|
+
</ft-typography>
|
|
1103
|
+
`:e.nothing}
|
|
1104
1104
|
${r.repeat(o,(t=>t.value),(t=>{var o;return e.html`
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1105
|
+
<div class="ft-filter-level--option" part="options">
|
|
1106
|
+
${this.multivalued?this.buildMultiValuedOption(t):this.buildMonoValuedOption(t)}
|
|
1107
|
+
${this.preventNavigation||t.selected||0===(null!==(o=t.subOptions)&&void 0!==o?o:[]).length?e.nothing:e.html`
|
|
1108
|
+
<ft-button icon="thin_arrow_right"
|
|
1109
|
+
part="controls navigate-hierarchy"
|
|
1110
|
+
label="${t.label}"
|
|
1111
|
+
?disabled=${this.disabled}
|
|
1112
|
+
tooltipPosition="left"
|
|
1113
|
+
@click=${()=>this.displayLevel(t)}></ft-button>
|
|
1114
|
+
`}
|
|
1115
|
+
</div>
|
|
1116
|
+
`}))}
|
|
1117
1117
|
${o.length<t.length?e.html`
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1118
|
+
<ft-button
|
|
1119
|
+
class="ft-filter-level--display-more"
|
|
1120
|
+
icon="thin_arrow"
|
|
1121
|
+
dense trailingIcon
|
|
1122
|
+
part="controls display-more"
|
|
1123
|
+
@click=${this.displayMore}>
|
|
1124
|
+
${this.moreValuesButtonLabel}
|
|
1125
|
+
</ft-button>
|
|
1126
|
+
`:e.nothing}
|
|
1127
1127
|
</div>
|
|
1128
1128
|
`}goBackOnKeyPress(t){"Enter"!==t.key&&" "!==t.key||this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}goBackOnClick(t){t.stopPropagation(),t.preventDefault(),this.dispatchEvent(new CustomEvent("go-back",{detail:this.parent}))}displayMore(){this.displayedPages++}buildMultiValuedOption(t){var i;return e.html`
|
|
1129
1129
|
<ft-checkbox name="${this.filterId}"
|
|
1130
1130
|
part="multivalued-option"
|
|
1131
1131
|
data-value="${t.value}"
|
|
1132
|
+
|
|
1132
1133
|
.checked=${t.selected}
|
|
1133
1134
|
.disabled=${this.disabled}
|
|
1134
1135
|
.indeterminate=${o.flatDeep(null!==(i=t.subOptions)&&void 0!==i?i:[],(t=>{var o;return null!==(o=t.subOptions)&&void 0!==o?o:[]})).some((t=>t.selected))}
|
|
1135
1136
|
@change=${o=>this.optionsChanged(o,t)}>
|
|
1136
|
-
${t.renderOption?t.renderOption:t.label}
|
|
1137
|
+
${t.renderOption?t.renderOption:t.label}${this.displayCount?` (${t.count})`:""}
|
|
1137
1138
|
</ft-checkbox>
|
|
1138
1139
|
`}buildMonoValuedOption(t){return e.html`
|
|
1139
1140
|
<ft-radio name="${this.filterId+Math.round(1e6*Math.random())}"
|
|
@@ -1144,9 +1145,9 @@ const M=Symbol.for(""),j=t=>{if(t?.r===M)return t?._$litStatic$},_=t=>({_$litSta
|
|
|
1144
1145
|
@click=${o=>this.optionsChanged(o,t)}
|
|
1145
1146
|
@keyup=${o=>this.onRadioKeyUp(o,t)}
|
|
1146
1147
|
@change=${t=>t.stopPropagation()}>
|
|
1147
|
-
${t.renderOption?t.renderOption:t.label}
|
|
1148
|
+
${t.renderOption?t.renderOption:t.label}${this.displayCount?` (${t.count})`:""}
|
|
1148
1149
|
</ft-radio>
|
|
1149
|
-
`}onRadioKeyUp(t,o){o.selected&&" "===t.key&&this.optionsChanged(t,o)}optionsChanged(t,o){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:o}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}Li.elementDefinitions={"ft-button":ni,"ft-ripple":Bo,"ft-typography":go,"ft-checkbox":bi,"ft-icon":ti,"ft-radio":$i},Li.styles=Ri,Ui([i.property({type:String})],Li.prototype,"filterId",void 0),Ui([i.property({type:Object})],Li.prototype,"parent",void 0),Ui([i.property({type:Array})],Li.prototype,"options",void 0),Ui([i.property({type:Boolean})],Li.prototype,"multivalued",void 0),Ui([i.property({type:Boolean})],Li.prototype,"disabled",void 0),Ui([i.property({type:Boolean})],Li.prototype,"hideSelectedOptions",void 0),Ui([i.property({type:Boolean})],Li.prototype,"preventNavigation",void 0),Ui([i.property({type:String})],Li.prototype,"filter",void 0),Ui([i.property({type:String})],Li.prototype,"moreValuesButtonLabel",void 0),Ui([i.property({type:String})],Li.prototype,"noValuesLabel",void 0),Ui([i.property({type:Number})],Li.prototype,"displayedValuesLimit",void 0),Ui([i.query(".ft-filter-level--container")],Li.prototype,"container",void 0),Ui([i.state()],Li.prototype,"displayedPages",void 0);const Wi={buttonsColor:o.FtCssVariableFactory.extend("--ft-snap-scroll-buttons-color","",o.designSystemVariables.colorPrimary),buttonsZIndex:o.FtCssVariableFactory.create("--ft-snap-scroll-buttons-z-index","","NUMBER","1"),gap:o.FtCssVariableFactory.create("--ft-snap-scroll-gap","","SIZE","0"),colorSurface:o.FtCssVariableFactory.external(o.designSystemVariables.colorSurface,"Design system")},zi=e.css`
|
|
1150
|
+
`}onRadioKeyUp(t,o){o.selected&&" "===t.key&&this.optionsChanged(t,o)}optionsChanged(t,o){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:o}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}Li.elementDefinitions={"ft-button":ni,"ft-ripple":Bo,"ft-typography":go,"ft-checkbox":bi,"ft-icon":ti,"ft-radio":$i},Li.styles=Ri,Ui([i.property({type:String})],Li.prototype,"filterId",void 0),Ui([i.property({type:Object})],Li.prototype,"parent",void 0),Ui([i.property({type:Array})],Li.prototype,"options",void 0),Ui([i.property({type:Boolean})],Li.prototype,"multivalued",void 0),Ui([i.property({type:Boolean})],Li.prototype,"disabled",void 0),Ui([i.property({type:Boolean})],Li.prototype,"hideSelectedOptions",void 0),Ui([i.property({type:Boolean})],Li.prototype,"displayCount",void 0),Ui([i.property({type:Boolean})],Li.prototype,"preventNavigation",void 0),Ui([i.property({type:String})],Li.prototype,"filter",void 0),Ui([i.property({type:String})],Li.prototype,"moreValuesButtonLabel",void 0),Ui([i.property({type:String})],Li.prototype,"noValuesLabel",void 0),Ui([i.property({type:Number})],Li.prototype,"displayedValuesLimit",void 0),Ui([i.query(".ft-filter-level--container")],Li.prototype,"container",void 0),Ui([i.state()],Li.prototype,"displayedPages",void 0);const Wi={buttonsColor:o.FtCssVariableFactory.extend("--ft-snap-scroll-buttons-color","",o.designSystemVariables.colorPrimary),buttonsZIndex:o.FtCssVariableFactory.create("--ft-snap-scroll-buttons-z-index","","NUMBER","1"),gap:o.FtCssVariableFactory.create("--ft-snap-scroll-gap","","SIZE","0"),colorSurface:o.FtCssVariableFactory.external(o.designSystemVariables.colorSurface,"Design system")},zi=e.css`
|
|
1150
1151
|
.ft-snap-scroll {
|
|
1151
1152
|
box-sizing: border-box;
|
|
1152
1153
|
position: relative;
|
|
@@ -1410,7 +1411,7 @@ const M=Symbol.for(""),j=t=>{if(t?.r===M)return t?._$litStatic$},_=t=>({_$litSta
|
|
|
1410
1411
|
slot:not([name]) {
|
|
1411
1412
|
display: none;
|
|
1412
1413
|
}
|
|
1413
|
-
`];var Vi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class qi extends CustomEvent{constructor(t){super("change",{detail:t})}}class Yi extends o.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.lastLevelHasHiddenvalues=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new o.Debouncer(300),this.changeDebouncer=new o.Debouncer(10),this.lastDispatchedValues=[]}get flatOptions(){return o.flatDeep(this.options,(t=>{var o;return null!==(o=t.subOptions)&&void 0!==o?o:[]}))}get childrenFilteredFlatOptions(){return o.flatDeep(this.options,(t=>{var o;return t.selected?[]:null!==(o=t.subOptions)&&void 0!==o?o:[]}))}get selectedValues(){return this.childrenFilteredFlatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){const t=this.flatOptions.some((t=>t.selected)),o=this.withScroll||this.filter||this.lastLevelHasHiddenvalues,i=this.filterPlaceHolder.replace("{0}",this.label);return e.html`
|
|
1414
|
+
`];var Vi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class qi extends CustomEvent{constructor(t){super("change",{detail:t})}}class Yi extends o.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.displayCount=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.lastLevelHasHiddenvalues=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new o.Debouncer(300),this.changeDebouncer=new o.Debouncer(10),this.lastDispatchedValues=[]}get flatOptions(){return o.flatDeep(this.options,(t=>{var o;return null!==(o=t.subOptions)&&void 0!==o?o:[]}))}get childrenFilteredFlatOptions(){return o.flatDeep(this.options,(t=>{var o;return t.selected?[]:null!==(o=t.subOptions)&&void 0!==o?o:[]}))}get selectedValues(){return this.childrenFilteredFlatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){const t=this.flatOptions.some((t=>t.selected)),o=this.withScroll||this.filter||this.lastLevelHasHiddenvalues,i=this.filterPlaceHolder.replace("{0}",this.label);return e.html`
|
|
1414
1415
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1415
1416
|
part="container">
|
|
1416
1417
|
${this.label||t?e.html`
|
|
@@ -1452,6 +1453,7 @@ const M=Symbol.for(""),j=t=>{if(t?.r===M)return t?._$litStatic$},_=t=>({_$litSta
|
|
|
1452
1453
|
filterId="${this.id}"
|
|
1453
1454
|
?multivalued=${this.multivalued}
|
|
1454
1455
|
?disabled=${this.disabled}
|
|
1456
|
+
?displayCount="${this.displayCount}"
|
|
1455
1457
|
preventNavigation
|
|
1456
1458
|
.options=${o}
|
|
1457
1459
|
@change=${this.onChange}
|
|
@@ -1475,6 +1477,7 @@ const M=Symbol.for(""),j=t=>{if(t?.r===M)return t?._$litStatic$},_=t=>({_$litSta
|
|
|
1475
1477
|
?multivalued=${this.multivalued}
|
|
1476
1478
|
?disabled=${this.disabled||"ft-filter--level-center"!==t}
|
|
1477
1479
|
?hideSelectedOptions=${this.raiseSelectedOptions}
|
|
1480
|
+
?displayCount="${this.displayCount}"
|
|
1478
1481
|
.parent=${i}
|
|
1479
1482
|
.options=${o}
|
|
1480
1483
|
.displayedValuesLimit=${this.displayedValuesLimit}
|
|
@@ -1485,7 +1488,7 @@ const M=Symbol.for(""),j=t=>{if(t?.r===M)return t?._$litStatic$},_=t=>({_$litSta
|
|
|
1485
1488
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1486
1489
|
noValuesLabel="${this.noValuesLabel}"
|
|
1487
1490
|
></ft-filter-level>
|
|
1488
|
-
`}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 o;t.stopPropagation();const e=this.flatOptions.find((o=>o.value===t.detail.value));e.selected=!e.selected;const i=t=>{var o;t!==e&&(t.selected=!1),null===(o=t.subOptions)||void 0===o||o.forEach(i)};this.multivalued?null===(o=e.subOptions)||void 0===o||o.forEach(i):this.options.forEach(i),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;o.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new qi(t)),this.lastDispatchedValues=t)}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,o;this.filter=null!==(o=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==o?o:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}Yi.elementDefinitions={"ft-button":ni,"ft-filter-level":Li,"ft-snap-scroll":Ai,"ft-typography":go},Yi.styles=Gi,Vi([i.property({type:String})],Yi.prototype,"id",void 0),Vi([i.property({type:String})],Yi.prototype,"label",void 0),Vi([i.property({type:String})],Yi.prototype,"filterPlaceHolder",void 0),Vi([i.property({type:String})],Yi.prototype,"clearButtonLabel",void 0),Vi([i.property({type:String})],Yi.prototype,"moreValuesButtonLabel",void 0),Vi([i.property({type:String})],Yi.prototype,"noValuesLabel",void 0),Vi([o.jsonProperty([])],Yi.prototype,"options",void 0),Vi([i.property({type:Boolean})],Yi.prototype,"multivalued",void 0),Vi([i.property({type:Boolean})],Yi.prototype,"disabled",void 0),Vi([i.property({type:Boolean})],Yi.prototype,"raiseSelectedOptions",void 0),Vi([i.property({type:Number})],Yi.prototype,"displayedValuesLimit",void 0),Vi([i.property({type:Boolean})],Yi.prototype,"hideClearButton",void 0),Vi([i.query(".ft-filter--slot")],Yi.prototype,"slotElement",void 0),Vi([i.query(".ft-filter--container")],Yi.prototype,"container",void 0),Vi([i.query(".ft-filter--values")],Yi.prototype,"valuesContainer",void 0),Vi([i.query(".ft-filter--levels")],Yi.prototype,"levelsContainer",void 0),Vi([i.state()],Yi.prototype,"lastLevelHasHiddenvalues",void 0),Vi([i.query(".ft-filter--filter input")],Yi.prototype,"filterInput",void 0),Vi([i.queryAll(".ft-filter--levels ft-filter-level")],Yi.prototype,"levels",void 0),Vi([i.state()],Yi.prototype,"withScroll",void 0),Vi([i.state()],Yi.prototype,"filter",void 0),Vi([i.state()],Yi.prototype,"slideIn",void 0),Vi([i.state()],Yi.prototype,"slideOut",void 0);var Qi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Xi extends o.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1491
|
+
`}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 o;t.stopPropagation();const e=this.flatOptions.find((o=>o.value===t.detail.value));e.selected=!e.selected;const i=t=>{var o;t!==e&&(t.selected=!1),null===(o=t.subOptions)||void 0===o||o.forEach(i)};this.multivalued?null===(o=e.subOptions)||void 0===o||o.forEach(i):this.options.forEach(i),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;o.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new qi(t)),this.lastDispatchedValues=t)}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,o;this.filter=null!==(o=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==o?o:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}Yi.elementDefinitions={"ft-button":ni,"ft-filter-level":Li,"ft-snap-scroll":Ai,"ft-typography":go},Yi.styles=Gi,Vi([i.property({type:String})],Yi.prototype,"id",void 0),Vi([i.property({type:String})],Yi.prototype,"label",void 0),Vi([i.property({type:String})],Yi.prototype,"filterPlaceHolder",void 0),Vi([i.property({type:String})],Yi.prototype,"clearButtonLabel",void 0),Vi([i.property({type:String})],Yi.prototype,"moreValuesButtonLabel",void 0),Vi([i.property({type:String})],Yi.prototype,"noValuesLabel",void 0),Vi([o.jsonProperty([])],Yi.prototype,"options",void 0),Vi([i.property({type:Boolean})],Yi.prototype,"multivalued",void 0),Vi([i.property({type:Boolean})],Yi.prototype,"disabled",void 0),Vi([i.property({type:Boolean})],Yi.prototype,"raiseSelectedOptions",void 0),Vi([i.property({type:Boolean})],Yi.prototype,"displayCount",void 0),Vi([i.property({type:Number})],Yi.prototype,"displayedValuesLimit",void 0),Vi([i.property({type:Boolean})],Yi.prototype,"hideClearButton",void 0),Vi([i.query(".ft-filter--slot")],Yi.prototype,"slotElement",void 0),Vi([i.query(".ft-filter--container")],Yi.prototype,"container",void 0),Vi([i.query(".ft-filter--values")],Yi.prototype,"valuesContainer",void 0),Vi([i.query(".ft-filter--levels")],Yi.prototype,"levelsContainer",void 0),Vi([i.state()],Yi.prototype,"lastLevelHasHiddenvalues",void 0),Vi([i.query(".ft-filter--filter input")],Yi.prototype,"filterInput",void 0),Vi([i.queryAll(".ft-filter--levels ft-filter-level")],Yi.prototype,"levels",void 0),Vi([i.state()],Yi.prototype,"withScroll",void 0),Vi([i.state()],Yi.prototype,"filter",void 0),Vi([i.state()],Yi.prototype,"slideIn",void 0),Vi([i.state()],Yi.prototype,"slideOut",void 0);var Qi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Xi extends o.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1489
1492
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1490
1493
|
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Xi.elementDefinitions={},Qi([i.property({type:String})],Xi.prototype,"label",void 0),Qi([i.property({type:Object,converter:t=>t})],Xi.prototype,"value",void 0),Qi([i.property({type:Boolean,reflect:!0})],Xi.prototype,"selected",void 0),Qi([i.property({type:Object})],Xi.prototype,"subOptions",void 0),Qi([o.jsonProperty({})],Xi.prototype,"renderOption",void 0),Qi([i.query(".ft-filter-option--slot")],Xi.prototype,"slotElement",void 0),o.customElement("ft-filter")(Yi),o.customElement("ft-filter-option")(Xi);const Ji=e.css`
|
|
1491
1494
|
`,tr=e.css`
|