@edifice.io/react 2.5.4-develop-b2school-actualites.20251209155049 → 2.5.4-develop-b2school-actualites.20251211160636

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.
@@ -69,6 +69,7 @@ export type ShareResourceMutation = UseMutationResult<PutShareResponse, unknown,
69
69
  * @property {ShareResourceMutation} [shareResource] - Optional React Query mutation for optimistic UI updates
70
70
  * @property {() => void} [onSuccess] - Callback fired after successful share operation
71
71
  * @property {(shareRights: ShareRight[], isDirty: boolean) => void} [onChange] - Callback fired when share rights change
72
+ * @property {(isSubmitting: boolean) => void} [onSubmit] - Callback fired when share operation is submitting
72
73
  * @property {string} [classNameSearchInput] - Optional CSS class for the search input wrapper (default: 'col-6')
73
74
  */
74
75
  interface ShareResourceProps {
@@ -92,9 +93,9 @@ interface ShareResourceProps {
92
93
  */
93
94
  onChange?: (shareRights: ShareRight[], isDirty: boolean) => void;
94
95
  /**
95
- * Callback when ShareResources component is submitting share rights or bookmark
96
+ * Callback when ShareResources component is submitting share rights or bookmark changes
96
97
  */
97
- onSubmit?: () => void;
98
+ onSubmit?: (isSubmitting: boolean) => void;
98
99
  /**
99
100
  * Optional className for the search input wrapper (default: 'col-6')
100
101
  */
@@ -158,7 +159,7 @@ export interface ShareResourcesRef {
158
159
  * shareOptions={shareOptions}
159
160
  * onSuccess={() => console.log('Shared successfully')}
160
161
  * onChange={(rights, isDirty) => console.log('Rights changed:', isDirty)}
161
- * onSubmit={() => console.log('Submitting share...')}
162
+ * onSubmit={(isSubmitting) => console.log('Submitting share...', isSubmitting)}
162
163
  * />
163
164
  * <button onClick={handleSave}>Save Changes</button>
164
165
  * </>
@@ -93,7 +93,7 @@ const ShareResources = /* @__PURE__ */ forwardRef(({
93
93
  }), [handleShare]), useEffect(() => {
94
94
  onChange(shareRights.rights, isDirty);
95
95
  }, [isDirty, shareRights.rights, onChange]), useEffect(() => {
96
- (isSavingBookmark || isSharing) && onSubmit();
96
+ onSubmit(isSavingBookmark || isSharing);
97
97
  }, [isSavingBookmark, isSharing, onSubmit]);
98
98
  const {
99
99
  t
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.5.4-develop-b2school-actualites.20251209155049",
3
+ "version": "2.5.4-develop-b2school-actualites.20251211160636",
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.4-develop-b2school-actualites.20251209155049",
137
- "@edifice.io/tiptap-extensions": "2.5.4-develop-b2school-actualites.20251209155049",
138
- "@edifice.io/utilities": "2.5.4-develop-b2school-actualites.20251209155049"
136
+ "@edifice.io/utilities": "2.5.4-develop-b2school-actualites.20251211160636",
137
+ "@edifice.io/tiptap-extensions": "2.5.4-develop-b2school-actualites.20251211160636",
138
+ "@edifice.io/bootstrap": "2.5.4-develop-b2school-actualites.20251211160636"
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/client": "2.5.4-develop-b2school-actualites.20251209155049",
170
- "@edifice.io/config": "2.5.4-develop-b2school-actualites.20251209155049"
169
+ "@edifice.io/client": "2.5.4-develop-b2school-actualites.20251211160636",
170
+ "@edifice.io/config": "2.5.4-develop-b2school-actualites.20251211160636"
171
171
  },
172
172
  "peerDependencies": {
173
173
  "@react-spring/web": "^9.7.5",