ublo-lib 1.46.4 → 1.46.6
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/es/common/components/date-picker/data.d.ts.map +1 -1
- package/es/common/components/editable-calendar/data.d.ts.map +1 -1
- package/es/common/components/search-bar/utils/keyboard-keys.d.ts.map +1 -1
- package/es/esf/components/instant-search/instant-search.d.ts +3 -1
- package/es/esf/components/instant-search/instant-search.d.ts.map +1 -1
- package/es/esf/components/instant-search/instant-search.js +2 -2
- package/es/esf/components/instant-search/links.d.ts +6 -5
- package/es/esf/components/instant-search/links.d.ts.map +1 -1
- package/es/esf/components/instant-search/products.d.ts +8 -7
- package/es/esf/components/instant-search/products.d.ts.map +1 -1
- package/es/esf/components/instant-search/results.d.ts +8 -14
- package/es/esf/components/instant-search/results.d.ts.map +1 -1
- package/es/esf/components/instant-search/results.js +4 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/data.js"],"names":[],"mappings":";;;;;;;;;;;AAaA,+BAA6D;AAE7D,gCAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2H/D
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/data.js"],"names":[],"mappings":";;;;;;;;;;;AAaA,+BAA6D;AAE7D,gCAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2H/D,6BAA8B,CAAC,CAAC;AAEzB,kEAyCN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-calendar/data.js"],"names":[],"mappings":"AA2FA,iEAmCC;AA5HD,+BAAkD;AAElD,gCAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFpD
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-calendar/data.js"],"names":[],"mappings":"AA2FA,iEAmCC;AA5HD,+BAAkD;AAElD,gCAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFpD,6BAA8B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-keys.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/search-bar/utils/keyboard-keys.js"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"keyboard-keys.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/search-bar/utils/keyboard-keys.js"],"names":[],"mappings":"AAAA,gBAAiB,EAAE,CAAC;AACpB,sBAAuB,EAAE,CAAC;AAC1B,wBAAyB,EAAE,CAAC;AAC5B,oBAAqB,EAAE,CAAC;AACxB,qBAAsB,EAAE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ResultsOptions } from "./results";
|
|
1
2
|
import { SearchOptions } from "./hooks/use-search";
|
|
2
3
|
type Props = {
|
|
3
4
|
lang: string;
|
|
@@ -13,7 +14,8 @@ type Props = {
|
|
|
13
14
|
en?: string[];
|
|
14
15
|
};
|
|
15
16
|
options?: SearchOptions;
|
|
17
|
+
resultsOptions?: ResultsOptions;
|
|
16
18
|
};
|
|
17
|
-
export default function InstantSearch({ lang, suggestions, className, ubloContext, options, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default function InstantSearch({ lang, suggestions, className, ubloContext, options, resultsOptions, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
20
|
export {};
|
|
19
21
|
//# sourceMappingURL=instant-search.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instant-search.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/instant-search/instant-search.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"instant-search.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/instant-search/instant-search.tsx"],"names":[],"mappings":"AASA,OAAgB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,OAAkB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAK9D,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;QAC1C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,WAAW,CAAC,EAAE;QACZ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;QACd,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;KACf,CAAC;IACF,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,IAAI,EACJ,WAAW,EACX,SAAS,EACT,WAAW,EACX,OAAY,EACZ,cAAc,GACf,EAAE,KAAK,2CAgIP"}
|
|
@@ -11,7 +11,7 @@ import Results from "./results";
|
|
|
11
11
|
import useSearch from "./hooks/use-search";
|
|
12
12
|
import * as Plausible from "../../../common/components/plausible";
|
|
13
13
|
import css from "./instant-search.module.css";
|
|
14
|
-
export default function InstantSearch({ lang, suggestions, className, ubloContext, options = {}, }) {
|
|
14
|
+
export default function InstantSearch({ lang, suggestions, className, ubloContext, options = {}, resultsOptions, }) {
|
|
15
15
|
const [opened, setOpened] = React.useState(false);
|
|
16
16
|
const [periodPickerOpened, setPeriodPickerOpened] = React.useState(false);
|
|
17
17
|
const [weekNumber, setWeekNumber] = React.useState(null);
|
|
@@ -83,5 +83,5 @@ export default function InstantSearch({ lang, suggestions, className, ubloContex
|
|
|
83
83
|
window.removeEventListener("keydown", handleKeyPresses);
|
|
84
84
|
};
|
|
85
85
|
}, [handleKeyPresses]);
|
|
86
|
-
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "transparent", className: classes, onClick: openSearch, children: _jsx(SearchIcon, { className: css.searchIcon }) }), _jsxs(Dialog, { className: css.dialog, isOpened: opened, showCloseButton: false, close: () => closeSearch(), container: "body", children: [_jsx(Input, { lang: lang, text: text, setText: setText, closeSearch: closeSearch, loading: search.loading === true, suggestions: suggestions }), _jsx(Results, { lang: lang, text: text, results: search.result, weekNumber: weekNumber, openPeriodPicker: openPeriodPicker, loading: search.loading === true && search.result === undefined, sendPlausibleGoal: sendPlausibleGoal })] }), _jsx(Dialog, { isOpened: periodPickerOpened, close: closePeriodPicker, container: "body", children: _jsx(PeriodPicker, { onChange: updateWeek, ubloContext: ubloContext }) })] }));
|
|
86
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "transparent", className: classes, onClick: openSearch, children: _jsx(SearchIcon, { className: css.searchIcon }) }), _jsxs(Dialog, { className: css.dialog, isOpened: opened, showCloseButton: false, close: () => closeSearch(), container: "body", children: [_jsx(Input, { lang: lang, text: text, setText: setText, closeSearch: closeSearch, loading: search.loading === true, suggestions: suggestions }), _jsx(Results, { lang: lang, text: text, results: search.result, weekNumber: weekNumber, openPeriodPicker: openPeriodPicker, loading: search.loading === true && search.result === undefined, sendPlausibleGoal: sendPlausibleGoal, resultsOptions: resultsOptions })] }), _jsx(Dialog, { isOpened: periodPickerOpened, close: closePeriodPicker, container: "body", children: _jsx(PeriodPicker, { onChange: updateWeek, ubloContext: ubloContext }) })] }));
|
|
87
87
|
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { Hit } from "./results";
|
|
2
|
+
export type LinkOptions = {
|
|
3
|
+
parentTitleField?: string | false;
|
|
4
|
+
titleField?: string | false;
|
|
5
|
+
textField?: string | false;
|
|
6
|
+
};
|
|
2
7
|
type Props = {
|
|
3
8
|
linksTitle: string;
|
|
4
9
|
icon: "FileText" | "Info" | "Question" | "User";
|
|
5
10
|
links: Hit[];
|
|
6
11
|
loading: boolean;
|
|
7
12
|
sendPlausibleGoal: (path: string) => void;
|
|
8
|
-
linkOptions?:
|
|
9
|
-
parentTitleField?: string | false;
|
|
10
|
-
titleField?: string | false;
|
|
11
|
-
textField?: string | false;
|
|
12
|
-
};
|
|
13
|
+
linkOptions?: LinkOptions;
|
|
13
14
|
};
|
|
14
15
|
export default function Links({ icon, linksTitle, links, loading, sendPlausibleGoal, linkOptions, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/instant-search/links.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGrC,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;IAChD,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE
|
|
1
|
+
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/instant-search/links.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAGrC,MAAM,MAAM,WAAW,GAAG;IACxB,gBAAgB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC5B,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;IAChD,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAMF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,IAAI,EACJ,UAAU,EACV,KAAK,EACL,OAAO,EACP,iBAAiB,EACjB,WAAgB,GACjB,EAAE,KAAK,2CAuEP"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { Hit } from "./results";
|
|
3
|
+
export type ProductOptions = {
|
|
4
|
+
categoryField?: string | false;
|
|
5
|
+
titleField?: string | false;
|
|
6
|
+
subTitleField?: string | false;
|
|
7
|
+
textField?: string | false;
|
|
8
|
+
tagFields?: string[];
|
|
9
|
+
};
|
|
3
10
|
type Props = {
|
|
4
11
|
lang: string;
|
|
5
12
|
products: Hit[];
|
|
@@ -8,13 +15,7 @@ type Props = {
|
|
|
8
15
|
sendPlausibleGoal: (path: string) => void;
|
|
9
16
|
otherResultsRef: React.RefObject<HTMLDivElement>;
|
|
10
17
|
isOtherResultsEmpty: boolean;
|
|
11
|
-
productOptions?:
|
|
12
|
-
categoryField?: string | false;
|
|
13
|
-
titleField?: string | false;
|
|
14
|
-
subTitleField?: string | false;
|
|
15
|
-
textField?: string | false;
|
|
16
|
-
tagFields?: string[];
|
|
17
|
-
};
|
|
18
|
+
productOptions?: ProductOptions;
|
|
18
19
|
};
|
|
19
20
|
export default function Products({ lang, products, weekNumber, loading, sendPlausibleGoal, otherResultsRef, isOtherResultsEmpty, productOptions, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/instant-search/products.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAWrC,
|
|
1
|
+
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/instant-search/products.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAWrC,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACjD,mBAAmB,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAmB,GACpB,EAAE,KAAK,2CA8IP"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { LinkOptions } from "./links";
|
|
2
|
+
import { ProductOptions } from "./products";
|
|
1
3
|
type Document = {
|
|
2
4
|
id: string;
|
|
3
5
|
image?: string;
|
|
@@ -48,6 +50,10 @@ type GroupedHit = {
|
|
|
48
50
|
group_key: string[];
|
|
49
51
|
hits: Hit[];
|
|
50
52
|
};
|
|
53
|
+
export type ResultsOptions = {
|
|
54
|
+
productOptions?: ProductOptions;
|
|
55
|
+
linkOptions?: LinkOptions;
|
|
56
|
+
};
|
|
51
57
|
type RequestParams = {
|
|
52
58
|
collection_name: string;
|
|
53
59
|
per_page: number;
|
|
@@ -70,20 +76,8 @@ type Props = {
|
|
|
70
76
|
openPeriodPicker: () => void;
|
|
71
77
|
sendPlausibleGoal: (path: string) => void;
|
|
72
78
|
loading: boolean;
|
|
73
|
-
|
|
74
|
-
productOptions?: {
|
|
75
|
-
categoryField?: string | false;
|
|
76
|
-
titleField?: string | false;
|
|
77
|
-
subTitleField?: string | false;
|
|
78
|
-
textField?: string | false;
|
|
79
|
-
tagFields?: string[];
|
|
80
|
-
};
|
|
81
|
-
linkOptions?: {
|
|
82
|
-
titleField?: string | false;
|
|
83
|
-
subTitleField?: string | false;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
79
|
+
resultsOptions?: ResultsOptions;
|
|
86
80
|
};
|
|
87
|
-
export default function Results({ lang, text, results, weekNumber, openPeriodPicker, loading, sendPlausibleGoal,
|
|
81
|
+
export default function Results({ lang, text, results, weekNumber, openPeriodPicker, loading, sendPlausibleGoal, resultsOptions, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
88
82
|
export {};
|
|
89
83
|
//# sourceMappingURL=results.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/instant-search/results.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/instant-search/results.tsx"],"names":[],"mappings":"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"}
|
|
@@ -10,7 +10,7 @@ import message from "./services/messages";
|
|
|
10
10
|
import css from "./results.module.css";
|
|
11
11
|
const { publicRuntimeConfig } = getConfig();
|
|
12
12
|
const { season } = publicRuntimeConfig;
|
|
13
|
-
export default function Results({ lang, text, results, weekNumber, openPeriodPicker, loading, sendPlausibleGoal,
|
|
13
|
+
export default function Results({ lang, text, results, weekNumber, openPeriodPicker, loading, sendPlausibleGoal, resultsOptions = {}, }) {
|
|
14
14
|
const ref = React.useRef(null);
|
|
15
15
|
const { grouped_hits: groupedHits = [] } = results || {};
|
|
16
16
|
const flattenedHits = groupedHits.reduce((acc, group) => {
|
|
@@ -37,8 +37,8 @@ export default function Results({ lang, text, results, weekNumber, openPeriodPic
|
|
|
37
37
|
instructors.length ||
|
|
38
38
|
filteredFaqs.length ||
|
|
39
39
|
information.length);
|
|
40
|
-
return (_jsx("div", { className: css.results, children: (loading || text.length > 0) && (_jsxs("div", { className: css.inner, children: [_jsxs("div", { ref: ref, className: css.left, children: [_jsx(Links, { linksTitle: message(lang, "pages"), icon: "FileText", links: pages, loading: loading, sendPlausibleGoal: sendPlausibleGoal, linkOptions:
|
|
41
|
-
...
|
|
40
|
+
return (_jsx("div", { className: css.results, children: (loading || text.length > 0) && (_jsxs("div", { className: css.inner, children: [_jsxs("div", { ref: ref, className: css.left, children: [_jsx(Links, { linksTitle: message(lang, "pages"), icon: "FileText", links: pages, loading: loading, sendPlausibleGoal: sendPlausibleGoal, linkOptions: resultsOptions.linkOptions }), _jsx(Links, { linksTitle: message(lang, "instructors"), icon: "User", links: instructors, loading: loading, sendPlausibleGoal: sendPlausibleGoal, linkOptions: resultsOptions.linkOptions }), _jsx(Links, { linksTitle: message(lang, "faqs"), icon: "Question", links: filteredFaqs, loading: loading, sendPlausibleGoal: sendPlausibleGoal, linkOptions: resultsOptions.linkOptions }), _jsx(Links, { linksTitle: message(lang, "information"), icon: "Info", links: information, loading: loading, sendPlausibleGoal: sendPlausibleGoal, linkOptions: {
|
|
41
|
+
...resultsOptions.linkOptions,
|
|
42
42
|
titleField: "pageTitle",
|
|
43
|
-
} })] }), _jsxs("div", { className: css.right, children: [!loading && products.length > 0 && weekSystemEnabled && (_jsx(_Fragment, { children: showProductsTitle ? (_jsxs("div", { className: css.resultsWithWeekTitle, children: [message(lang, "productTitleWithWeek"), Dates.weekToLongDate(weekNumber, season.end, season.forceSeasonSwitch), _jsxs(Button, { onClick: openPeriodPicker, children: [_jsx(CalendarIcon, {}), message(lang, "updateWeek")] })] })) : (_jsxs("div", { className: css.resultsWithoutWeekTitle, children: [message(lang, "productTitleWithoutWeek"), _jsxs(Button, { onClick: openPeriodPicker, children: [_jsx(CalendarIcon, {}), message(lang, "chooseWeek")] })] })) })), _jsx(Products, { lang: lang, products: products, weekNumber: weekNumber, loading: loading, sendPlausibleGoal: sendPlausibleGoal, otherResultsRef: ref, isOtherResultsEmpty: isOtherResultsEmpty, productOptions:
|
|
43
|
+
} })] }), _jsxs("div", { className: css.right, children: [!loading && products.length > 0 && weekSystemEnabled && (_jsx(_Fragment, { children: showProductsTitle ? (_jsxs("div", { className: css.resultsWithWeekTitle, children: [message(lang, "productTitleWithWeek"), Dates.weekToLongDate(weekNumber, season.end, season.forceSeasonSwitch), _jsxs(Button, { onClick: openPeriodPicker, children: [_jsx(CalendarIcon, {}), message(lang, "updateWeek")] })] })) : (_jsxs("div", { className: css.resultsWithoutWeekTitle, children: [message(lang, "productTitleWithoutWeek"), _jsxs(Button, { onClick: openPeriodPicker, children: [_jsx(CalendarIcon, {}), message(lang, "chooseWeek")] })] })) })), _jsx(Products, { lang: lang, products: products, weekNumber: weekNumber, loading: loading, sendPlausibleGoal: sendPlausibleGoal, otherResultsRef: ref, isOtherResultsEmpty: isOtherResultsEmpty, productOptions: resultsOptions.productOptions })] })] })) }));
|
|
44
44
|
}
|