@fluid-topics/ft-filter 0.3.46 → 0.3.48

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.
@@ -34,6 +34,7 @@ export declare class FtFilter extends FtLitElement implements FtFilterProperties
34
34
  private slideOut?;
35
35
  private scrollResizeObserver;
36
36
  private get flatOptions();
37
+ get selectedValues(): any[];
37
38
  protected render(): import("lit-html").TemplateResult<1>;
38
39
  protected update(props: PropertyValues): void;
39
40
  protected contentAvailableCallback(props: PropertyValues): void;
@@ -43,6 +43,9 @@ export class FtFilter extends FtLitElement {
43
43
  get flatOptions() {
44
44
  return flatDeep(this.options, o => { var _a; return (_a = o.subOptions) !== null && _a !== void 0 ? _a : []; });
45
45
  }
46
+ get selectedValues() {
47
+ return this.flatOptions.filter(o => o.selected).map(o => o.value);
48
+ }
46
49
  render() {
47
50
  var _a, _b;
48
51
  const valuesSelected = this.flatOptions.some(o => o.selected);
@@ -219,8 +222,7 @@ export class FtFilter extends FtLitElement {
219
222
  optionsChanged() {
220
223
  this.changeDebouncer.run(() => {
221
224
  var _a;
222
- const selectedValues = this.flatOptions.filter(o => o.selected).map(o => o.value);
223
- this.dispatchEvent(new FtFilterChangeEvent(selectedValues));
225
+ this.dispatchEvent(new FtFilterChangeEvent(this.selectedValues));
224
226
  this.requestUpdate();
225
227
  (_a = this.levels) === null || _a === void 0 ? void 0 : _a.forEach(l => l.requestUpdate());
226
228
  });
@@ -1149,7 +1149,7 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
1149
1149
  slot {
1150
1150
  display: none;
1151
1151
  }
1152
- `];var $e=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class ke extends CustomEvent{constructor(t){super("change",{detail:t})}}class we 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 ni(this.options,(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]}))}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,r=this.filterPlaceHolder.replace("{0}",this.label);return e.html`
1152
+ `];var $e=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class ke extends CustomEvent{constructor(t){super("change",{detail:t})}}class we 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 ni(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,r=this.filterPlaceHolder.replace("{0}",this.label);return e.html`
1153
1153
  <div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
1154
1154
  part="container">
1155
1155
  ${this.label||o?e.html`
@@ -1219,6 +1219,6 @@ const V=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
1219
1219
  .exportpartsPrefixes=${["values","available-values"]}
1220
1220
  noValuesLabel="${this.noValuesLabel}"
1221
1221
  ></ft-filter-level>
1222
- `}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;const i=this.flatOptions.filter((t=>t.selected)).map((t=>t.value));this.dispatchEvent(new ke(i)),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)}}we.elementDefinitions={"ft-button":Wi,"ft-filter-level":de,"ft-snap-scroll":ge,"ft-typography":ri},we.styles=me,$e([o.property({type:String})],we.prototype,"id",void 0),$e([o.property({type:String})],we.prototype,"label",void 0),$e([o.property({type:String})],we.prototype,"filterPlaceHolder",void 0),$e([o.property({type:String})],we.prototype,"clearButtonLabel",void 0),$e([o.property({type:String})],we.prototype,"moreValuesButtonLabel",void 0),$e([o.property({type:String})],we.prototype,"noValuesLabel",void 0),$e([i.jsonProperty([])],we.prototype,"options",void 0),$e([o.property({type:Boolean})],we.prototype,"multivalued",void 0),$e([o.property({type:Boolean})],we.prototype,"disabled",void 0),$e([o.property({type:Boolean})],we.prototype,"raiseSelectedOptions",void 0),$e([o.property({type:Number})],we.prototype,"displayedValuesLimit",void 0),$e([o.property({type:Boolean})],we.prototype,"hideClearButton",void 0),$e([o.query(".ft-filter--slot")],we.prototype,"slotElement",void 0),$e([o.query(".ft-filter--container")],we.prototype,"container",void 0),$e([o.query(".ft-filter--values")],we.prototype,"valuesContainer",void 0),$e([o.query(".ft-filter--levels")],we.prototype,"levelsContainer",void 0),$e([o.query(".ft-filter--levels ft-filter-level:last-child")],we.prototype,"lastLevel",void 0),$e([o.query(".ft-filter--filter input")],we.prototype,"filterInput",void 0),$e([o.queryAll(".ft-filter--levels ft-filter-level")],we.prototype,"levels",void 0),$e([o.state()],we.prototype,"withScroll",void 0),$e([o.state()],we.prototype,"filter",void 0),$e([o.state()],we.prototype,"slideIn",void 0),$e([o.state()],we.prototype,"slideOut",void 0);var ze=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Se extends i.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
1222
+ `}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 ke(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)}}we.elementDefinitions={"ft-button":Wi,"ft-filter-level":de,"ft-snap-scroll":ge,"ft-typography":ri},we.styles=me,$e([o.property({type:String})],we.prototype,"id",void 0),$e([o.property({type:String})],we.prototype,"label",void 0),$e([o.property({type:String})],we.prototype,"filterPlaceHolder",void 0),$e([o.property({type:String})],we.prototype,"clearButtonLabel",void 0),$e([o.property({type:String})],we.prototype,"moreValuesButtonLabel",void 0),$e([o.property({type:String})],we.prototype,"noValuesLabel",void 0),$e([i.jsonProperty([])],we.prototype,"options",void 0),$e([o.property({type:Boolean})],we.prototype,"multivalued",void 0),$e([o.property({type:Boolean})],we.prototype,"disabled",void 0),$e([o.property({type:Boolean})],we.prototype,"raiseSelectedOptions",void 0),$e([o.property({type:Number})],we.prototype,"displayedValuesLimit",void 0),$e([o.property({type:Boolean})],we.prototype,"hideClearButton",void 0),$e([o.query(".ft-filter--slot")],we.prototype,"slotElement",void 0),$e([o.query(".ft-filter--container")],we.prototype,"container",void 0),$e([o.query(".ft-filter--values")],we.prototype,"valuesContainer",void 0),$e([o.query(".ft-filter--levels")],we.prototype,"levelsContainer",void 0),$e([o.query(".ft-filter--levels ft-filter-level:last-child")],we.prototype,"lastLevel",void 0),$e([o.query(".ft-filter--filter input")],we.prototype,"filterInput",void 0),$e([o.queryAll(".ft-filter--levels ft-filter-level")],we.prototype,"levels",void 0),$e([o.state()],we.prototype,"withScroll",void 0),$e([o.state()],we.prototype,"filter",void 0),$e([o.state()],we.prototype,"slideIn",void 0),$e([o.state()],we.prototype,"slideOut",void 0);var ze=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Se extends i.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
1223
1223
  <slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
1224
1224
  `}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}))}}Se.elementDefinitions={},ze([o.property({type:String})],Se.prototype,"label",void 0),ze([o.property({type:Object,converter:t=>t})],Se.prototype,"value",void 0),ze([o.property({type:Boolean,reflect:!0})],Se.prototype,"selected",void 0),ze([o.property({type:Object})],Se.prototype,"subOptions",void 0),ze([i.jsonProperty({})],Se.prototype,"renderOption",void 0),ze([o.query(".ft-filter-option--slot")],Se.prototype,"slotElement",void 0),i.customElement("ft-filter")(we),i.customElement("ft-filter-option")(Se),t.FtFilter=we,t.FtFilterChangeEvent=ke,t.FtFilterCssVariables=ye,t.FtFilterOption=Se,t.styles=me,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
