ublo-lib 1.17.7 → 1.18.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/es/common/components/editable-calendar/calendar.js +3 -2
- package/es/esf/components/{instructors-book-v2 → instructors-book}/api.js +12 -8
- package/es/esf/components/{instructors-book-v2 → instructors-book}/book.js +1 -1
- package/es/esf/components/{instructors-book-v2 → instructors-book}/filters.js +2 -2
- package/es/esf/components/instructors-book/index.js +6 -3
- package/es/esf/components/{instructors-book-v2 → instructors-book}/instructor.js +6 -6
- package/es/esf/components/instructors-book/list.js +39 -170
- package/es/esf/components/instructors-book/messages.js +36 -37
- package/es/esf/components/{instructors-book-v2 → instructors-book}/sheet.js +17 -17
- package/es/esf/components/instructors-book/utils.js +48 -2
- package/package.json +1 -1
- package/es/esf/components/instructor-suggestions/fetcher.js +0 -16
- package/es/esf/components/instructor-suggestions/icons.js +0 -266
- package/es/esf/components/instructor-suggestions/index.js +0 -2
- package/es/esf/components/instructor-suggestions/instructor-suggestions.js +0 -180
- package/es/esf/components/instructor-suggestions/loader.js +0 -8
- package/es/esf/components/instructor-suggestions/messages.js +0 -16
- package/es/esf/components/instructors-book/container.js +0 -18
- package/es/esf/components/instructors-book/details.js +0 -117
- package/es/esf/components/instructors-book/icons.js +0 -266
- package/es/esf/components/instructors-book/inner.js +0 -15
- package/es/esf/components/instructors-book/instructors-book.js +0 -111
- package/es/esf/components/instructors-book/link.js +0 -17
- package/es/esf/components/instructors-book/list-utils.js +0 -18
- package/es/esf/components/instructors-book/loader.js +0 -8
- package/es/esf/components/instructors-book-v2/index.js +0 -6
- package/es/esf/components/instructors-book-v2/list.js +0 -47
- package/es/esf/components/instructors-book-v2/messages.js +0 -41
- package/es/esf/components/instructors-book-v2/utils.js +0 -51
- /package/es/esf/components/{instructors-book-v2 → instructors-book}/book.module.css +0 -0
- /package/es/esf/components/{instructors-book-v2 → instructors-book}/filters.module.css +0 -0
- /package/es/esf/components/{instructors-book-v2 → instructors-book}/flags.js +0 -0
- /package/es/esf/components/{instructors-book-v2 → instructors-book}/instructor.module.css +0 -0
- /package/es/esf/components/{instructors-book-v2 → instructors-book}/list.module.css +0 -0
- /package/es/esf/components/{instructors-book-v2 → instructors-book}/prefixes.js +0 -0
- /package/es/esf/components/{instructors-book-v2 → instructors-book}/sheet.module.css +0 -0
- /package/es/esf/components/{instructors-book-v2 → instructors-book}/suggestions.js +0 -0
- /package/es/esf/components/{instructors-book-v2 → instructors-book}/suggestions.module.css +0 -0
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
-
const SvgIcon = ({
|
|
5
|
-
title,
|
|
6
|
-
...props
|
|
7
|
-
}) => _jsxs("svg", {
|
|
8
|
-
viewBox: "0 0 24 24",
|
|
9
|
-
...props,
|
|
10
|
-
children: [title && _jsx("title", {
|
|
11
|
-
children: title
|
|
12
|
-
}), props.children]
|
|
13
|
-
});
|
|
14
|
-
export const PersonIcon = props => _jsx(SvgIcon, {
|
|
15
|
-
...props,
|
|
16
|
-
children: _jsx("path", {
|
|
17
|
-
d: "M12 4c2.7614 0 5 2.23858 5 5 0 2.7614-2.2386 5-5 5-2.76142 0-5-2.2386-5-5 0-2.76142 2.23858-5 5-5m0 12.5c5.525 0 10 2.2375 10 5V24H2v-2.5c0-2.7625 4.475-5 10-5z"
|
|
18
|
-
})
|
|
19
|
-
});
|
|
20
|
-
export const ArrowDownIcon = props => _jsx(SvgIcon, {
|
|
21
|
-
...props,
|
|
22
|
-
children: _jsx("path", {
|
|
23
|
-
d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"
|
|
24
|
-
})
|
|
25
|
-
});
|
|
26
|
-
export const CloseIcon = props => _jsx(SvgIcon, {
|
|
27
|
-
...props,
|
|
28
|
-
children: _jsx("path", {
|
|
29
|
-
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
30
|
-
})
|
|
31
|
-
});
|
|
32
|
-
const ArFlag = props => _jsxs(SvgIcon, {
|
|
33
|
-
...props,
|
|
34
|
-
children: [_jsx("path", {
|
|
35
|
-
d: "M0 3h24v6H0V3z",
|
|
36
|
-
fill: "#000"
|
|
37
|
-
}), _jsx("path", {
|
|
38
|
-
d: "M0 9h24v6H0V9z",
|
|
39
|
-
fill: "#fff"
|
|
40
|
-
}), _jsx("path", {
|
|
41
|
-
d: "M0 15h24v6H0v-6z",
|
|
42
|
-
fill: "#00732F"
|
|
43
|
-
})]
|
|
44
|
-
});
|
|
45
|
-
const CnFlag = props => _jsxs(SvgIcon, {
|
|
46
|
-
...props,
|
|
47
|
-
children: [_jsx("path", {
|
|
48
|
-
d: "M0 3h24v18H0V3z",
|
|
49
|
-
fill: "#DE2910"
|
|
50
|
-
}), _jsx("path", {
|
|
51
|
-
d: "M2.91 9.69L4.5 4.8l1.59 4.89-4.16-3.03h5.14L2.91 9.7zM9.9 4.88l-1.66.38 1.12-1.29-.15 1.7-.88-1.46 1.58.67zM11.6 7.01l-1.7-.3 1.55-.74-.8 1.51-.25-1.7 1.2 1.23zM11.35 10.01l-1.42-.96L11.64 9l-1.35 1.06.48-1.65.58 1.61zM9.24 11.97l-.95-1.43 1.6.6-1.65.46 1.08-1.34-.08 1.71z",
|
|
52
|
-
fill: "#FFDE00"
|
|
53
|
-
})]
|
|
54
|
-
});
|
|
55
|
-
const DeFlag = props => _jsxs(SvgIcon, {
|
|
56
|
-
...props,
|
|
57
|
-
children: [_jsx("path", {
|
|
58
|
-
d: "M0 15h24v6H0v-6z",
|
|
59
|
-
fill: "#FFCE00"
|
|
60
|
-
}), _jsx("path", {
|
|
61
|
-
d: "M0 3h24v6H0V3z",
|
|
62
|
-
fill: "#000"
|
|
63
|
-
}), _jsx("path", {
|
|
64
|
-
d: "M0 9h24v6H0V9z",
|
|
65
|
-
fill: "#D00"
|
|
66
|
-
})]
|
|
67
|
-
});
|
|
68
|
-
const DkFlag = props => _jsxs(SvgIcon, {
|
|
69
|
-
...props,
|
|
70
|
-
children: [_jsx("path", {
|
|
71
|
-
d: "M0 3h24v18H0V3z",
|
|
72
|
-
fill: "#C60C30"
|
|
73
|
-
}), _jsx("path", {
|
|
74
|
-
d: "M7.7 3h2.6v18H7.7V3z",
|
|
75
|
-
fill: "#fff"
|
|
76
|
-
}), _jsx("path", {
|
|
77
|
-
d: "M0 10.7h24v2.6H0v-2.6z",
|
|
78
|
-
fill: "#fff"
|
|
79
|
-
})]
|
|
80
|
-
});
|
|
81
|
-
const EsFlag = props => _jsxs(SvgIcon, {
|
|
82
|
-
...props,
|
|
83
|
-
children: [_jsx("path", {
|
|
84
|
-
d: "M0 3h24v18H0V3z",
|
|
85
|
-
fill: "#C60B1E"
|
|
86
|
-
}), _jsx("path", {
|
|
87
|
-
d: "M0 7.5h24v9H0v-9z",
|
|
88
|
-
fill: "#FFC400"
|
|
89
|
-
})]
|
|
90
|
-
});
|
|
91
|
-
const FrFlag = props => _jsxs(SvgIcon, {
|
|
92
|
-
...props,
|
|
93
|
-
children: [_jsx("path", {
|
|
94
|
-
fillRule: "evenodd",
|
|
95
|
-
clipRule: "evenodd",
|
|
96
|
-
d: "M0 3h24v18H0V3z",
|
|
97
|
-
fill: "#fff"
|
|
98
|
-
}), _jsx("path", {
|
|
99
|
-
fillRule: "evenodd",
|
|
100
|
-
clipRule: "evenodd",
|
|
101
|
-
d: "M0 3h8v18H0V3z",
|
|
102
|
-
fill: "#00267F"
|
|
103
|
-
}), _jsx("path", {
|
|
104
|
-
fillRule: "evenodd",
|
|
105
|
-
clipRule: "evenodd",
|
|
106
|
-
d: "M16 3h8v18h-8V3z",
|
|
107
|
-
fill: "#F31830"
|
|
108
|
-
})]
|
|
109
|
-
});
|
|
110
|
-
const EnFlag = props => _jsxs(SvgIcon, {
|
|
111
|
-
...props,
|
|
112
|
-
children: [_jsx("path", {
|
|
113
|
-
d: "M-6 3h36v18H-6V3z",
|
|
114
|
-
fill: "#006"
|
|
115
|
-
}), _jsx("path", {
|
|
116
|
-
d: "M-6 3v2l32 16h4v-2L-2 3h-4zm36 0v2L-2 21h-4v-2L26 3h4z",
|
|
117
|
-
fill: "#fff"
|
|
118
|
-
}), _jsx("path", {
|
|
119
|
-
d: "M9 3v18h6V3H9zM-6 9v6h36V9H-6z",
|
|
120
|
-
fill: "#fff"
|
|
121
|
-
}), _jsx("path", {
|
|
122
|
-
d: "M-6 10.2v3.6h36v-3.6H-6zM10.2 3v18h3.6V3h-3.6zM-7 21l11-6h3l-11 6h-3zm1-18.5L7 9H4.5L-6 4V2.5zM16.5 9l12-6H31L19 9h-2.5zM30 21.5L17 15h3l10 5v1.5z",
|
|
123
|
-
fill: "#C00"
|
|
124
|
-
})]
|
|
125
|
-
});
|
|
126
|
-
const IlFlag = props => _jsxs(SvgIcon, {
|
|
127
|
-
...props,
|
|
128
|
-
children: [_jsx("path", {
|
|
129
|
-
d: "M25 21H-1V3H25v18z",
|
|
130
|
-
fill: "#fff"
|
|
131
|
-
}), _jsx("path", {
|
|
132
|
-
d: "M25 7H-1V4.8H25V7zm0 12.4H-1V17H25v2.4zM7.8 9.7l3.9 6.8 4-6.7h-8z",
|
|
133
|
-
fill: "#00C"
|
|
134
|
-
}), _jsx("path", {
|
|
135
|
-
d: "M11 14.2l.8 1.3.7-1.3H11z",
|
|
136
|
-
fill: "#fff"
|
|
137
|
-
}), _jsx("path", {
|
|
138
|
-
d: "M7.9 14.3l3.9-6.8 4 6.8h-8z",
|
|
139
|
-
fill: "#00C"
|
|
140
|
-
}), _jsx("path", {
|
|
141
|
-
d: "M11 9.8l.8-1.3.7 1.2H11zm-1.5 2.8l-.8 1.2h1.5l-.7-1.2zm-.8-2.4h1.5l-.7 1.3-.8-1.3zm5.4 2.4l.7 1.2h-1.5l.8-1.2zm.7-2.4h-1.5l.7 1.3.8-1.3zm-4 0l-1 1.8 1 1.8h1.8l1.2-1.8-1-1.8h-2z",
|
|
142
|
-
fill: "#fff"
|
|
143
|
-
})]
|
|
144
|
-
});
|
|
145
|
-
const ItFlag = props => _jsxs(SvgIcon, {
|
|
146
|
-
...props,
|
|
147
|
-
children: [_jsx("path", {
|
|
148
|
-
fillRule: "evenodd",
|
|
149
|
-
clipRule: "evenodd",
|
|
150
|
-
d: "M0 3h24v18H0V3z",
|
|
151
|
-
fill: "#fff"
|
|
152
|
-
}), _jsx("path", {
|
|
153
|
-
fillRule: "evenodd",
|
|
154
|
-
clipRule: "evenodd",
|
|
155
|
-
d: "M0 3h8v18H0V3z",
|
|
156
|
-
fill: "#009246"
|
|
157
|
-
}), _jsx("path", {
|
|
158
|
-
fillRule: "evenodd",
|
|
159
|
-
clipRule: "evenodd",
|
|
160
|
-
d: "M16 3h8v18h-8V3z",
|
|
161
|
-
fill: "#CE2B37"
|
|
162
|
-
})]
|
|
163
|
-
});
|
|
164
|
-
const JpFlag = props => _jsxs(SvgIcon, {
|
|
165
|
-
...props,
|
|
166
|
-
children: [_jsx("path", {
|
|
167
|
-
fillRule: "evenodd",
|
|
168
|
-
clipRule: "evenodd",
|
|
169
|
-
d: "M-1.5 3h27v18h-27V3z",
|
|
170
|
-
fill: "#fff"
|
|
171
|
-
}), _jsx("path", {
|
|
172
|
-
d: "M12 17.6a5.6 5.6 0 100-11.2 5.6 5.6 0 000 11.2z",
|
|
173
|
-
fill: "#D30000"
|
|
174
|
-
})]
|
|
175
|
-
});
|
|
176
|
-
const NlFlag = props => _jsxs(SvgIcon, {
|
|
177
|
-
...props,
|
|
178
|
-
children: [_jsx("path", {
|
|
179
|
-
d: "M24 3H0v18h24V3z",
|
|
180
|
-
fill: "#fff"
|
|
181
|
-
}), _jsx("path", {
|
|
182
|
-
d: "M24 15H0v6h24v-6z",
|
|
183
|
-
fill: "#21468B"
|
|
184
|
-
}), _jsx("path", {
|
|
185
|
-
fillRule: "evenodd",
|
|
186
|
-
clipRule: "evenodd",
|
|
187
|
-
d: "M0 3h24v6H0V3z",
|
|
188
|
-
fill: "#AE1C28"
|
|
189
|
-
})]
|
|
190
|
-
});
|
|
191
|
-
const PlFlag = props => _jsxs(SvgIcon, {
|
|
192
|
-
...props,
|
|
193
|
-
children: [_jsx("path", {
|
|
194
|
-
fillRule: "evenodd",
|
|
195
|
-
clipRule: "evenodd",
|
|
196
|
-
d: "M24 21H0V3h24v18z",
|
|
197
|
-
fill: "#fff"
|
|
198
|
-
}), _jsx("path", {
|
|
199
|
-
fillRule: "evenodd",
|
|
200
|
-
clipRule: "evenodd",
|
|
201
|
-
d: "M24 21H0v-9h24v9z",
|
|
202
|
-
fill: "#DC143C"
|
|
203
|
-
})]
|
|
204
|
-
});
|
|
205
|
-
const PtFlag = props => _jsxs(SvgIcon, {
|
|
206
|
-
...props,
|
|
207
|
-
children: [_jsx("path", {
|
|
208
|
-
d: "M9.6 3H24v18H9.6V3z",
|
|
209
|
-
fill: "red"
|
|
210
|
-
}), _jsx("path", {
|
|
211
|
-
d: "M0 3h9.6v18H0V3z",
|
|
212
|
-
fill: "#060"
|
|
213
|
-
})]
|
|
214
|
-
});
|
|
215
|
-
const RuFlag = props => _jsxs(SvgIcon, {
|
|
216
|
-
...props,
|
|
217
|
-
children: [_jsx("path", {
|
|
218
|
-
fillRule: "evenodd",
|
|
219
|
-
clipRule: "evenodd",
|
|
220
|
-
d: "M0 3h24v18H0V3z",
|
|
221
|
-
fill: "#fff"
|
|
222
|
-
}), _jsx("path", {
|
|
223
|
-
fillRule: "evenodd",
|
|
224
|
-
clipRule: "evenodd",
|
|
225
|
-
d: "M0 9h24v12H0V9z",
|
|
226
|
-
fill: "#0039A6"
|
|
227
|
-
}), _jsx("path", {
|
|
228
|
-
fillRule: "evenodd",
|
|
229
|
-
clipRule: "evenodd",
|
|
230
|
-
d: "M0 15h24v6H0v-6z",
|
|
231
|
-
fill: "#D52B1E"
|
|
232
|
-
})]
|
|
233
|
-
});
|
|
234
|
-
const SeFlag = props => _jsxs(SvgIcon, {
|
|
235
|
-
...props,
|
|
236
|
-
children: [_jsx("path", {
|
|
237
|
-
d: "M-2.4 3h9v7.2h-9V3zm0 10.8h9V21h-9v-7.2z",
|
|
238
|
-
fill: "#006AA7"
|
|
239
|
-
}), _jsx("path", {
|
|
240
|
-
d: "M-2.4 10.2h9v3.6h-9v-3.6zM6.6 3h3.6v18H6.6V3z",
|
|
241
|
-
fill: "#FECC00"
|
|
242
|
-
}), _jsx("path", {
|
|
243
|
-
d: "M10 10.2h16.3v3.6H10v-3.6z",
|
|
244
|
-
fill: "#FECC00"
|
|
245
|
-
}), _jsx("path", {
|
|
246
|
-
d: "M10.2 13.8h16.2V21H10.2v-7.2zm0-10.8h16.2v7.2H10.2V3z",
|
|
247
|
-
fill: "#006AA7"
|
|
248
|
-
})]
|
|
249
|
-
});
|
|
250
|
-
export const flags = {
|
|
251
|
-
ar: ArFlag,
|
|
252
|
-
cn: CnFlag,
|
|
253
|
-
de: DeFlag,
|
|
254
|
-
dk: DkFlag,
|
|
255
|
-
en: EnFlag,
|
|
256
|
-
es: EsFlag,
|
|
257
|
-
fr: FrFlag,
|
|
258
|
-
il: IlFlag,
|
|
259
|
-
it: ItFlag,
|
|
260
|
-
jp: JpFlag,
|
|
261
|
-
nl: NlFlag,
|
|
262
|
-
pl: PlFlag,
|
|
263
|
-
pt: PtFlag,
|
|
264
|
-
ru: RuFlag,
|
|
265
|
-
se: SeFlag
|
|
266
|
-
};
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { useEffect, useState, useMemo } from "react";
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
import { useUbloContext } from "ublo/with-ublo";
|
|
5
|
-
import { fetchRandomInstructors } from "./fetcher";
|
|
6
|
-
import { PersonIcon, ArrowDownIcon, CloseIcon, flags } from "./icons";
|
|
7
|
-
import Loader from "./loader";
|
|
8
|
-
import messages from "./messages";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
|
-
const InstructorSuggestions = ({
|
|
13
|
-
size,
|
|
14
|
-
buildHref,
|
|
15
|
-
env
|
|
16
|
-
}) => {
|
|
17
|
-
const {
|
|
18
|
-
seo,
|
|
19
|
-
lang,
|
|
20
|
-
config
|
|
21
|
-
} = useUbloContext();
|
|
22
|
-
const {
|
|
23
|
-
resort: school
|
|
24
|
-
} = config;
|
|
25
|
-
const tags = useMemo(() => seo && seo.keywords && seo.keywords.trim() !== "" ? seo.keywords.split(",") : undefined, [seo]);
|
|
26
|
-
const [instructors, setInstructors] = useState();
|
|
27
|
-
const [instructor, setInstructor] = useState();
|
|
28
|
-
const texts = messages(lang);
|
|
29
|
-
const selectInstructor = instructor => () => {
|
|
30
|
-
setInstructor(instructor);
|
|
31
|
-
};
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
const fetchInstructors = async () => {
|
|
34
|
-
if (school && lang && tags) {
|
|
35
|
-
const instructors = await fetchRandomInstructors(school, lang, tags, size, env);
|
|
36
|
-
setInstructors(instructors);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
fetchInstructors();
|
|
40
|
-
}, [school, lang, tags, size, env]);
|
|
41
|
-
const renderDetails = () => {
|
|
42
|
-
const {
|
|
43
|
-
firstname,
|
|
44
|
-
lastname,
|
|
45
|
-
languages,
|
|
46
|
-
activities,
|
|
47
|
-
introduction,
|
|
48
|
-
description,
|
|
49
|
-
uri
|
|
50
|
-
} = instructor;
|
|
51
|
-
return _jsxs(_Fragment, {
|
|
52
|
-
children: [_jsx("div", {
|
|
53
|
-
className: "instructor-suggestions__details-close",
|
|
54
|
-
onClick: selectInstructor(),
|
|
55
|
-
children: _jsx(CloseIcon, {
|
|
56
|
-
className: "instructor-suggestions__details-close-icon"
|
|
57
|
-
})
|
|
58
|
-
}), _jsxs("div", {
|
|
59
|
-
className: "instructor-suggestions__details-data",
|
|
60
|
-
children: [_jsxs("div", {
|
|
61
|
-
className: "instructor-suggestions__details-name",
|
|
62
|
-
children: [_jsx("span", {
|
|
63
|
-
className: "instructor-suggestions__details-firstname",
|
|
64
|
-
children: firstname
|
|
65
|
-
}), " ", _jsx("span", {
|
|
66
|
-
className: "instructor-suggestions__details-lastname",
|
|
67
|
-
children: lastname
|
|
68
|
-
})]
|
|
69
|
-
}), _jsx("div", {
|
|
70
|
-
className: "instructor-suggestions__details-langs",
|
|
71
|
-
children: languages && languages.map(({
|
|
72
|
-
code,
|
|
73
|
-
label
|
|
74
|
-
}) => {
|
|
75
|
-
const Flag = flags[code];
|
|
76
|
-
return Flag ? _jsx(Flag, {
|
|
77
|
-
className: "instructor-suggestions__details-lang",
|
|
78
|
-
title: label
|
|
79
|
-
}, code) : _jsx("div", {
|
|
80
|
-
className: "instructor-suggestions__details-langtext",
|
|
81
|
-
children: label
|
|
82
|
-
}, code);
|
|
83
|
-
})
|
|
84
|
-
}), activities && _jsxs("div", {
|
|
85
|
-
className: "instructor-suggestions__details-skills",
|
|
86
|
-
children: ["Mes sp\xE9cialit\xE9s sont :", " ", activities.map(({
|
|
87
|
-
code,
|
|
88
|
-
label
|
|
89
|
-
}, index) => {
|
|
90
|
-
const length = activities.length;
|
|
91
|
-
return _jsxs("div", {
|
|
92
|
-
className: "instructor-suggestions__details-skill",
|
|
93
|
-
children: [_jsx("span", {
|
|
94
|
-
className: "instructor-suggestions__details-skillspan",
|
|
95
|
-
children: label
|
|
96
|
-
}), index < length - 2 ? ", " : index < length - 1 ? texts["instructor-suggestions-and"] : ""]
|
|
97
|
-
}, code);
|
|
98
|
-
})]
|
|
99
|
-
})]
|
|
100
|
-
}), _jsxs("div", {
|
|
101
|
-
className: "instructor-suggestions__details-description",
|
|
102
|
-
children: [_jsx("div", {
|
|
103
|
-
className: "instructor-suggestions__details-mojo",
|
|
104
|
-
dangerouslySetInnerHTML: {
|
|
105
|
-
__html: introduction
|
|
106
|
-
}
|
|
107
|
-
}), description && description.trim() !== "" && _jsxs(_Fragment, {
|
|
108
|
-
children: [_jsx("div", {
|
|
109
|
-
className: "instructor-suggestions__details-description-title",
|
|
110
|
-
children: texts["instructor-suggestions-about"]
|
|
111
|
-
}), _jsx("div", {
|
|
112
|
-
className: "instructor-suggestions__details-text",
|
|
113
|
-
dangerouslySetInnerHTML: {
|
|
114
|
-
__html: description
|
|
115
|
-
}
|
|
116
|
-
})]
|
|
117
|
-
})]
|
|
118
|
-
}), buildHref && _jsx("div", {
|
|
119
|
-
className: "instructor-suggestions__details-bottom",
|
|
120
|
-
children: _jsx("a", {
|
|
121
|
-
className: "instructor-suggestions__details-see-more",
|
|
122
|
-
href: buildHref(uri),
|
|
123
|
-
children: texts["instructor-suggestions-see-full-version"]
|
|
124
|
-
})
|
|
125
|
-
})]
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
|
-
const renderInstructors = () => {
|
|
129
|
-
return instructors.map(instructor => {
|
|
130
|
-
const {
|
|
131
|
-
uri,
|
|
132
|
-
photo,
|
|
133
|
-
firstname,
|
|
134
|
-
lastname
|
|
135
|
-
} = instructor;
|
|
136
|
-
return _jsx("div", {
|
|
137
|
-
className: "instructor-suggestions__instructor",
|
|
138
|
-
onClick: selectInstructor(instructor),
|
|
139
|
-
children: _jsxs("div", {
|
|
140
|
-
className: "instructor-suggestions__instructor-inner",
|
|
141
|
-
children: [_jsx("div", {
|
|
142
|
-
className: "instructor-suggestions__instructor-image-container",
|
|
143
|
-
children: photo ? _jsx("img", {
|
|
144
|
-
src: photo,
|
|
145
|
-
className: "instructor-suggestions__instructor-image",
|
|
146
|
-
alt: `${firstname}-${lastname}`
|
|
147
|
-
}) : _jsx(PersonIcon, {
|
|
148
|
-
className: "instructor-suggestions__instructor-imageplaceholder"
|
|
149
|
-
})
|
|
150
|
-
}), _jsx("div", {
|
|
151
|
-
className: "instructor-suggestions__instructor-firstname",
|
|
152
|
-
children: firstname
|
|
153
|
-
}), _jsx("div", {
|
|
154
|
-
className: "instructor-suggestions__instructor-lastname",
|
|
155
|
-
children: lastname
|
|
156
|
-
}), _jsx("div", {
|
|
157
|
-
className: "instructor-suggestions__instructor-arrow-container",
|
|
158
|
-
children: _jsx(ArrowDownIcon, {
|
|
159
|
-
className: "instructor-suggestions__instructor-arrow"
|
|
160
|
-
})
|
|
161
|
-
})]
|
|
162
|
-
})
|
|
163
|
-
}, uri);
|
|
164
|
-
});
|
|
165
|
-
};
|
|
166
|
-
const detailsClasses = classNames("instructor-suggestions__details", {
|
|
167
|
-
"instructor-suggestions__details__open": instructor
|
|
168
|
-
});
|
|
169
|
-
return _jsxs("div", {
|
|
170
|
-
className: "instructor-suggestions",
|
|
171
|
-
children: [_jsx("div", {
|
|
172
|
-
className: "instructor-suggestions__instructors",
|
|
173
|
-
children: instructors ? renderInstructors() : _jsx(Loader, {})
|
|
174
|
-
}), _jsx("div", {
|
|
175
|
-
className: detailsClasses,
|
|
176
|
-
children: instructor ? renderDetails() : ""
|
|
177
|
-
})]
|
|
178
|
-
});
|
|
179
|
-
};
|
|
180
|
-
export default InstructorSuggestions;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const messages = {
|
|
2
|
-
fr: {
|
|
3
|
-
"instructor-suggestions-about": "À propos",
|
|
4
|
-
"instructor-suggestions-and": " et ",
|
|
5
|
-
"instructor-suggestions-see-full-version": "Voir la version complète"
|
|
6
|
-
},
|
|
7
|
-
en: {
|
|
8
|
-
"instructor-suggestions-about": "About",
|
|
9
|
-
"instructor-suggestions-and": " and ",
|
|
10
|
-
"instructor-suggestions-see-full-version": "See full version"
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
export default (lang => {
|
|
14
|
-
const l = messages[lang] === undefined ? "en" : lang;
|
|
15
|
-
return messages[l];
|
|
16
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import Link from "./link";
|
|
3
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
const Container = ({
|
|
6
|
-
trombi,
|
|
7
|
-
children,
|
|
8
|
-
...props
|
|
9
|
-
}) => {
|
|
10
|
-
return trombi ? _jsxs("div", {
|
|
11
|
-
...props,
|
|
12
|
-
children: [" ", children]
|
|
13
|
-
}) : _jsx(Link, {
|
|
14
|
-
...props,
|
|
15
|
-
children: children
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
export default Container;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import Link from "./link";
|
|
3
|
-
import { flags, BackIcon, PersonIcon } from "./icons";
|
|
4
|
-
import getMessage from "./messages";
|
|
5
|
-
import { formatNames } from "./utils";
|
|
6
|
-
import Loader from "./loader";
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
|
-
const Details = ({
|
|
11
|
-
instructor,
|
|
12
|
-
lang,
|
|
13
|
-
backToList
|
|
14
|
-
}) => {
|
|
15
|
-
const texts = getMessage(lang);
|
|
16
|
-
const renderInstructor = () => {
|
|
17
|
-
const {
|
|
18
|
-
firstname,
|
|
19
|
-
lastname,
|
|
20
|
-
photo,
|
|
21
|
-
languages,
|
|
22
|
-
activities,
|
|
23
|
-
introduction,
|
|
24
|
-
description,
|
|
25
|
-
uri
|
|
26
|
-
} = instructor;
|
|
27
|
-
return _jsxs(_Fragment, {
|
|
28
|
-
children: [_jsx("div", {
|
|
29
|
-
className: "instructors-book-details__background-frieze"
|
|
30
|
-
}, "background"), _jsxs("div", {
|
|
31
|
-
className: "instructors-book-details__inner",
|
|
32
|
-
children: [_jsxs("div", {
|
|
33
|
-
className: "instructors-book-details__data",
|
|
34
|
-
children: [_jsx(Link, {
|
|
35
|
-
...backToList(uri),
|
|
36
|
-
className: "instructors-book-details__back",
|
|
37
|
-
"data-tooltip": texts["instructors-book-back-to-list"],
|
|
38
|
-
children: _jsx(BackIcon, {
|
|
39
|
-
className: "instructors-book-details__back-icon"
|
|
40
|
-
})
|
|
41
|
-
}), _jsxs("div", {
|
|
42
|
-
className: "instructors-book-details__name",
|
|
43
|
-
children: [_jsxs("span", {
|
|
44
|
-
className: "instructors-book-details__firstname",
|
|
45
|
-
children: [formatNames(firstname), " "]
|
|
46
|
-
}), _jsx("span", {
|
|
47
|
-
className: "instructors-book-details__lastname",
|
|
48
|
-
children: lastname
|
|
49
|
-
})]
|
|
50
|
-
}), _jsx("div", {
|
|
51
|
-
className: "instructors-book-details__picture-container",
|
|
52
|
-
children: photo ? _jsx("img", {
|
|
53
|
-
src: photo,
|
|
54
|
-
className: "instructors-book-details__picture",
|
|
55
|
-
alt: `${firstname}-${lastname}`
|
|
56
|
-
}) : _jsx(PersonIcon, {
|
|
57
|
-
className: "instructors-book-details__pictureplaceholder"
|
|
58
|
-
})
|
|
59
|
-
}), _jsx("div", {
|
|
60
|
-
className: "instructors-book-details__langs",
|
|
61
|
-
children: languages && languages.map(({
|
|
62
|
-
code,
|
|
63
|
-
label
|
|
64
|
-
}) => {
|
|
65
|
-
const Flag = flags[code];
|
|
66
|
-
return Flag ? _jsx(Flag, {
|
|
67
|
-
className: "instructors-book-details__lang",
|
|
68
|
-
title: label
|
|
69
|
-
}, code) : _jsx("div", {
|
|
70
|
-
className: "instructors-book-details__langtext",
|
|
71
|
-
children: label
|
|
72
|
-
}, code);
|
|
73
|
-
})
|
|
74
|
-
}), activities && _jsxs("div", {
|
|
75
|
-
className: "instructors-book-details__skills",
|
|
76
|
-
children: [texts["instructors-book-activities"], activities.map(({
|
|
77
|
-
code,
|
|
78
|
-
label
|
|
79
|
-
}, index) => {
|
|
80
|
-
const length = activities.length;
|
|
81
|
-
return _jsxs("div", {
|
|
82
|
-
className: "instructors-book-details__skill",
|
|
83
|
-
children: [_jsx("span", {
|
|
84
|
-
className: "instructors-book-details__skillspan",
|
|
85
|
-
children: label
|
|
86
|
-
}), index < length - 2 ? ", " : index < length - 1 ? texts["instructors-book-and"] : ""]
|
|
87
|
-
}, code);
|
|
88
|
-
})]
|
|
89
|
-
})]
|
|
90
|
-
}), _jsxs("div", {
|
|
91
|
-
className: "instructors-book-details__description",
|
|
92
|
-
children: [_jsx("div", {
|
|
93
|
-
className: "instructors-book-details__mojo",
|
|
94
|
-
dangerouslySetInnerHTML: {
|
|
95
|
-
__html: introduction
|
|
96
|
-
}
|
|
97
|
-
}), description && description.trim() !== "" && _jsxs(_Fragment, {
|
|
98
|
-
children: [_jsx("div", {
|
|
99
|
-
className: "instructors-book-details__description-title",
|
|
100
|
-
children: texts["instructors-book-about"]
|
|
101
|
-
}), _jsx("div", {
|
|
102
|
-
className: "instructors-book-details__text",
|
|
103
|
-
dangerouslySetInnerHTML: {
|
|
104
|
-
__html: description
|
|
105
|
-
}
|
|
106
|
-
})]
|
|
107
|
-
})]
|
|
108
|
-
})]
|
|
109
|
-
}, "details")]
|
|
110
|
-
});
|
|
111
|
-
};
|
|
112
|
-
return instructor ? _jsx("div", {
|
|
113
|
-
className: "instructors-book-details",
|
|
114
|
-
children: renderInstructor()
|
|
115
|
-
}) : _jsx(Loader, {});
|
|
116
|
-
};
|
|
117
|
-
export default Details;
|