wineater-bot 4.9.6 → 4.9.7
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/dist/wineater-chatbot.mjs +2778 -2741
- package/dist/wineater-chatbot.umd.js +23 -23
- package/package.json +1 -1
- package/src/components/Header.svelte +32 -3
- package/src/services/ui-config/projects-config 2.ts +72 -0
- package/src/services/ui-config/projects-config.ts +1 -0
- package/src/services/ui-config/types.ts +1 -0
package/package.json
CHANGED
|
@@ -7,13 +7,42 @@
|
|
|
7
7
|
import Fish from './icons/Fish.svelte';
|
|
8
8
|
|
|
9
9
|
let lang = $derived(appStore.getAppLanguage());
|
|
10
|
-
|
|
10
|
+
let uiConfig = $derived(appStore.getUiConfig());
|
|
11
|
+
let titleText = $derived(window?.wineaterData?.TITLE_TEXT || uiConfig?.titleText || null);
|
|
11
12
|
let ShowedIcon = $state(Meat);
|
|
13
|
+
|
|
14
|
+
// splits a custom title into text/keyword segments so the meal/mood/occasion
|
|
15
|
+
// icons can be placed right next to their matching word
|
|
16
|
+
function splitTitleText(text: string) {
|
|
17
|
+
return text
|
|
18
|
+
.split(/(meal|mood|occasion)/gi)
|
|
19
|
+
.map((part) => ({ keyword: /^(meal|mood|occasion)$/i.test(part) ? part.toLowerCase() : null, text: part }));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let titleSegments = $derived(titleText ? splitTitleText(titleText) : null);
|
|
12
23
|
</script>
|
|
13
24
|
|
|
14
25
|
<div class="wr-Header">
|
|
15
|
-
{#if
|
|
16
|
-
<h1 class="wr-Header-title">
|
|
26
|
+
{#if titleSegments}
|
|
27
|
+
<h1 class="wr-Header-title">
|
|
28
|
+
{#each titleSegments as segment}
|
|
29
|
+
{#if segment.keyword === 'meal'}
|
|
30
|
+
<span onmouseenter={() => (ShowedIcon = Fish)} onmouseleave={() => (ShowedIcon = Meat)}>
|
|
31
|
+
<ShowedIcon className="wr-Header-icon" size="28" />
|
|
32
|
+
</span><span class="wr-Header-label">{segment.text}</span>
|
|
33
|
+
{:else if segment.keyword === 'mood'}
|
|
34
|
+
<Heart className="wr-Header-icon" size="28" /><span class="wr-Header-label"
|
|
35
|
+
>{segment.text}</span
|
|
36
|
+
>
|
|
37
|
+
{:else if segment.keyword === 'occasion'}
|
|
38
|
+
<Diamond className="wr-Header-icon" size="28" /><span class="wr-Header-label"
|
|
39
|
+
>{segment.text}</span
|
|
40
|
+
>
|
|
41
|
+
{:else}
|
|
42
|
+
{segment.text}
|
|
43
|
+
{/if}
|
|
44
|
+
{/each}
|
|
45
|
+
</h1>
|
|
17
46
|
{:else}
|
|
18
47
|
<h1 class="wr-Header-title">
|
|
19
48
|
{getTranslation({ key: 'headerLine1', lang })}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { ProjectUiConfig } from "./types";
|
|
2
|
+
|
|
3
|
+
export const projectConfigs: Record<string, ProjectUiConfig> = {
|
|
4
|
+
"0": {
|
|
5
|
+
logoUrl: null,
|
|
6
|
+
brandColor: "#7B2BEB",
|
|
7
|
+
},
|
|
8
|
+
"25": {
|
|
9
|
+
logoUrl: null,
|
|
10
|
+
brandColor: "#000000",
|
|
11
|
+
wineaterColor: "#000000",
|
|
12
|
+
buttonUppercase: true,
|
|
13
|
+
customCss: `
|
|
14
|
+
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
|
|
15
|
+
:root { --wineater-font-primary: 'Roboto', sans-serif; }
|
|
16
|
+
#wr-Custom {
|
|
17
|
+
.wr-Search-input {
|
|
18
|
+
border-color: #7c7c7c;
|
|
19
|
+
color: #7c7c7c;
|
|
20
|
+
}
|
|
21
|
+
.wr-Search-button:hover {
|
|
22
|
+
background: #E3BE8D;
|
|
23
|
+
opacity: 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.wr-WineTile-params {
|
|
27
|
+
color: #7c7c7c;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.wr-WineTilePopup-reason {
|
|
31
|
+
color: #000000;
|
|
32
|
+
}
|
|
33
|
+
.wr-WineTilePopup-tag {
|
|
34
|
+
color: #000000;
|
|
35
|
+
background: rgba(239,239,239,0.7);
|
|
36
|
+
border-color: transparent;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.wr-WineTile-action {
|
|
40
|
+
background: transparent;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.wr-WineTile-action:hover {
|
|
44
|
+
background: #000000;
|
|
45
|
+
color: #ffffff;
|
|
46
|
+
box-shadow: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`,
|
|
50
|
+
translations: {
|
|
51
|
+
fr: {
|
|
52
|
+
"wineDetails.buy": "voir plus"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"21": {
|
|
57
|
+
logoUrl: "https://www.intermarche.com/images/logoIntermarche.svg",
|
|
58
|
+
brandColor: "#B81242",
|
|
59
|
+
wineaterColor: "#7B2BEB",
|
|
60
|
+
buttonUppercase: true,
|
|
61
|
+
customCss: "",
|
|
62
|
+
translations: {}
|
|
63
|
+
},
|
|
64
|
+
"26": {
|
|
65
|
+
logoUrl: "https://paladarlondon.com/wp-content/uploads/2021/05/cropped-cropped-Paladar-Logo-1473x464-min-768x219.png",
|
|
66
|
+
brandColor: "#B81242",
|
|
67
|
+
wineaterColor: "#7B2BEB",
|
|
68
|
+
buttonUppercase: true,
|
|
69
|
+
customCss: "",
|
|
70
|
+
translations: {}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
@@ -124,6 +124,7 @@ export const projectConfigs: Record<string, ProjectUiConfig> = {
|
|
|
124
124
|
logoUrl: null,
|
|
125
125
|
brandColor: "#8bae98",
|
|
126
126
|
wineaterColor: "#8bae98",
|
|
127
|
+
titleText: "Looking for the perfect bottle? Ask our AI Sommelier for personalised recommendations, whatever the meal, mood or occasion.",
|
|
127
128
|
customCss: `
|
|
128
129
|
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500&display=swap');
|
|
129
130
|
:root { --wineater-font-primary: 'Montserrat', Verdana, Helvetica, Arial, sans-serif; }
|
|
@@ -7,6 +7,7 @@ export type ProjectUiConfig = {
|
|
|
7
7
|
wineaterColor?: string;
|
|
8
8
|
customCss?: string | null;
|
|
9
9
|
buttonUppercase?: boolean;
|
|
10
|
+
titleText?: string | null;
|
|
10
11
|
translations?: Partial<Record<LanguageCode, Record<string, string>>>;
|
|
11
12
|
}
|
|
12
13
|
export type UiConfig = ProjectUiConfig & {
|