@edifice.io/react 2.4.2-develop-pedago.20251119164852 → 2.4.2-develop-b2school-actualites.20251124095016

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 (52) hide show
  1. package/dist/components/AppIcon/index.d.ts +1 -0
  2. package/dist/components/Divider/Divider.d.ts +5 -0
  3. package/dist/components/Divider/Divider.js +21 -0
  4. package/dist/components/Divider/index.d.ts +1 -0
  5. package/dist/components/Flex/Flex.js +1 -1
  6. package/dist/components/Menu/components/MenuButton.d.ts +2 -0
  7. package/dist/components/Menu/components/MenuButton.js +13 -4
  8. package/dist/components/Select/Select.d.ts +6 -2
  9. package/dist/components/Select/Select.js +10 -4
  10. package/dist/components/SeparatedInfo/SeparatedInfo.d.ts +6 -0
  11. package/dist/components/SeparatedInfo/SeparatedInfo.js +13 -0
  12. package/dist/components/SeparatedInfo/index.d.ts +1 -0
  13. package/dist/components/index.d.ts +2 -0
  14. package/dist/editor.js +40 -36
  15. package/dist/hooks/index.d.ts +1 -0
  16. package/dist/hooks/useInfiniteScroll/index.d.ts +1 -0
  17. package/dist/hooks/useInfiniteScroll/useInfiniteScroll.d.ts +33 -0
  18. package/dist/hooks/useInfiniteScroll/useInfiniteScroll.js +20 -0
  19. package/dist/icons.js +294 -292
  20. package/dist/index.js +84 -74
  21. package/dist/modals.js +8 -6
  22. package/dist/modules/comments/components/Comment.js +5 -3
  23. package/dist/modules/comments/components/CommentList.js +1 -1
  24. package/dist/modules/comments/constants.d.ts +4 -0
  25. package/dist/modules/comments/constants.js +2 -1
  26. package/dist/modules/comments/hooks/useProfileQueries.js +1 -2
  27. package/dist/modules/comments/provider/CommentProvider.js +2 -1
  28. package/dist/modules/comments/types.d.ts +4 -0
  29. package/dist/modules/editor/components/Editor/EditorPreview.d.ts +14 -0
  30. package/dist/modules/editor/components/Editor/EditorPreview.js +56 -0
  31. package/dist/modules/editor/components/Editor/EditorPreviewSkeleton.d.ts +8 -0
  32. package/dist/modules/editor/components/Editor/EditorPreviewSkeleton.js +24 -0
  33. package/dist/modules/editor/components/Editor/index.d.ts +2 -0
  34. package/dist/modules/icons/components/IconClockAlert.d.ts +7 -0
  35. package/dist/modules/icons/components/IconClockAlert.js +17 -0
  36. package/dist/modules/icons/components/index.d.ts +1 -0
  37. package/dist/modules/modals/ShareModal/ShareModal.d.ts +1 -11
  38. package/dist/modules/modals/ShareModal/ShareModal.js +11 -104
  39. package/dist/modules/modals/ShareModal/ShareResources.d.ts +165 -0
  40. package/dist/modules/modals/ShareModal/ShareResources.js +132 -0
  41. package/dist/modules/modals/ShareModal/hooks/useSearch.d.ts +2 -1
  42. package/dist/modules/modals/ShareModal/hooks/useSearch.js +3 -2
  43. package/dist/modules/modals/ShareModal/hooks/useShare.d.ts +11 -4
  44. package/dist/modules/modals/ShareModal/hooks/useShare.js +17 -10
  45. package/dist/modules/modals/ShareModal/index.d.ts +3 -1
  46. package/dist/modules/multimedia/FileCard/FileCard.js +1 -1
  47. package/dist/modules/multimedia/FileCard/FileIcon.js +1 -1
  48. package/dist/utilities/index.d.ts +1 -0
  49. package/dist/utilities/react-query/index.d.ts +1 -0
  50. package/dist/utilities/react-query/react-query-utils.d.ts +21 -0
  51. package/dist/utilities/react-query/react-query-utils.js +13 -0
  52. package/package.json +6 -6
@@ -0,0 +1,21 @@
1
+ import { InvalidateQueryFilters, QueryClient } from '../../node_modules/@tanstack/react-query';
2
+ /**
3
+ * Invalidates queries and resets infinite query data to only contain the first page.
4
+ *
5
+ * This utility function is useful when you want to invalidate a query but also ensure
6
+ * that any infinite query data is reset to show only the first page, removing any
7
+ * previously loaded subsequent pages.
8
+ *
9
+ * @param queryClient - The TanStack Query client instance used to manage queries
10
+ * @param options - The invalidate query filters that specify which queries to invalidate
11
+ * @returns The result of the invalidateQueries operation, or undefined if no queryKey is provided
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * // Invalidate user queries and reset to first page only
16
+ * invalidateQueriesWithFirstPage(queryClient, {
17
+ * queryKey: ['users']
18
+ * });
19
+ * ```
20
+ */
21
+ export declare function invalidateQueriesWithFirstPage(queryClient: QueryClient, options: InvalidateQueryFilters): Promise<void> | undefined;
@@ -0,0 +1,13 @@
1
+ function invalidateQueriesWithFirstPage(queryClient, options) {
2
+ if (options.queryKey)
3
+ return queryClient.setQueriesData({
4
+ queryKey: options.queryKey
5
+ }, (oldData) => oldData != null && oldData.pages ? {
6
+ ...oldData,
7
+ pages: [oldData.pages[0]],
8
+ pageParams: [oldData.pageParams[0]]
9
+ } : oldData), queryClient.invalidateQueries(options);
10
+ }
11
+ export {
12
+ invalidateQueriesWithFirstPage
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.4.2-develop-pedago.20251119164852",
3
+ "version": "2.4.2-develop-b2school-actualites.20251124095016",
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-pedago.20251119164852",
135
- "@edifice.io/tiptap-extensions": "2.4.2-develop-pedago.20251119164852",
136
- "@edifice.io/utilities": "2.4.2-develop-pedago.20251119164852"
134
+ "@edifice.io/utilities": "2.4.2-develop-b2school-actualites.20251124095016",
135
+ "@edifice.io/tiptap-extensions": "2.4.2-develop-b2school-actualites.20251124095016",
136
+ "@edifice.io/bootstrap": "2.4.2-develop-b2school-actualites.20251124095016"
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-pedago.20251119164852",
168
- "@edifice.io/config": "2.4.2-develop-pedago.20251119164852"
167
+ "@edifice.io/client": "2.4.2-develop-b2school-actualites.20251124095016",
168
+ "@edifice.io/config": "2.4.2-develop-b2school-actualites.20251124095016"
169
169
  },
170
170
  "peerDependencies": {
171
171
  "@react-spring/web": "^9.7.5",