@edifice.io/react 2.5.10-develop-pedago.20260217165817 → 2.5.10-develop-b2school.20260218115154

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.
Files changed (120) hide show
  1. package/dist/components/Badge/Badge.js +10 -1
  2. package/dist/components/Layout/components/WidgetApps.js +2 -2
  3. package/dist/components/MediaViewer/PdfViewer.js +14 -4
  4. package/dist/components/index.d.ts +0 -1
  5. package/dist/hooks/useBrowserInfo/useBrowserInfo.d.ts +4 -3
  6. package/dist/hooks/useBrowserInfo/useBrowserInfo.js +1 -1
  7. package/dist/hooks/useConf/useConf.d.ts +1 -1
  8. package/dist/hooks/usePreferences/usePreferences.d.ts +3 -3
  9. package/dist/hooks/useSession/useSession.d.ts +1 -1
  10. package/dist/hooks/useToast/useToast.js +5 -5
  11. package/dist/icons.js +298 -302
  12. package/dist/index.js +0 -4
  13. package/dist/modules/icons/components/index.d.ts +0 -2
  14. package/dist/modules/modals/OnboardingModal/OnboardingModal.d.ts +28 -2
  15. package/dist/modules/modals/OnboardingModal/OnboardingModal.js +11 -7
  16. package/dist/modules/modals/OnboardingModal/useOnboardingModal.d.ts +4 -1
  17. package/dist/modules/modals/OnboardingModal/useOnboardingModal.js +24 -17
  18. package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -1
  19. package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +1 -1
  20. package/dist/modules/modals/ShareModal/ShareResources.d.ts +1 -1
  21. package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
  22. package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +1 -1
  23. package/dist/providers/AntThemeProvider/AntProvider.js +5 -5
  24. package/dist/providers/EdificeClientProvider/EdificeClientProvider.context.d.ts +1 -1
  25. package/dist/utilities/react-query/react-query-utils.d.ts +1 -1
  26. package/package.json +6 -6
  27. package/dist/_virtual/common.js +0 -4
  28. package/dist/_virtual/de_DE.js +0 -4
  29. package/dist/_virtual/de_DE2.js +0 -4
  30. package/dist/_virtual/de_DE3.js +0 -4
  31. package/dist/_virtual/de_DE4.js +0 -4
  32. package/dist/_virtual/de_DE5.js +0 -4
  33. package/dist/_virtual/de_DE6.js +0 -4
  34. package/dist/_virtual/defineProperty.js +0 -4
  35. package/dist/_virtual/es_ES.js +0 -4
  36. package/dist/_virtual/es_ES2.js +0 -4
  37. package/dist/_virtual/es_ES3.js +0 -4
  38. package/dist/_virtual/es_ES4.js +0 -4
  39. package/dist/_virtual/es_ES5.js +0 -4
  40. package/dist/_virtual/es_ES6.js +0 -4
  41. package/dist/_virtual/fr_FR.js +0 -4
  42. package/dist/_virtual/fr_FR2.js +0 -4
  43. package/dist/_virtual/fr_FR3.js +0 -4
  44. package/dist/_virtual/fr_FR4.js +0 -4
  45. package/dist/_virtual/fr_FR5.js +0 -4
  46. package/dist/_virtual/fr_FR6.js +0 -4
  47. package/dist/_virtual/interopRequireDefault.js +0 -4
  48. package/dist/_virtual/it_IT.js +0 -4
  49. package/dist/_virtual/it_IT2.js +0 -4
  50. package/dist/_virtual/it_IT3.js +0 -4
  51. package/dist/_virtual/it_IT4.js +0 -4
  52. package/dist/_virtual/it_IT5.js +0 -4
  53. package/dist/_virtual/it_IT6.js +0 -4
  54. package/dist/_virtual/objectSpread2.js +0 -4
  55. package/dist/_virtual/pt_PT.js +0 -4
  56. package/dist/_virtual/pt_PT2.js +0 -4
  57. package/dist/_virtual/pt_PT3.js +0 -4
  58. package/dist/_virtual/pt_PT4.js +0 -4
  59. package/dist/_virtual/pt_PT5.js +0 -4
  60. package/dist/_virtual/pt_PT6.js +0 -4
  61. package/dist/_virtual/toPrimitive.js +0 -4
  62. package/dist/_virtual/toPropertyKey.js +0 -4
  63. package/dist/_virtual/typeof.js +0 -4
  64. package/dist/components/AddAttachments/AddAttachments.d.ts +0 -21
  65. package/dist/components/AddAttachments/AddAttachments.js +0 -75
  66. package/dist/components/AddAttachments/components/AddAttachmentToWorkspaceModal.d.ts +0 -9
  67. package/dist/components/AddAttachments/components/AddAttachmentToWorkspaceModal.js +0 -41
  68. package/dist/components/AddAttachments/components/SingleAttachment.d.ts +0 -13
  69. package/dist/components/AddAttachments/components/SingleAttachment.js +0 -27
  70. package/dist/components/AddAttachments/hooks/useFileToAttachment.d.ts +0 -3
  71. package/dist/components/AddAttachments/hooks/useFileToAttachment.js +0 -16
  72. package/dist/components/AddAttachments/index.d.ts +0 -2
  73. package/dist/components/AddAttachments/models/attachment.d.ts +0 -10
  74. package/dist/modules/icons/components/IconCollect.d.ts +0 -7
  75. package/dist/modules/icons/components/IconCollect.js +0 -12
  76. package/dist/modules/icons/components/IconSubmission.d.ts +0 -7
  77. package/dist/modules/icons/components/IconSubmission.js +0 -12
  78. package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/defineProperty.js +0 -18
  79. package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/interopRequireDefault.js +0 -13
  80. package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/objectSpread2.js +0 -31
  81. package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -20
  82. package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -15
  83. package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/typeof.js +0 -16
  84. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/de_DE.js +0 -11
  85. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/es_ES.js +0 -11
  86. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/fr_FR.js +0 -11
  87. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/it_IT.js +0 -11
  88. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/pt_PT.js +0 -11
  89. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/de_DE.js +0 -22
  90. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/es_ES.js +0 -22
  91. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/fr_FR.js +0 -27
  92. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/it_IT.js +0 -20
  93. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/pt_PT.js +0 -45
  94. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/de_DE.js +0 -145
  95. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/es_ES.js +0 -145
  96. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/fr_FR.js +0 -144
  97. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/it_IT.js +0 -156
  98. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/pt_PT.js +0 -158
  99. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/de_DE.js +0 -10
  100. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/es_ES.js +0 -10
  101. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/fr_FR.js +0 -10
  102. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/it_IT.js +0 -10
  103. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/pt_PT.js +0 -10
  104. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/de_DE.js +0 -8
  105. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/es_ES.js +0 -8
  106. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/fr_FR.js +0 -8
  107. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/it_IT.js +0 -8
  108. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/pt_PT.js +0 -8
  109. package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/de_DE.js +0 -21
  110. package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/es_ES.js +0 -21
  111. package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/fr_FR.js +0 -21
  112. package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/it_IT.js +0 -21
  113. package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/pt_PT.js +0 -21
  114. package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/common.js +0 -14
  115. package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/de_DE.js +0 -37
  116. package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/es_ES.js +0 -37
  117. package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/fr_FR.js +0 -38
  118. package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/it_IT.js +0 -37
  119. package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/pt_PT.js +0 -39
  120. package/dist/types/color.d.ts +0 -3
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { default as default2 } from "./components/ActionBar/ActionBar.js";
2
- import { AddAttachments } from "./components/AddAttachments/AddAttachments.js";
3
2
  import { default as default3 } from "./components/Alert/Alert.js";
