@edifice.io/react 2.6.6-develop-b2school.20260923094411 → 2.6.6-develop-pedago.20260923164322

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.
Files changed (82) hide show
  1. package/dist/components/Form/FormText.js +6 -11
  2. package/dist/components/Input/Input.d.ts +2 -11
  3. package/dist/components/Input/Input.js +21 -38
  4. package/dist/components/Label/Label.js +4 -4
  5. package/dist/components/Layout/Layout.js +5 -10
  6. package/dist/components/PageLayout/PageLayout.d.ts +0 -4
  7. package/dist/components/PageLayout/PageLayout.js +12 -22
  8. package/dist/components/PageLayout/components/PageLayoutContent.js +1 -5
  9. package/dist/components/Table/components/Table.d.ts +2 -2
  10. package/dist/components/Table/components/TableTd.d.ts +1 -1
  11. package/dist/components/Table/components/TableTh.d.ts +1 -1
  12. package/dist/components/index.d.ts +0 -2
  13. package/dist/homepage.js +28 -29
  14. package/dist/hooks/index.d.ts +0 -2
  15. package/dist/hooks/useClickOutside/useClickOutside.d.ts +1 -1
  16. package/dist/hooks/useClickOutside/useClickOutside.js +2 -3
  17. package/dist/hooks/useZendeskGuide/useZendeskGuide.d.ts +2 -14
  18. package/dist/hooks/useZendeskGuide/useZendeskGuide.js +24 -51
  19. package/dist/index.js +160 -168
  20. package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +3 -3
  21. package/dist/modules/homepage/components/Communities/Communities.js +35 -0
  22. package/dist/modules/homepage/components/Communities/CommunitiesContainer.d.ts +4 -2
  23. package/dist/modules/homepage/components/Communities/CommunitiesContainer.js +31 -0
  24. package/dist/modules/homepage/components/Communities/CommunitiesSkeleton.js +32 -0
  25. package/dist/modules/homepage/components/Communities/CommunityItem.d.ts +2 -1
  26. package/dist/modules/homepage/components/Communities/CommunityItem.js +28 -0
  27. package/dist/modules/homepage/components/Communities/useCommunities.d.ts +1 -4
  28. package/dist/modules/homepage/components/Communities/useCommunities.js +25 -0
  29. package/dist/modules/homepage/components/Header/Header.js +4 -11
  30. package/dist/modules/homepage/components/UserSpace/hooks/useProfileLinks.js +8 -18
  31. package/dist/modules/homepage/components/index.d.ts +1 -1
  32. package/dist/modules/widgets/index.d.ts +1 -1
  33. package/package.json +6 -6
  34. package/dist/components/LinkPill/LinkPill.d.ts +0 -45
  35. package/dist/components/LinkPill/LinkPill.js +0 -27
  36. package/dist/components/LinkPill/index.d.ts +0 -2
  37. package/dist/components/ModalBeta/ModalBeta.d.ts +0 -47
  38. package/dist/components/ModalBeta/ModalBeta.js +0 -62
  39. package/dist/components/ModalBeta/ModalBetaBody.d.ts +0 -19
  40. package/dist/components/ModalBeta/ModalBetaBody.js +0 -15
  41. package/dist/components/ModalBeta/ModalBetaContext.d.ts +0 -7
  42. package/dist/components/ModalBeta/ModalBetaContext.js +0 -15
  43. package/dist/components/ModalBeta/ModalBetaFooter.d.ts +0 -13
  44. package/dist/components/ModalBeta/ModalBetaFooter.js +0 -7
  45. package/dist/components/ModalBeta/ModalBetaHeader.d.ts +0 -23
  46. package/dist/components/ModalBeta/ModalBetaHeader.js +0 -31
  47. package/dist/components/ModalBeta/index.d.ts +0 -2
  48. package/dist/components/PageLayout/components/PageLayoutHelpZone.d.ts +0 -12
  49. package/dist/components/PageLayout/components/PageLayoutHelpZone.js +0 -6
  50. package/dist/hooks/useBackground/index.d.ts +0 -1
  51. package/dist/hooks/useBackground/useBackground.d.ts +0 -7
  52. package/dist/hooks/useBackground/useBackground.js +0 -16
  53. package/dist/hooks/useUserPreferences/index.d.ts +0 -1
  54. package/dist/hooks/useUserPreferences/useUserPreferences.d.ts +0 -9
  55. package/dist/hooks/useUserPreferences/useUserPreferences.js +0 -40
  56. package/dist/modules/HelpZone/HelpZone.d.ts +0 -13
  57. package/dist/modules/HelpZone/HelpZone.js +0 -52
  58. package/dist/modules/HelpZone/HelpZoneContainer.d.ts +0 -4
  59. package/dist/modules/HelpZone/HelpZoneContainer.js +0 -18
  60. package/dist/modules/HelpZone/index.d.ts +0 -3
  61. package/dist/modules/homepage/components/UsefulLinks/LinkForm.d.ts +0 -13
  62. package/dist/modules/homepage/components/UsefulLinks/LinkForm.js +0 -67
  63. package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.d.ts +0 -6
  64. package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.js +0 -29
  65. package/dist/modules/homepage/components/UsefulLinks/UsefulLinksContainer.d.ts +0 -1
  66. package/dist/modules/homepage/components/UsefulLinks/UsefulLinksContainer.js +0 -40
  67. package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.d.ts +0 -11
  68. package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.js +0 -65
  69. package/dist/modules/homepage/components/UsefulLinks/hooks/useUsefulLinksContainer.d.ts +0 -19
  70. package/dist/modules/homepage/components/UsefulLinks/hooks/useUsefulLinksContainer.js +0 -26
  71. package/dist/modules/homepage/components/UsefulLinks/index.d.ts +0 -5
  72. package/dist/modules/homepage/components/UsefulLinks/services/api/index.d.ts +0 -6
  73. package/dist/modules/homepage/components/UsefulLinks/services/api/index.js +0 -5
  74. package/dist/modules/homepage/components/UsefulLinks/services/api/usefulLinksService.d.ts +0 -31
  75. package/dist/modules/homepage/components/UsefulLinks/services/api/usefulLinksService.js +0 -50
  76. package/dist/modules/homepage/components/UsefulLinks/services/queries/usefulLinks.d.ts +0 -20
  77. package/dist/modules/homepage/components/UsefulLinks/services/queries/usefulLinks.js +0 -65
  78. package/dist/modules/icons/components/logo/IconLogoEdificeFull.d.ts +0 -7
  79. package/dist/modules/icons/components/logo/IconLogoEdificeFull.js +0 -26
  80. package/dist/modules/icons/components/logo/IconLogoEdificeSmall.d.ts +0 -7
  81. package/dist/modules/icons/components/logo/IconLogoEdificeSmall.js +0 -17
  82. package/dist/modules/icons/components/logo/index.d.ts +0 -2
