@edifice.io/react 2.4.2-develop-b2school-actualites.20251126112549 → 2.4.2-develop-b2school-actualites.20251126114120

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.
@@ -19,14 +19,14 @@ function ShareResourceModal({
19
19
  (_a = refShareResources.current) == null || _a.handleShare();
20
20
  }, [isSaving, setIsSaving] = useState(!1), {
21
21
  t
22
- } = useTranslation(), onChange = (_, _isDirty, isSaving2) => {
22
+ } = useTranslation(), onSaving = (isSaving2) => {
23
23
  setIsSaving(isSaving2);
24
24
  };
25
25
  return /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "share_modal", size: "lg", isOpen, onModalClose: onCancel, children: [
26
26
  /* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: t("share.title") }),
27
27
  /* @__PURE__ */ jsxs(Modal.Body, { children: [
28
28
  /* @__PURE__ */ jsx(Alert, { type: "info", className: "mb-16", children: t("explorer.modal.share.alert.community") }),
29
- /* @__PURE__ */ jsx(ShareResources, { shareOptions, shareResource, ref: refShareResources, onSuccess, onChange, classNameSearchInput: "flex-fill" }),
29
+ /* @__PURE__ */ jsx(ShareResources, { shareOptions, shareResource, ref: refShareResources, onSuccess, onSaving, classNameSearchInput: "flex-fill" }),
30
30
  children
31
31
  ] }),
32
32
  /* @__PURE__ */ jsxs(Modal.Footer, { children: [
@@ -86,6 +86,10 @@ interface ShareResourceProps {
86
86
  * Callback when share rights change
87
87
  */
88
88
  onChange?: (shareRights: ShareRight[], isDirty: boolean, isSaving: boolean) => void;
89
+ /**
90
+ * Callback when SHareRessource component isSaving share rights or bookmark
91
+ */
92
+ onSaving?: (isSaving: boolean) => void;
89
93
  /**
90
94
  * Optional className for the search input
91
95
  */
@@ -24,6 +24,8 @@ const ShareResources = /* @__PURE__ */ forwardRef(({
24
24
  },
25
25
  onChange = () => {
26
26
  },
27
+ onSaving = () => {
28
+ },
27
29
  classNameSearchInput = "col-6"
28
30
  }, ref) => {
29
31
  const {
@@ -90,7 +92,9 @@ const ShareResources = /* @__PURE__ */ forwardRef(({
90
92
  handleShare
91
93
  }), [handleShare]), useEffect(() => {
92
94
  onChange(shareRights.rights, isDirty, isSavingBookmark || isSharing);
93
- }, [isDirty, shareRights.rights, onChange, isSavingBookmark, isSharing]);
95
+ }, [isDirty, shareRights.rights, onChange, isSavingBookmark, isSharing]), useEffect(() => {
96
+ onSaving(isSavingBookmark || isSharing);
97
+ }, [isSavingBookmark, isSharing, onSaving]);
94
98
  const {
95
99
  t
96
100
  } = useTranslation(), searchPlaceholder = showSearchAdmlHint() ? t("explorer.search.adml.hint") : t("explorer.modal.share.search.placeholder");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.4.2-develop-b2school-actualites.20251126112549",
3
+ "version": "2.4.2-develop-b2school-actualites.20251126114120",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -131,9 +131,9 @@
131
131
  "react-slugify": "^3.0.3",
132
132
  "swiper": "^10.1.0",
133
133
  "ua-parser-js": "^1.0.36",
134
- "@edifice.io/bootstrap": "2.4.2-develop-b2school-actualites.20251126112549",
135
- "@edifice.io/tiptap-extensions": "2.4.2-develop-b2school-actualites.20251126112549",
136
- "@edifice.io/utilities": "2.4.2-develop-b2school-actualites.20251126112549"
134
+ "@edifice.io/bootstrap": "2.4.2-develop-b2school-actualites.20251126114120",
135
+ "@edifice.io/tiptap-extensions": "2.4.2-develop-b2school-actualites.20251126114120",
136
+ "@edifice.io/utilities": "2.4.2-develop-b2school-actualites.20251126114120"
137
137
  },
138
138
  "devDependencies": {
139
139
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -164,8 +164,8 @@
164
164
  "vite": "^5.4.11",
165
165
  "vite-plugin-dts": "^4.1.0",
166
166
  "vite-tsconfig-paths": "^5.0.1",
167
- "@edifice.io/client": "2.4.2-develop-b2school-actualites.20251126112549",
168
- "@edifice.io/config": "2.4.2-develop-b2school-actualites.20251126112549"
167
+ "@edifice.io/client": "2.4.2-develop-b2school-actualites.20251126114120",
168
+ "@edifice.io/config": "2.4.2-develop-b2school-actualites.20251126114120"
169
169
  },
170
170
  "peerDependencies": {
171
171
  "@react-spring/web": "^9.7.5",