@@ -1268,7 +1268,7 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
1268
1268
  slot {
1269
1269
  display: none;
1270
1270
  }
1271
- `];var wo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ko extends CustomEvent{constructor(t){super("change",{detail:t})}}class Oo extends $t{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 e(300),this.changeDebouncer=new e(10)}get flatOptions(){return Ke(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected)),o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e,s=this.filterPlaceHolder.replace("{0}",this.label);return q`
1271
+ `];var wo=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class ko extends CustomEvent{constructor(t){super("change",{detail:t})}}class Oo extends $t{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 e(300),this.changeDebouncer=new e(10)}get flatOptions(){return Ke(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){var t,e;const i=this.flatOptions.some((t=>t.selected)),o=this.withScroll||this.filter||null!==(e=null===(t=this.lastLevel)||void 0===t?void 0:t.hasHiddenValues)&&void 0!==e&&e,s=this.filterPlaceHolder.replace("{0}",this.label);return q`
1272
1272
  <div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
1273
1273
  part="container">
1274
1274
  ${this.label||i?q`
@@ -1338,6 +1338,6 @@ class Ni extends qe{constructor(t){if(super(t),this.it=Y,t.type!==Ze)throw Error
1338
1338
  .exportpartsPrefixes=${["values","available-values"]}
1339
1339
  noValuesLabel="${this.noValuesLabel}"
1340
1340
  ></ft-filter-level>
1341
- `}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 ko(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(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}Oo.elementDefinitions={"ft-button":Hi,"ft-filter-level":uo,"ft-snap-scroll":go,"ft-typography":He},Oo.styles=$o,wo([o({type:String})],Oo.prototype,"id",void 0),wo([o({type:String})],Oo.prototype,"label",void 0),wo([o({type:String})],Oo.prototype,"filterPlaceHolder",void 0),wo([o({type:String})],Oo.prototype,"clearButtonLabel",void 0),wo([o({type:String})],Oo.prototype,"moreValuesButtonLabel",void 0),wo([o({type:String})],Oo.prototype,"noValuesLabel",void 0),wo([p([])],Oo.prototype,"options",void 0),wo([o({type:Boolean})],Oo.prototype,"multivalued",void 0),wo([o({type:Boolean})],Oo.prototype,"disabled",void 0),wo([o({type:Boolean})],Oo.prototype,"raiseSelectedOptions",void 0),wo([o({type:Number})],Oo.prototype,"displayedValuesLimit",void 0),wo([o({type:Boolean})],Oo.prototype,"hideClearButton",void 0),wo([n(".ft-filter--slot")],Oo.prototype,"slotElement",void 0),wo([n(".ft-filter--container")],Oo.prototype,"container",void 0),wo([n(".ft-filter--values")],Oo.prototype,"valuesContainer",void 0),wo([n(".ft-filter--levels")],Oo.prototype,"levelsContainer",void 0),wo([n(".ft-filter--levels ft-filter-level:last-child")],Oo.prototype,"lastLevel",void 0),wo([n(".ft-filter--filter input")],Oo.prototype,"filterInput",void 0),wo([function(t){return r({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],Oo.prototype,"levels",void 0),wo([s()],Oo.prototype,"withScroll",void 0),wo([s()],Oo.prototype,"filter",void 0),wo([s()],Oo.prototype,"slideIn",void 0),wo([s()],Oo.prototype,"slideOut",void 0);var So=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Co extends $t{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return q`
1341
+ `}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.dispatchEvent(new ko(this.selectedValues)),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}Oo.elementDefinitions={"ft-button":Hi,"ft-filter-level":uo,"ft-snap-scroll":go,"ft-typography":He},Oo.styles=$o,wo([o({type:String})],Oo.prototype,"id",void 0),wo([o({type:String})],Oo.prototype,"label",void 0),wo([o({type:String})],Oo.prototype,"filterPlaceHolder",void 0),wo([o({type:String})],Oo.prototype,"clearButtonLabel",void 0),wo([o({type:String})],Oo.prototype,"moreValuesButtonLabel",void 0),wo([o({type:String})],Oo.prototype,"noValuesLabel",void 0),wo([p([])],Oo.prototype,"options",void 0),wo([o({type:Boolean})],Oo.prototype,"multivalued",void 0),wo([o({type:Boolean})],Oo.prototype,"disabled",void 0),wo([o({type:Boolean})],Oo.prototype,"raiseSelectedOptions",void 0),wo([o({type:Number})],Oo.prototype,"displayedValuesLimit",void 0),wo([o({type:Boolean})],Oo.prototype,"hideClearButton",void 0),wo([n(".ft-filter--slot")],Oo.prototype,"slotElement",void 0),wo([n(".ft-filter--container")],Oo.prototype,"container",void 0),wo([n(".ft-filter--values")],Oo.prototype,"valuesContainer",void 0),wo([n(".ft-filter--levels")],Oo.prototype,"levelsContainer",void 0),wo([n(".ft-filter--levels ft-filter-level:last-child")],Oo.prototype,"lastLevel",void 0),wo([n(".ft-filter--filter input")],Oo.prototype,"filterInput",void 0),wo([function(t){return r({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],Oo.prototype,"levels",void 0),wo([s()],Oo.prototype,"withScroll",void 0),wo([s()],Oo.prototype,"filter",void 0),wo([s()],Oo.prototype,"slideIn",void 0),wo([s()],Oo.prototype,"slideOut",void 0);var So=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class Co extends $t{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return q`
1342
1342
  <slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
1343
1343
  `}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}))}}Co.elementDefinitions={},So([o({type:String})],Co.prototype,"label",void 0),So([o({type:Object,converter:t=>t})],Co.prototype,"value",void 0),So([o({type:Boolean,reflect:!0})],Co.prototype,"selected",void 0),So([o({type:Object})],Co.prototype,"subOptions",void 0),So([p({})],Co.prototype,"renderOption",void 0),So([n(".ft-filter-option--slot")],Co.prototype,"slotElement",void 0),c("ft-filter")(Oo),c("ft-filter-option")(Co),t.FtFilter=Oo,t.FtFilterChangeEvent=ko,t.FtFilterCssVariables=mo,t.FtFilterOption=Co,t.styles=$o,Object.defineProperty(t,"i",{value:!0})}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-filter",
