@fluid-topics/ft-search-bar 2.1.18 → 2.1.20
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.js +7 -7
- package/build/ft-search-bar.d.ts +1 -1
- package/build/ft-search-bar.js +1 -1
- package/build/ft-search-bar.light.js +123 -123
- package/build/ft-search-bar.min.js +55 -55
- package/build/ft-search-bar.styles.js +3 -3
- package/build/managers/FacetsChipsManager.js +11 -11
- package/build/managers/SuggestManager.js +3 -3
- package/package.json +16 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { designSystemVariables, FtCssVariableFactory, setVariable } from "@fluid-topics/ft-wc-utils";
|
|
1
|
+
import { designSystemVariables, FtCssVariableFactory, setVariable, } from "@fluid-topics/ft-wc-utils";
|
|
2
2
|
import { css } from "lit";
|
|
3
3
|
import { FtButtonCssVariables } from "@fluid-topics/ft-button/build/ft-button.styles";
|
|
4
4
|
import { FtInputLabelCssVariables } from "@fluid-topics/ft-input-label/build/ft-input-label.styles";
|
|
@@ -27,7 +27,7 @@ export const FtSearchBarCssVariables = {
|
|
|
27
27
|
buttonRippleColor: FtCssVariableFactory.external(FtButtonCssVariables.rippleColor, "Button"),
|
|
28
28
|
activeItemBorderColor: FtCssVariableFactory.extend("--ft-search-bar-active-border-color", "", designSystemVariables.colorPrimary),
|
|
29
29
|
};
|
|
30
|
-
//language=css
|
|
30
|
+
// language=css
|
|
31
31
|
export const searchBarCss = css `
|
|
32
32
|
* {
|
|
33
33
|
box-sizing: border-box;
|
|
@@ -222,7 +222,7 @@ export const searchBarCss = css `
|
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
`;
|
|
225
|
-
//language=css
|
|
225
|
+
// language=css
|
|
226
226
|
export const facetsCss = css `
|
|
227
227
|
.ft-search-bar--presets {
|
|
228
228
|
min-width: 200px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { css, html, nothing } from "lit";
|
|
1
|
+
import { css, html, nothing, } from "lit";
|
|
2
2
|
import { repeat } from "lit/directives/repeat.js";
|
|
3
|
-
import { getBreadcrumbFromValue, getLabelFromValue, getSelectedValues } from "../converters";
|
|
3
|
+
import { getBreadcrumbFromValue, getLabelFromValue, getSelectedValues, } from "../converters";
|
|
4
4
|
import { setVariable } from "@fluid-topics/ft-wc-utils";
|
|
5
5
|
import { FtSnapScrollCssVariables } from "@fluid-topics/ft-snap-scroll";
|
|
6
6
|
import { FtChipCssVariables } from "@fluid-topics/ft-chip";
|
|
@@ -25,10 +25,10 @@ export class FacetsChipsManager {
|
|
|
25
25
|
${(this.getLocaleLabel(this.searchBar.contentLocale))}
|
|
26
26
|
</ft-chip>
|
|
27
27
|
` : null}
|
|
28
|
-
${repeat(this.searchBar.facets, facet => facet.key, facet => {
|
|
28
|
+
${repeat(this.searchBar.facets, (facet) => facet.key, (facet) => {
|
|
29
29
|
const values = getSelectedValues(facet);
|
|
30
|
-
return repeat(values, value => {
|
|
31
|
-
|
|
30
|
+
return repeat(values, (value) => {
|
|
31
|
+
const label = facet.label + ": " + getBreadcrumbFromValue(value);
|
|
32
32
|
const keyWithNoColumn = facet.key.replace(":", "-");
|
|
33
33
|
const chip = html `
|
|
34
34
|
<ft-chip
|
|
@@ -36,11 +36,11 @@ export class FacetsChipsManager {
|
|
|
36
36
|
?dense=${this.searchBar.dense && !isMobile}
|
|
37
37
|
?clickable=${isMobile}
|
|
38
38
|
?removable=${!isMobile}
|
|
39
|
-
icon
|
|
39
|
+
icon="${isMobile ? nothing : "close"}"
|
|
40
40
|
label="${label}"
|
|
41
|
-
title
|
|
41
|
+
title="${useSnapScroll ? label : nothing}"
|
|
42
42
|
@click=${() => this.openMobileFilters(facet.key)}
|
|
43
|
-
@icon-click=${() => this.searchBar.setFilter(facet.key, values.filter(v => v !== value))}
|
|
43
|
+
@icon-click=${() => this.searchBar.setFilter(facet.key, values.filter((v) => v !== value))}
|
|
44
44
|
data-key="${facet.key}"
|
|
45
45
|
data-value="${value}">
|
|
46
46
|
${getLabelFromValue(value)}
|
|
@@ -89,12 +89,12 @@ export class FacetsChipsManager {
|
|
|
89
89
|
}
|
|
90
90
|
getLocaleLabel(locale) {
|
|
91
91
|
var _a;
|
|
92
|
-
return (_a = this.searchBar.availableContentLocales.filter(l => { var _a; return ((_a = l.lang) !== null && _a !== void 0 ? _a : "").toLowerCase() === (locale !== null && locale !== void 0 ? locale : "").toLowerCase(); })
|
|
93
|
-
.map(l => l.label)
|
|
92
|
+
return (_a = this.searchBar.availableContentLocales.filter((l) => { var _a; return ((_a = l.lang) !== null && _a !== void 0 ? _a : "").toLowerCase() === (locale !== null && locale !== void 0 ? locale : "").toLowerCase(); })
|
|
93
|
+
.map((l) => l.label)
|
|
94
94
|
.pop()) !== null && _a !== void 0 ? _a : locale;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
//language=css
|
|
97
|
+
// language=css
|
|
98
98
|
FacetsChipsManager.styles = css `
|
|
99
99
|
.ft-search-bar--selected-filters:not(ft-snap-scroll) {
|
|
100
100
|
flex-shrink: 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { css, html, nothing } from "lit";
|
|
1
|
+
import { css, html, nothing, } from "lit";
|
|
2
2
|
import { repeat } from "lit/directives/repeat.js";
|
|
3
|
-
import { FtIcons, FtIconVariants, resolveFileFormatIcon } from "@fluid-topics/ft-icon";
|
|
4
|
-
import { Debouncer, setVariable, wordWrap } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
import { FtIcons, FtIconVariants, resolveFileFormatIcon, } from "@fluid-topics/ft-icon";
|
|
4
|
+
import { Debouncer, setVariable, wordWrap, } from "@fluid-topics/ft-wc-utils";
|
|
5
5
|
import { FtSearchBarCssVariables } from "../ft-search-bar.styles";
|
|
6
6
|
import { FtRippleCssVariables } from "@fluid-topics/ft-ripple";
|
|
7
7
|
export class SuggestManager {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-bar",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.20",
|
|
4
4
|
"description": "Search bar component using Fluid Topics public API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,23 +19,23 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-accordion": "2.1.
|
|
23
|
-
"@fluid-topics/ft-app-context": "2.1.
|
|
24
|
-
"@fluid-topics/ft-button": "2.1.
|
|
25
|
-
"@fluid-topics/ft-chip": "2.1.
|
|
26
|
-
"@fluid-topics/ft-filter": "2.1.
|
|
27
|
-
"@fluid-topics/ft-icon": "2.1.
|
|
28
|
-
"@fluid-topics/ft-select": "2.1.
|
|
29
|
-
"@fluid-topics/ft-size-watcher": "2.1.
|
|
30
|
-
"@fluid-topics/ft-skeleton": "2.1.
|
|
31
|
-
"@fluid-topics/ft-snap-scroll": "2.1.
|
|
32
|
-
"@fluid-topics/ft-tooltip": "2.1.
|
|
33
|
-
"@fluid-topics/ft-typography": "2.1.
|
|
34
|
-
"@fluid-topics/ft-wc-utils": "2.1.
|
|
22
|
+
"@fluid-topics/ft-accordion": "2.1.20",
|
|
23
|
+
"@fluid-topics/ft-app-context": "2.1.20",
|
|
24
|
+
"@fluid-topics/ft-button": "2.1.20",
|
|
25
|
+
"@fluid-topics/ft-chip": "2.1.20",
|
|
26
|
+
"@fluid-topics/ft-filter": "2.1.20",
|
|
27
|
+
"@fluid-topics/ft-icon": "2.1.20",
|
|
28
|
+
"@fluid-topics/ft-select": "2.1.20",
|
|
29
|
+
"@fluid-topics/ft-size-watcher": "2.1.20",
|
|
30
|
+
"@fluid-topics/ft-skeleton": "2.1.20",
|
|
31
|
+
"@fluid-topics/ft-snap-scroll": "2.1.20",
|
|
32
|
+
"@fluid-topics/ft-tooltip": "2.1.20",
|
|
33
|
+
"@fluid-topics/ft-typography": "2.1.20",
|
|
34
|
+
"@fluid-topics/ft-wc-utils": "2.1.20",
|
|
35
35
|
"lit": "3.1.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@fluid-topics/public-api": "1.0.
|
|
38
|
+
"@fluid-topics/public-api": "1.0.136"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "77e9f03085f977dde887e175b964bf66b862253f"
|
|
41
41
|
}
|