@fluid-topics/ft-search-facet 1.1.21 → 1.1.22
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.
|
@@ -1294,7 +1294,7 @@ const M=Symbol.for(""),j=t=>{if(t?.r===M)return t?._$litStatic$},_=t=>({_$litSta
|
|
|
1294
1294
|
@click=${this.next}
|
|
1295
1295
|
></ft-button>
|
|
1296
1296
|
</div>
|
|
1297
|
-
`}update(t){super.update(t),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 Bi(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(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))}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,o;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(o=this.contentSlot)||void 0===o||o.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)}}Di.elementDefinitions={"ft-button":ni},Di.styles=zi,Ai([i.property({type:Boolean})],Di.prototype,"horizontal",void 0),Ai([i.property({type:Boolean})],Di.prototype,"hideScrollbar",void 0),Ai([i.property({type:Boolean})],Di.prototype,"controls",void 0),Ai([i.property({type:Boolean})],Di.prototype,"limitSize",void 0),Ai([i.state()],Di.prototype,"elements",void 0),Ai([i.state()],Di.prototype,"currentElement",void 0),Ai([i.state()],Di.prototype,"withScroll",void 0),Ai([i.state()],Di.prototype,"startReached",void 0),Ai([i.state()],Di.prototype,"endReached",void 0),Ai([i.query(".ft-snap-scroll--content")],Di.prototype,"contentSlot",void 0),e.customElement("ft-snap-scroll")(Di);const Ki=e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),Fi=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),Zi=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),Ti=e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),Pi=e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),Hi=e.FtCssVariableFactory.external(e.designSystemVariables.transitionDuration,"Design system"),Mi=e.FtCssVariableFactory.external(e.designSystemVariables.transitionTimingFunction,"Design system"),ji=e.FtCssVariableFactory.extend("--ft-filter-label-color","",e.designSystemVariables.colorOnSurface),_i=e.FtCssVariableFactory.extend("--ft-filter-label-font-size","",rt.fontSize,"
|
|
1297
|
+
`}update(t){super.update(t),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 Bi(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(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))}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,o;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(o=this.contentSlot)||void 0===o||o.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)}}Di.elementDefinitions={"ft-button":ni},Di.styles=zi,Ai([i.property({type:Boolean})],Di.prototype,"horizontal",void 0),Ai([i.property({type:Boolean})],Di.prototype,"hideScrollbar",void 0),Ai([i.property({type:Boolean})],Di.prototype,"controls",void 0),Ai([i.property({type:Boolean})],Di.prototype,"limitSize",void 0),Ai([i.state()],Di.prototype,"elements",void 0),Ai([i.state()],Di.prototype,"currentElement",void 0),Ai([i.state()],Di.prototype,"withScroll",void 0),Ai([i.state()],Di.prototype,"startReached",void 0),Ai([i.state()],Di.prototype,"endReached",void 0),Ai([i.query(".ft-snap-scroll--content")],Di.prototype,"contentSlot",void 0),e.customElement("ft-snap-scroll")(Di);const Ki=e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),Fi=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),Zi=e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceMedium,"Design system"),Ti=e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),Pi=e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),Hi=e.FtCssVariableFactory.external(e.designSystemVariables.transitionDuration,"Design system"),Mi=e.FtCssVariableFactory.external(e.designSystemVariables.transitionTimingFunction,"Design system"),ji=e.FtCssVariableFactory.extend("--ft-filter-label-color","",e.designSystemVariables.colorOnSurface),_i=e.FtCssVariableFactory.extend("--ft-filter-label-font-size","",rt.fontSize,"16px"),Gi=[se,o.css`
|
|
1298
1298
|
:host {
|
|
1299
1299
|
display: flex;
|
|
1300
1300
|
max-height: 100%;
|
|
@@ -1446,7 +1446,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1446
1446
|
@click=${this.next}
|
|
1447
1447
|
></ft-button>
|
|
1448
1448
|
</div>
|
|
1449
|
-
`}update(t){super.update(t),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 il(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(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))}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,o;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(o=this.contentSlot)||void 0===o||o.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)}}rl.elementDefinitions={"ft-button":$a},rl.styles=el,ol([R({type:Boolean})],rl.prototype,"horizontal",void 0),ol([R({type:Boolean})],rl.prototype,"hideScrollbar",void 0),ol([R({type:Boolean})],rl.prototype,"controls",void 0),ol([R({type:Boolean})],rl.prototype,"limitSize",void 0),ol([I()],rl.prototype,"elements",void 0),ol([I()],rl.prototype,"currentElement",void 0),ol([I()],rl.prototype,"withScroll",void 0),ol([I()],rl.prototype,"startReached",void 0),ol([I()],rl.prototype,"endReached",void 0),ol([A(".ft-snap-scroll--content")],rl.prototype,"contentSlot",void 0),B("ft-snap-scroll")(rl);const nl=Ue.external(De.colorOutline,"Design system"),sl=Ue.external(De.colorOnSurface,"Design system"),al=Ue.external(De.colorOnSurfaceMedium,"Design system"),ll=Ue.external(De.colorPrimary,"Design system"),cl=Ue.external(De.colorSurface,"Design system"),fl=Ue.external(De.transitionDuration,"Design system"),hl=Ue.external(De.transitionTimingFunction,"Design system"),ul=Ue.extend("--ft-filter-label-color","",De.colorOnSurface),pl=Ue.extend("--ft-filter-label-font-size","",fr.fontSize,"
|
|
1449
|
+
`}update(t){super.update(t),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 il(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(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))}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,o;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(o=this.contentSlot)||void 0===o||o.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)}}rl.elementDefinitions={"ft-button":$a},rl.styles=el,ol([R({type:Boolean})],rl.prototype,"horizontal",void 0),ol([R({type:Boolean})],rl.prototype,"hideScrollbar",void 0),ol([R({type:Boolean})],rl.prototype,"controls",void 0),ol([R({type:Boolean})],rl.prototype,"limitSize",void 0),ol([I()],rl.prototype,"elements",void 0),ol([I()],rl.prototype,"currentElement",void 0),ol([I()],rl.prototype,"withScroll",void 0),ol([I()],rl.prototype,"startReached",void 0),ol([I()],rl.prototype,"endReached",void 0),ol([A(".ft-snap-scroll--content")],rl.prototype,"contentSlot",void 0),B("ft-snap-scroll")(rl);const nl=Ue.external(De.colorOutline,"Design system"),sl=Ue.external(De.colorOnSurface,"Design system"),al=Ue.external(De.colorOnSurfaceMedium,"Design system"),ll=Ue.external(De.colorPrimary,"Design system"),cl=Ue.external(De.colorSurface,"Design system"),fl=Ue.external(De.transitionDuration,"Design system"),hl=Ue.external(De.transitionTimingFunction,"Design system"),ul=Ue.extend("--ft-filter-label-color","",De.colorOnSurface),pl=Ue.extend("--ft-filter-label-font-size","",fr.fontSize,"16px"),dl=[dn,Ut`
|
|
1450
1450
|
:host {
|
|
1451
1451
|
display: flex;
|
|
1452
1452
|
max-height: 100%;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-facet",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.22",
|
|
4
4
|
"description": "Search facet for integrated search component",
|
|
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-filter": "1.1.
|
|
23
|
-
"@fluid-topics/ft-i18n": "1.1.
|
|
24
|
-
"@fluid-topics/ft-search-context": "1.1.
|
|
25
|
-
"@fluid-topics/ft-typography": "1.1.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-filter": "1.1.22",
|
|
23
|
+
"@fluid-topics/ft-i18n": "1.1.22",
|
|
24
|
+
"@fluid-topics/ft-search-context": "1.1.22",
|
|
25
|
+
"@fluid-topics/ft-typography": "1.1.22",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.1.22",
|
|
27
27
|
"lit": "3.1.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@fluid-topics/public-api": "1.0.55"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "89c8b3562faee77c5ae79180f255aa9021f4d229"
|
|
33
33
|
}
|