@edifice.io/react 2.6.6-develop-b2school.20260924181933 → 2.6.6-develop-b2school.20260928102355
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Input/Input.js +8 -3
- package/dist/components/Layout/Layout.js +17 -5
- package/dist/components/LinkPill/LinkPill.d.ts +3 -7
- package/dist/components/LinkPill/LinkPill.js +3 -2
- package/dist/homepage.js +4 -0
- package/dist/hooks/useZendeskGuide/useZendeskGuide.d.ts +3 -1
- package/dist/hooks/useZendeskGuide/useZendeskGuide.js +10 -3
- package/dist/icons.js +404 -402
- package/dist/modules/homepage/components/Favorites/Favorites.js +2 -2
- package/dist/modules/homepage/components/HomeCard/HomeCard.d.ts +1 -1
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.d.ts +15 -1
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.js +2 -1
- package/dist/modules/homepage/components/UsefulLinks/LinkForm.js +9 -9
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.js +5 -3
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.js +9 -9
- package/dist/modules/homepage/components/UserSpace/UserSpace.d.ts +3 -1
- package/dist/modules/homepage/components/UserSpace/UserSpace.js +13 -7
- package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.d.ts +4 -2
- package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.js +3 -2
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.d.ts +16 -0
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.js +15 -0
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.d.ts +21 -0
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js +47 -0
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/index.d.ts +2 -0
- package/dist/modules/homepage/components/index.d.ts +1 -0
- package/dist/modules/icons/components/IconAddWidget.d.ts +7 -0
- package/dist/modules/icons/components/IconAddWidget.js +12 -0
- package/dist/modules/icons/components/index.d.ts +1 -0
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useRef, useState } from "react";
|
|
2
|
+
import { forwardRef, useRef, useState, useLayoutEffect } from "react";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import SvgIconClose from "../../modules/icons/components/IconClose.js";
|
|
@@ -12,7 +12,8 @@ const Input = /* @__PURE__ */ forwardRef(({
|
|
|
12
12
|
showCounter = !1,
|
|
13
13
|
autoComplete = "off",
|
|
14
14
|
clearable = !1,
|
|
15
|
-
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16
|
+
noValidationIcon,
|
|
16
17
|
...restProps
|
|
17
18
|
}, forwardedRef) => {
|
|
18
19
|
var _a;
|
|
@@ -23,7 +24,11 @@ const Input = /* @__PURE__ */ forwardRef(({
|
|
|
23
24
|
status
|
|
24
25
|
} = useFormControl(), {
|
|
25
26
|
t
|
|
26
|
-
} = useTranslation(), inputRef = useRef(null), [currentLength, setCurrentLength] = useState(((_a = restProps.defaultValue) == null ? void 0 : _a.toString().length) || 0)
|
|
27
|
+
} = useTranslation(), inputRef = useRef(null), [currentLength, setCurrentLength] = useState(((_a = restProps.defaultValue) == null ? void 0 : _a.toString().length) || 0);
|
|
28
|
+
useLayoutEffect(() => {
|
|
29
|
+
inputRef.current && setCurrentLength(inputRef.current.value.length);
|
|
30
|
+
}, []);
|
|
31
|
+
const setRefs = (node) => {
|
|
27
32
|
inputRef.current = node, typeof forwardedRef == "function" ? forwardedRef(node) : forwardedRef && (forwardedRef.current = node);
|
|
28
33
|
}, wrapperClasses = clsx("input", {
|
|
29
34
|
"input--lg": size === "lg",
|
|
@@ -14,16 +14,22 @@ import useZendeskGuide from "../../hooks/useZendeskGuide/useZendeskGuide.js";
|
|
|
14
14
|
import useCantoo from "../../hooks/useCantoo/useCantoo.js";
|
|
15
15
|
import Alert from "../Alert/Alert.js";
|
|
16
16
|
import ButtonBeta from "../ButtonBeta/ButtonBeta.js";
|
|
17
|
-
|
|
17
|
+
import HelpZone from "../../modules/HelpZone/HelpZone.js";
|
|
18
|
+
const HeaderV2 = /* @__PURE__ */ lazy(() => import("../../modules/homepage/components/Header/Header.js"));
|
|
19
|
+
function getHeaderColor() {
|
|
20
|
+
return getComputedStyle(document.documentElement).getPropertyValue("--primitive-blue-400").trim();
|
|
21
|
+
}
|
|
22
|
+
const Layout = ({
|
|
18
23
|
children,
|
|
19
24
|
headless = !1,
|
|
20
25
|
whiteBg = !0,
|
|
21
26
|
className,
|
|
22
27
|
...restProps
|
|
23
28
|
}) => {
|
|
29
|
+
var _a;
|
|
24
30
|
const {
|
|
25
31
|
theme
|
|
26
|
-
} = useEdificeTheme(), override = useUiOverride("layout.header"), isHeaderV2 = (override == null ? void 0 : override.variant) === "v2", {
|
|
32
|
+
} = useEdificeTheme(), override = useUiOverride("layout.header"), isHeaderV2 = (override == null ? void 0 : override.variant) === "v2", isEdificeInProductHelp = ((_a = useUiOverride("layout.helpzone")) == null ? void 0 : _a.variant) === "edifice-in-product", {
|
|
27
33
|
productOverride,
|
|
28
34
|
background,
|
|
29
35
|
isBackgroundImageOverridden
|
|
@@ -35,8 +41,13 @@ const HeaderV2 = /* @__PURE__ */ lazy(() => import("../../modules/homepage/compo
|
|
|
35
41
|
showCookiesConsent,
|
|
36
42
|
handleConsultCookies,
|
|
37
43
|
handleCloseCookiesConsent
|
|
38
|
-
} = useCookiesConsent()
|
|
39
|
-
|
|
44
|
+
} = useCookiesConsent(), {
|
|
45
|
+
isReady: isHelpZoneReady,
|
|
46
|
+
isOpen: isHelpZoneOpen,
|
|
47
|
+
open: openHelpZone,
|
|
48
|
+
close: closeHelpZone
|
|
49
|
+
} = useZendeskGuide(isEdificeInProductHelp ? getHeaderColor() : void 0);
|
|
50
|
+
useCantoo();
|
|
40
51
|
const classes = clsx("d-flex flex-column", {
|
|
41
52
|
"bg-white": whiteBg,
|
|
42
53
|
"container-fluid": !headless,
|
|
@@ -50,7 +61,8 @@ const HeaderV2 = /* @__PURE__ */ lazy(() => import("../../modules/homepage/compo
|
|
|
50
61
|
renderNotificationsOverlay,
|
|
51
62
|
/* @__PURE__ */ jsx("main", { className: classes, ...restProps, children }),
|
|
52
63
|
renderToaster,
|
|
53
|
-
renderCookies
|
|
64
|
+
renderCookies,
|
|
65
|
+
isEdificeInProductHelp && /* @__PURE__ */ jsx(HelpZone, { isReady: isHelpZoneReady, isOpen: isHelpZoneOpen, onOpen: openHelpZone, onClose: closeHelpZone })
|
|
54
66
|
] });
|
|
55
67
|
};
|
|
56
68
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
export type LinkPillIllustrationType = 'icon' | 'img';
|
|
3
3
|
export type LinkPillIllustrationPosition = 'left' | 'right';
|
|
4
|
-
export interface LinkPillProps {
|
|
4
|
+
export interface LinkPillProps extends ComponentPropsWithoutRef<'a'> {
|
|
5
5
|
/**
|
|
6
6
|
* URL opened in a new tab when the pill is clicked.
|
|
7
7
|
*/
|
|
@@ -29,17 +29,13 @@ export interface LinkPillProps {
|
|
|
29
29
|
* Side the illustration is displayed on.
|
|
30
30
|
*/
|
|
31
31
|
illustrationPosition?: LinkPillIllustrationPosition;
|
|
32
|
-
/**
|
|
33
|
-
* Optional class for styling purpose
|
|
34
|
-
*/
|
|
35
|
-
className?: string;
|
|
36
32
|
}
|
|
37
33
|
/**
|
|
38
34
|
* LinkPill – design system component used to display a link to an
|
|
39
35
|
* external resource as a small rounded pill.
|
|
40
36
|
*/
|
|
41
37
|
declare const LinkPill: {
|
|
42
|
-
({ href, label, subtitle, illustration, illustrationType, illustrationPosition, className, }: LinkPillProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
({ href, label, subtitle, illustration, illustrationType, illustrationPosition, className, ...restProps }: LinkPillProps): import("react/jsx-runtime").JSX.Element;
|
|
43
39
|
displayName: string;
|
|
44
40
|
};
|
|
45
41
|
export default LinkPill;
|
|
@@ -8,13 +8,14 @@ const LinkPill = ({
|
|
|
8
8
|
illustration,
|
|
9
9
|
illustrationType = "icon",
|
|
10
10
|
illustrationPosition = "left",
|
|
11
|
-
className
|
|
11
|
+
className,
|
|
12
|
+
...restProps
|
|
12
13
|
}) => {
|
|
13
14
|
const illustrationNode = illustrationType === "icon" ? /* @__PURE__ */ jsx("span", { className: "link-pill-icon", children: illustration ?? /* @__PURE__ */ jsx(SvgIconLink, {}) }) : /* @__PURE__ */ jsx("span", { className: "link-pill-image", children: illustration }), contentNode = /* @__PURE__ */ jsxs("span", { className: "link-pill-content", children: [
|
|
14
15
|
/* @__PURE__ */ jsx("span", { className: "link-pill-label", title: label, children: label }),
|
|
15
16
|
subtitle && /* @__PURE__ */ jsx("span", { className: "link-pill-subtitle", title: subtitle, children: subtitle })
|
|
16
17
|
] });
|
|
17
|
-
return /* @__PURE__ */ jsx("a", { href, target: "_blank", rel: "noopener noreferrer", "data-testid": "link-pill", className: clsx("link-pill", `link-pill--illustration-${illustrationPosition}`, className), children: illustrationPosition === "left" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18
|
+
return /* @__PURE__ */ jsx("a", { href, target: "_blank", rel: "noopener noreferrer", "data-testid": "link-pill", className: clsx("link-pill", `link-pill--illustration-${illustrationPosition}`, className), ...restProps, children: illustrationPosition === "left" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18
19
|
illustrationNode,
|
|
19
20
|
contentNode
|
|
20
21
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
package/dist/homepage.js
CHANGED
|
@@ -20,6 +20,8 @@ import { UsefulLinks } from "./modules/homepage/components/UsefulLinks/UsefulLin
|
|
|
20
20
|
import { UsefulLinksContainer } from "./modules/homepage/components/UsefulLinks/UsefulLinksContainer.js";
|
|
21
21
|
import { UsefulLinksModal } from "./modules/homepage/components/UsefulLinks/UsefulLinksModal.js";
|
|
22
22
|
import { UserSpaceContainer } from "./modules/homepage/components/UserSpace/UserSpaceContainer.js";
|
|
23
|
+
import { WidgetToggle } from "./modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.js";
|
|
24
|
+
import { WidgetsPersonalizationPanel } from "./modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js";
|
|
23
25
|
export {
|
|
24
26
|
Favorites,
|
|
25
27
|
FavoritesContainer,
|
|
@@ -43,5 +45,7 @@ export {
|
|
|
43
45
|
UsefulLinksModal,
|
|
44
46
|
default10 as UserSpace,
|
|
45
47
|
UserSpaceContainer,
|
|
48
|
+
WidgetToggle,
|
|
49
|
+
WidgetsPersonalizationPanel,
|
|
46
50
|
useUsefulLinksContainer
|
|
47
51
|
};
|
|
@@ -9,6 +9,8 @@ export interface UseZendeskGuideAPI {
|
|
|
9
9
|
/**
|
|
10
10
|
* Add Zendesk Guide
|
|
11
11
|
*
|
|
12
|
-
* @param headerColor Overrides the widget panel's theme color.
|
|
12
|
+
* @param headerColor Overrides the widget panel's theme color. Can change
|
|
13
|
+
* across renders (e.g. once resolved from async platform config) — the
|
|
14
|
+
* widget is updated in place, no need to keep it stable.
|
|
13
15
|
*/
|
|
14
16
|
export default function useZendeskGuide(headerColor?: string): UseZendeskGuideAPI;
|
|
@@ -83,8 +83,7 @@ function useZendeskGuide(headerColor) {
|
|
|
83
83
|
}), Object.keys(zendeskGuideConfig.module).length > 0 && setDataModule(zendeskGuideConfig.module), window.zE("webWidget", "show"), window.zE("webWidget", "updateSettings", {
|
|
84
84
|
webWidget: {
|
|
85
85
|
color: {
|
|
86
|
-
theme: zendeskGuideConfig.color || "#ffc400"
|
|
87
|
-
header: headerColor
|
|
86
|
+
theme: headerColor || zendeskGuideConfig.color || "#ffc400"
|
|
88
87
|
},
|
|
89
88
|
zIndex: 3,
|
|
90
89
|
launcher: {
|
|
@@ -117,7 +116,15 @@ function useZendeskGuide(headerColor) {
|
|
|
117
116
|
};
|
|
118
117
|
}
|
|
119
118
|
})();
|
|
120
|
-
}, [hasSupportWorkflow]), {
|
|
119
|
+
}, [hasSupportWorkflow]), useEffect(() => {
|
|
120
|
+
!isReady || headerColor === void 0 || window.zE("webWidget", "updateSettings", {
|
|
121
|
+
webWidget: {
|
|
122
|
+
color: {
|
|
123
|
+
theme: headerColor
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}, [headerColor, isReady]), {
|
|
121
128
|
isReady,
|
|
122
129
|
isOpen,
|
|
123
130
|
open,
|