ublo-lib 1.12.7 → 1.12.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"admin-links.d.ts","sourceRoot":"","sources":["../../../../src/common/components/admin-links/admin-links.tsx"],"names":[],"mappings":";AAMA,aAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,aAAK,KAAK,GAAG;IACX,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;CACpC,CAAC;AAeF,QAAA,MAAM,UAAU,oBAAqB,KAAK,gBA6EzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"admin-links.d.ts","sourceRoot":"","sources":["../../../../src/common/components/admin-links/admin-links.tsx"],"names":[],"mappings":";AAMA,aAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,aAAK,KAAK,GAAG;IACX,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;CACpC,CAAC;AAeF,QAAA,MAAM,UAAU,oBAAqB,KAAK,gBA8EzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -19,7 +19,7 @@ const AdminLinks = ({ customLinks }) => {
19
19
  },
20
20
  tutoriels: {
21
21
  name: "Tutoriels",
22
- onClick: "http://esf-tutoriels.valraiso.net/",
22
+ onClick: "https://www.valraiso.net/toolbox/?auth=my-toolbox&filter=tools",
23
23
  target: "_blank",
24
24
  },
25
25
  popup: {
@@ -42,7 +42,7 @@ const AdminLinks = ({ customLinks }) => {
42
42
  return (_jsx("div", { className: styles.root, children: cmsMode && (_jsxs(_Fragment, { children: [_jsx("div", { className: styles.toggle, onClick: () => setOpen(!open), children: _jsx(ToggleIcon, {}) }), open && (_jsxs("div", { className: styles.links, children: [_jsx("div", { className: styles.linksTitle, children: "Liens utiles" }), Object.keys(links).map((key, i) => {
43
43
  const link = links[key];
44
44
  if (!link)
45
- return;
45
+ return null;
46
46
  const { name, onClick, target } = link;
47
47
  const isHrefValid = typeof onClick === "string" && onClick !== "";
48
48
  const isFunction = typeof onClick === "function";
@@ -6,6 +6,7 @@ declare type ItemProps = {
6
6
  path: string;
7
7
  page: string;
8
8
  subs?: ItemProps[];
9
+ exclusions: string[];
9
10
  };
10
11
  declare type BreadcrumbProps = {
11
12
  breadcrumb: ItemProps;
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/common/components/breadcrumb.tsx"],"names":[],"mappings":";AAGA,aAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;CACpB,CAAC;AAEF,aAAK,eAAe,GAAG;IACrB,UAAU,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA0CF,QAAA,MAAM,UAAU,+BAAqC,eAAe,gBAInE,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/common/components/breadcrumb.tsx"],"names":[],"mappings":";AAGA,aAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,aAAK,eAAe,GAAG;IACrB,UAAU,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAqDF,QAAA,MAAM,UAAU,+BAAqC,eAAe,gBAInE,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,23 +1,24 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Link from "ublo/link";
3
- const Item = ({ page, path, itemTitle, nextItem, isCurrent }) => {
3
+ const Item = ({ name, page, path, itemTitle, nextItem, isCurrent, exclusions, }) => {
4
4
  const hasTemplate = page !== undefined;
5
5
  const isExternalUrl = /^((http|https):\/\/)/.test(path);
6
6
  const noHref = isCurrent || !hasTemplate;
7
+ const isExcluded = !isCurrent && exclusions.includes(name);
7
8
  const Tag = isExternalUrl ? "a" : noHref ? "span" : Link;
8
9
  const linkProps = { title: itemTitle, page, as: path };
9
10
  const spanProps = { dangerouslySetInnerHTML: { __html: itemTitle } };
10
11
  const anchorProps = { ...spanProps, href: path };
11
12
  const props = isExternalUrl ? anchorProps : noHref ? spanProps : linkProps;
12
- return (_jsxs(_Fragment, { children: [_jsx(Tag, { className: "breadcrumb__item", ...props }), nextItem] }));
13
+ return (_jsxs(_Fragment, { children: [!isExcluded && _jsx(Tag, { className: "breadcrumb__item", ...props }), nextItem] }));
13
14
  };
14
15
  const Items = ({ rawItem, exclusions }) => {
15
- const { next, title, path, page, shortTitle } = rawItem;
16
+ const { next, name, title, path, page, shortTitle } = rawItem;
16
17
  const isCurrent = next === undefined;
17
18
  const isNextExcluded = !isCurrent && exclusions.includes(next.name);
18
19
  const itemToRender = isNextExcluded ? next.next : next;
19
20
  const nextItem = !isCurrent ? (_jsx(Items, { rawItem: itemToRender, exclusions: exclusions })) : null;
20
- return (_jsx(Item, { page: page, path: path, itemTitle: shortTitle || title, nextItem: nextItem, isCurrent: isCurrent }));
21
+ return (_jsx(Item, { name: name, page: page, path: path, itemTitle: shortTitle || title, nextItem: nextItem, isCurrent: isCurrent, exclusions: exclusions }));
21
22
  };
22
23
  const Breadcrumb = ({ breadcrumb, exclusions = [] }) => (_jsx("div", { className: "breadcrumb", children: _jsx(Items, { rawItem: breadcrumb, exclusions: exclusions }) }));
23
24
  export default Breadcrumb;
@@ -9,7 +9,7 @@ export default function ParcoursEsf({ parcours, constraints = [], noeudsExclus =
9
9
  const { lang } = useUbloContext();
10
10
  const [loaded, setLoaded] = React.useState(false);
11
11
  // const parcoursLang = lang === "fr" ? "fr" : "en";
12
- const parcoursLang = lang === "fr" ? "fr" : "fr"; // seul le fr est pris en charge pour le moment
12
+ const parcoursLang = "fr"; // seul le fr est pris en charge pour le moment
13
13
  const startParcours = () => {
14
14
  window.EsfParcours.onLoad(() => {
15
15
  setLoaded(true);
@@ -1,7 +1,7 @@
1
1
  const messages = {
2
2
  fr: {
3
3
  title: "<b>A quelle période</b> souhaitez-vous venir ?",
4
- "selected-title": "<b>Vous venez</b> du",
4
+ "selected-title": "Vous venez du",
5
5
  warn: "Attention, modifier vos dates de séjour entraine la suppression du contenu du panier",
6
6
  ok: "Confirmer",
7
7
  cancel: "Annuler",
@@ -12,7 +12,7 @@ const messages = {
12
12
  },
13
13
  en: {
14
14
  title: "<span>When</span> are you coming?",
15
- "selected-title": "<b>You are comming</b> from",
15
+ "selected-title": "You are coming from",
16
16
  warn: "Warning, if you change your dates of stay, products in your cart will be removed",
17
17
  ok: "Confirm",
18
18
  cancel: "Cancel",
@@ -23,7 +23,7 @@ const messages = {
23
23
  },
24
24
  nl: {
25
25
  title: "<span>Wanneer</span> kom je?",
26
- "selected-title": "<b>You are comming</b> from",
26
+ "selected-title": "Je komt van",
27
27
  warn: "Waarschuwing, als u uw verblijfsdata wijzigt, wordt uw winkelwagentje gewist",
28
28
  ok: "Aanpassen",
29
29
  cancel: "Annuleren",
@@ -4,6 +4,7 @@ import * as Messages from "./messages";
4
4
  import * as Stay from "./services/stay";
5
5
  import css from "./title.module.css";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
7
8
  const Title = ({
8
9
  stay
9
10
  }) => {
@@ -19,11 +20,11 @@ const Title = ({
19
20
  });
20
21
  }
21
22
  const formatedStay = Stay.formatStay(lang, stay);
22
- return _jsx("div", {
23
+ return _jsxs("div", {
23
24
  className: css.title,
24
- dangerouslySetInnerHTML: {
25
- __html: `${Messages.get(lang, "selected-title")} ${formatedStay}`
26
- }
25
+ children: [Messages.get(lang, "selected-title"), " ", _jsx("b", {
26
+ children: formatedStay
27
+ })]
27
28
  });
28
29
  };
29
30
  export default Title;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.12.7",
3
+ "version": "1.12.9",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^2.1.0",
6
6
  "leaflet": "^1.9.1",