@stapel/search-react 0.7.0 → 0.9.0
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/CHANGELOG.md +61 -0
- package/dist/default/FacetGroupControl.d.ts +40 -0
- package/dist/default/FacetGroupControl.d.ts.map +1 -0
- package/dist/default/FacetGroupControl.js +176 -0
- package/dist/default/FacetGroupControl.js.map +1 -0
- package/dist/default/FacetPanelPane.d.ts +30 -0
- package/dist/default/FacetPanelPane.d.ts.map +1 -1
- package/dist/default/FacetPanelPane.js +28 -16
- package/dist/default/FacetPanelPane.js.map +1 -1
- package/dist/default/FilterChips.d.ts +37 -0
- package/dist/default/FilterChips.d.ts.map +1 -0
- package/dist/default/FilterChips.js +203 -0
- package/dist/default/FilterChips.js.map +1 -0
- package/dist/default/SearchPage.d.ts +59 -0
- package/dist/default/SearchPage.d.ts.map +1 -1
- package/dist/default/SearchPage.js +60 -10
- package/dist/default/SearchPage.js.map +1 -1
- package/dist/default/SearchResultsPane.d.ts +19 -0
- package/dist/default/SearchResultsPane.d.ts.map +1 -1
- package/dist/default/SearchResultsPane.js +15 -2
- package/dist/default/SearchResultsPane.js.map +1 -1
- package/dist/default/ViewSwitch.d.ts +66 -0
- package/dist/default/ViewSwitch.d.ts.map +1 -0
- package/dist/default/ViewSwitch.js +49 -0
- package/dist/default/ViewSwitch.js.map +1 -0
- package/dist/default/index.d.ts +12 -1
- package/dist/default/index.d.ts.map +1 -1
- package/dist/default/index.js +9 -1
- package/dist/default/index.js.map +1 -1
- package/dist/headless/SearchStateProvider.d.ts +35 -0
- package/dist/headless/SearchStateProvider.d.ts.map +1 -1
- package/dist/headless/SearchStateProvider.js +38 -3
- package/dist/headless/SearchStateProvider.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +9 -1
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/keys.d.ts +32 -1
- package/dist/i18n/keys.d.ts.map +1 -1
- package/dist/i18n/keys.js +42 -2
- package/dist/i18n/keys.js.map +1 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +9 -1
- package/dist/i18n/ru.js.map +1 -1
- package/llms.txt +2 -1
- package/manifest.json +32 -3
- package/nav-manifest.json +1 -1
- package/package.json +8 -8
- package/src/analytics/generated/events.json +1 -1
- package/src/default/FacetGroupControl.tsx +312 -0
- package/src/default/FacetPanelPane.tsx +57 -63
- package/src/default/FilterChips.tsx +423 -0
- package/src/default/SearchPage.tsx +158 -16
- package/src/default/SearchResultsPane.tsx +39 -2
- package/src/default/ViewSwitch.tsx +147 -0
- package/src/default/index.ts +23 -1
- package/src/headless/SearchStateProvider.tsx +80 -3
- package/src/i18n/es.ts +10 -1
- package/src/i18n/keys.ts +44 -2
- package/src/i18n/ru.ts +10 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* `<FilterChips>` — the phone's filter row: one horizontally scrolling line of
|
|
4
|
+
* chips, each of which opens its OWN picker.
|
|
5
|
+
*
|
|
6
|
+
* ## What it replaces, and why the replacement is not cosmetic
|
|
7
|
+
*
|
|
8
|
+
* The phone filter path was a single full-width "Filters (3)" button that
|
|
9
|
+
* opened the whole panel. Everything about a search — the category, the price,
|
|
10
|
+
* the brand, where — was behind one tap onto a sheet you then had to scroll,
|
|
11
|
+
* and NOTHING about what was already applied was visible on the results page
|
|
12
|
+
* itself except a number in brackets. The chips row states the filters ON the
|
|
13
|
+
* page: the ones you have set read as set, the ones you have not are one tap
|
|
14
|
+
* from their own small picker, and the whole panel is still there behind the
|
|
15
|
+
* leading chip for the person who wants all of it at once.
|
|
16
|
+
*
|
|
17
|
+
* ## The row scrolls; the PAGE does not
|
|
18
|
+
*
|
|
19
|
+
* A row of chips wider than a 390px phone is the point — it is how the row
|
|
20
|
+
* holds eight filters. What must not happen is the page's own body growing a
|
|
21
|
+
* horizontal scrollbar, which is what a `flex-wrap: nowrap` row without an
|
|
22
|
+
* `overflow-x` owner does: the chips push the document wider, every other
|
|
23
|
+
* element on the page slides, and the visitor is left rubber-banding the whole
|
|
24
|
+
* screen sideways to read a price. So the row owns its overflow
|
|
25
|
+
* (`overflow-x: auto`), contains its overscroll so a flick past the last chip
|
|
26
|
+
* does not start scrolling the page behind it, and hides the scrollbar itself
|
|
27
|
+
* (a 15px grey trough under a 32px chip is chrome nobody asked for) — through
|
|
28
|
+
* a hoisted stylesheet, because `::-webkit-scrollbar` and `scrollbar-width`
|
|
29
|
+
* cannot be written as inline style.
|
|
30
|
+
*
|
|
31
|
+
* Hiding a scrollbar is only safe because nothing here is reachable ONLY by
|
|
32
|
+
* dragging it: every chip is a real `<button>`, so Tab walks the row and the
|
|
33
|
+
* browser scrolls the focused chip into view on its own.
|
|
34
|
+
*
|
|
35
|
+
* ## Every picker is a `SkinDialog`
|
|
36
|
+
*
|
|
37
|
+
* Which means every picker is a BOTTOM SHEET on a phone and a modal above it
|
|
38
|
+
* (owner ruling 2026-08-24, enforced by `stapel/no-bare-dialog`). The chips
|
|
39
|
+
* row is a phone surface, so in practice it is always the sheet — but the
|
|
40
|
+
* component does not decide that, the substrate does, and a tablet rendering
|
|
41
|
+
* the row gets the tablet answer without this file knowing.
|
|
42
|
+
*
|
|
43
|
+
* ## The library is not inventing a classified's filters
|
|
44
|
+
*
|
|
45
|
+
* A chip exists for each facet group the SERVER returned, each numeric range
|
|
46
|
+
* the CATEGORY SCHEMA declares, and the location — plus the leading
|
|
47
|
+
* "all filters" chip. Nothing here knows what a "brand" or a "mileage" is;
|
|
48
|
+
* a deployment with three facets gets three chips and a deployment with none
|
|
49
|
+
* gets the leading chip alone.
|
|
50
|
+
*/
|
|
51
|
+
import { useState } from "react";
|
|
52
|
+
import { Button, Flex, Typography } from "antd";
|
|
53
|
+
import { SkinDialog, useDialogSurface } from "@stapel/tokens-antd/skin";
|
|
54
|
+
import { SlotPlaceholder, useT, useTPlural } from "@stapel/core";
|
|
55
|
+
import { radii, spacing } from "@stapel/tokens";
|
|
56
|
+
import { useFacetPanel } from "../headless/FacetPanel.js";
|
|
57
|
+
import { useAppliedCount } from "../headless/useAppliedCount.js";
|
|
58
|
+
import { useSearchState } from "../headless/SearchStateProvider.js";
|
|
59
|
+
import { buildRangeGroups } from "../state/ranges.js";
|
|
60
|
+
import { SEARCH_I18N_KEYS } from "../i18n/keys.js";
|
|
61
|
+
import { FacetGroupControl } from "./FacetGroupControl.js";
|
|
62
|
+
import { RangeFilterRow } from "./RangeFilterRow.js";
|
|
63
|
+
import { geoSummaryFallback } from "./FacetPanelPane.js";
|
|
64
|
+
/** The class the scroller carries, for {@link chipRowCss}. */
|
|
65
|
+
export const CHIP_ROW_CLASS = "stapel-filter-chips";
|
|
66
|
+
/** The `href` the hoisted chip-row stylesheet is deduplicated by. */
|
|
67
|
+
export const CHIP_ROW_STYLE_HREF = "stapel-search-filter-chips";
|
|
68
|
+
/**
|
|
69
|
+
* The two rules an inline style cannot express: Firefox's `scrollbar-width`
|
|
70
|
+
* and WebKit's `::-webkit-scrollbar`. Static (no theme values), so one hoisted
|
|
71
|
+
* copy serves the document.
|
|
72
|
+
*/
|
|
73
|
+
export function chipRowCss() {
|
|
74
|
+
return [
|
|
75
|
+
`.${CHIP_ROW_CLASS}{scrollbar-width:none;-ms-overflow-style:none}`,
|
|
76
|
+
`.${CHIP_ROW_CLASS}::-webkit-scrollbar{display:none}`,
|
|
77
|
+
].join("");
|
|
78
|
+
}
|
|
79
|
+
/** The scroller: one line, its own overflow, nobody else's. */
|
|
80
|
+
const ROW = {
|
|
81
|
+
display: "flex",
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
gap: spacing[2],
|
|
84
|
+
flexWrap: "nowrap",
|
|
85
|
+
overflowX: "auto",
|
|
86
|
+
// A flick past the last chip must not hand the gesture to the page.
|
|
87
|
+
overscrollBehaviorInline: "contain",
|
|
88
|
+
// Room for the focus ring of the first and last chip, which a flush edge
|
|
89
|
+
// clips into invisibility.
|
|
90
|
+
paddingBlock: spacing[1],
|
|
91
|
+
};
|
|
92
|
+
const CHIP = { flex: "0 0 auto", borderRadius: radii.full };
|
|
93
|
+
/**
|
|
94
|
+
* The label a chip carries: the group's name alone when nothing is chosen,
|
|
95
|
+
* and the CHOICE when something is — "Brand" becomes "Bosch", "Brand, +2".
|
|
96
|
+
* A chip that reads "Brand" while filtering to Bosch is a lie the person can
|
|
97
|
+
* only catch by opening it.
|
|
98
|
+
*/
|
|
99
|
+
function chipLabel(group, t) {
|
|
100
|
+
const chosen = group.options.filter((option) => option.selected);
|
|
101
|
+
const first = chosen[0];
|
|
102
|
+
if (first === undefined)
|
|
103
|
+
return group.label;
|
|
104
|
+
return chosen.length === 1
|
|
105
|
+
? first.label
|
|
106
|
+
: `${first.label}${t(SEARCH_I18N_KEYS.filtersChipMore, { count: chosen.length - 1 })}`;
|
|
107
|
+
}
|
|
108
|
+
export function FilterChips(props) {
|
|
109
|
+
const t = useT();
|
|
110
|
+
const tPlural = useTPlural();
|
|
111
|
+
const { state, setGeo } = useSearchState();
|
|
112
|
+
const bag = useFacetPanel({
|
|
113
|
+
...(props.categoryFeatures !== undefined
|
|
114
|
+
? { categoryFeatures: props.categoryFeatures }
|
|
115
|
+
: {}),
|
|
116
|
+
...(props.locale !== undefined ? { locale: props.locale } : {}),
|
|
117
|
+
});
|
|
118
|
+
const applied = useAppliedCount();
|
|
119
|
+
const surface = useDialogSurface();
|
|
120
|
+
const [open, setOpen] = useState(null);
|
|
121
|
+
const ranges = buildRangeGroups({
|
|
122
|
+
state,
|
|
123
|
+
...(props.categoryFeatures !== undefined
|
|
124
|
+
? { categoryFeatures: props.categoryFeatures }
|
|
125
|
+
: {}),
|
|
126
|
+
t,
|
|
127
|
+
});
|
|
128
|
+
const groups = bag.state.status === "ready"
|
|
129
|
+
? bag.state.data.filter((group) => group.options.length > 0)
|
|
130
|
+
: [];
|
|
131
|
+
// The same sentence the panel's own commit button says, for the same reason:
|
|
132
|
+
// the results are BEHIND this sheet, so the button that closes it is the
|
|
133
|
+
// only place a person learns what their choice did.
|
|
134
|
+
const applyLabel = applied.count === null || applied.kind === "unknown"
|
|
135
|
+
? t(SEARCH_I18N_KEYS.filtersApply)
|
|
136
|
+
: tPlural(applied.kind === "at_least"
|
|
137
|
+
? SEARCH_I18N_KEYS.filtersShowCountAtLeast
|
|
138
|
+
: SEARCH_I18N_KEYS.filtersShowCount, { count: applied.count });
|
|
139
|
+
const close = () => {
|
|
140
|
+
setOpen(null);
|
|
141
|
+
};
|
|
142
|
+
const sheetFor = (id, title, body) => (_jsx(SkinDialog, { open: open === id, onClose: close, title: title, dismissLabel: t(SEARCH_I18N_KEYS.filtersDismiss), "data-testid": `filter-chip-sheet-${id}`, footer: _jsx(Button, { block: true, type: "primary", "data-testid": `filter-chip-apply-${id}`, "data-analytics": "none", "data-analytics-reason": "the filter is already applied; this closes the sheet", onClick: close, children: applyLabel }), children: body }));
|
|
143
|
+
const geo = state.geo;
|
|
144
|
+
const showGeoChip = props.renderGeoFilter !== undefined || geo !== undefined;
|
|
145
|
+
// Nothing applied: the chip is the FILTER's name ("Location"), because there
|
|
146
|
+
// is no constraint to describe yet. Applied: the host's name for the place,
|
|
147
|
+
// and failing that the sentence that admits the pair does not know it.
|
|
148
|
+
const geoChipLabel = geo === undefined
|
|
149
|
+
? t(SEARCH_I18N_KEYS.geoTitle)
|
|
150
|
+
: (props.geoLabel ?? geoSummaryFallback(geo, t));
|
|
151
|
+
return (_jsxs(_Fragment, { children: [_jsx("style", { href: CHIP_ROW_STYLE_HREF, precedence: "default", children: chipRowCss() }), _jsxs("div", { className: CHIP_ROW_CLASS, style: ROW, role: "group", "aria-label": t(SEARCH_I18N_KEYS.filtersChipsLabel), "data-testid": "search-filter-chips", "data-surface": surface, children: [_jsx(Button, { shape: "circle", "aria-label": t(SEARCH_I18N_KEYS.filtersAll), icon: _jsx(SlidersGlyph, {}), style: CHIP, "data-testid": "search-filters-open", "data-active": bag.activeFilters > 0 ? "true" : "false", "data-analytics": "none", "data-analytics-reason": "opening the filter sheet is a read, not a flow step", onClick: props.onOpenAll, children: bag.activeFilters > 0 && _jsx(ActiveDot, {}) }), showGeoChip && (_jsx(Button, { style: CHIP, shape: "round", type: geo !== undefined ? "primary" : "default", "data-testid": "search-chip-geo", "data-analytics": "none", "data-analytics-reason": "a filter is a read, not a flow step", onClick: () => {
|
|
152
|
+
setOpen("geo");
|
|
153
|
+
}, children: geoChipLabel })), ranges.map((group) => (_jsx(Button, { style: CHIP, shape: "round", type: group.active ? "primary" : "default", "data-testid": `search-chip-range-${group.slug}`, "data-analytics": "none", "data-analytics-reason": "a filter is a read, not a flow step", onClick: () => {
|
|
154
|
+
setOpen(`range:${group.slug}`);
|
|
155
|
+
}, children: group.label }, group.slug))), groups.map((group) => (_jsx(Button, { style: CHIP, shape: "round", type: group.selected.length > 0 ? "primary" : "default", "data-testid": `search-chip-${group.slug}`, "data-analytics": "none", "data-analytics-reason": "a filter is a read, not a flow step", onClick: () => {
|
|
156
|
+
setOpen(`facet:${group.slug}`);
|
|
157
|
+
}, children: chipLabel(group, t) }, group.slug)))] }), open?.startsWith("facet:") === true &&
|
|
158
|
+
(() => {
|
|
159
|
+
const slug = open.slice("facet:".length);
|
|
160
|
+
const group = groups.find((candidate) => candidate.slug === slug);
|
|
161
|
+
return group === undefined
|
|
162
|
+
? null
|
|
163
|
+
: sheetFor(open, group.label, _jsx(FacetGroupControl, { group: group, onToggle: bag.toggle, heading: false,
|
|
164
|
+
// A sheet devoted to ONE group has the room for all of it;
|
|
165
|
+
// "Show all" inside it would be a fold inside a fold.
|
|
166
|
+
visibleOptions: null }));
|
|
167
|
+
})(), open?.startsWith("range:") === true &&
|
|
168
|
+
(() => {
|
|
169
|
+
const slug = open.slice("range:".length);
|
|
170
|
+
const group = ranges.find((candidate) => candidate.slug === slug);
|
|
171
|
+
return group === undefined
|
|
172
|
+
? null
|
|
173
|
+
: sheetFor(open, group.label, _jsx(RangeFilterRow, { group: group, onApply: bag.setRange }));
|
|
174
|
+
})(), open === "geo" &&
|
|
175
|
+
sheetFor("geo", t(SEARCH_I18N_KEYS.geoTitle), _jsxs(Flex, { vertical: true, gap: spacing[3], children: [props.renderGeoFilter?.({
|
|
176
|
+
value: geo,
|
|
177
|
+
onChange: (next) => {
|
|
178
|
+
setGeo(next);
|
|
179
|
+
},
|
|
180
|
+
}) ?? _jsx(SlotPlaceholder, { name: "renderGeoFilter", "data-testid": "search-chip-geo-slot" }), geo !== undefined && (_jsxs(_Fragment, { children: [_jsx(Typography.Text, { type: "secondary", "data-testid": "search-chip-geo-summary", children: geoChipLabel }), _jsx(Button, { style: { alignSelf: "flex-start" }, "data-testid": "search-chip-geo-clear", "data-analytics": "none", "data-analytics-reason": "a filter is a read, not a flow step", onClick: () => {
|
|
181
|
+
setGeo(null);
|
|
182
|
+
}, children: t(SEARCH_I18N_KEYS.geoClear) })] }))] }))] }));
|
|
183
|
+
}
|
|
184
|
+
/** The mark on the "all filters" chip: something is applied. Not a count —
|
|
185
|
+
* the counts are on the chips beside it, and a number inside a 32px circle is
|
|
186
|
+
* a number nobody reads. */
|
|
187
|
+
function ActiveDot() {
|
|
188
|
+
return (_jsx("span", { "aria-hidden": "true", "data-testid": "search-filters-dot", style: {
|
|
189
|
+
position: "absolute",
|
|
190
|
+
insetInlineEnd: spacing[1],
|
|
191
|
+
insetBlockStart: spacing[1],
|
|
192
|
+
width: spacing[2],
|
|
193
|
+
height: spacing[2],
|
|
194
|
+
borderRadius: radii.full,
|
|
195
|
+
background: "currentColor",
|
|
196
|
+
} }));
|
|
197
|
+
}
|
|
198
|
+
/** Sliders — the one glyph a filter control is universally drawn with. Inline
|
|
199
|
+
* SVG, like every other glyph in the fleet's skins: no icon-font dependency. */
|
|
200
|
+
function SlidersGlyph() {
|
|
201
|
+
return (_jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", role: "img", "aria-hidden": "true", children: [_jsx("path", { d: "M4 7h10M18 7h2M4 17h4M12 17h8" }), _jsx("circle", { cx: "16", cy: "7", r: "2.2" }), _jsx("circle", { cx: "10", cy: "17", r: "2.2" })] }));
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=FilterChips.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterChips.js","sourceRoot":"","sources":["../../src/default/FilterChips.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGzD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC;AAEpD,qEAAqE;AACrE,MAAM,CAAC,MAAM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,IACF,CACJ,CAAC;AACJ,CAAC;AAED;;4BAE4B;AAC5B,SAAS,SAAS;IAChB,OAAO,CACL,8BACc,MAAM,iBACN,oBAAoB,EAChC,KAAK,EAAE;YACL,QAAQ,EAAE,UAAU;YACpB,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC;YAC1B,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;YAC3B,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;YACjB,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;YAClB,YAAY,EAAE,KAAK,CAAC,IAAI;YACxB,UAAU,EAAE,cAAc;SAC3B,GACD,CACH,CAAC;AACJ,CAAC;AAED;gFACgF;AAChF,SAAS,YAAY;IACnB,OAAO,CACL,eACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,MAAM,EAClB,aAAa,EAAC,OAAO,EACrB,IAAI,EAAC,KAAK,iBACE,MAAM,aAElB,eAAM,CAAC,EAAC,+BAA+B,GAAG,EAC1C,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,KAAK,GAAG,EACjC,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,KAAK,GAAG,IAC9B,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -2,7 +2,9 @@ import type { ReactElement, ReactNode } from "react";
|
|
|
2
2
|
import type { FeatureDef } from "@stapel/attributes-react";
|
|
3
3
|
import type { SearchParamsAdapter } from "../headless/SearchStateProvider.js";
|
|
4
4
|
import type { ParseSearchStateOptions } from "../state/urlState.js";
|
|
5
|
+
import type { SearchGeo } from "../api/types.js";
|
|
5
6
|
import type { CategoryFilterSlotProps, GeoFilterSlotProps } from "./FacetPanelPane.js";
|
|
7
|
+
import type { SearchView } from "./ViewSwitch.js";
|
|
6
8
|
import type { DegradationNoticeVariant } from "./DegradationNotice.js";
|
|
7
9
|
import type { SearchCardRenderer } from "./SearchResultCard.js";
|
|
8
10
|
import type { ThemeModeProp } from "./types.js";
|
|
@@ -36,6 +38,24 @@ export interface SearchPageProps extends ThemeModeProp, ParseSearchStateOptions
|
|
|
36
38
|
readonly renderCategoryFilter?: (slot: CategoryFilterSlotProps) => ReactNode;
|
|
37
39
|
/** The location control slot (`geo-react`). */
|
|
38
40
|
readonly renderGeoFilter?: (slot: GeoFilterSlotProps) => ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* What the current location is CALLED, in words — set once here and it
|
|
43
|
+
* reaches both filter surfaces, the desktop panel and the phone chip row.
|
|
44
|
+
* See {@link FacetPanelPaneProps.geoLabel}: this page never prints a
|
|
45
|
+
* coordinate, with or without it.
|
|
46
|
+
*/
|
|
47
|
+
readonly geoLabel?: ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Open the search centred where the visitor is, when the URL says nothing
|
|
50
|
+
* about location — see {@link SearchStateProviderProps.defaultGeo} for the
|
|
51
|
+
* four rules that keep it from overruling a link or a person.
|
|
52
|
+
*
|
|
53
|
+
* The host resolves the position; this page does not know what a map or a
|
|
54
|
+
* geocoder is and must not learn. A browser prompt (`usePermission`
|
|
55
|
+
* + `geolocation`) or the server's IP guess both arrive here as the same two
|
|
56
|
+
* numbers, and `geoLabel` is where the name of the place they mean comes in.
|
|
57
|
+
*/
|
|
58
|
+
readonly defaultGeo?: SearchGeo | undefined;
|
|
39
59
|
/** Container chrome under the results — e.g. the ranking-disclosure link. */
|
|
40
60
|
readonly footer?: ReactNode;
|
|
41
61
|
/**
|
|
@@ -71,6 +91,45 @@ export interface SearchPageProps extends ThemeModeProp, ParseSearchStateOptions
|
|
|
71
91
|
readonly defaultFiltersOpen?: boolean;
|
|
72
92
|
/** Offer a page-size control beside the sort. Default `true`. */
|
|
73
93
|
readonly pageSize?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* The trail above the heading — "Home / Cars / Sedans".
|
|
96
|
+
*
|
|
97
|
+
* A SLOT, because a breadcrumb is a walk up the CATEGORY tree and the tree
|
|
98
|
+
* belongs to `categories-react`; a search package knows the `category`
|
|
99
|
+
* parameter's value and nothing about its ancestors. Rendered above the
|
|
100
|
+
* results heading, inside the results column, so it sits over the list it
|
|
101
|
+
* describes rather than over the whole two-column page.
|
|
102
|
+
*/
|
|
103
|
+
readonly breadcrumb?: ReactNode;
|
|
104
|
+
/**
|
|
105
|
+
* The arrangements the view switch offers. Default: the pair's own list and
|
|
106
|
+
* grid. A deployment adds its own — `{ id: "map", labelKey, icon, render }`
|
|
107
|
+
* — and the switch treats it like the two that ship; see {@link SearchView}.
|
|
108
|
+
*
|
|
109
|
+
* A single view draws no switch at all.
|
|
110
|
+
*/
|
|
111
|
+
readonly views?: readonly SearchView[];
|
|
112
|
+
/** Which arrangement the page opens in. Default: the first of `views`. */
|
|
113
|
+
readonly defaultView?: string;
|
|
114
|
+
/** Told when the arrangement changes, for a host that remembers it. The
|
|
115
|
+
* view is NOT url state — see `<ViewSwitch>` for why. */
|
|
116
|
+
readonly onViewChange?: (id: string) => void;
|
|
117
|
+
/**
|
|
118
|
+
* The action at the trailing end of the results toolbar — conventionally
|
|
119
|
+
* "notify me about new ones".
|
|
120
|
+
*
|
|
121
|
+
* A SLOT, and it cannot be anything else: saving a search and mailing its
|
|
122
|
+
* new hits is a subscription with an owner, a schedule and a consent record,
|
|
123
|
+
* none of which this pair has. What the pair CAN state is where such a
|
|
124
|
+
* control belongs and that the page keeps room for it.
|
|
125
|
+
*/
|
|
126
|
+
readonly resultsAction?: ReactNode;
|
|
127
|
+
/**
|
|
128
|
+
* Heading level for the results caption. Default `1` — on a results SCREEN
|
|
129
|
+
* the list's name is the page's heading. A container that already prints its
|
|
130
|
+
* own `<h1>` above this page passes a lower level.
|
|
131
|
+
*/
|
|
132
|
+
readonly resultsHeadingLevel?: 1 | 2 | 3 | 4 | 5;
|
|
74
133
|
}
|
|
75
134
|
export declare function SearchPage(props: SearchPageProps): ReactElement;
|
|
76
135
|
//# sourceMappingURL=SearchPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchPage.d.ts","sourceRoot":"","sources":["../../src/default/SearchPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchPage.d.ts","sourceRoot":"","sources":["../../src/default/SearchPage.tsx"],"names":[],"mappings":"AAgEA,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAG9E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,iFAAiF;AACjF,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAErD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAiCtC,MAAM,WAAW,eAAgB,SAAQ,aAAa,EAAE,uBAAuB;IAC7E;2BACuB;IACvB,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IACzC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SA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AM,CAAC;IAC9B;6DACyD;IACzD,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C;;;;;;;;OAQG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAClD;AAsOD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CA0D/D"}
|
|
@@ -34,6 +34,20 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
34
34
|
* behind a "Filters (N)" button and opens as a bottom sheet through the shared
|
|
35
35
|
* `SkinDialog`, with the count of what is applied on the button itself.
|
|
36
36
|
*
|
|
37
|
+
* ── Where the search opens, and what it calls the place ───────────────────
|
|
38
|
+
*
|
|
39
|
+
* `defaultGeo` centres a fresh search on the visitor — a granted browser
|
|
40
|
+
* prompt, or the server's IP guess when there was none — and `geoLabel` says
|
|
41
|
+
* what that place is CALLED. Both are the host's to resolve: this page has a
|
|
42
|
+
* `lat` and a `lon` in its query string and no way on earth to turn them into
|
|
43
|
+
* "Berlin Mitte", which is exactly why it must not print them. A search
|
|
44
|
+
* package that grew a geocoder to say a nicer sentence would have taken on the
|
|
45
|
+
* whole of `geo-react` to avoid one bad line.
|
|
46
|
+
*
|
|
47
|
+
* The centring is applied once, only into a URL that carries no location, and
|
|
48
|
+
* never again after the visitor has said anything about location themselves —
|
|
49
|
+
* see {@link SearchStateProviderProps.defaultGeo}, which owns the rules.
|
|
50
|
+
*
|
|
37
51
|
* ── The filter column is laid out only when there is something in it ──────
|
|
38
52
|
*
|
|
39
53
|
* `Col md={7}` was unconditional, and on a deployment whose search plan
|
|
@@ -59,10 +73,12 @@ import { useAppliedCount } from "../headless/useAppliedCount.js";
|
|
|
59
73
|
import { buildRangeGroups } from "../state/ranges.js";
|
|
60
74
|
import { SEARCH_I18N_KEYS } from "../i18n/keys.js";
|
|
61
75
|
import { FacetPanelPane } from "./FacetPanelPane.js";
|
|
76
|
+
import { FilterChips } from "./FilterChips.js";
|
|
62
77
|
import { PageSizeSelect } from "./PageSizeSelect.js";
|
|
63
78
|
import { SearchBox } from "./SearchBox.js";
|
|
64
79
|
import { SearchResultsPane } from "./SearchResultsPane.js";
|
|
65
80
|
import { SortSelect } from "./SortSelect.js";
|
|
81
|
+
import { SEARCH_BUILTIN_VIEWS, ViewSwitch, resolveView } from "./ViewSwitch.js";
|
|
66
82
|
import { UrlIssueNotice } from "./UrlIssueNotice.js";
|
|
67
83
|
/**
|
|
68
84
|
* The desktop filter rail's width.
|
|
@@ -76,10 +92,31 @@ import { UrlIssueNotice } from "./UrlIssueNotice.js";
|
|
|
76
92
|
* same panel the phone sheet draws — one component, two frames.
|
|
77
93
|
*/
|
|
78
94
|
export const FILTERS_RAIL_WIDTH = 280;
|
|
79
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* The rail: fixed width, never squeezed, never grown — and STICKY.
|
|
97
|
+
*
|
|
98
|
+
* A catalogue page is thirty cards long and the filters are at the top of it,
|
|
99
|
+
* so by the fourth row of results the controls that narrow the list are a
|
|
100
|
+
* screenful above the list they narrow: the only way to change a filter after
|
|
101
|
+
* scrolling was to scroll back. The rail now stays put while the results move
|
|
102
|
+
* under it, and scrolls INTERNALLY when its own content is taller than the
|
|
103
|
+
* window (`overflowY: auto` + a viewport-height cap), which is the one place a
|
|
104
|
+
* viewport measure is right — the sticky box's height IS the window's.
|
|
105
|
+
*
|
|
106
|
+
* `alignSelf: flex-start` is load-bearing: a flex child stretches to the row's
|
|
107
|
+
* height by default, and a stretched box has nothing to stick to.
|
|
108
|
+
*/
|
|
80
109
|
const RAIL = {
|
|
81
110
|
flex: `0 0 ${String(FILTERS_RAIL_WIDTH)}px`,
|
|
82
111
|
maxWidth: FILTERS_RAIL_WIDTH,
|
|
112
|
+
position: "sticky",
|
|
113
|
+
top: 0,
|
|
114
|
+
alignSelf: "flex-start",
|
|
115
|
+
maxHeight: "100dvh",
|
|
116
|
+
overflowY: "auto",
|
|
117
|
+
overscrollBehavior: "contain",
|
|
118
|
+
// Room for the focus ring of the last control against the scroll edge.
|
|
119
|
+
paddingBlockEnd: spacing[2],
|
|
83
120
|
};
|
|
84
121
|
/** The results take what is left. `minWidth: 0` so a long word inside a card
|
|
85
122
|
* cannot push the grid wider than its column. */
|
|
@@ -101,6 +138,17 @@ function SearchPageBody(props) {
|
|
|
101
138
|
const surface = useDialogSurface();
|
|
102
139
|
const layout = props.filtersLayout ?? (surface === "sheet" ? "sheet" : "column");
|
|
103
140
|
const [sheetOpen, setSheetOpen] = useState(props.defaultFiltersOpen === true);
|
|
141
|
+
// How the results are ARRANGED. Component state, not URL state: it changes
|
|
142
|
+
// how the same answer is drawn, never what the answer is, so it must not
|
|
143
|
+
// rewrite the meaning of a link somebody shared (`<ViewSwitch>` §the view is
|
|
144
|
+
// not URL state).
|
|
145
|
+
const views = props.views ?? SEARCH_BUILTIN_VIEWS;
|
|
146
|
+
const [viewId, setViewId] = useState(props.defaultView);
|
|
147
|
+
const view = resolveView(views, viewId) ?? { id: "", labelKey: "" };
|
|
148
|
+
const changeView = (next) => {
|
|
149
|
+
setViewId(next);
|
|
150
|
+
props.onViewChange?.(next);
|
|
151
|
+
};
|
|
104
152
|
/**
|
|
105
153
|
* "Show 25 results", not "Show results".
|
|
106
154
|
*
|
|
@@ -138,25 +186,27 @@ function SearchPageBody(props) {
|
|
|
138
186
|
? { renderCategoryFilter: props.renderCategoryFilter }
|
|
139
187
|
: {}), ...(props.renderGeoFilter !== undefined
|
|
140
188
|
? { renderGeoFilter: props.renderGeoFilter }
|
|
141
|
-
: {}) }))] }));
|
|
142
|
-
|
|
143
|
-
|
|
189
|
+
: {}), ...(props.geoLabel !== undefined ? { geoLabel: props.geoLabel } : {}) }))] }));
|
|
190
|
+
// The toolbar over the results: how they are ARRANGED, how they are ORDERED,
|
|
191
|
+
// how many per page — and the surface's own action at the trailing end.
|
|
192
|
+
const toolbar = (_jsxs(Flex, { align: "center", wrap: true, gap: spacing[3], children: [_jsx(ViewSwitch, { views: views, value: view.id, onChange: changeView }), _jsx(SortSelect, {}), props.pageSize !== false && _jsx(PageSizeSelect, {}), props.resultsAction] }));
|
|
193
|
+
const results = (_jsx(SearchResultsPane, { toolbar: toolbar, headingLevel: props.resultsHeadingLevel ?? 1, ...(view.render !== undefined ? { renderResults: view.render } : {}), ...(view.layout !== undefined ? { layout: view.layout } : {}), ...(props.renderCard !== undefined ? { renderCard: props.renderCard } : {}), ...(props.footer !== undefined ? { footer: props.footer } : {}), ...(props.resultsHeading !== undefined
|
|
144
194
|
? { heading: props.resultsHeading }
|
|
145
195
|
: {}), ...(props.degradationNotice !== undefined
|
|
146
196
|
? { degradationNotice: props.degradationNotice }
|
|
147
197
|
: {}) }));
|
|
148
|
-
return (_jsxs(Flex, { vertical: true, gap: spacing[4], "data-testid": "search-page", "data-filters": showFilters ? "on" : "off", "data-filters-layout": layout, children: [props.searchBox !== false && _jsx(SearchBox, {}), _jsx(UrlIssueNotice, {}), showFilters && layout === "sheet" ? (_jsxs(_Fragment, { children: [_jsx(
|
|
198
|
+
return (_jsxs(Flex, { vertical: true, gap: spacing[4], "data-testid": "search-page", "data-filters": showFilters ? "on" : "off", "data-filters-layout": layout, children: [props.searchBox !== false && _jsx(SearchBox, {}), props.breadcrumb !== undefined && (_jsx("div", { "data-testid": "search-breadcrumb", children: props.breadcrumb })), _jsx(UrlIssueNotice, {}), showFilters && layout === "sheet" ? (_jsxs(_Fragment, { children: [_jsx(FilterChips, { onOpenAll: () => {
|
|
149
199
|
setSheetOpen(true);
|
|
150
|
-
},
|
|
151
|
-
?
|
|
152
|
-
:
|
|
200
|
+
}, ...(categoryFeatures !== undefined ? { categoryFeatures } : {}), ...(locale !== undefined ? { locale } : {}), ...(props.renderGeoFilter !== undefined
|
|
201
|
+
? { renderGeoFilter: props.renderGeoFilter }
|
|
202
|
+
: {}), ...(props.geoLabel !== undefined ? { geoLabel: props.geoLabel } : {}) }), _jsx(SkinDialog, { open: sheetOpen, onClose: () => {
|
|
153
203
|
setSheetOpen(false);
|
|
154
204
|
}, title: t(SEARCH_I18N_KEYS.facetsTitle), dismissLabel: t(SEARCH_I18N_KEYS.filtersDismiss), "data-testid": "search-filters-sheet", footer: _jsx(Button, { block: true, type: "primary", "data-testid": "search-filters-apply", "data-analytics": "none", "data-analytics-reason": "the filters are already applied; this closes the sheet", onClick: () => {
|
|
155
205
|
setSheetOpen(false);
|
|
156
206
|
}, children: applyLabel }), children: panel }), results] })) : showFilters ? (_jsxs(Flex, { align: "flex-start", gap: spacing[5], "data-testid": "search-page-columns", children: [_jsx("div", { style: RAIL, children: panel }), _jsx("div", { style: RESULTS_COLUMN, children: results })] })) : (results)] }));
|
|
157
207
|
}
|
|
158
208
|
export function SearchPage(props) {
|
|
159
|
-
const { adapter, renderCard, categoryFeatures, locale, searchBox, languages, renderCategoryFilter, renderGeoFilter, footer, filtersHeader, resultsHeading, degradationNotice, filtersLayout, defaultFiltersOpen, pageSize, mode, ...parseOptions } = props;
|
|
160
|
-
return (_jsx(SkinTheme, { surface: "base", ...(mode !== undefined ? { mode } : {}), children: _jsx(SearchStateProvider, { adapter: adapter, ...parseOptions, children: _jsx(SearchPageBody, { ...(renderCard !== undefined ? { renderCard } : {}), ...(categoryFeatures !== undefined ? { categoryFeatures } : {}), ...(locale !== undefined ? { locale } : {}), ...(searchBox !== undefined ? { searchBox } : {}), ...(languages !== undefined ? { languages } : {}), ...(renderCategoryFilter !== undefined ? { renderCategoryFilter } : {}), ...(renderGeoFilter !== undefined ? { renderGeoFilter } : {}), ...(footer !== undefined ? { footer } : {}), ...(filtersHeader !== undefined ? { filtersHeader } : {}), ...(resultsHeading !== undefined ? { resultsHeading } : {}), ...(degradationNotice !== undefined ? { degradationNotice } : {}), ...(filtersLayout !== undefined ? { filtersLayout } : {}), ...(defaultFiltersOpen !== undefined ? { defaultFiltersOpen } : {}), ...(pageSize !== undefined ? { pageSize } : {}) }) }) }));
|
|
209
|
+
const { adapter, renderCard, categoryFeatures, locale, searchBox, languages, renderCategoryFilter, renderGeoFilter, geoLabel, defaultGeo, footer, filtersHeader, resultsHeading, degradationNotice, filtersLayout, defaultFiltersOpen, pageSize, breadcrumb, views, defaultView, onViewChange, resultsAction, resultsHeadingLevel, mode, ...parseOptions } = props;
|
|
210
|
+
return (_jsx(SkinTheme, { surface: "base", ...(mode !== undefined ? { mode } : {}), children: _jsx(SearchStateProvider, { adapter: adapter, defaultGeo: defaultGeo, ...parseOptions, children: _jsx(SearchPageBody, { ...(renderCard !== undefined ? { renderCard } : {}), ...(categoryFeatures !== undefined ? { categoryFeatures } : {}), ...(locale !== undefined ? { locale } : {}), ...(searchBox !== undefined ? { searchBox } : {}), ...(languages !== undefined ? { languages } : {}), ...(renderCategoryFilter !== undefined ? { renderCategoryFilter } : {}), ...(renderGeoFilter !== undefined ? { renderGeoFilter } : {}), ...(geoLabel !== undefined ? { geoLabel } : {}), ...(footer !== undefined ? { footer } : {}), ...(filtersHeader !== undefined ? { filtersHeader } : {}), ...(resultsHeading !== undefined ? { resultsHeading } : {}), ...(degradationNotice !== undefined ? { degradationNotice } : {}), ...(filtersLayout !== undefined ? { filtersLayout } : {}), ...(defaultFiltersOpen !== undefined ? { defaultFiltersOpen } : {}), ...(pageSize !== undefined ? { pageSize } : {}), ...(breadcrumb !== undefined ? { breadcrumb } : {}), ...(views !== undefined ? { views } : {}), ...(defaultView !== undefined ? { defaultView } : {}), ...(onViewChange !== undefined ? { onViewChange } : {}), ...(resultsAction !== undefined ? { resultsAction } : {}), ...(resultsHeadingLevel !== undefined ? { resultsHeadingLevel } : {}) }) }) }));
|
|
161
211
|
}
|
|
162
212
|
//# sourceMappingURL=SearchPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchPage.js","sourceRoot":"","sources":["../../src/default/SearchPage.tsx"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"SearchPage.js","sourceRoot":"","sources":["../../src/default/SearchPage.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACnF,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzF,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAIhF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AA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tE,GACkB,GACZ,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -28,6 +28,7 @@ import type { ReactElement, ReactNode } from "react";
|
|
|
28
28
|
import type { SearchItem } from "../api/types.js";
|
|
29
29
|
import type { DegradationNoticeVariant } from "./DegradationNotice.js";
|
|
30
30
|
import type { SearchCardRenderer } from "./SearchResultCard.js";
|
|
31
|
+
import type { SearchResultsLayout } from "./ViewSwitch.js";
|
|
31
32
|
import type { ThemeModeProp } from "./types.js";
|
|
32
33
|
/**
|
|
33
34
|
* The whole result LAYOUT, for a container that wants its own — a map beside
|
|
@@ -98,6 +99,24 @@ export interface SearchResultsPaneProps extends ThemeModeProp {
|
|
|
98
99
|
/** Widest the column of results may grow (default {@link RESULTS_MAX_WIDTH});
|
|
99
100
|
* `null` lets the container decide. */
|
|
100
101
|
readonly maxWidth?: number | null;
|
|
102
|
+
/**
|
|
103
|
+
* How the loaded rows are arranged: as many card columns as fit
|
|
104
|
+
* (`"grid"`, the default) or one wide row each (`"list"`). The view SWITCH
|
|
105
|
+
* that flips this lives in `<ViewSwitch>`; the pane only draws.
|
|
106
|
+
*
|
|
107
|
+
* Ignored when `renderResults` replaces the arrangement entirely.
|
|
108
|
+
*/
|
|
109
|
+
readonly layout?: SearchResultsLayout;
|
|
110
|
+
/**
|
|
111
|
+
* Heading level for the results caption. Default `4`, which is what every
|
|
112
|
+
* surface that EMBEDS this pane under its own title needs.
|
|
113
|
+
*
|
|
114
|
+
* `<SearchPage>` passes `1`: on a results SCREEN the list's name is the
|
|
115
|
+
* page's heading, and a page whose only heading is an `<h4>` has a document
|
|
116
|
+
* outline that starts three levels down — the thing a screen reader's
|
|
117
|
+
* heading list is for.
|
|
118
|
+
*/
|
|
119
|
+
readonly headingLevel?: 1 | 2 | 3 | 4 | 5;
|
|
101
120
|
}
|
|
102
121
|
export declare function SearchResultsPane(props: SearchResultsPaneProps): ReactElement;
|
|
103
122
|
//# sourceMappingURL=SearchResultsPane.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResultsPane.d.ts","sourceRoot":"","sources":["../../src/default/SearchResultsPane.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAOlD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAClC,KAAK,EAAE,SAAS,UAAU,EAAE,KACzB,SAAS,CAAC;AAEf;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchResultsPane.d.ts","sourceRoot":"","sources":["../../src/default/SearchResultsPane.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAOlD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAClC,KAAK,EAAE,SAAS,UAAU,EAAE,KACzB,SAAS,CAAC;AAEf;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAC;AA+BtC,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IAC3D;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IACzC;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,qBAAqB,CAAC;IAC/C;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B;;;;;;;;;OASG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;IACtD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B;2CACuC;IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IACtC;;;;;;;;OAQG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAC3C;AA8DD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAoG7E"}
|
|
@@ -33,6 +33,19 @@ const RESULTS_GRID = {
|
|
|
33
33
|
gap: spacing[3],
|
|
34
34
|
alignItems: "stretch",
|
|
35
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* The LIST arrangement: one wide row per result.
|
|
38
|
+
*
|
|
39
|
+
* The same grid with one track, deliberately — not a second layout mechanism.
|
|
40
|
+
* A list is a grid whose column count is one, and expressing it that way is
|
|
41
|
+
* what keeps the card slot, the gap and the stretch identical between the two
|
|
42
|
+
* arrangements, so switching views cannot change anything except the number of
|
|
43
|
+
* columns.
|
|
44
|
+
*/
|
|
45
|
+
const RESULTS_LIST = {
|
|
46
|
+
...RESULTS_GRID,
|
|
47
|
+
gridTemplateColumns: "1fr",
|
|
48
|
+
};
|
|
36
49
|
function Count(props) {
|
|
37
50
|
// A COUNTED sentence: `tPlural` asks Intl.PluralRules for the locale's
|
|
38
51
|
// category, so Russian gets three different endings for 1, 3 and 17 instead
|
|
@@ -73,13 +86,13 @@ export function SearchResultsPane(props) {
|
|
|
73
86
|
return (_jsx(SkinTheme, { surface: "base", ...(props.mode !== undefined ? { mode: props.mode } : {}), style: {
|
|
74
87
|
width: "100%",
|
|
75
88
|
...(maxWidth !== null ? { maxWidth } : {}),
|
|
76
|
-
}, children: _jsx(SearchResults, { ...(props.enabled !== undefined ? { enabled: props.enabled } : {}), children: (bag) => (_jsxs(Flex, { vertical: true, gap: spacing[4], children: [_jsxs(Flex, { justify: "space-between", align: "center", wrap: true, gap: spacing[2], children: [_jsx(Typography.Title, { level: 4, style: { margin: 0 }, "data-testid": "search-results-heading", children: props.heading ?? t(SEARCH_I18N_KEYS.resultsTitle) }), _jsxs(Flex, { align: "center", wrap: true, gap: spacing[3], children: [_jsx(Count, { bag: bag }), props.toolbar] })] }), _jsx(DegradationNotice, { degradations: bag.degradations, variant: props.degradationNotice ?? "banner", scorerName: scorerName }), _jsx(LoadList, { state: bag.state, testId: "search", skeletonRows: 6, onRetry: bag.refetch, empty: _jsx(EmptyState, { title: t(SEARCH_I18N_KEYS.resultsEmpty), testId: "search-empty" }), failed: (error) => {
|
|
89
|
+
}, children: _jsx(SearchResults, { ...(props.enabled !== undefined ? { enabled: props.enabled } : {}), children: (bag) => (_jsxs(Flex, { vertical: true, gap: spacing[4], children: [_jsxs(Flex, { justify: "space-between", align: "center", wrap: true, gap: spacing[2], children: [_jsx(Typography.Title, { level: props.headingLevel ?? 4, style: { margin: 0 }, "data-testid": "search-results-heading", children: props.heading ?? t(SEARCH_I18N_KEYS.resultsTitle) }), _jsxs(Flex, { align: "center", wrap: true, gap: spacing[3], children: [_jsx(Count, { bag: bag }), props.toolbar] })] }), _jsx(DegradationNotice, { degradations: bag.degradations, variant: props.degradationNotice ?? "banner", scorerName: scorerName }), _jsx(LoadList, { state: bag.state, testId: "search", skeletonRows: 6, onRetry: bag.refetch, empty: _jsx(EmptyState, { title: t(SEARCH_I18N_KEYS.resultsEmpty), testId: "search-empty" }), failed: (error) => {
|
|
77
90
|
// The window refusal is a DIFFERENT sentence from a failed
|
|
78
91
|
// search, and both are different from "nothing found".
|
|
79
92
|
const isWindow = errorCode(error) === SEARCH_WINDOW_EXCEEDED;
|
|
80
93
|
return (_jsx(ErrorAlert, { testId: isWindow ? "search-window-exceeded" : "search-failed", thrown: error, message: t(isWindow
|
|
81
94
|
? SEARCH_I18N_KEYS.resultsWindowExceeded
|
|
82
95
|
: SEARCH_I18N_KEYS.resultsLoadFailed), retryLabel: t(SEARCH_I18N_KEYS.resultsRetry), onRetry: bag.refetch }));
|
|
83
|
-
}, children: (items) => (_jsx("div", { "data-testid": "search-results", children: renderResults !== undefined ? (renderResults(items)) : (_jsx("div", { style: RESULTS_GRID, "data-testid": "search-results-grid", children: items.map((item) => (_jsx("div", { children: renderCard !== undefined ? (renderCard(item)) : (_jsx(SearchResultCard, { item: item })) }, item.key))) })) })) }), _jsx(Pager, { bag: bag }), props.footer] })) }) }));
|
|
96
|
+
}, children: (items) => (_jsx("div", { "data-testid": "search-results", children: renderResults !== undefined ? (renderResults(items)) : (_jsx("div", { style: props.layout === "list" ? RESULTS_LIST : RESULTS_GRID, "data-testid": "search-results-grid", "data-layout": props.layout ?? "grid", children: items.map((item) => (_jsx("div", { children: renderCard !== undefined ? (renderCard(item)) : (_jsx(SearchResultCard, { item: item })) }, item.key))) })) })) }), _jsx(Pager, { bag: bag }), props.footer] })) }) }));
|
|
84
97
|
}
|
|
85
98
|
//# sourceMappingURL=SearchResultsPane.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResultsPane.js","sourceRoot":"","sources":["../../src/default/SearchResultsPane.tsx"],"names":[],"mappings":";AA2BA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EACL,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,SAAS,GACV,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchResultsPane.js","sourceRoot":"","sources":["../../src/default/SearchResultsPane.tsx"],"names":[],"mappings":";AA2BA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EACL,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,SAAS,GACV,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,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