@edifice.io/react 2.5.3-develop-integration.20260109155948 → 2.5.3-develop-integration.20260115095207
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.
|
@@ -41,15 +41,14 @@ const Header = ({
|
|
|
41
41
|
} = useTranslation(), {
|
|
42
42
|
messages,
|
|
43
43
|
msgLink,
|
|
44
|
-
zimbraWorkflow
|
|
45
|
-
carbonioPreauth
|
|
44
|
+
zimbraWorkflow
|
|
46
45
|
} = useConversation(), {
|
|
47
46
|
user,
|
|
48
47
|
avatar
|
|
49
48
|
} = useUser(), {
|
|
50
49
|
currentLanguage,
|
|
51
50
|
currentApp
|
|
52
|
-
} = useEdificeClient(), hasOldHelpEnableWorkflow = useHasWorkflow("org.entcore.portal.controllers.PortalController|oldHelpEnable") || !1, {
|
|
51
|
+
} = useEdificeClient(), hasOldHelpEnableWorkflow = useHasWorkflow("org.entcore.portal.controllers.PortalController|oldHelpEnable") || !1, hasCarbonioPreauthWorkflow = useHasWorkflow("org.entcore.auth.controllers.CarbonioPreauthController|preauth") || !1, {
|
|
53
52
|
isModalOpen: isHelpOpen,
|
|
54
53
|
setIsModalOpen: setIsHelpOpen,
|
|
55
54
|
parsedContent,
|
|
@@ -94,7 +93,7 @@ const Header = ({
|
|
|
94
93
|
}, className: "position-absolute", children: messages }),
|
|
95
94
|
/* @__PURE__ */ jsx(VisuallyHidden, { children: t("navbar.messages") })
|
|
96
95
|
] }) }),
|
|
97
|
-
|
|
96
|
+
hasCarbonioPreauthWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { className: "position-relative", link: "/auth/carbonio/preauth", translate: t("conversation"), children: /* @__PURE__ */ jsx(SvgIconNeoMessaging, { color: "#fff" }) }) }),
|
|
98
97
|
/* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/userbook/mon-compte", className: "dropdown-item", translate: t("navbar.myaccount"), children: /* @__PURE__ */ jsx(SvgIconOneProfile, { className: "icon user" }) }) }),
|
|
99
98
|
currentLanguage === "fr" && hasOldHelpEnableWorkflow ? /* @__PURE__ */ jsxs(NavItem, { children: [
|
|
100
99
|
/* @__PURE__ */ jsxs("button", { className: "nav-link", onClick: () => {
|
|
@@ -155,7 +154,7 @@ const Header = ({
|
|
|
155
154
|
level: "warning"
|
|
156
155
|
}, className: "position-absolute", children: messages })
|
|
157
156
|
] }) }),
|
|
158
|
-
|
|
157
|
+
hasCarbonioPreauthWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { className: "position-relative", link: "/auth/carbonio/preauth", translate: t("conversation"), children: /* @__PURE__ */ jsx(SvgIconNeoMessaging, { color: "#fff" }) }) }),
|
|
159
158
|
currentLanguage === "fr" && hasOldHelpEnableWorkflow ? /* @__PURE__ */ jsxs(NavItem, { children: [
|
|
160
159
|
/* @__PURE__ */ jsxs("button", { className: "nav-link btn btn-naked", onClick: () => {
|
|
161
160
|
setIsHelpOpen(!0);
|
|
@@ -2,6 +2,5 @@ declare const useConversation: () => {
|
|
|
2
2
|
readonly messages: any;
|
|
3
3
|
readonly msgLink: string;
|
|
4
4
|
readonly zimbraWorkflow: boolean | Record<string, boolean> | undefined;
|
|
5
|
-
readonly carbonioPreauth: boolean | Record<string, boolean> | undefined;
|
|
6
5
|
};
|
|
7
6
|
export default useConversation;
|
|
@@ -3,14 +3,14 @@ import { odeServices } from "@edifice.io/client";
|
|
|
3
3
|
import { useQuery } from "@tanstack/react-query";
|
|
4
4
|
import useHasWorkflow from "../useHasWorkflow/useHasWorkflow.js";
|
|
5
5
|
const useConversation = () => {
|
|
6
|
-
const zimbraWorkflow = useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|view"), zimbraPreauth = useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|preauth"),
|
|
6
|
+
const zimbraWorkflow = useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|view"), zimbraPreauth = useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|preauth"), [msgLink, setMsgLink] = useState(""), queryParams = {
|
|
7
7
|
unread: !0,
|
|
8
8
|
_: (/* @__PURE__ */ new Date()).getTime()
|
|
9
9
|
}, {
|
|
10
10
|
data: messages
|
|
11
11
|
} = useQuery({
|
|
12
12
|
queryKey: ["folder", "count", "inbox"],
|
|
13
|
-
queryFn: async () =>
|
|
13
|
+
queryFn: async () => await odeServices.http().get(zimbraWorkflow ? "/zimbra/count/INBOX" : "/conversation/count/inbox", {
|
|
14
14
|
queryParams
|
|
15
15
|
}),
|
|
16
16
|
staleTime: 5 * 60 * 1e3
|
|
@@ -31,8 +31,7 @@ const useConversation = () => {
|
|
|
31
31
|
}, []), {
|
|
32
32
|
messages: messages ? messages.count : 0,
|
|
33
33
|
msgLink,
|
|
34
|
-
zimbraWorkflow
|
|
35
|
-
carbonioPreauth
|
|
34
|
+
zimbraWorkflow
|
|
36
35
|
};
|
|
37
36
|
};
|
|
38
37
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.5.3-develop-integration.
|
|
3
|
+
"version": "2.5.3-develop-integration.20260115095207",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -133,9 +133,9 @@
|
|
|
133
133
|
"react-slugify": "^3.0.3",
|
|
134
134
|
"swiper": "^10.1.0",
|
|
135
135
|
"ua-parser-js": "^1.0.36",
|
|
136
|
-
"@edifice.io/bootstrap": "2.5.3-develop-integration.
|
|
137
|
-
"@edifice.io/
|
|
138
|
-
"@edifice.io/
|
|
136
|
+
"@edifice.io/bootstrap": "2.5.3-develop-integration.20260115095207",
|
|
137
|
+
"@edifice.io/utilities": "2.5.3-develop-integration.20260115095207",
|
|
138
|
+
"@edifice.io/tiptap-extensions": "2.5.3-develop-integration.20260115095207"
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|
|
141
141
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
@@ -166,8 +166,8 @@
|
|
|
166
166
|
"vite": "^5.4.11",
|
|
167
167
|
"vite-plugin-dts": "^4.1.0",
|
|
168
168
|
"vite-tsconfig-paths": "^5.0.1",
|
|
169
|
-
"@edifice.io/
|
|
170
|
-
"@edifice.io/
|
|
169
|
+
"@edifice.io/client": "2.5.3-develop-integration.20260115095207",
|
|
170
|
+
"@edifice.io/config": "2.5.3-develop-integration.20260115095207"
|
|
171
171
|
},
|
|
172
172
|
"peerDependencies": {
|
|
173
173
|
"@react-spring/web": "^9.7.5",
|