@edifice.io/react 2.6.7-develop-integration.20261005091442 → 2.6.7-develop-b2school.20261005112514
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/Layout/Layout.js +21 -8
- package/dist/components/Tree/utilities/tree.js +1 -21
- package/dist/homepage.js +4 -0
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/useBackground/useBackground.d.ts +1 -0
- package/dist/hooks/useBackground/useBackground.js +2 -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/index.js +182 -194
- 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 +2 -1
- 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/multimedia/FileCard/index.d.ts +0 -4
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.d.ts +1 -7
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +0 -2
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +2 -2
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +12 -48
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.d.ts +0 -2
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +0 -4
- package/dist/modules/multimedia/Workspace/Workspace.js +5 -8
- package/dist/modules/multimedia/index.d.ts +0 -2
- package/dist/multimedia.js +18 -26
- package/package.json +6 -6
- package/dist/hooks/useGoogleDriveSearch/index.d.ts +0 -1
- package/dist/hooks/useGoogleDriveSearch/useGoogleDriveSearch.d.ts +0 -14
- package/dist/hooks/useGoogleDriveSearch/useGoogleDriveSearch.js +0 -60
- package/dist/hooks/useNextcloudSearch/index.d.ts +0 -1
- package/dist/hooks/useNextcloudSearch/useNextcloudSearch.d.ts +0 -14
- package/dist/hooks/useNextcloudSearch/useNextcloudSearch.js +0 -64
- package/dist/modules/multimedia/FileCard/GoogleDriveFileCard.d.ts +0 -25
- package/dist/modules/multimedia/FileCard/GoogleDriveFileCard.js +0 -102
- package/dist/modules/multimedia/FileCard/NextcloudFileCard.d.ts +0 -25
- package/dist/modules/multimedia/FileCard/NextcloudFileCard.js +0 -102
- package/dist/modules/multimedia/GoogleDrive/GoogleDrive.d.ts +0 -24
- package/dist/modules/multimedia/GoogleDrive/GoogleDrive.js +0 -100
- package/dist/modules/multimedia/GoogleDrive/index.d.ts +0 -2
- package/dist/modules/multimedia/MediaLibrary/innertabs/GoogleDrive.d.ts +0 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/GoogleDrive.js +0 -61
- package/dist/modules/multimedia/MediaLibrary/innertabs/Nextcloud.d.ts +0 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/Nextcloud.js +0 -48
- package/dist/modules/multimedia/Nextcloud/Nextcloud.d.ts +0 -24
- package/dist/modules/multimedia/Nextcloud/Nextcloud.js +0 -124
- package/dist/modules/multimedia/Nextcloud/index.d.ts +0 -2
|
@@ -14,19 +14,26 @@ 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
|
-
isBackgroundImageOverridden
|
|
35
|
+
isBackgroundImageOverridden,
|
|
36
|
+
betaEnabled
|
|
30
37
|
} = useBackground(), {
|
|
31
38
|
toggleOverlay
|
|
32
39
|
} = useOverlay(), toast = useToast(), {
|
|
@@ -35,22 +42,28 @@ const HeaderV2 = /* @__PURE__ */ lazy(() => import("../../modules/homepage/compo
|
|
|
35
42
|
showCookiesConsent,
|
|
36
43
|
handleConsultCookies,
|
|
37
44
|
handleCloseCookiesConsent
|
|
38
|
-
} = useCookiesConsent()
|
|
39
|
-
|
|
45
|
+
} = useCookiesConsent(), {
|
|
46
|
+
isReady: isHelpZoneReady,
|
|
47
|
+
isOpen: isHelpZoneOpen,
|
|
48
|
+
open: openHelpZone,
|
|
49
|
+
close: closeHelpZone
|
|
50
|
+
} = useZendeskGuide(isEdificeInProductHelp ? getHeaderColor() : void 0);
|
|
51
|
+
useCantoo();
|
|
40
52
|
const classes = clsx("d-flex flex-column", {
|
|
41
53
|
"bg-white": whiteBg,
|
|
42
54
|
"container-fluid": !headless,
|
|
43
55
|
"rounded-4 border": (theme == null ? void 0 : theme.is1d) && !headless,
|
|
44
56
|
"mt-24": (theme == null ? void 0 : theme.is1d) && !headless
|
|
45
|
-
}, 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(ButtonBeta, { variant: "outline", onClick: handleConsultCookies, children: t("rgpd.cookies.banner.button.consult") }), onClose: handleCloseCookiesConsent, children: t("rgpd.cookies.banner.text1") }), renderToaster = toast.renderToaster();
|
|
46
|
-
return /* @__PURE__ */ jsxs("div", { "data-product": productOverride, "data-background":
|
|
57
|
+
}, 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(ButtonBeta, { variant: "outline", onClick: handleConsultCookies, children: t("rgpd.cookies.banner.button.consult") }), onClose: handleCloseCookiesConsent, children: t("rgpd.cookies.banner.text1") }), renderToaster = toast.renderToaster(), isBackgroundHidden = !!(theme != null && theme.is1d || !betaEnabled);
|
|
58
|
+
return /* @__PURE__ */ jsxs("div", { "data-product": productOverride, "data-background": isBackgroundHidden ? void 0 : background, className: clsx("layout", {
|
|
47
59
|
"layout-has-background-image": isBackgroundImageOverridden
|
|
48
60
|
}), children: [
|
|
49
61
|
renderHeader,
|
|
50
62
|
renderNotificationsOverlay,
|
|
51
63
|
/* @__PURE__ */ jsx("main", { className: classes, ...restProps, children }),
|
|
52
64
|
renderToaster,
|
|
53
|
-
renderCookies
|
|
65
|
+
renderCookies,
|
|
66
|
+
isEdificeInProductHelp && /* @__PURE__ */ jsx(HelpZone, { isReady: isHelpZoneReady, isOpen: isHelpZoneOpen, onOpen: openHelpZone, onClose: closeHelpZone })
|
|
54
67
|
] });
|
|
55
68
|
};
|
|
56
69
|
export {
|
|
@@ -16,25 +16,6 @@ function findNodeById(data, id) {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
function modifyNode(data, callback) {
|
|
20
|
-
return doModify(data, callback) || data;
|
|
21
|
-
}
|
|
22
|
-
function doModify(current, callback, parent) {
|
|
23
|
-
var _a;
|
|
24
|
-
const result = callback(current, parent);
|
|
25
|
-
if ((_a = result == null ? void 0 : result.children) != null && _a.length) {
|
|
26
|
-
const children = [];
|
|
27
|
-
for (const child of (result == null ? void 0 : result.children) || []) {
|
|
28
|
-
const res = doModify(child, callback, result);
|
|
29
|
-
res && children.push(res);
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
...result,
|
|
33
|
-
children
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
return result;
|
|
37
|
-
}
|
|
38
19
|
function findPathById(tree, nodeId) {
|
|
39
20
|
let path = [];
|
|
40
21
|
function traverse(node, currentPath) {
|
|
@@ -59,6 +40,5 @@ function findPathById(tree, nodeId) {
|
|
|
59
40
|
}
|
|
60
41
|
export {
|
|
61
42
|
findNodeById,
|
|
62
|
-
findPathById
|
|
63
|
-
modifyNode
|
|
43
|
+
findPathById
|
|
64
44
|
};
|
package/dist/homepage.js
CHANGED
|
@@ -24,6 +24,8 @@ import { UsefulLinks } from "./modules/homepage/components/UsefulLinks/UsefulLin
|
|
|
24
24
|
import { UsefulLinksContainer } from "./modules/homepage/components/UsefulLinks/UsefulLinksContainer.js";
|
|
25
25
|
import { UsefulLinksModal } from "./modules/homepage/components/UsefulLinks/UsefulLinksModal.js";
|
|
26
26
|
import { UserSpaceContainer } from "./modules/homepage/components/UserSpace/UserSpaceContainer.js";
|
|
27
|
+
import { WidgetToggle } from "./modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.js";
|
|
28
|
+
import { WidgetsPersonalizationPanel } from "./modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js";
|
|
27
29
|
import { useCommunities } from "./modules/homepage/components/Communities/useCommunities.js";
|
|
28
30
|
export {
|
|
29
31
|
default2 as Communities,
|
|
@@ -52,6 +54,8 @@ export {
|
|
|
52
54
|
UsefulLinksModal,
|
|
53
55
|
default13 as UserSpace,
|
|
54
56
|
UserSpaceContainer,
|
|
57
|
+
WidgetToggle,
|
|
58
|
+
WidgetsPersonalizationPanel,
|
|
55
59
|
useCommunities,
|
|
56
60
|
useUsefulLinksContainer
|
|
57
61
|
};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export * from './useDirectory';
|
|
|
12
12
|
export * from './useDropdown';
|
|
13
13
|
export * from './useDropzone';
|
|
14
14
|
export * from './useEdificeIcons';
|
|
15
|
-
export * from './useGoogleDriveSearch';
|
|
16
15
|
export * from './useHasWorkflow';
|
|
17
16
|
export * from './useHover';
|
|
18
17
|
export * from './useHttpErrorToast';
|
|
@@ -24,7 +23,6 @@ export * from './useIsAdmlcOrAdmc';
|
|
|
24
23
|
export * from './useKeyPress';
|
|
25
24
|
export * from './useLibraryUrl';
|
|
26
25
|
export * from './useMediaLibrary';
|
|
27
|
-
export * from './useNextcloudSearch';
|
|
28
26
|
export * from './usePublicConf';
|
|
29
27
|
export * from './useScreeb';
|
|
30
28
|
export * from './useScrollToTop';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type Background = 'default' | 'pink-200' | 'yellow-200' | 'orange-200' | 'blue-200' | 'green-200';
|
|
2
2
|
declare const _default: () => {
|
|
3
|
+
betaEnabled: boolean | undefined;
|
|
3
4
|
background: Background;
|
|
4
5
|
isBackgroundImageOverridden: boolean;
|
|
5
6
|
productOverride: string | undefined;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import useUiOverride from "../useUiOverride/useUiOverride.js";
|
|
2
2
|
import useUserPreferences from "../useUserPreferences/useUserPreferences.js";
|
|
3
3
|
const useBackground = () => {
|
|
4
|
+
var _a;
|
|
4
5
|
const backgroundOverride = useUiOverride("layout.background"), backgroundDefault = useUiOverride("background.default"), {
|
|
5
6
|
preferences
|
|
6
7
|
} = useUserPreferences(), isBackgroundImageOverridden = (backgroundOverride == null ? void 0 : backgroundOverride.variant) === "image";
|
|
7
8
|
return {
|
|
9
|
+
betaEnabled: (_a = preferences == null ? void 0 : preferences.homePage) == null ? void 0 : _a.betaEnabled,
|
|
8
10
|
/* Actual background is either : user's prefered value, theme-conf overriden value or 'default' */
|
|
9
11
|
background: (preferences == null ? void 0 : preferences.background) ?? (backgroundDefault == null ? void 0 : backgroundDefault.variant) ?? "default",
|
|
10
12
|
isBackgroundImageOverridden,
|
|
@@ -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,
|