@edifice.io/react 2.2.1-develop-integration-nabook.20250327193001 → 2.2.1-develop-integration-nabook.20250327193455

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.
@@ -54,7 +54,7 @@ const Header = ({
54
54
  parsedContent,
55
55
  parsedHeadline,
56
56
  error
57
- } = useHelp(), classes = clsx("header", {
57
+ } = useHelp(hasOldHelpEnableWorkflow), classes = clsx("header", {
58
58
  "no-2d": is1d,
59
59
  "no-1d": !is1d
60
60
  }), {
@@ -1,4 +1,4 @@
1
- export declare function useHelp(): {
1
+ export declare function useHelp(hasOldHelpEnableWorkflow: boolean | Record<string, boolean>): {
2
2
  html: string;
3
3
  visibility: boolean;
4
4
  isModalOpen: boolean;
@@ -5,7 +5,7 @@ import SvgIconBurgerMenu from "../../../modules/icons/components/IconBurgerMenu.
5
5
  import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
6
6
  import { useEdificeTheme } from "../../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
7
7
  import Button from "../../Button/Button.js";
8
- function useHelp() {
8
+ function useHelp(hasOldHelpEnableWorkflow) {
9
9
  var _a, _b, _c, _d, _e;
10
10
  const {
11
11
  appCode
@@ -13,7 +13,7 @@ function useHelp() {
13
13
  theme
14
14
  } = useEdificeTheme(), [html, setHtml] = useState(""), [visibility, setVisibility] = useState(!0), [activeSection, setActiveSection] = useState("présentation"), [isModalOpen, setIsModalOpen] = useState(!1), [error, setError] = useState(!1), helpPath = theme != null && theme.is1d ? "/help-1d" : "/help-2d";
15
15
  useEffect(() => {
16
- (async () => {
16
+ hasOldHelpEnableWorkflow && (async () => {
17
17
  let helpURL = "";
18
18
  helpURL = helpPath + "/application/" + appCode + "/", !appCode && window.location.pathname !== "/adapter" ? helpURL = helpPath + "/application/portal/" : window.location.pathname === "/adapter" ? helpURL = helpPath + "/application/" + window.location.search.split("eliot=")[1].split("&")[0] + "/" : window.location.pathname.includes("/directory/class-admin") ? helpURL = helpPath + "/application/parametrage-de-la-classe/" : (window.location.pathname.includes("/userbook/mon-compte") || window.location.pathname.includes("/timeline/preferencesView") || window.location.pathname.includes("/timeline/historyView")) && (helpURL = helpPath + "/application/userbook/");
19
19
  try {
@@ -30,7 +30,8 @@ function useHelp() {
30
30
  }, [appCode, helpPath]);
31
31
  const parsedHTML = parse(html, {
32
32
  replace: (domNode) => {
33
- const typedDomNode = domNode, isActive = typedDomNode.attribs.id === activeSection;
33
+ var _a2;
34
+ const typedDomNode = domNode, isActive = ((_a2 = typedDomNode.attribs) == null ? void 0 : _a2.id) === activeSection;
34
35
  if (typedDomNode.attribs && typedDomNode.attribs.id === "TOC")
35
36
  return /* @__PURE__ */ jsxs("nav", { id: "TOC", children: [
36
37
  /* @__PURE__ */ jsx(Button, { onClick: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.2.1-develop-integration-nabook.20250327193001",
3
+ "version": "2.2.1-develop-integration-nabook.20250327193455",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -118,9 +118,9 @@
118
118
  "react-slugify": "^3.0.3",
119
119
  "swiper": "^10.1.0",
120
120
  "ua-parser-js": "^1.0.36",
121
- "@edifice.io/bootstrap": "2.2.1-develop-integration-nabook.20250327193001",
122
- "@edifice.io/tiptap-extensions": "2.2.1-develop-integration-nabook.20250327193001",
123
- "@edifice.io/utilities": "2.2.1-develop-integration-nabook.20250327193001"
121
+ "@edifice.io/bootstrap": "2.2.1-develop-integration-nabook.20250327193455",
122
+ "@edifice.io/tiptap-extensions": "2.2.1-develop-integration-nabook.20250327193455",
123
+ "@edifice.io/utilities": "2.2.1-develop-integration-nabook.20250327193455"
124
124
  },
125
125
  "devDependencies": {
126
126
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -151,8 +151,8 @@
151
151
  "vite": "^5.4.11",
152
152
  "vite-plugin-dts": "^4.1.0",
153
153
  "vite-tsconfig-paths": "^5.0.1",
154
- "@edifice.io/client": "2.2.1-develop-integration-nabook.20250327193001",
155
- "@edifice.io/config": "2.2.1-develop-integration-nabook.20250327193001"
154
+ "@edifice.io/client": "2.2.1-develop-integration-nabook.20250327193455",
155
+ "@edifice.io/config": "2.2.1-develop-integration-nabook.20250327193455"
156
156
  },
157
157
  "peerDependencies": {
158
158
  "@react-spring/web": "^9.7.5",