@edifice.io/react 2.6.6 → 2.6.7-develop-b2school.20260928143952
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/Alert/Alert.js +47 -23
- package/dist/components/Form/FormText.js +11 -6
- package/dist/components/Input/Input.d.ts +11 -2
- package/dist/components/Input/Input.js +43 -21
- package/dist/components/Label/Label.js +4 -4
- package/dist/components/Layout/Layout.js +30 -15
- package/dist/components/LinkPill/LinkPill.d.ts +41 -0
- package/dist/components/LinkPill/LinkPill.js +28 -0
- package/dist/components/LinkPill/index.d.ts +2 -0
- package/dist/components/ModalBeta/ModalBeta.d.ts +47 -0
- package/dist/components/ModalBeta/ModalBeta.js +62 -0
- package/dist/components/ModalBeta/ModalBetaBody.d.ts +19 -0
- package/dist/components/ModalBeta/ModalBetaBody.js +15 -0
- package/dist/components/ModalBeta/ModalBetaContext.d.ts +7 -0
- package/dist/components/ModalBeta/ModalBetaContext.js +15 -0
- package/dist/components/ModalBeta/ModalBetaFooter.d.ts +13 -0
- package/dist/components/ModalBeta/ModalBetaFooter.js +7 -0
- package/dist/components/ModalBeta/ModalBetaHeader.d.ts +23 -0
- package/dist/components/ModalBeta/ModalBetaHeader.js +31 -0
- package/dist/components/ModalBeta/index.d.ts +2 -0
- package/dist/components/PageLayout/PageLayout.d.ts +4 -0
- package/dist/components/PageLayout/PageLayout.js +37 -14
- package/dist/components/PageLayout/components/PageLayoutContent.js +5 -1
- package/dist/components/PageLayout/components/PageLayoutHelpZone.d.ts +12 -0
- package/dist/components/PageLayout/components/PageLayoutHelpZone.js +6 -0
- package/dist/components/Table/components/Table.d.ts +2 -2
- package/dist/components/Table/components/TableTd.d.ts +1 -1
- package/dist/components/Table/components/TableTh.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/homepage.js +44 -19
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useBackground/index.d.ts +1 -0
- package/dist/hooks/useBackground/useBackground.d.ts +7 -0
- package/dist/hooks/useBackground/useBackground.js +16 -0
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +1 -1
- package/dist/hooks/useClickOutside/useClickOutside.js +3 -2
- package/dist/hooks/useToast/useToast.d.ts +1 -0
- package/dist/hooks/useToast/useToast.js +12 -9
- package/dist/hooks/useUserPreferences/index.d.ts +1 -0
- package/dist/hooks/useUserPreferences/useUserPreferences.d.ts +9 -0
- package/dist/hooks/useUserPreferences/useUserPreferences.js +40 -0
- package/dist/hooks/useZendeskGuide/useZendeskGuide.d.ts +16 -2
- package/dist/hooks/useZendeskGuide/useZendeskGuide.js +58 -24
- package/dist/icons.js +404 -402
- package/dist/index.js +168 -160
- package/dist/modules/HelpZone/HelpZone.d.ts +13 -0
- package/dist/modules/HelpZone/HelpZone.js +52 -0
- package/dist/modules/HelpZone/HelpZoneContainer.d.ts +4 -0
- package/dist/modules/HelpZone/HelpZoneContainer.js +18 -0
- package/dist/modules/HelpZone/index.d.ts +3 -0
- package/dist/modules/homepage/components/Communities/Communities.js +35 -0
- package/dist/modules/homepage/components/Communities/CommunitiesContainer.d.ts +4 -2
- package/dist/modules/homepage/components/Communities/CommunitiesContainer.js +31 -0
- package/dist/modules/homepage/components/Communities/CommunitiesSkeleton.js +32 -0
- package/dist/modules/homepage/components/Communities/CommunityItem.d.ts +2 -1
- package/dist/modules/homepage/components/Communities/CommunityItem.js +28 -0
- package/dist/modules/homepage/components/Communities/useCommunities.d.ts +1 -4
- package/dist/modules/homepage/components/Communities/useCommunities.js +25 -0
- package/dist/modules/homepage/components/Favorites/Favorites.js +2 -2
- package/dist/modules/homepage/components/Header/Header.js +11 -4
- 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/Notifications/components/NotificationFilterModal.js +36 -26
- package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.js +1 -1
- package/dist/modules/homepage/components/Notifications/services/queries/notification.js +9 -2
- package/dist/modules/homepage/components/UsefulLinks/LinkForm.d.ts +13 -0
- package/dist/modules/homepage/components/UsefulLinks/LinkForm.js +67 -0
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.d.ts +6 -0
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.js +31 -0
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinksContainer.d.ts +1 -0
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinksContainer.js +40 -0
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.d.ts +11 -0
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.js +65 -0
- package/dist/modules/homepage/components/UsefulLinks/hooks/useUsefulLinksContainer.d.ts +19 -0
- package/dist/modules/homepage/components/UsefulLinks/hooks/useUsefulLinksContainer.js +26 -0
- package/dist/modules/homepage/components/UsefulLinks/index.d.ts +5 -0
- package/dist/modules/homepage/components/UsefulLinks/services/api/index.d.ts +6 -0
- package/dist/modules/homepage/components/UsefulLinks/services/api/index.js +5 -0
- package/dist/modules/homepage/components/UsefulLinks/services/api/usefulLinksService.d.ts +31 -0
- package/dist/modules/homepage/components/UsefulLinks/services/api/usefulLinksService.js +50 -0
- package/dist/modules/homepage/components/UsefulLinks/services/queries/usefulLinks.d.ts +20 -0
- package/dist/modules/homepage/components/UsefulLinks/services/queries/usefulLinks.js +65 -0
- 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/UserSpace/hooks/useProfileLinks.js +18 -8
- 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 +3 -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/dist/modules/icons/components/logo/IconLogoEdificeFull.d.ts +7 -0
- package/dist/modules/icons/components/logo/IconLogoEdificeFull.js +26 -0
- package/dist/modules/icons/components/logo/IconLogoEdificeSmall.d.ts +7 -0
- package/dist/modules/icons/components/logo/IconLogoEdificeSmall.js +17 -0
- package/dist/modules/icons/components/logo/index.d.ts +2 -0
- package/dist/modules/widgets/index.d.ts +1 -1
- package/package.json +6 -6
|
@@ -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() {
|
|
8
|
+
function useZendeskGuide(headerColor) {
|
|
9
9
|
const {
|
|
10
10
|
currentLanguage
|
|
11
11
|
} = useEdificeClient(), {
|
|
@@ -14,7 +14,13 @@ function useZendeskGuide() {
|
|
|
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),
|
|
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 = () => {
|
|
18
24
|
const modulePathnameSplit = locationPathname.split("/");
|
|
19
25
|
let moduleLabel = "", labels = "";
|
|
20
26
|
if (dataModule != null && dataModule.labels && Object.keys(dataModule == null ? void 0 : dataModule.labels).length > 0 && modulePathnameSplit.length > 1) {
|
|
@@ -33,8 +39,40 @@ function useZendeskGuide() {
|
|
|
33
39
|
return useEffect(() => {
|
|
34
40
|
window.location.pathname !== locationPathname && setLocationPathname(window.location.pathname), !(dataModule === void 0 || Object.keys(dataModule).length === 0) && setZendeskGuideLabels();
|
|
35
41
|
}, [window.location.pathname, dataModule]), useEffect(() => {
|
|
36
|
-
|
|
37
|
-
|
|
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
|
+
}
|
|
38
76
|
if (zendeskGuideConfig && zendeskGuideConfig.key && zendeskGuideConfig.key !== "") {
|
|
39
77
|
const scriptZendesk = document.createElement("script");
|
|
40
78
|
scriptZendesk.id = "ze-snippet", scriptZendesk.src = `https://static.zdassets.com/ekr/snippet.js?key=${zendeskGuideConfig.key}`, document.body.appendChild(scriptZendesk).onload = () => {
|
|
@@ -45,7 +83,7 @@ function useZendeskGuide() {
|
|
|
45
83
|
}), Object.keys(zendeskGuideConfig.module).length > 0 && setDataModule(zendeskGuideConfig.module), window.zE("webWidget", "show"), window.zE("webWidget", "updateSettings", {
|
|
46
84
|
webWidget: {
|
|
47
85
|
color: {
|
|
48
|
-
theme: zendeskGuideConfig.color || "#ffc400"
|
|
86
|
+
theme: headerColor || zendeskGuideConfig.color || "#ffc400"
|
|
49
87
|
},
|
|
50
88
|
zIndex: 3,
|
|
51
89
|
launcher: {
|
|
@@ -74,28 +112,24 @@ function useZendeskGuide() {
|
|
|
74
112
|
}
|
|
75
113
|
}
|
|
76
114
|
});
|
|
77
|
-
}),
|
|
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
|
-
});
|
|
115
|
+
}), registerWidgetHandlers(), setIsReady(!0);
|
|
95
116
|
};
|
|
96
117
|
}
|
|
97
118
|
})();
|
|
98
|
-
}, [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]), {
|
|
128
|
+
isReady,
|
|
129
|
+
isOpen,
|
|
130
|
+
open,
|
|
131
|
+
close
|
|
132
|
+
};
|
|
99
133
|
}
|
|
100
134
|
export {
|
|
101
135
|
useZendeskGuide as default
|