@@ -1,21 +1,16 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
- import SvgIconError from "../../modules/icons/components/IconError.js";
4
- import SvgIconSuccessOutline from "../../modules/icons/components/IconSuccessOutline.js";
5
3
  import { useFormControl } from "./FormContext.js";
6
4
  const FormText = ({
7
5
  children
8
6
  }) => {
9
7
  const {
10
8
  status
11
- } = useFormControl(), classes = clsx("input-message", {
12
- "input-message--invalid": status === "invalid",
13
- "input-message--valid": status === "valid"
14
- }), Icon = status === "invalid" ? SvgIconError : status === "valid" ? SvgIconSuccessOutline : null;
15
- return /* @__PURE__ */ jsxs("p", { className: classes, children: [
16
- Icon && /* @__PURE__ */ jsx(Icon, { className: "input-message__icon", "aria-hidden": "true" }),
17
- children
18
- ] });
9
+ } = useFormControl(), classes = clsx("form-text", {
10
+ "is-invalid": status === "invalid",
11
+ valid: status === "valid"
12
+ });
13
+ return /* @__PURE__ */ jsx("p", { className: classes, children: /* @__PURE__ */ jsx("em", { children }) });
19
14
  };
20
15
  export {
21
16
  FormText as default
@@ -2,8 +2,7 @@ import { Size } from '../../types';
2
2
  export type OmitInputProps = 'disabled' | 'required' | 'size' | 'id' | 'readOnly';
3
3
  export interface InputProps extends Omit<React.ComponentPropsWithRef<'input'>, OmitInputProps> {
4
4
  /**
5
- * Control size of input. `sm` and `md` share the same visual size
6
- * ("Medium" in the design system); only `lg` ("Big") differs.
5
+ * Control size of input
7
6
  */
8
7
  size: Size;
9
8
  /**
@@ -19,8 +18,7 @@ export interface InputProps extends Omit<React.ComponentPropsWithRef<'input'>, O
19
18
  */
20
19
  disabled?: boolean;
21
20
  /**
22
- * @deprecated Validation icons no longer render inside the field —
23
- * this prop has no effect and will be removed in a future major version.
21
+ * Remove validation icon
24
22
  */
25
23
  noValidationIcon?: boolean;
26
24
  /**
@@ -35,13 +33,6 @@ export interface InputProps extends Omit<React.ComponentPropsWithRef<'input'>, O
35
33
  * Browser autocomplete feature
36
34
  */
37
35
  autoComplete?: string;
38
- /**
39
- * Show a built-in clear (×) button while the field is focused. Opt-in:
40
- * several consumers render their own clear affordance already (e.g.
41
- * `SearchBar`), and a broad audit of every `Input` usage hasn't been done
42
- * yet — see INPUT-MIGRATION-PLAN.md §07.
43
- */
44
- clearable?: boolean;
45
36
  }
46
37
  /**
47
38
  * Input Form Component
@@ -1,57 +1,40 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { forwardRef, useRef, useState } from "react";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { forwardRef, useState } from "react";
3
3
  import clsx from "clsx";
4
- import { useTranslation } from "react-i18next";
5
- import SvgIconClose from "../../modules/icons/components/IconClose.js";
6
4
  import { useFormControl } from "../Form/FormContext.js";
5
+ import Textcounter from "../TextCounter/TextCounter.js";
7
6
  const Input = /* @__PURE__ */ forwardRef(({
7
+ noValidationIcon,
8
8
  placeholder,
9
9
  size = "md",
10
10
  type = "text",
11
11
  className,
12
12
  showCounter = !1,
13
13
  autoComplete = "off",
14
- clearable = !1,
15
- noValidationIcon: _noValidationIcon,
16
14
  ...restProps
17
- }, forwardedRef) => {
15
+ }, ref) => {
18
16
  var _a;
19
17
  const {
20
18
  id,
21
19
  isRequired,
22
20
  isReadOnly,
23
21
  status
24
- } = useFormControl(), {
25
- t
26
- } = useTranslation(), inputRef = useRef(null), [currentLength, setCurrentLength] = useState(((_a = restProps.defaultValue) == null ? void 0 : _a.toString().length) || 0), setRefs = (node) => {
27
- inputRef.current = node, typeof forwardedRef == "function" ? forwardedRef(node) : forwardedRef && (forwardedRef.current = node);
28
- }, wrapperClasses = clsx("input", {
29
- "input--lg": size === "lg",
30
- "input--invalid": status === "invalid",
31
- "input--valid": status === "valid",
32
- "input--plaintext": isReadOnly
33
- }, className), handleChange = (e) => {
34
- var _a2;
35
- setCurrentLength(e.target.value.length), (_a2 = restProps.onChange) == null || _a2.call(restProps, e);
36
- }, handleClear = () => {
37
- var _a2;
38
- const node = inputRef.current;
39
- if (!node) return;
40
- const nativeSetter = (_a2 = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")) == null ? void 0 : _a2.set;
41
- nativeSetter == null || nativeSetter.call(node, ""), node.dispatchEvent(new Event("input", {
42
- bubbles: !0
43
- })), node.focus();
44
- }, maxLength = restProps.maxLength ?? 0;
45
- return /* @__PURE__ */ jsxs("div", { className: wrapperClasses, children: [
46
- /* @__PURE__ */ jsx("input", { ref: setRefs, id, className: "input__field", type, placeholder, required: isRequired, readOnly: isReadOnly, ...restProps, onChange: handleChange, autoComplete }),
47
- clearable && !isReadOnly && /* @__PURE__ */ jsx("button", { type: "button", className: "input__clear", onClick: handleClear, "aria-label": t("clear"), children: /* @__PURE__ */ jsx(SvgIconClose, {}) }),
48
- showCounter && /* @__PURE__ */ jsxs("span", { className: clsx("input__counter", {
49
- "input__counter--max": currentLength === maxLength
50
- }), children: [
51
- currentLength,
52
- " / ",
53
- maxLength
54
- ] })
22
+ } = useFormControl(), [currentLength, setCurrentLength] = useState(((_a = restProps.defaultValue) == null ? void 0 : _a.toString().length) || 0), classes = clsx({
23
+ "form-control": !isReadOnly,
24
+ "form-control-lg": size === "lg",
25
+ "form-control-sm": size === "sm",
26
+ "is-invalid": status === "invalid",
27
+ "is-valid": status === "valid",
28
+ "form-control-plaintext": isReadOnly,
29
+ "no-validation-icon": noValidationIcon,
30
+ "pe-64": showCounter && !status
31
+ }, className);
32
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
33
+ /* @__PURE__ */ jsx("input", { ref, id, className: classes, type, placeholder, required: isRequired, readOnly: isReadOnly, ...restProps, onChange: (e) => {
34
+ var _a2;
35
+ setCurrentLength(e.target.value.length), (_a2 = restProps.onChange) == null || _a2.call(restProps, e);
36
+ }, autoComplete }),
37
+ showCounter && !status && /* @__PURE__ */ jsx(Textcounter, { currentLength, maxLength: restProps.maxLength ?? 0 })
55
38
  ] });
56
39
  });