3
- "version": "0.3.46",
3
+ "version": "0.3.48",
4
4
  "description": "Flat selector for multivalued or monovalued filters",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,15 +19,15 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-button": "0.3.46",
23
- "@fluid-topics/ft-checkbox": "0.3.46",
24
- "@fluid-topics/ft-icon": "0.3.46",
25
- "@fluid-topics/ft-radio": "0.3.46",
26
- "@fluid-topics/ft-ripple": "0.3.46",
27
- "@fluid-topics/ft-snap-scroll": "0.3.46",
28
- "@fluid-topics/ft-typography": "0.3.46",
29
- "@fluid-topics/ft-wc-utils": "0.3.46",
22
+ "@fluid-topics/ft-button": "0.3.48",
23
+ "@fluid-topics/ft-checkbox": "0.3.48",
24
+ "@fluid-topics/ft-icon": "0.3.48",
25
+ "@fluid-topics/ft-radio": "0.3.48",
26
+ "@fluid-topics/ft-ripple": "0.3.48",
27
+ "@fluid-topics/ft-snap-scroll": "0.3.48",
28
+ "@fluid-topics/ft-typography": "0.3.48",
29
+ "@fluid-topics/ft-wc-utils": "0.3.48",
30
30
  "lit": "2.2.8"
31
31
  },
32
- "gitHead": "de9703e114f8104f705c56d7793f03bfb5faae06"
32
+ "gitHead": "d3c000ead2ed2e15f291d09b303ad8aaa7f1ce98"
33
33
  }