4
3
  import { default as default4 } from "./components/AppHeader/AppHeader.js";
5
4
  import { default as default5 } from "./components/AppIcon/AppIcon.js";
@@ -141,13 +140,11 @@ import { mergeRefs, setRef } from "./utilities/refs/ref.js";
141
140
  import { useCheckable } from "./hooks/useCheckable/useCheckable.js";
142
141
  import { useEdificeClient } from "./providers/EdificeClientProvider/EdificeClientProvider.hook.js";
143
142
  import { useEdificeTheme } from "./providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
144
- import { useFileToAttachment } from "./components/AddAttachments/hooks/useFileToAttachment.js";
145
143
  import { useTreeSortable } from "./components/Tree/hooks/useTreeSortable.js";
146
144
  import { useTreeView } from "./components/TreeView/hooks/useTreeView.js";
147
145
  export {
148
146
  AccessiblePalette,
149
147
  default2 as ActionBar,
150
- AddAttachments,
151
148
  default3 as Alert,
152
149
  AntProvider,
153
150
  default4 as AppHeader,
@@ -292,7 +289,6 @@ export {
292
289
  useEdificeClient,
293
290
  default85 as useEdificeIcons,
294
291
  useEdificeTheme,
295
- useFileToAttachment,
296
292
  default86 as useHasWorkflow,
297
293
  default87 as useHover,
298
294
  default88 as useHttpErrorToast,
@@ -32,7 +32,6 @@ export { default as IconClock } from './IconClock';
32
32
  export { default as IconCloseFullScreen } from './IconCloseFullScreen';
33
33
  export { default as IconClose } from './IconClose';
34
34
  export { default as IconCode } from './IconCode';
35
- export { default as IconCollect } from './IconCollect';
36
35
  export { default as IconCopy } from './IconCopy';
37
36
  export { default as IconCrop } from './IconCrop';
38
37
  export { default as IconCut } from './IconCut';
@@ -141,7 +140,6 @@ export { default as IconSplitCells } from './IconSplitCells';
141
140
  export { default as IconSquareRoot } from './IconSquareRoot';
142
141
  export { default as IconStarFull } from './IconStarFull';
143
142
  export { default as IconStar } from './IconStar';
144
- export { default as IconSubmission } from './IconSubmission';
145
143
  export { default as IconSubmitToValidate } from './IconSubmitToValidate';
146
144
  export { default as IconSubscript } from './IconSubscript';
147
145
  export { default as IconSuccessFill } from './IconSuccessFill';
@@ -38,11 +38,37 @@ export interface OnboardingModalRef {
38
38
  setIsOpen: (isOpen: boolean) => void;
39
39
  handleSavePreference: () => void;
40
40
  }
41
- interface OnboardingProps {
41
+ /**
42
+ * Result of a custom display check. Must contain the following data :
43
+ * - display: a boolean indicating whether the modal should be shown when truthy or hidden if falsy;
44
+ * - nextState: the next state to persist when onboarding is done.
45
+ */
46
+ export interface DisplayRuleCheckResult<T> {
47
+ display: boolean;
48
+ nextState: T;
49
+ }
50
+ export interface OnboardingProps<T = boolean> {
42
51
  id: string;
43
52
  items: ModalItemsProps[];
44
53
  modalOptions?: ModalOptionsProps;
45
54
  isOnboardingChange?: (isOnboarding: boolean) => void;
55
+ /**
56
+ * Allow the parent component to control the rule for showing/hiding the modal.
57
+ *
58
+ * If undefined, the component will manage a visible/hidden state on its own.
59
+ *
60
+ * If defined, this function is called with the previously known state (if any).
61
+ * It can then compute the next state and return a DisplayRuleCheckResult.
62
+ *
63
+ * Note that the user may close the modal without finishing their onboarding.
64
+ * In this case, the next state is not persisted.
65
+ */
66
+ onDisplayRuleCheck?: (previousState?: T) => DisplayRuleCheckResult<T>;
46
67
  }
47
- declare const OnboardingModal: import('react').ForwardRefExoticComponent<OnboardingProps & import('react').RefAttributes<OnboardingModalRef>>;
68
+ declare const OnboardingModalInner: <T = boolean>({ id, items, modalOptions, isOnboardingChange, onDisplayRuleCheck, }: OnboardingProps<T>, ref: React.Ref<OnboardingModalRef>) => import('react').ReactPortal | null;
69
+ declare const OnboardingModal: (<T = boolean>(props: OnboardingProps<T> & {
70
+ ref?: React.Ref<OnboardingModalRef>;
71
+ }) => ReturnType<typeof OnboardingModalInner>) & {
72
+ displayName?: string;
73
+ };
48
74
  export default OnboardingModal;
@@ -8,11 +8,15 @@ import { useOnboardingModal } from "./useOnboardingModal.js";
8
8
  import Modal from "../../../components/Modal/Modal.js";
9
9
  import Image from "../../../components/Image/Image.js";
10
10
  import Button from "../../../components/Button/Button.js";
11
- const OnboardingModal = /* @__PURE__ */ forwardRef(({
11
+ const OnboardingModalInner = ({
12
12
  id,
13
13
  items,
14
14
  modalOptions = {},
15
- isOnboardingChange
15
+ isOnboardingChange,
16
+ onDisplayRuleCheck = (previousState) => ({
17
+ display: previousState === !0,
18
+ nextState: !1
19
+ })
16
20
  }, ref) => {
17
21
  var _a;
18
22
  const [swiperInstance, setSwiperInstance] = useState(), [swiperProgress, setSwiperprogress] = useState(0), {
@@ -20,12 +24,12 @@ const OnboardingModal = /* @__PURE__ */ forwardRef(({
20
24
  isOnboarding,
21
25
  setIsOpen,
22
26
  handleSavePreference
23
- } = useOnboardingModal(id);
27
+ } = useOnboardingModal(id, onDisplayRuleCheck);
24
28
  useImperativeHandle(ref, () => ({
25
29
  setIsOpen,
26
30
  handleSavePreference
27
31
  })), useEffect(() => {
28
- isOnboardingChange && isOnboardingChange(isOnboarding);
32
+ isOnboardingChange == null || isOnboardingChange(isOnboarding);
29
33
  }, [isOnboarding, isOnboardingChange]), useEffect(() => {
30
34
  const link = document.createElement("link");
31
35
  return link.href = "https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css", link.rel = "stylesheet", link.type = "text/css", document.head.appendChild(link), () => {
@@ -44,7 +48,7 @@ const OnboardingModal = /* @__PURE__ */ forwardRef(({
44
48
  }, handleCloseWithoutPreference = () => {
45
49
  setIsOpen(!1), setSwiperprogress(0);
46
50
  };
47
- return /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "onboarding-modal", "data-testid": "modal-onboarding", size: "md", isOpen, focusId: "nextButtonId", onModalClose: handleCloseWithoutPreference, children: [
51
+ return isOpen ? /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "onboarding-modal", "data-testid": "modal-onboarding", size: "md", isOpen, focusId: "nextButtonId", onModalClose: handleCloseWithoutPreference, children: [
48
52
  /* @__PURE__ */ jsx(Modal.Header, { onModalClose: handleCloseWithoutPreference, centered: !0, children: t(currentTitle || "explorer.modal.onboarding.trash.title") }),
49
53
  /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx(Swiper, { modules: [Pagination], onSwiper: (swiper) => {
50
54
  setSwiperInstance(swiper);
@@ -66,8 +70,8 @@ const OnboardingModal = /* @__PURE__ */ forwardRef(({
66
70
  isOnboarding ? handleCloseWithPreference() : handleCloseWithoutPreference();
67
71
  }, children: t(closeText || "explorer.modal.onboarding.trash.close") })
68
72
  ] })
69
- ] }), document.getElementById("portal") || document.body);
70
- });
73
+ ] }), document.getElementById("portal") || document.body) : null;
74
+ }, OnboardingModal = /* @__PURE__ */ forwardRef(OnboardingModalInner);
71
75
  export {
72
76
  OnboardingModal as default
73
77
  };
@@ -1,4 +1,7 @@
1
- export declare const useOnboardingModal: (id: string) => {
1
+ export declare const useOnboardingModal: <T>(id: string, applyDisplayRule: (previousState?: T) => {
2
+ display: boolean;
3
+ nextState: T;
4
+ }) => {
2
5
  isOpen: boolean;
3
6
  setIsOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
4
7
  isOnboarding: boolean;
@@ -1,28 +1,35 @@
1
- import { useState, useEffect } from "react";
2
- import { odeServices } from "@edifice.io/client";
3
- const getOnboardingTrash = async (key) => await odeServices.conf().getPreference(key), saveOnboardingTrash = async (key) => await odeServices.conf().savePreference(key, JSON.stringify({
4
- key: !1
5
- })), useOnboardingModal = (id) => {
6
- const [isOpen, setIsOpen] = useState(!1), [isOnboarding, setIsOnboarding] = useState(!1);
7
- return useEffect(() => {
1
+ import { useRef, useState, useEffect, useCallback } from "react";
2
+ import usePreferences from "../../../hooks/usePreferences/usePreferences.js";
3
+ const useOnboardingModal = (id, applyDisplayRule) => {
4
+ const state = useRef(), [isOpen, setIsOpen] = useState(!1), [isOnboarding, setIsOnboarding] = useState(!1), {
5
+ getPreference,
6
+ savePreference
7
+ } = usePreferences(id);
8
+ useEffect(() => {
8
9
  (async () => {
9
- const response = await getOnboardingTrash(id);
10
+ const response = await getPreference();
10
11
  if (response) {
11
12
  const {
12
13
  key
13
- } = response;
14
- key === !0 && setIsOpen(!0), setIsOnboarding(key);
15
- return;
16
- }
17
- setIsOnboarding(!0), setIsOpen(!0);
14
+ } = response, {
15
+ display,
16
+ nextState
17
+ } = applyDisplayRule(key);
18
+ setIsOpen(display), setIsOnboarding(display), state.current = nextState;
19
+ } else
20
+ setIsOnboarding(!0), setIsOpen(!0), state.current = void 0;
18
21
  })();
19
- }, [id]), {
22
+ }, []);
23
+ const handleSavePreference = useCallback(async () => {
24
+ await savePreference({
25
+ key: state.current
26
+ }), setIsOpen(!1), setIsOnboarding(!1);
27
+ }, [savePreference, setIsOpen, setIsOnboarding]);
28
+ return {
20
29
  isOpen,
21
30
  setIsOpen,
22
31
  isOnboarding,
23
- handleSavePreference: async () => {
24
- await saveOnboardingTrash(id), setIsOpen(!1), setIsOnboarding(!1);
25
- }
32
+ handleSavePreference
26
33
  };
27
34
  };
28
35
  export {
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { CreateParameters, CreateResult, ID, IFolder, UpdateParameters, UpdateResult } from '@edifice.io/client';
3
- import { UseMutationResult } from '../../../../node_modules/@tanstack/react-query';
3
+ import { UseMutationResult } from '../../../node_modules/@tanstack/react-query';
4
4
  export interface FormInputs {
5
5
  title: string;
6
6
  description: string;
@@ -1,5 +1,5 @@
1
1
  import { UpdateParameters, UpdateResult } from '@edifice.io/client';
2
- import { UseMutationOptions, UseMutationResult } from '../../../../../node_modules/@tanstack/react-query';
2
+ import { UseMutationOptions, UseMutationResult } from '../../../../node_modules/@tanstack/react-query';
3
3
  declare const useUpdateMutation: ({ application, options, }: {
4
4
  application: string;
5
5
  options?: UseMutationOptions<UpdateResult, Error, UpdateParameters>;
@@ -1,5 +1,5 @@
1
1
  import { ID, PutShareResponse, RightStringified, ShareRight, ShareRightAction, ShareRightActionDisplayName, ShareUrls } from '@edifice.io/client';
2
- import { UseMutationResult } from '../../../../node_modules/@tanstack/react-query';
2
+ import { UseMutationResult } from '../../../node_modules/@tanstack/react-query';
3
3
  /**
4
4
  * Configuration options for sharing a resource
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import { ID, UpdateParameters, UpdateResult } from '@edifice.io/client';
2
- import { UseMutationResult } from '../../../../../node_modules/@tanstack/react-query';
2
+ import { UseMutationResult } from '../../../../node_modules/@tanstack/react-query';
3
3
  export type PublicationType = 'RESTRAINT' | 'IMMEDIATE' | undefined;
4
4
  export interface ShareBlogProps {
5
5
  resourceId: ID;
@@ -1,5 +1,5 @@
1
1
  import { PutShareResponse, ShareRight } from '@edifice.io/client';
2
- import { UseMutationOptions, UseMutationResult } from '../../../../../node_modules/@tanstack/react-query';
2
+ import { UseMutationOptions, UseMutationResult } from '../../../../node_modules/@tanstack/react-query';
3
3
  declare const useShareMutation: ({ application, options, }: {
4
4
  application: string;
5
5
  options?: UseMutationOptions<PutShareResponse, Error, {
@@ -3,11 +3,11 @@ import { ConfigProvider } from "antd";
3
3
  import { antTheme } from "./antThemeConfig.js";
4
4
  /* empty css */
5
5
  import { useEdificeClient } from "../EdificeClientProvider/EdificeClientProvider.hook.js";
6
- import frFR from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/fr_FR.js";
7
- import deDE from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/de_DE.js";
8
- import esES from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/es_ES.js";
9
- import itIT from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/it_IT.js";
10
- import ptPT from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/pt_PT.js";
6
+ import frFR from "antd/locale/fr_FR";
7
+ import deDE from "antd/locale/de_DE";
8
+ import esES from "antd/locale/es_ES";
9
+ import itIT from "antd/locale/it_IT";
10
+ import ptPT from "antd/locale/pt_PT";
11
11
  const antdLocaleMap = {
12
12
  fr: frFR,
13
13
  de: deDE,
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { App, IGetConf, IGetSession, IUserDescription, IUserInfo, IWebApp, UserProfile } from '@edifice.io/client';
3
- import { UseQueryResult } from '../../../node_modules/@tanstack/react-query';
3
+ import { UseQueryResult } from '../../node_modules/@tanstack/react-query';
4
4
  export interface EdificeClientParams {
5
5
  alternativeApp?: boolean;
6
6
  app: App;
@@ -1,4 +1,4 @@
1
- import { InvalidateQueryFilters, QueryClient } from '../../../node_modules/@tanstack/react-query';
1
+ import { InvalidateQueryFilters, QueryClient } from '../../node_modules/@tanstack/react-query';
2
2
  /**
3
3
  * Invalidates queries and resets infinite query data to only contain the first page.
4
4
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.5.10-develop-pedago.20260217165817",
3
+ "version": "2.5.10-develop-b2school.20260218115154",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -135,9 +135,9 @@
135
135
  "swiper": "^10.1.0",
136
136
  "ua-parser-js": "^1.0.36",
137
137
  "react-pdf": "10.2.0",
138
- "@edifice.io/bootstrap": "2.5.10-develop-pedago.20260217165817",
139
- "@edifice.io/tiptap-extensions": "2.5.10-develop-pedago.20260217165817",
140
- "@edifice.io/utilities": "2.5.10-develop-pedago.20260217165817"
138
+ "@edifice.io/bootstrap": "2.5.10-develop-b2school.20260218115154",
139
+ "@edifice.io/tiptap-extensions": "2.5.10-develop-b2school.20260218115154",
140
+ "@edifice.io/utilities": "2.5.10-develop-b2school.20260218115154"
141
141
  },
142
142
  "devDependencies": {
143
143
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -168,8 +168,8 @@
168
168
  "vite": "^5.4.11",
169
169
  "vite-plugin-dts": "^4.1.0",
170
170
  "vite-tsconfig-paths": "^5.0.1",
171
- "@edifice.io/client": "2.5.10-develop-pedago.20260217165817",
172
- "@edifice.io/config": "2.5.10-develop-pedago.20260217165817"
171
+ "@edifice.io/client": "2.5.10-develop-b2school.20260218115154",
172
+ "@edifice.io/config": "2.5.10-develop-b2school.20260218115154"
173
173
  },
174
174
  "peerDependencies": {
175
175
  "@react-spring/web": "^9.7.5",
@@ -1,4 +0,0 @@
1
- var common = {};
2
- export {
3
- common as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var de_DE = {};
2
- export {
3
- de_DE as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var de_DE = {};
2
- export {
3
- de_DE as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var de_DE = {};
2
- export {
3
- de_DE as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var de_DE = {};
2
- export {
3
- de_DE as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var de_DE = {};
2
- export {
3
- de_DE as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var de_DE = {};
2
- export {
3
- de_DE as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var defineProperty = { exports: {} };
2
- export {
3
- defineProperty as __module
4
- };
@@ -1,4 +0,0 @@
1
- var es_ES = {};
2
- export {
3
- es_ES as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var es_ES = {};
2
- export {
3
- es_ES as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var es_ES = {};
2
- export {
3
- es_ES as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var es_ES = {};
2
- export {
3
- es_ES as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var es_ES = {};
2
- export {
3
- es_ES as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var es_ES = {};
2
- export {
3
- es_ES as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var fr_FR = {};
2
- export {
3
- fr_FR as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var fr_FR = {};
2
- export {
3
- fr_FR as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var fr_FR = {};
2
- export {
3
- fr_FR as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var fr_FR = {};
2
- export {
3
- fr_FR as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var fr_FR = {};
2
- export {
3
- fr_FR as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var fr_FR = {};
2
- export {
3
- fr_FR as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var interopRequireDefault = { exports: {} };
2
- export {
3
- interopRequireDefault as __module
4
- };
@@ -1,4 +0,0 @@
1
- var it_IT = {};
2
- export {
3
- it_IT as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var it_IT = {};
2
- export {
3
- it_IT as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var it_IT = {};
2
- export {
3
- it_IT as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var it_IT = {};
2
- export {
3
- it_IT as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var it_IT = {};
2
- export {
3
- it_IT as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var it_IT = {};
2
- export {
3
- it_IT as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var objectSpread2 = { exports: {} };
2
- export {
3
- objectSpread2 as __module
4
- };
@@ -1,4 +0,0 @@
1
- var pt_PT = {};
2
- export {
3
- pt_PT as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var pt_PT = {};
2
- export {
3
- pt_PT as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var pt_PT = {};
2
- export {
3
- pt_PT as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var pt_PT = {};
2
- export {
3
- pt_PT as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var pt_PT = {};
2
- export {
3
- pt_PT as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var pt_PT = {};
2
- export {
3
- pt_PT as __exports
4
- };
@@ -1,4 +0,0 @@
1
- var toPrimitive = { exports: {} };
2
- export {
3
- toPrimitive as __module
4
- };
@@ -1,4 +0,0 @@
1
- var toPropertyKey = { exports: {} };
2
- export {
3
- toPropertyKey as __module
4
- };
@@ -1,4 +0,0 @@
1
- var _typeof = { exports: {} };
2
- export {
3
- _typeof as __module
4
- };
@@ -1,21 +0,0 @@
1
- import { Attachment } from './models/attachment';
2
- export type SingleAttachmentType = Attachment;
3
- export { useFileToAttachment } from './hooks/useFileToAttachment';
4
- export interface AddAttachmentsProps {
5
- attachments: Attachment[];
6
- onChange?: (attachments: Attachment[]) => void;
7
- onFilesSelected?: (files: File[]) => void;
8
- onRemoveAttachment?: (attachmentId: string) => void;
9
- editMode?: boolean;
10
- isMutating?: boolean;
11
- onCopyToWorkspace?: (attachments: Attachment[], folderId: string) => Promise<boolean>;
12
- /** Si fourni, chaque pièce jointe affiche un bouton télécharger avec l'URL retournée. */
13
- getDownloadUrl?: (attachmentId: string) => string;
14
- /** Si fourni et qu'il y a plusieurs pièces jointes, affiche un bouton « télécharger tout ». */
15
- downloadAllUrl?: string;
16
- }
17
- export declare const AddAttachments: {
18
- ({ attachments, onChange, onFilesSelected, onRemoveAttachment, editMode, isMutating, onCopyToWorkspace, getDownloadUrl, downloadAllUrl, }: AddAttachmentsProps): import("react/jsx-runtime").JSX.Element | null;
19
- displayName: string;
20
- };
21
- export default AddAttachments;