ublo-lib 1.0.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/admin-links/admin-links.js +107 -0
- package/es/common/components/admin-links/admin-links.module.css +85 -0
- package/es/common/components/admin-links/index.js +2 -0
- package/es/common/components/analytics.js +46 -0
- package/es/common/components/breadcrumb.js +69 -0
- package/es/common/components/carousel-zone.js +61 -0
- package/es/common/components/carousel.js +365 -0
- package/es/common/components/cookie-consent/cookie-consent.js +111 -0
- package/es/common/components/cookie-consent/cookie-consent.module.css +103 -0
- package/es/common/components/cookie-consent/index.js +3 -0
- package/es/common/components/cookie-consent/messages.js +31 -0
- package/es/common/components/custom-contact-form/attachment.js +229 -0
- package/es/common/components/custom-contact-form/attachment.module.css +211 -0
- package/es/common/components/custom-contact-form/custom-contact-form.js +168 -0
- package/es/common/components/custom-contact-form/field.js +294 -0
- package/es/common/components/custom-contact-form/field.module.css +17 -0
- package/es/common/components/custom-contact-form/icons.js +55 -0
- package/es/common/components/custom-contact-form/index.js +2 -0
- package/es/common/components/custom-contact-form/index.module.css +119 -0
- package/es/common/components/custom-contact-form/messages.js +79 -0
- package/es/common/components/custom-contact-form/utils.js +132 -0
- package/es/common/components/date-picker/calendar.js +246 -0
- package/es/common/components/date-picker/calendar.module.css +123 -0
- package/es/common/components/date-picker/data.js +96 -0
- package/es/common/components/date-picker/date-item.js +127 -0
- package/es/common/components/date-picker/date-item.module.css +78 -0
- package/es/common/components/date-picker/date-picker.js +119 -0
- package/es/common/components/date-picker/date-picker.module.css +111 -0
- package/es/common/components/date-picker/helper.js +41 -0
- package/es/common/components/date-picker/helper.module.css +81 -0
- package/es/common/components/date-picker/index.js +3 -0
- package/es/common/components/date-picker/messages.js +34 -0
- package/es/common/components/date-picker/modes.js +42 -0
- package/es/common/components/date-picker/modes.module.css +90 -0
- package/es/common/components/date-picker/month.js +78 -0
- package/es/common/components/date-picker/month.module.css +54 -0
- package/es/common/components/date-picker/utils.js +121 -0
- package/es/common/components/error-404/error-404.js +51 -0
- package/es/common/components/error-404/error-404.module.css +55 -0
- package/es/common/components/error-404/index.js +2 -0
- package/es/common/components/error-404/messages.js +29 -0
- package/es/common/components/faq.js +54 -0
- package/es/common/components/info-buttons.js +116 -0
- package/es/common/components/plausible/hooks/use-plausible.js +33 -0
- package/es/common/components/plausible/index.js +7 -0
- package/es/common/components/plausible/plausible.js +20 -0
- package/es/common/components/plausible/services/callback.js +63 -0
- package/es/common/components/plausible/services/load.js +7 -0
- package/es/common/components/plausible/services/send-goal.js +10 -0
- package/es/common/components/popup.js +90 -0
- package/es/common/components/scroll-spy.js +53 -0
- package/es/common/components/tabbed-zones.js +110 -0
- package/es/common/components/unsupported-browser.js +158 -0
- package/es/common/components/video-player/controls.js +125 -0
- package/es/common/components/video-player/icons.js +45 -0
- package/es/common/components/video-player/index.js +1 -0
- package/es/common/components/video-player/player.module.css +151 -0
- package/es/common/components/video-player/utils.js +43 -0
- package/es/common/components/video-player/video-player.js +111 -0
- package/es/common/hooks/use-faq.js +44 -0
- package/es/common/hooks/use-in-view.js +73 -0
- package/es/common/hooks/use-injected-cms-markup.js +50 -0
- package/es/common/hooks/use-packages.js +127 -0
- package/es/common/hooks/use-scroll-direction.js +44 -0
- package/es/common/hooks/use-stay.js +32 -0
- package/es/common/hooks/use-sticky.js +38 -0
- package/es/common/hooks/use-tunnel.js +50 -0
- package/es/common/hooks/use-window-sizes.js +37 -0
- package/es/common/hooks/use-youtube-popup.js +62 -0
- package/es/common/hooks/use-zone-sync.js +65 -0
- package/es/common/utils/cookies.js +13 -0
- package/es/common/utils/copy.js +11 -0
- package/es/common/utils/dates.js +8 -0
- package/es/common/utils/events.js +25 -0
- package/es/common/utils/fetcher.js +37 -0
- package/es/common/utils/file-manager.js +14 -0
- package/es/common/utils/load-js.js +11 -0
- package/es/common/utils/msem-widget.js +16 -0
- package/es/common/utils/touch-device.js +1 -0
- package/es/common/utils/url-parameters.js +12 -0
- package/es/empty.d.ts +4 -0
- package/es/empty.d.ts.map +1 -0
- package/es/empty.js +6 -0
- package/es/esf/components/booking-form/data.js +213 -0
- package/es/esf/components/booking-form/field.js +140 -0
- package/es/esf/components/booking-form/hooks/use-custom-fields.js +20 -0
- package/es/esf/components/booking-form/hooks/use-stay.js +12 -0
- package/es/esf/components/booking-form/icons.js +50 -0
- package/es/esf/components/booking-form/index.js +78 -0
- package/es/esf/components/booking-form/lesson.js +59 -0
- package/es/esf/components/booking-form/lessons.js +93 -0
- package/es/esf/components/booking-form/messages.js +52 -0
- package/es/esf/components/booking-form/personal-data.js +73 -0
- package/es/esf/components/booking-form/progress-bar.js +35 -0
- package/es/esf/components/booking-form/response.js +42 -0
- package/es/esf/components/booking-form/steps.js +81 -0
- package/es/esf/components/booking-form/summary.js +138 -0
- package/es/esf/components/booking-form/utils.js +72 -0
- package/es/esf/components/contact-form/api.js +36 -0
- package/es/esf/components/contact-form/contact-form.js +293 -0
- package/es/esf/components/contact-form/contact-form.module.css +51 -0
- package/es/esf/components/contact-form/data.js +53 -0
- package/es/esf/components/contact-form/index.js +2 -0
- package/es/esf/components/contact-form/messages.js +75 -0
- package/es/esf/components/contact-form/validation.js +63 -0
- package/es/esf/components/covid-link/index.js +119 -0
- package/es/esf/components/covid-link/index.module.css +108 -0
- package/es/esf/components/covid-link/mask-icon.js +17 -0
- package/es/esf/components/covid-link/vax-pass-icon.js +34 -0
- package/es/esf/components/cp-form.js +65 -0
- package/es/esf/components/instructor-suggestions/fetcher.js +17 -0
- package/es/esf/components/instructor-suggestions/icons.js +266 -0
- package/es/esf/components/instructor-suggestions/index.js +181 -0
- package/es/esf/components/instructor-suggestions/loader.js +10 -0
- package/es/esf/components/instructor-suggestions/messages.js +16 -0
- package/es/esf/components/instructors-book/container.js +18 -0
- package/es/esf/components/instructors-book/details.js +120 -0
- package/es/esf/components/instructors-book/icons.js +266 -0
- package/es/esf/components/instructors-book/index.js +15 -0
- package/es/esf/components/instructors-book/link.js +17 -0
- package/es/esf/components/instructors-book/list-utils.js +21 -0
- package/es/esf/components/instructors-book/list.js +184 -0
- package/es/esf/components/instructors-book/loader.js +10 -0
- package/es/esf/components/instructors-book/messages.js +44 -0
- package/es/esf/components/instructors-book/utils.js +5 -0
- package/es/esf/components/levels.js +265 -0
- package/es/esf/components/loyal-customers/api.js +24 -0
- package/es/esf/components/loyal-customers/components/bin-icon.js +31 -0
- package/es/esf/components/loyal-customers/components/bin-icon.module.css +9 -0
- package/es/esf/components/loyal-customers/components/customer-form.js +105 -0
- package/es/esf/components/loyal-customers/components/customer-form.module.css +40 -0
- package/es/esf/components/loyal-customers/components/field.js +119 -0
- package/es/esf/components/loyal-customers/components/field.module.css +3 -0
- package/es/esf/components/loyal-customers/components/row.js +77 -0
- package/es/esf/components/loyal-customers/components/row.module.css +95 -0
- package/es/esf/components/loyal-customers/components/rows.js +38 -0
- package/es/esf/components/loyal-customers/components/rows.module.css +11 -0
- package/es/esf/components/loyal-customers/components/stay.js +37 -0
- package/es/esf/components/loyal-customers/components/stay.module.css +18 -0
- package/es/esf/components/loyal-customers/components/student-form.js +105 -0
- package/es/esf/components/loyal-customers/components/student-form.module.css +68 -0
- package/es/esf/components/loyal-customers/components/voucher.js +26 -0
- package/es/esf/components/loyal-customers/components/voucher.module.css +7 -0
- package/es/esf/components/loyal-customers/content.js +55 -0
- package/es/esf/components/loyal-customers/data.js +131 -0
- package/es/esf/components/loyal-customers/hooks/use-stored-rows.js +14 -0
- package/es/esf/components/loyal-customers/index.js +2 -0
- package/es/esf/components/loyal-customers/loyal-customers.js +141 -0
- package/es/esf/components/loyal-customers/loyal-customers.module.css +62 -0
- package/es/esf/components/loyal-customers/messages.js +59 -0
- package/es/esf/components/loyal-customers/utils.js +81 -0
- package/es/esf/components/village-maps/icons.js +35 -0
- package/es/esf/components/village-maps/index.js +214 -0
- package/es/esf/components/village-maps/messages.js +19 -0
- package/es/esf/components/village-maps/utils.js +26 -0
- package/es/esf/components/week-picker/index.js +244 -0
- package/es/esf/components/week-picker/messages.js +36 -0
- package/es/esf/components/week-picker/utils.js +65 -0
- package/es/esf/components/week-picker/week.js +52 -0
- package/es/esf/components/week-picker-2/index.js +283 -0
- package/es/esf/components/week-picker-2/messages.js +27 -0
- package/es/esf/components/week-picker-2/utils.js +65 -0
- package/es/esf/components/week-picker-2/week.js +55 -0
- package/es/esf/hooks/use-affiliation.js +26 -0
- package/es/esf/hooks/use-booking-links.js +36 -0
- package/es/esf/hooks/use-reviews.js +28 -0
- package/es/esf/hooks/use-season-products.js +100 -0
- package/package.json +51 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import classnames from "classnames";
|
|
4
|
+
import { fetchRandomInstructors } from "./fetcher";
|
|
5
|
+
import { PersonIcon, ArrowDownIcon, CloseIcon, flags } from "./icons";
|
|
6
|
+
import Loader from "./loader";
|
|
7
|
+
import messages from "./messages";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
+
|
|
12
|
+
const InstructorSuggestions = ({
|
|
13
|
+
school,
|
|
14
|
+
lang,
|
|
15
|
+
tags,
|
|
16
|
+
size,
|
|
17
|
+
buildHref,
|
|
18
|
+
env
|
|
19
|
+
}) => {
|
|
20
|
+
const [instructors, setInstructors] = useState();
|
|
21
|
+
const [instructor, setInstructor] = useState();
|
|
22
|
+
const texts = messages(lang);
|
|
23
|
+
|
|
24
|
+
const selectInstructor = instructor => () => {
|
|
25
|
+
setInstructor(instructor);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
const fetchInstructors = async () => {
|
|
30
|
+
if (school && lang && tags) {
|
|
31
|
+
const instructors = await fetchRandomInstructors(school, lang, tags, size, env);
|
|
32
|
+
setInstructors(instructors);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
fetchInstructors();
|
|
37
|
+
}, [school, lang, tags, size, env]);
|
|
38
|
+
|
|
39
|
+
const renderDetails = () => {
|
|
40
|
+
const {
|
|
41
|
+
firstname,
|
|
42
|
+
lastname,
|
|
43
|
+
languages,
|
|
44
|
+
activities,
|
|
45
|
+
introduction,
|
|
46
|
+
description,
|
|
47
|
+
uri
|
|
48
|
+
} = instructor;
|
|
49
|
+
return _jsxs(_Fragment, {
|
|
50
|
+
children: [_jsx("div", {
|
|
51
|
+
className: "instructor-suggestions__details-close",
|
|
52
|
+
onClick: selectInstructor(),
|
|
53
|
+
children: _jsx(CloseIcon, {
|
|
54
|
+
className: "instructor-suggestions__details-close-icon"
|
|
55
|
+
})
|
|
56
|
+
}), _jsxs("div", {
|
|
57
|
+
className: "instructor-suggestions__details-data",
|
|
58
|
+
children: [_jsxs("div", {
|
|
59
|
+
className: "instructor-suggestions__details-name",
|
|
60
|
+
children: [_jsx("span", {
|
|
61
|
+
className: "instructor-suggestions__details-firstname",
|
|
62
|
+
children: firstname
|
|
63
|
+
}), " ", _jsx("span", {
|
|
64
|
+
className: "instructor-suggestions__details-lastname",
|
|
65
|
+
children: lastname
|
|
66
|
+
})]
|
|
67
|
+
}), _jsx("div", {
|
|
68
|
+
className: "instructor-suggestions__details-langs",
|
|
69
|
+
children: languages && languages.map(({
|
|
70
|
+
code,
|
|
71
|
+
label
|
|
72
|
+
}) => {
|
|
73
|
+
const Flag = flags[code];
|
|
74
|
+
return Flag ? _jsx(Flag, {
|
|
75
|
+
className: "instructor-suggestions__details-lang",
|
|
76
|
+
title: label
|
|
77
|
+
}, code) : _jsx("div", {
|
|
78
|
+
className: "instructor-suggestions__details-langtext",
|
|
79
|
+
children: label
|
|
80
|
+
}, code);
|
|
81
|
+
})
|
|
82
|
+
}), activities && _jsxs("div", {
|
|
83
|
+
className: "instructor-suggestions__details-skills",
|
|
84
|
+
children: ["Mes sp\xE9cialit\xE9s sont :", " ", activities.map(({
|
|
85
|
+
code,
|
|
86
|
+
label
|
|
87
|
+
}, index) => {
|
|
88
|
+
const length = activities.length;
|
|
89
|
+
return _jsxs("div", {
|
|
90
|
+
className: "instructor-suggestions__details-skill",
|
|
91
|
+
children: [_jsx("span", {
|
|
92
|
+
className: "instructor-suggestions__details-skillspan",
|
|
93
|
+
children: label
|
|
94
|
+
}), index < length - 2 ? ", " : index < length - 1 ? texts["instructor-suggestions-and"] : ""]
|
|
95
|
+
}, code);
|
|
96
|
+
})]
|
|
97
|
+
})]
|
|
98
|
+
}), _jsxs("div", {
|
|
99
|
+
className: "instructor-suggestions__details-description",
|
|
100
|
+
children: [_jsx("div", {
|
|
101
|
+
className: "instructor-suggestions__details-mojo",
|
|
102
|
+
dangerouslySetInnerHTML: {
|
|
103
|
+
__html: introduction
|
|
104
|
+
}
|
|
105
|
+
}), description && description.trim() !== "" && _jsxs(_Fragment, {
|
|
106
|
+
children: [_jsx("div", {
|
|
107
|
+
className: "instructor-suggestions__details-description-title",
|
|
108
|
+
children: texts["instructor-suggestions-about"]
|
|
109
|
+
}), _jsx("div", {
|
|
110
|
+
className: "instructor-suggestions__details-text",
|
|
111
|
+
dangerouslySetInnerHTML: {
|
|
112
|
+
__html: description
|
|
113
|
+
}
|
|
114
|
+
})]
|
|
115
|
+
})]
|
|
116
|
+
}), buildHref && _jsx("div", {
|
|
117
|
+
className: "instructor-suggestions__details-bottom",
|
|
118
|
+
children: _jsx("a", {
|
|
119
|
+
className: "instructor-suggestions__details-see-more",
|
|
120
|
+
href: buildHref(uri),
|
|
121
|
+
children: texts["instructor-suggestions-see-full-version"]
|
|
122
|
+
})
|
|
123
|
+
})]
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const renderInstructors = () => {
|
|
128
|
+
return instructors.map(instructor => {
|
|
129
|
+
const {
|
|
130
|
+
uri,
|
|
131
|
+
photo,
|
|
132
|
+
firstname,
|
|
133
|
+
lastname
|
|
134
|
+
} = instructor;
|
|
135
|
+
return _jsx("div", {
|
|
136
|
+
className: "instructor-suggestions__instructor",
|
|
137
|
+
onClick: selectInstructor(instructor),
|
|
138
|
+
children: _jsxs("div", {
|
|
139
|
+
className: "instructor-suggestions__instructor-inner",
|
|
140
|
+
children: [_jsx("div", {
|
|
141
|
+
className: "instructor-suggestions__instructor-image-container",
|
|
142
|
+
children: photo ? _jsx("img", {
|
|
143
|
+
src: photo,
|
|
144
|
+
className: "instructor-suggestions__instructor-image",
|
|
145
|
+
alt: `${firstname}-${lastname}`
|
|
146
|
+
}) : _jsx(PersonIcon, {
|
|
147
|
+
className: "instructor-suggestions__instructor-imageplaceholder"
|
|
148
|
+
})
|
|
149
|
+
}), _jsx("div", {
|
|
150
|
+
className: "instructor-suggestions__instructor-firstname",
|
|
151
|
+
children: firstname
|
|
152
|
+
}), _jsx("div", {
|
|
153
|
+
className: "instructor-suggestions__instructor-lastname",
|
|
154
|
+
children: lastname
|
|
155
|
+
}), _jsx("div", {
|
|
156
|
+
className: "instructor-suggestions__instructor-arrow-container",
|
|
157
|
+
children: _jsx(ArrowDownIcon, {
|
|
158
|
+
className: "instructor-suggestions__instructor-arrow"
|
|
159
|
+
})
|
|
160
|
+
})]
|
|
161
|
+
})
|
|
162
|
+
}, uri);
|
|
163
|
+
});
|
|
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
|
+
|
|
181
|
+
export default InstructorSuggestions;
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
|
|
6
|
+
const Container = ({
|
|
7
|
+
trombi,
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}) => {
|
|
11
|
+
return trombi ? _jsxs("div", { ...props,
|
|
12
|
+
children: [" ", children]
|
|
13
|
+
}) : _jsx(Link, { ...props,
|
|
14
|
+
children: children
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default Container;
|
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
|
|
11
|
+
const Details = ({
|
|
12
|
+
instructor,
|
|
13
|
+
lang,
|
|
14
|
+
backToList
|
|
15
|
+
}) => {
|
|
16
|
+
const texts = getMessage(lang);
|
|
17
|
+
|
|
18
|
+
const renderInstructor = () => {
|
|
19
|
+
const {
|
|
20
|
+
firstname,
|
|
21
|
+
lastname,
|
|
22
|
+
photo,
|
|
23
|
+
languages,
|
|
24
|
+
activities,
|
|
25
|
+
introduction,
|
|
26
|
+
description,
|
|
27
|
+
uri
|
|
28
|
+
} = instructor;
|
|
29
|
+
return _jsxs(_Fragment, {
|
|
30
|
+
children: [_jsx("div", {
|
|
31
|
+
className: "instructors-book-details__background-frieze"
|
|
32
|
+
}, "background"), _jsxs("div", {
|
|
33
|
+
className: "instructors-book-details__inner",
|
|
34
|
+
children: [_jsxs("div", {
|
|
35
|
+
className: "instructors-book-details__data",
|
|
36
|
+
children: [_jsx(Link, { ...backToList(uri),
|
|
37
|
+
className: "instructors-book-details__back",
|
|
38
|
+
"data-tooltip": texts["instructors-book-back-to-list"],
|
|
39
|
+
children: _jsx(BackIcon, {
|
|
40
|
+
className: "instructors-book-details__back-icon"
|
|
41
|
+
})
|
|
42
|
+
}), _jsxs("div", {
|
|
43
|
+
className: "instructors-book-details__name",
|
|
44
|
+
children: [_jsxs("span", {
|
|
45
|
+
className: "instructors-book-details__firstname",
|
|
46
|
+
children: [formatNames(firstname), " "]
|
|
47
|
+
}), _jsx("span", {
|
|
48
|
+
className: "instructors-book-details__lastname",
|
|
49
|
+
children: lastname
|
|
50
|
+
})]
|
|
51
|
+
}), _jsx("div", {
|
|
52
|
+
className: "instructors-book-details__picture-container",
|
|
53
|
+
children: photo ? _jsx("img", {
|
|
54
|
+
src: photo,
|
|
55
|
+
className: "instructors-book-details__picture",
|
|
56
|
+
alt: `${firstname}-${lastname}`
|
|
57
|
+
}) : _jsx(PersonIcon, {
|
|
58
|
+
className: "instructors-book-details__pictureplaceholder"
|
|
59
|
+
})
|
|
60
|
+
}), _jsx("div", {
|
|
61
|
+
className: "instructors-book-details__langs",
|
|
62
|
+
children: languages && languages.map(({
|
|
63
|
+
code,
|
|
64
|
+
label
|
|
65
|
+
}) => {
|
|
66
|
+
const Flag = flags[code];
|
|
67
|
+
return Flag ? _jsx(Flag, {
|
|
68
|
+
className: "instructors-book-details__lang",
|
|
69
|
+
title: label
|
|
70
|
+
}, code) : _jsx("div", {
|
|
71
|
+
className: "instructors-book-details__langtext",
|
|
72
|
+
children: label
|
|
73
|
+
}, code);
|
|
74
|
+
})
|
|
75
|
+
}), activities && _jsxs("div", {
|
|
76
|
+
className: "instructors-book-details__skills",
|
|
77
|
+
children: [texts["instructors-book-activities"], activities.map(({
|
|
78
|
+
code,
|
|
79
|
+
label
|
|
80
|
+
}, index) => {
|
|
81
|
+
const length = activities.length;
|
|
82
|
+
return _jsxs("div", {
|
|
83
|
+
className: "instructors-book-details__skill",
|
|
84
|
+
children: [_jsx("span", {
|
|
85
|
+
className: "instructors-book-details__skillspan",
|
|
86
|
+
children: label
|
|
87
|
+
}), index < length - 2 ? ", " : index < length - 1 ? texts["instructors-book-and"] : ""]
|
|
88
|
+
}, code);
|
|
89
|
+
})]
|
|
90
|
+
})]
|
|
91
|
+
}), _jsxs("div", {
|
|
92
|
+
className: "instructors-book-details__description",
|
|
93
|
+
children: [_jsx("div", {
|
|
94
|
+
className: "instructors-book-details__mojo",
|
|
95
|
+
dangerouslySetInnerHTML: {
|
|
96
|
+
__html: introduction
|
|
97
|
+
}
|
|
98
|
+
}), description && description.trim() !== "" && _jsxs(_Fragment, {
|
|
99
|
+
children: [_jsx("div", {
|
|
100
|
+
className: "instructors-book-details__description-title",
|
|
101
|
+
children: texts["instructors-book-about"]
|
|
102
|
+
}), _jsx("div", {
|
|
103
|
+
className: "instructors-book-details__text",
|
|
104
|
+
dangerouslySetInnerHTML: {
|
|
105
|
+
__html: description
|
|
106
|
+
}
|
|
107
|
+
})]
|
|
108
|
+
})]
|
|
109
|
+
})]
|
|
110
|
+
}, "details")]
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
return instructor ? _jsx("div", {
|
|
115
|
+
className: "instructors-book-details",
|
|
116
|
+
children: renderInstructor()
|
|
117
|
+
}) : _jsx(Loader, {});
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export default Details;
|
|
@@ -0,0 +1,266 @@
|
|
|
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
|
+
|
|
5
|
+
const SvgIcon = ({
|
|
6
|
+
title,
|
|
7
|
+
...props
|
|
8
|
+
}) => _jsxs("svg", {
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
...props,
|
|
11
|
+
children: [title && _jsx("title", {
|
|
12
|
+
children: title
|
|
13
|
+
}), props.children]
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const PersonIcon = props => _jsx(SvgIcon, { ...props,
|
|
17
|
+
children: _jsx("path", {
|
|
18
|
+
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"
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
export const OverlayIcon = props => _jsx(SvgIcon, { ...props,
|
|
22
|
+
children: _jsx("path", {
|
|
23
|
+
d: "M15.5 14h-.8l-.3-.3c1-1.1 1.6-2.6 1.6-4.2a6.5 6.5 0 10-2.3 5l.3.2v.8l5 5 1.5-1.5-5-5zm-6 0a4.5 4.5 0 110-9 4.5 4.5 0 010 9z"
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
export const BackIcon = props => _jsx(SvgIcon, { ...props,
|
|
27
|
+
children: _jsx("path", {
|
|
28
|
+
d: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const ArFlag = props => _jsxs(SvgIcon, { ...props,
|
|
33
|
+
children: [_jsx("path", {
|
|
34
|
+
d: "M0 3h24v6H0V3z",
|
|
35
|
+
fill: "#000"
|
|
36
|
+
}), _jsx("path", {
|
|
37
|
+
d: "M0 9h24v6H0V9z",
|
|
38
|
+
fill: "#fff"
|
|
39
|
+
}), _jsx("path", {
|
|
40
|
+
d: "M0 15h24v6H0v-6z",
|
|
41
|
+
fill: "#00732F"
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const CnFlag = props => _jsxs(SvgIcon, { ...props,
|
|
46
|
+
children: [_jsx("path", {
|
|
47
|
+
d: "M0 3h24v18H0V3z",
|
|
48
|
+
fill: "#DE2910"
|
|
49
|
+
}), _jsx("path", {
|
|
50
|
+
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",
|
|
51
|
+
fill: "#FFDE00"
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const DeFlag = props => _jsxs(SvgIcon, { ...props,
|
|
56
|
+
children: [_jsx("path", {
|
|
57
|
+
d: "M0 15h24v6H0v-6z",
|
|
58
|
+
fill: "#FFCE00"
|
|
59
|
+
}), _jsx("path", {
|
|
60
|
+
d: "M0 3h24v6H0V3z",
|
|
61
|
+
fill: "#000"
|
|
62
|
+
}), _jsx("path", {
|
|
63
|
+
d: "M0 9h24v6H0V9z",
|
|
64
|
+
fill: "#D00"
|
|
65
|
+
})]
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const DkFlag = props => _jsxs(SvgIcon, { ...props,
|
|
69
|
+
children: [_jsx("path", {
|
|
70
|
+
d: "M0 3h24v18H0V3z",
|
|
71
|
+
fill: "#C60C30"
|
|
72
|
+
}), _jsx("path", {
|
|
73
|
+
d: "M7.7 3h2.6v18H7.7V3z",
|
|
74
|
+
fill: "#fff"
|
|
75
|
+
}), _jsx("path", {
|
|
76
|
+
d: "M0 10.7h24v2.6H0v-2.6z",
|
|
77
|
+
fill: "#fff"
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
const EsFlag = props => _jsxs(SvgIcon, { ...props,
|
|
82
|
+
children: [_jsx("path", {
|
|
83
|
+
d: "M0 3h24v18H0V3z",
|
|
84
|
+
fill: "#C60B1E"
|
|
85
|
+
}), _jsx("path", {
|
|
86
|
+
d: "M0 7.5h24v9H0v-9z",
|
|
87
|
+
fill: "#FFC400"
|
|
88
|
+
})]
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const FrFlag = props => _jsxs(SvgIcon, { ...props,
|
|
92
|
+
children: [_jsx("path", {
|
|
93
|
+
fillRule: "evenodd",
|
|
94
|
+
clipRule: "evenodd",
|
|
95
|
+
d: "M0 3h24v18H0V3z",
|
|
96
|
+
fill: "#fff"
|
|
97
|
+
}), _jsx("path", {
|
|
98
|
+
fillRule: "evenodd",
|
|
99
|
+
clipRule: "evenodd",
|
|
100
|
+
d: "M0 3h8v18H0V3z",
|
|
101
|
+
fill: "#00267F"
|
|
102
|
+
}), _jsx("path", {
|
|
103
|
+
fillRule: "evenodd",
|
|
104
|
+
clipRule: "evenodd",
|
|
105
|
+
d: "M16 3h8v18h-8V3z",
|
|
106
|
+
fill: "#F31830"
|
|
107
|
+
})]
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const EnFlag = props => _jsxs(SvgIcon, { ...props,
|
|
111
|
+
children: [_jsx("path", {
|
|
112
|
+
d: "M-6 3h36v18H-6V3z",
|
|
113
|
+
fill: "#006"
|
|
114
|
+
}), _jsx("path", {
|
|
115
|
+
d: "M-6 3v2l32 16h4v-2L-2 3h-4zm36 0v2L-2 21h-4v-2L26 3h4z",
|
|
116
|
+
fill: "#fff"
|
|
117
|
+
}), _jsx("path", {
|
|
118
|
+
d: "M9 3v18h6V3H9zM-6 9v6h36V9H-6z",
|
|
119
|
+
fill: "#fff"
|
|
120
|
+
}), _jsx("path", {
|
|
121
|
+
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",
|
|
122
|
+
fill: "#C00"
|
|
123
|
+
})]
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
const IlFlag = props => _jsxs(SvgIcon, { ...props,
|
|
127
|
+
children: [_jsx("path", {
|
|
128
|
+
d: "M25 21H-1V3H25v18z",
|
|
129
|
+
fill: "#fff"
|
|
130
|
+
}), _jsx("path", {
|
|
131
|
+
d: "M25 7H-1V4.8H25V7zm0 12.4H-1V17H25v2.4zM7.8 9.7l3.9 6.8 4-6.7h-8z",
|
|
132
|
+
fill: "#00C"
|
|
133
|
+
}), _jsx("path", {
|
|
134
|
+
d: "M11 14.2l.8 1.3.7-1.3H11z",
|
|
135
|
+
fill: "#fff"
|
|
136
|
+
}), _jsx("path", {
|
|
137
|
+
d: "M7.9 14.3l3.9-6.8 4 6.8h-8z",
|
|
138
|
+
fill: "#00C"
|
|
139
|
+
}), _jsx("path", {
|
|
140
|
+
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",
|
|
141
|
+
fill: "#fff"
|
|
142
|
+
})]
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
const ItFlag = props => _jsxs(SvgIcon, { ...props,
|
|
146
|
+
children: [_jsx("path", {
|
|
147
|
+
fillRule: "evenodd",
|
|
148
|
+
clipRule: "evenodd",
|
|
149
|
+
d: "M0 3h24v18H0V3z",
|
|
150
|
+
fill: "#fff"
|
|
151
|
+
}), _jsx("path", {
|
|
152
|
+
fillRule: "evenodd",
|
|
153
|
+
clipRule: "evenodd",
|
|
154
|
+
d: "M0 3h8v18H0V3z",
|
|
155
|
+
fill: "#009246"
|
|
156
|
+
}), _jsx("path", {
|
|
157
|
+
fillRule: "evenodd",
|
|
158
|
+
clipRule: "evenodd",
|
|
159
|
+
d: "M16 3h8v18h-8V3z",
|
|
160
|
+
fill: "#CE2B37"
|
|
161
|
+
})]
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
const JpFlag = props => _jsxs(SvgIcon, { ...props,
|
|
165
|
+
children: [_jsx("path", {
|
|
166
|
+
fillRule: "evenodd",
|
|
167
|
+
clipRule: "evenodd",
|
|
168
|
+
d: "M-1.5 3h27v18h-27V3z",
|
|
169
|
+
fill: "#fff"
|
|
170
|
+
}), _jsx("path", {
|
|
171
|
+
d: "M12 17.6a5.6 5.6 0 100-11.2 5.6 5.6 0 000 11.2z",
|
|
172
|
+
fill: "#D30000"
|
|
173
|
+
})]
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
const NlFlag = props => _jsxs(SvgIcon, { ...props,
|
|
177
|
+
children: [_jsx("path", {
|
|
178
|
+
d: "M24 3H0v18h24V3z",
|
|
179
|
+
fill: "#fff"
|
|
180
|
+
}), _jsx("path", {
|
|
181
|
+
d: "M24 15H0v6h24v-6z",
|
|
182
|
+
fill: "#21468B"
|
|
183
|
+
}), _jsx("path", {
|
|
184
|
+
fillRule: "evenodd",
|
|
185
|
+
clipRule: "evenodd",
|
|
186
|
+
d: "M0 3h24v6H0V3z",
|
|
187
|
+
fill: "#AE1C28"
|
|
188
|
+
})]
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
const PlFlag = props => _jsxs(SvgIcon, { ...props,
|
|
192
|
+
children: [_jsx("path", {
|
|
193
|
+
fillRule: "evenodd",
|
|
194
|
+
clipRule: "evenodd",
|
|
195
|
+
d: "M24 21H0V3h24v18z",
|
|
196
|
+
fill: "#fff"
|
|
197
|
+
}), _jsx("path", {
|
|
198
|
+
fillRule: "evenodd",
|
|
199
|
+
clipRule: "evenodd",
|
|
200
|
+
d: "M24 21H0v-9h24v9z",
|
|
201
|
+
fill: "#DC143C"
|
|
202
|
+
})]
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
const PtFlag = props => _jsxs(SvgIcon, { ...props,
|
|
206
|
+
children: [_jsx("path", {
|
|
207
|
+
d: "M9.6 3H24v18H9.6V3z",
|
|
208
|
+
fill: "red"
|
|
209
|
+
}), _jsx("path", {
|
|
210
|
+
d: "M0 3h9.6v18H0V3z",
|
|
211
|
+
fill: "#060"
|
|
212
|
+
})]
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
const RuFlag = props => _jsxs(SvgIcon, { ...props,
|
|
216
|
+
children: [_jsx("path", {
|
|
217
|
+
fillRule: "evenodd",
|
|
218
|
+
clipRule: "evenodd",
|
|
219
|
+
d: "M0 3h24v18H0V3z",
|
|
220
|
+
fill: "#fff"
|
|
221
|
+
}), _jsx("path", {
|
|
222
|
+
fillRule: "evenodd",
|
|
223
|
+
clipRule: "evenodd",
|
|
224
|
+
d: "M0 9h24v12H0V9z",
|
|
225
|
+
fill: "#0039A6"
|
|
226
|
+
}), _jsx("path", {
|
|
227
|
+
fillRule: "evenodd",
|
|
228
|
+
clipRule: "evenodd",
|
|
229
|
+
d: "M0 15h24v6H0v-6z",
|
|
230
|
+
fill: "#D52B1E"
|
|
231
|
+
})]
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
const SeFlag = props => _jsxs(SvgIcon, { ...props,
|
|
235
|
+
children: [_jsx("path", {
|
|
236
|
+
d: "M-2.4 3h9v7.2h-9V3zm0 10.8h9V21h-9v-7.2z",
|
|
237
|
+
fill: "#006AA7"
|
|
238
|
+
}), _jsx("path", {
|
|
239
|
+
d: "M-2.4 10.2h9v3.6h-9v-3.6zM6.6 3h3.6v18H6.6V3z",
|
|
240
|
+
fill: "#FECC00"
|
|
241
|
+
}), _jsx("path", {
|
|
242
|
+
d: "M10 10.2h16.3v3.6H10v-3.6z",
|
|
243
|
+
fill: "#FECC00"
|
|
244
|
+
}), _jsx("path", {
|
|
245
|
+
d: "M10.2 13.8h16.2V21H10.2v-7.2zm0-10.8h16.2v7.2H10.2V3z",
|
|
246
|
+
fill: "#006AA7"
|
|
247
|
+
})]
|
|
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
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import List from "./list";
|
|
3
|
+
import Details from "./details";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
const InstructorsBook = props => {
|
|
7
|
+
return _jsx("div", {
|
|
8
|
+
className: "instructors-book",
|
|
9
|
+
children: props.instructor ? _jsx(Details, { ...props
|
|
10
|
+
}) : props.instructors ? _jsx(List, { ...props
|
|
11
|
+
}) : "No data"
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default InstructorsBook;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
const Link = ({
|
|
5
|
+
Link,
|
|
6
|
+
linkProps,
|
|
7
|
+
children,
|
|
8
|
+
...props
|
|
9
|
+
}) => {
|
|
10
|
+
return Link !== undefined ? _jsx(Link, { ...linkProps,
|
|
11
|
+
children: children
|
|
12
|
+
}) : _jsx("a", { ...props,
|
|
13
|
+
children: children
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default Link;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const strStartWith = (str1, str2) => str1.toLowerCase().trim().startsWith(str2.toLowerCase().trim());
|
|
2
|
+
|
|
3
|
+
const strEquals = (str1, str2) => str1.toLowerCase().trim() === str2.toLowerCase().trim();
|
|
4
|
+
|
|
5
|
+
const match = (searchingArray, entries) => {
|
|
6
|
+
return searchingArray.reduce((acc, str, index) => {
|
|
7
|
+
const matched = index === searchingArray.length - 1 ? strStartWith : strEquals;
|
|
8
|
+
return acc && entries.some(entry => matched(entry, str));
|
|
9
|
+
}, true);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const filter = (project, search = "") => {
|
|
13
|
+
const searchingArray = search.split(" ");
|
|
14
|
+
const filtered = project.all.filter(uri => {
|
|
15
|
+
const instructor = project.byUri[uri];
|
|
16
|
+
const firstnameWords = instructor.firstname.split(" ");
|
|
17
|
+
const lastnameWords = instructor.lastname.split(" ");
|
|
18
|
+
return match(searchingArray, [...firstnameWords, ...lastnameWords]);
|
|
19
|
+
});
|
|
20
|
+
return filtered.reduce((acc, uri) => [...acc, project.byUri[uri]], []);
|
|
21
|
+
};
|