57
40
  export {
@@ -16,8 +16,8 @@ const Label = /* @__PURE__ */ forwardRef(({
16
16
  isRequired
17
17
  } = useFormControl(), {
18
18
  t
19
- } = useTranslation(), classes = clsx("input-label", {
20
- "input-label--has-icon": leftIcon
19
+ } = useTranslation(), classes = clsx("form-label", {
20
+ "has-icon": leftIcon
21
21
  }, className), optionalState = isOptional && !isRequired, requiredState = isRequired && !isOptional;
22
22
  return useEffect(() => {
23
23
  if (isOptional && isRequired)
@@ -25,11 +25,11 @@ const Label = /* @__PURE__ */ forwardRef(({
25
25
  }, [isOptional, isRequired]), /* @__PURE__ */ jsxs("label", { ref, htmlFor: id, className: classes, children: [
26
26
  leftIcon,
27
27
  children,
28
- optionalState && /* @__PURE__ */ jsxs("em", { className: "input-label__optional", children: [
28
+ optionalState && /* @__PURE__ */ jsxs("em", { className: "optional", children: [
29
29
  "- ",
30
30
  optionalText ?? t("explorer.optional")
31
31
  ] }),
32
- requiredState && /* @__PURE__ */ jsx("em", { className: "input-label__required", children: requiredText })
32
+ requiredState && /* @__PURE__ */ jsx("em", { className: "required", children: requiredText })
33
33
  ] });
34
34
  });
35
35
  export {
@@ -4,11 +4,10 @@ import clsx from "clsx";
4
4
  import { Toaster } from "react-hot-toast";
5
5
  import { useTranslation } from "react-i18next";
6
6
  import { useEdificeTheme } from "../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
7
- import { useOverlay } from "../PageLayout/hook/useOverlay.js";
8
7
  import Header from "./components/Header.js";
9
8
  import HeaderNotificationsOverlay from "./components/HeaderNotificationsOverlay.js";
9
+ import { useOverlay } from "../PageLayout/hook/useOverlay.js";
10
10
  import useUiOverride from "../../hooks/useUiOverride/useUiOverride.js";
11
- import useBackground from "../../hooks/useBackground/useBackground.js";
12
11
  import useCookiesConsent from "../../hooks/useCookiesConsent/useCookiesConsent.js";
13
12
  import useZendeskGuide from "../../hooks/useZendeskGuide/useZendeskGuide.js";
14
13
  import useCantoo from "../../hooks/useCantoo/useCantoo.js";
@@ -23,11 +22,7 @@ const HeaderV2 = /* @__PURE__ */ lazy(() => import("../../modules/homepage/compo
23
22
  }) => {
24
23
  const {
25
24
  theme
26
- } = useEdificeTheme(), override = useUiOverride("layout.header"), isHeaderV2 = (override == null ? void 0 : override.variant) === "v2", {
27
- productOverride,
28
- background,
29
- isBackgroundImageOverridden
30
- } = useBackground(), {
25
+ } = useEdificeTheme(), override = useUiOverride("layout.header"), isHeaderV2 = (override == null ? void 0 : override.variant) === "v2", backgroundOverride = useUiOverride("layout.background"), hasBackgroundImage = (backgroundOverride == null ? void 0 : backgroundOverride.variant) === "image", {
31
26
  toggleOverlay
32
27
  } = useOverlay(), {
33
28
  t
@@ -45,9 +40,9 @@ const HeaderV2 = /* @__PURE__ */ lazy(() => import("../../modules/homepage/compo
45
40
  }, className), renderHeader = headless ? null : isHeaderV2 ? /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(HeaderV2, { src: theme == null ? void 0 : theme.basePath, dataProduct: override == null ? void 0 : override.theme, onNotificationsClick: toggleOverlay }) }) : /* @__PURE__ */ jsx(Header, { is1d: theme == null ? void 0 : theme.is1d, src: theme == null ? void 0 : theme.basePath }), renderNotificationsOverlay = !headless && isHeaderV2 && /* @__PURE__ */ jsx(HeaderNotificationsOverlay, {}), renderCookies = showCookiesConsent && /* @__PURE__ */ jsx(Alert, { type: "info", className: "m-12 rgpd", isConfirm: !0, position: "bottom-right", button: /* @__PURE__ */ jsx(Button, { color: "tertiary", variant: "ghost", onClick: handleConsultCookies, children: t("rgpd.cookies.banner.button.consult") }), onClose: handleCloseCookiesConsent, children: t("rgpd.cookies.banner.text1") }), renderToaster = /* @__PURE__ */ jsx(Toaster, { containerClassName: "toaster-container", toastOptions: {
46
41
  position: "top-right"
47
42
  } });
48
- return /* @__PURE__ */ jsxs("div", { "data-product": productOverride, "data-background": theme != null && theme.is1d ? void 0 : background, className: clsx("layout", {
49
- "layout-has-background-image": isBackgroundImageOverridden
50
- }), children: [
43
+ return /* @__PURE__ */ jsxs("div", { className: clsx("layout", {
44
+ "layout-has-background-image": hasBackgroundImage
45
+ }), "data-product": hasBackgroundImage ? backgroundOverride == null ? void 0 : backgroundOverride.theme : void 0, children: [
51
46
  renderHeader,
52
47
  renderNotificationsOverlay,
53
48
  /* @__PURE__ */ jsx("main", { className: classes, ...restProps, children }),
@@ -41,9 +41,5 @@ declare const PageLayout: {
41
41
  ({ children, onClose, closeButton, backdrop, className, ...props }: import('./components/PageLayoutOverlay').PageLayoutOverlayProps): import("react/jsx-runtime").JSX.Element;
42
42
  displayName: string;
43
43
  };
44
- HelpZone: {
45
- (): import("react/jsx-runtime").JSX.Element;
46
- displayName: string;
47
- };
48
44
  };
49
45
  export default PageLayout;
@@ -1,16 +1,15 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useMemo, Children, isValidElement } from "react";
3
3
  import clsx from "clsx";
4
4
  import PageLayoutBreadcrumb from "./components/PageLayoutBreadcrumb.js";
5
5
  import PageLayoutContent from "./components/PageLayoutContent.js";
6
6
  import PageLayoutHeader from "./components/PageLayoutHeader.js";
7
- import PageLayoutHelpZone from "./components/PageLayoutHelpZone.js";
8
7
  import PageLayoutOverlay from "./components/PageLayoutOverlay.js";
9
8
  import PageLayoutSidebarLeft from "./components/PageLayoutSidebarLeft.js";
10
9
  import PageLayoutSidebarRight from "./components/PageLayoutSidebarRight.js";
11
10
  import { PageLayoutContext } from "./PageLayoutContext.js";
12
11
  function analyzeChildren(children) {
13
- let hasLeftSidebar = !1, hasRightSidebar = !1, breadcrumb = null, overlay = null, helpZone = null;
12
+ let hasLeftSidebar = !1, hasRightSidebar = !1, breadcrumb = null, overlay = null;
14
13
  const headerChildren = [], mainChildren = [];
15
14
  return Children.toArray(children).forEach((child) => {
16
15
  if (/* @__PURE__ */ isValidElement(child))
@@ -24,9 +23,6 @@ function analyzeChildren(children) {
24
23
  case PageLayoutOverlay:
25
24
  overlay = child;
26
25
  break;
27
- case PageLayoutHelpZone:
28
- helpZone = child;
29
- break;
30
26
  case PageLayoutSidebarLeft:
31
27
  hasLeftSidebar = !0, mainChildren.push(child);
32
28
  break;
@@ -45,7 +41,6 @@ function analyzeChildren(children) {
45
41
  hasRightSidebar,
46
42
  breadcrumb,
47
43
  overlay,
48
- helpZone,
49
44
  headerChildren,
50
45
  mainChildren
51
46
  };
@@ -68,7 +63,6 @@ const Root = ({
68
63
  hasRightSidebar,
69
64
  breadcrumb,
70
65
  overlay,
71
- helpZone,
72
66
  headerChildren,
73
67
  mainChildren
74
68
  } = analyzeChildren(children), mainAreaClasses = clsx("pagelayout-mainarea", {
@@ -77,27 +71,23 @@ const Root = ({
77
71
  "has-right-sidebar-only": !hasLeftSidebar && hasRightSidebar,
78
72
  "has-gap": withGap
79
73
  }), isFullpage = variant === "fullpage";
80
- return /* @__PURE__ */ jsxs(PageLayoutContext.Provider, { value: contextValue, children: [
81
- /* @__PURE__ */ jsxs("div", { className: clsx("pagelayout", `pagelayout-${variant}`, scrollMode && `pagelayout-scroll-${scrollMode}`, className), ...props, children: [
82
- headerChildren,
83
- headerChildren.length > 0 && /* @__PURE__ */ jsx("div", { className: "pagelayout-headerspacer" }),
84
- !isFullpage && breadcrumb,
85
- /* @__PURE__ */ jsxs("div", { className: mainAreaClasses, children: [
86
- isFullpage && breadcrumb,
87
- mainChildren
88
- ] }),
89
- overlay
74
+ return /* @__PURE__ */ jsx(PageLayoutContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs("div", { className: clsx("pagelayout", `pagelayout-${variant}`, scrollMode && `pagelayout-scroll-${scrollMode}`, className), ...props, children: [
75
+ headerChildren,
76
+ headerChildren.length > 0 && /* @__PURE__ */ jsx("div", { className: "pagelayout-headerspacer" }),
77
+ !isFullpage && breadcrumb,
78
+ /* @__PURE__ */ jsxs("div", { className: mainAreaClasses, children: [
79
+ isFullpage && breadcrumb,
80
+ mainChildren
90
81
  ] }),
91
- helpZone
92
- ] });
82
+ overlay
83
+ ] }) });
93
84
  }, PageLayout = Object.assign(Root, {
94
85
  Header: PageLayoutHeader,
95
86
  Breadcrumb: PageLayoutBreadcrumb,
96
87
  SidebarLeft: PageLayoutSidebarLeft,
97
88
  Content: PageLayoutContent,
98
89
  SidebarRight: PageLayoutSidebarRight,
99
- Overlay: PageLayoutOverlay,
100
- HelpZone: PageLayoutHelpZone
90
+ Overlay: PageLayoutOverlay
101
91
  });
102
92
  export {
103
93
  PageLayout as default
@@ -1,19 +1,15 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
3
  import { usePageLayout } from "../PageLayoutContext.js";
4
- import useBackground from "../../../hooks/useBackground/useBackground.js";
5
4
  const PageLayoutContent = ({
6
5
  children,
7
6
  className,
8
7
  ...props
9
8
  }) => {
10
9
  const {
11
- productOverride,
12
- background
13
- } = useBackground(), {
14
10
  noPadding
15
11
  } = usePageLayout();
16
- return /* @__PURE__ */ jsx("main", { "data-product": productOverride, "data-background": background, className: clsx("pagelayout-content", {
12
+ return /* @__PURE__ */ jsx("main", { className: clsx("pagelayout-content", {
17
13
  "pagelayout-content--no-padding": noPadding == null ? void 0 : noPadding.content
18
14
  }, className), ...props, children });
19
15
  };
@@ -13,7 +13,7 @@ declare const Table: import('react').ForwardRefExoticComponent<{
13
13
  displayName: string;
14
14
  };
15
15
  Th: {
16
- (props: React.ThHTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
16
+ (props: React.HTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
17
17
  displayName: string;
18
18
  };
19
19
  Tbody: {
@@ -25,7 +25,7 @@ declare const Table: import('react').ForwardRefExoticComponent<{
25
25
  displayName: string;
26
26
  };
27
27
  Td: {
28
- (props: React.TdHTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
28
+ (props: React.HTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
29
29
  displayName: string;
30
30
  };
31
31
  };
@@ -1,4 +1,4 @@
1
1
  export declare const TableTd: {
2
- (props: React.TdHTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
2
+ (props: React.HTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
3
3
  displayName: string;
4
4
  };
@@ -1,4 +1,4 @@
1
1
  export declare const TableTh: {
2
- (props: React.ThHTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
2
+ (props: React.HTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
3
3
  displayName: string;
4
4
  };
@@ -28,7 +28,6 @@ export * from './Image';
28
28
  export * from './Input';
29
29
  export * from './Label';
30
30
  export * from './Layout';
31
- export * from './LinkPill';
32
31
  export * from './List';
33
32
  export * from './Loading';
34
33
  export * from './LoadingScreen';
@@ -37,7 +36,6 @@ export * from './LogoBeta';
37
36
  export * from './MediaViewer';
38
37
  export * from './Menu';
39
38
  export * from './Modal';
40
- export * from './ModalBeta';
41
39
  export * from './PageLayout';
42
40
  export * from './Pagination';
43
41
  export * from './Popover';
package/dist/homepage.js CHANGED
@@ -1,47 +1,46 @@
1
- import { default as default2 } from "./modules/homepage/components/Header/Header.js";
2
- import { default as default3 } from "./modules/homepage/components/HomeCard/HomeCard.js";
3
- import { default as default4 } from "./modules/homepage/components/LastInfos/LastInfos.js";
4
- import { default as default5 } from "./modules/homepage/components/MessageFlashList/MessageFlash.js";
5
- import { default as default6 } from "./modules/homepage/components/MessageFlashList/MessageFlashList.js";
6
- import { default as default7 } from "./modules/homepage/components/Notifications/NotificationItem.js";
7
- import { default as default8 } from "./modules/homepage/components/Notifications/NotificationList.js";
1
+ import { default as default2 } from "./modules/homepage/components/Communities/Communities.js";
2
+ import { default as default3 } from "./modules/homepage/components/Communities/CommunityItem.js";
3
+ import { default as default4 } from "./modules/homepage/components/Communities/CommunitiesSkeleton.js";
4
+ import { default as default5 } from "./modules/homepage/components/Header/Header.js";
5
+ import { default as default6 } from "./modules/homepage/components/HomeCard/HomeCard.js";
6
+ import { default as default7 } from "./modules/homepage/components/LastInfos/LastInfos.js";
7
+ import { default as default8 } from "./modules/homepage/components/MessageFlashList/MessageFlash.js";
8
+ import { default as default9 } from "./modules/homepage/components/MessageFlashList/MessageFlashList.js";
9
+ import { default as default10 } from "./modules/homepage/components/Notifications/NotificationItem.js";
10
+ import { default as default11 } from "./modules/homepage/components/Notifications/NotificationList.js";
8
11
  import { NotificationListContainer } from "./modules/homepage/components/Notifications/NotificationListContainer.js";
9
- import { default as default9 } from "./modules/homepage/components/SchoolSpace/SchoolSpace.js";
10
- import { default as default10 } from "./modules/homepage/components/UserSpace/UserSpace.js";
12
+ import { default as default12 } from "./modules/homepage/components/SchoolSpace/SchoolSpace.js";
13
+ import { default as default13 } from "./modules/homepage/components/UserSpace/UserSpace.js";
14
+ import { CommunitiesContainer } from "./modules/homepage/components/Communities/CommunitiesContainer.js";
11
15
  import { Favorites } from "./modules/homepage/components/Favorites/Favorites.js";
12
16
  import { FavoritesContainer } from "./modules/homepage/components/Favorites/FavoritesContainer.js";
13
17
  import { LastInfosContainer } from "./modules/homepage/components/LastInfos/LastInfosContainer.js";
14
18
  import { LastInfosList } from "./modules/homepage/components/LastInfos/LastInfosList.js";
15
- import { LinkForm } from "./modules/homepage/components/UsefulLinks/LinkForm.js";
16
- import { MAX_USEFUL_LINKS, useUsefulLinksContainer } from "./modules/homepage/components/UsefulLinks/hooks/useUsefulLinksContainer.js";
17
19
  import { MessageFlashListContainer } from "./modules/homepage/components/MessageFlashList/MessageFlashListContainer.js";
18
20
  import { SchoolSpaceContainer } from "./modules/homepage/components/SchoolSpace/SchoolSpaceContainer.js";
19
- import { UsefulLinks } from "./modules/homepage/components/UsefulLinks/UsefulLinks.js";
20
- import { UsefulLinksContainer } from "./modules/homepage/components/UsefulLinks/UsefulLinksContainer.js";
21
- import { UsefulLinksModal } from "./modules/homepage/components/UsefulLinks/UsefulLinksModal.js";
22
21
  import { UserSpaceContainer } from "./modules/homepage/components/UserSpace/UserSpaceContainer.js";
22
+ import { useCommunities } from "./modules/homepage/components/Communities/useCommunities.js";
23
23
  export {
24
+ default2 as Communities,
25
+ CommunitiesContainer,
26
+ default3 as CommunitiesItem,
27
+ default4 as CommunitiesSkeleton,
24
28
  Favorites,
25
29
  FavoritesContainer,
26
- default2 as Header,
27
- default3 as HomeCard,
28
- default4 as LastInfos,
30
+ default5 as Header,
31
+ default6 as HomeCard,
32
+ default7 as LastInfos,
29
33
  LastInfosContainer,
30
34
  LastInfosList,
31
- LinkForm,
32
- MAX_USEFUL_LINKS,
33
- default5 as MessageFlash,
34
- default6 as MessageFlashList,
35
+ default8 as MessageFlash,
36
+ default9 as MessageFlashList,
35
37
  MessageFlashListContainer,
36
- default7 as NotificationItem,
37
- default8 as NotificationList,
38
+ default10 as NotificationItem,
39
+ default11 as NotificationList,
38
40
  NotificationListContainer,
39
- default9 as SchoolSpace,
41
+ default12 as SchoolSpace,
40
42
  SchoolSpaceContainer,
41
- UsefulLinks,
42
- UsefulLinksContainer,
43
- UsefulLinksModal,
44
- default10 as UserSpace,
43
+ default13 as UserSpace,
45
44
  UserSpaceContainer,
46
- useUsefulLinksContainer
45
+ useCommunities
47
46
  };
@@ -1,4 +1,3 @@
1
- export * from './useBackground';
2
1
  export * from './useBookmark';
3
2
  export * from './useBreakpoint';
4
3
  export * from './useBrowserInfo';
@@ -35,7 +34,6 @@ export * from './useUiOverride';
35
34
  export * from './useUpload';
36
35
  export * from './useUploadFiles';
37
36
  export * from './useUser';
38
- export * from './useUserPreferences';
39
37
  export * from './useWorkspaceFile';
40
38
  export * from './useWorkspaceFolders';
41
39
  export * from './useWorkspaceSearch';
@@ -1 +1 @@
1
- export default function useClickOutside<T extends HTMLElement = any>(handler: () => void, events?: string[] | null, nodes?: Array<HTMLElement | null>, enabled?: boolean): import('react').MutableRefObject<T | null>;
1
+ export default function useClickOutside<T extends HTMLElement = any>(handler: () => void, events?: string[] | null, nodes?: Array<HTMLElement | null>): import('react').MutableRefObject<T | null>;
@@ -1,9 +1,8 @@
1
1
  import { useRef, useEffect } from "react";
2
2
  const DEFAULT_EVENTS = ["mousedown", "touchstart"];
3
- function useClickOutside(handler, events, nodes, enabled = !0) {
3
+ function useClickOutside(handler, events, nodes) {
4
4
  const ref = useRef(null);
5
5
  return useEffect(() => {
6
- if (!enabled) return;
7
6
  const listener = (event) => {
8
7
  const {
9
8
  target
@@ -20,7 +19,7 @@ function useClickOutside(handler, events, nodes, enabled = !0) {
20
19
  document.removeEventListener(fn, listener);
21
20
  });
22
21
  };
23
- }, [ref, handler, nodes, events, enabled]), ref;
22
+ }, [ref, handler, nodes, events]), ref;
24
23
  }
25
24
  export {
26
25
  useClickOutside as default
@@ -1,14 +1,2 @@
1
- export interface UseZendeskGuideAPI {
2
- /** True once the widget script is loaded and configured. */
3
- isReady: boolean;
4
- /** True while the widget panel is open. */
5
- isOpen: boolean;
6
- open: () => void;
7
- close: () => void;
8
- }
9
- /**
10
- * Add Zendesk Guide
11
- *
12
- * @param headerColor Overrides the widget panel's theme color.
13
- */
14
- export default function useZendeskGuide(headerColor?: string): UseZendeskGuideAPI;
1
+ /** Add Zendesk Guide */
2
+ export default function useZendeskGuide(): null;
@@ -5,7 +5,7 @@ import { useEdificeTheme } from "../../providers/EdificeThemeProvider/EdificeThe
5
5
  import useUser from "../useUser/useUser.js";
6
6
  import useIsAdml from "../useIsAdml/useIsAdml.js";
7
7
  import useHasWorkflow from "../useHasWorkflow/useHasWorkflow.js";
8
- function useZendeskGuide(headerColor) {
8
+ function useZendeskGuide() {
9
9
  const {
10
10
  currentLanguage
11
11
  } = useEdificeClient(), {
@@ -14,13 +14,7 @@ function useZendeskGuide(headerColor) {
14
14
  isAdml
15
15
  } = useIsAdml(), {
16
16
  theme
17
- } = useEdificeTheme(), isMobileView = window.innerWidth <= 768, hasSupportWorkflow = useHasWorkflow("net.atos.entng.support.controllers.DisplayController|view"), [locationPathname, setLocationPathname] = useState(""), [dataModule, setDataModule] = useState(void 0), [isReady, setIsReady] = useState(!1), [isOpen, setIsOpen] = useState(!1), open = () => {
18
- var _a;
19
- (_a = window.zE) == null || _a.call(window, "webWidget", "open");
20
- }, close = () => {
21
- var _a;
22
- (_a = window.zE) == null || _a.call(window, "webWidget", "close");
23
- }, setZendeskGuideLabels = () => {
17
+ } = useEdificeTheme(), isMobileView = window.innerWidth <= 768, hasSupportWorkflow = useHasWorkflow("net.atos.entng.support.controllers.DisplayController|view"), [locationPathname, setLocationPathname] = useState(""), [dataModule, setDataModule] = useState(void 0), setZendeskGuideLabels = () => {
24
18
  const modulePathnameSplit = locationPathname.split("/");
25
19
  let moduleLabel = "", labels = "";
26
20
  if (dataModule != null && dataModule.labels && Object.keys(dataModule == null ? void 0 : dataModule.labels).length > 0 && modulePathnameSplit.length > 1) {
@@ -39,40 +33,8 @@ function useZendeskGuide(headerColor) {
39
33
  return useEffect(() => {
40
34
  window.location.pathname !== locationPathname && setLocationPathname(window.location.pathname), !(dataModule === void 0 || Object.keys(dataModule).length === 0) && setZendeskGuideLabels();
41
35
  }, [window.location.pathname, dataModule]), useEffect(() => {
42
- const registerWidgetHandlers = () => {
43
- window.zE("webWidget:on", "open", function() {
44
- setIsOpen(!0), hasSupportWorkflow && window.zE("webWidget", "updateSettings", {
45
- webWidget: {
46
- contactForm: {
47
- suppress: !1
48
- }
49
- }
50
- });
51
- }), window.zE("webWidget:on", "close", function() {
52
- setIsOpen(!1);
53
- }), window.zE("webWidget:on", "userEvent", function(ref) {
54
- const category = ref.category, action = ref.action, properties = ref.properties;
55
- action === "Contact Form Shown" && category === "Zendesk Web Widget" && properties && properties.name === "contact-form" && hasSupportWorkflow && (window.zE("webWidget", "updateSettings", {
56
- webWidget: {
57
- contactForm: {
58
- suppress: !0
59
- }
60
- }
61
- }), window.zE("webWidget", "close"), window.open("/support/tickets/new", "_blank"));
62
- });
63
- };
64
- if (document.getElementById("ze-snippet")) {
65
- window.zE && (registerWidgetHandlers(), setIsReady(!0));
66
- return;
67
- }
68
- hasSupportWorkflow !== void 0 && (async () => {
69
- let zendeskGuideConfig;
70
- try {
71
- zendeskGuideConfig = await odeServices.http().get("/zendeskGuide/config");
72
- } catch (error) {
73
- console.warn("[useZendeskGuide] Failed to fetch the support widget config from `/zendeskGuide/config` — the widget (and HelpZone's button) won't show up. If you're running a local dev server, check that `/zendeskGuide` is proxied to your backend in your app's Vite dev proxy config.", error);
74
- return;
75
- }
36
+ document.getElementById("ze-snippet") || hasSupportWorkflow === void 0 || (async () => {
37
+ const zendeskGuideConfig = await odeServices.http().get("/zendeskGuide/config");
76
38
  if (zendeskGuideConfig && zendeskGuideConfig.key && zendeskGuideConfig.key !== "") {
77
39
  const scriptZendesk = document.createElement("script");
78
40
  scriptZendesk.id = "ze-snippet", scriptZendesk.src = `https://static.zdassets.com/ekr/snippet.js?key=${zendeskGuideConfig.key}`, document.body.appendChild(scriptZendesk).onload = () => {
@@ -83,8 +45,7 @@ function useZendeskGuide(headerColor) {
83
45
  }), Object.keys(zendeskGuideConfig.module).length > 0 && setDataModule(zendeskGuideConfig.module), window.zE("webWidget", "show"), window.zE("webWidget", "updateSettings", {
84
46
  webWidget: {
85
47
  color: {
86
- theme: zendeskGuideConfig.color || "#ffc400",
87
- header: headerColor
48
+ theme: zendeskGuideConfig.color || "#ffc400"
88
49
  },
89
50
  zIndex: 3,
90
51
  launcher: {
@@ -113,16 +74,28 @@ function useZendeskGuide(headerColor) {
113
74
  }
114
75
  }
115
76
  });
116
- }), registerWidgetHandlers(), setIsReady(!0);
77
+ }), window.zE("webWidget:on", "open", function() {
78
+ hasSupportWorkflow && window.zE("webWidget", "updateSettings", {
79
+ webWidget: {
80
+ contactForm: {
81
+ suppress: !1
82
+ }
83
+ }
84
+ });
85
+ }), window.zE("webWidget:on", "userEvent", function(ref) {
86
+ const category = ref.category, action = ref.action, properties = ref.properties;
87
+ action === "Contact Form Shown" && category === "Zendesk Web Widget" && properties && properties.name === "contact-form" && hasSupportWorkflow && (window.zE("webWidget", "updateSettings", {
88
+ webWidget: {
89
+ contactForm: {
90
+ suppress: !0
91
+ }
92
+ }
93
+ }), window.zE("webWidget", "close"), window.open("/support/tickets/new", "_blank"));
94
+ });
117
95
  };
118
96
  }
119
97
  })();
120
- }, [hasSupportWorkflow]), {
121
- isReady,
122
- isOpen,
123
- open,
124
- close
125
- };
98
+ }, [hasSupportWorkflow]), null;
126
99
  }
127
100
  export {
128
101
  useZendeskGuide as default