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

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 (57) 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/ShareBookmark.d.ts +1 -1
  38. package/dist/modules/modals/ShareModal/ShareBookmark.js +5 -2
  39. package/dist/modules/modals/ShareModal/ShareModal.d.ts +1 -11
  40. package/dist/modules/modals/ShareModal/ShareModal.js +13 -105
  41. package/dist/modules/modals/ShareModal/ShareResources.d.ts +164 -0
  42. package/dist/modules/modals/ShareModal/ShareResources.js +133 -0
  43. package/dist/modules/modals/ShareModal/hooks/useSearch.d.ts +2 -1
  44. package/dist/modules/modals/ShareModal/hooks/useSearch.js +3 -2
  45. package/dist/modules/modals/ShareModal/hooks/useShare.d.ts +12 -5
  46. package/dist/modules/modals/ShareModal/hooks/useShare.js +20 -13
  47. package/dist/modules/modals/ShareModal/hooks/useShareBookmark.d.ts +1 -1
  48. package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +1 -1
  49. package/dist/modules/modals/ShareModal/index.d.ts +3 -1
  50. package/dist/modules/multimedia/FileCard/FileCard.js +1 -1
  51. package/dist/modules/multimedia/FileCard/FileIcon.js +1 -1
  52. package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +1 -4
  53. package/dist/utilities/index.d.ts +1 -0
  54. package/dist/utilities/react-query/index.d.ts +1 -0
  55. package/dist/utilities/react-query/react-query-utils.d.ts +21 -0
  56. package/dist/utilities/react-query/react-query-utils.js +13 -0
  57. package/package.json +6 -6
@@ -5,7 +5,7 @@ const FileIcon = ({
5
5
  type,
6
6
  roleMap
7
7
  }) => {
8
- const hasShadow = typeof (roleMap == null ? void 0 : roleMap.icon) != "string" && type !== "unknown" && (roleMap == null ? void 0 : roleMap.hasShadow) !== !1, fileicon = clsx("position-absolute rounded-circle top-50 start-50 translate-middle", {
8
+ const hasShadow = typeof (roleMap == null ? void 0 : roleMap.icon) != "string" && type !== "unknown" && (roleMap == null ? void 0 : roleMap.hasShadow) !== !1, fileicon = clsx("position-absolute top-50 start-50 translate-middle", {
9
9
  "p-12 rounded-circle shadow": hasShadow
10
10
  }, roleMap == null ? void 0 : roleMap.color);
11
11
  return /* @__PURE__ */ jsx("div", { className: fileicon, children: (roleMap == null ? void 0 : roleMap.icon) ?? /* @__PURE__ */ jsx(SvgIconPaperclip, {}) });
@@ -111,10 +111,7 @@ const InternalLinker = ({
111
111
  }, [resources]), /* @__PURE__ */ jsxs("div", { className: "d-flex flex-column flex-fill overflow-hidden", children: [
112
112
  /* @__PURE__ */ jsxs("div", { className: "search d-flex bg-light rounded-top border border-bottom-0", children: [
113
113
  showApplicationSelector && /* @__PURE__ */ jsx("div", { className: "flex-shrink-1 px-8 py-12 border-end", children: /* @__PURE__ */ jsxs(Dropdown, { overflow: !0, children: [
114
- /* @__PURE__ */ jsx(Dropdown.Trigger, { icon: /* @__PURE__ */ jsx("div", { className: "pe-8", children: (selectedApplication == null ? void 0 : selectedApplication.icon) || /* @__PURE__ */ jsx(SvgIconApplications, {}) }), label: /* @__PURE__ */ jsxs("span", { className: "d-md-inline d-sm-none", children: [
115
- " ",
116
- t((selectedApplication == null ? void 0 : selectedApplication.displayName) || "bbm.linker.int.choose")
117
- ] }), variant: "ghost", size: "md" }),
114
+ /* @__PURE__ */ jsx(Dropdown.Trigger, { icon: /* @__PURE__ */ jsx("div", { className: "pe-8", children: (selectedApplication == null ? void 0 : selectedApplication.icon) || /* @__PURE__ */ jsx(SvgIconApplications, {}) }), label: t((selectedApplication == null ? void 0 : selectedApplication.displayName) || "bbm.linker.int.choose"), variant: "ghost", size: "md" }),
118
115
  /* @__PURE__ */ jsx(Dropdown.Menu, { children: options == null ? void 0 : options.map((option) => /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: () => handleOptionClick(option), children: option.displayName }, option.application)) })
119
116
  ] }) }),
120
117
  /* @__PURE__ */ jsx("div", { className: "flex-grow-1 align-self-center", children: /* @__PURE__ */ jsx("form", { className: "gap-16 d-flex w-100 align-items-center px-16 py-8", onSubmit: handleSubmit, children: /* @__PURE__ */ jsx(SearchBar, { isVariant: !0, placeholder: t("search"), size: "lg", className: "w-100", disabled: !selectedApplication, onChange: handleSearchChange }) }) })
@@ -1,3 +1,4 @@
1
1
  export * from './check-user-rights';
2
2
  export * from './emptyscreen-mapping';
3
+ export * from './react-query';
3
4
  export * from './refs';
@@ -0,0 +1 @@
1
+ export * from './react-query-utils';
@@ -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.20251125160034",
3
+ "version": "2.4.2-develop-b2school-actualites.20251126112549",
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.20251125160034",
135
- "@edifice.io/tiptap-extensions": "2.4.2-develop-pedago.20251125160034",
136
- "@edifice.io/utilities": "2.4.2-develop-pedago.20251125160034"
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"
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.20251125160034",
168
- "@edifice.io/config": "2.4.2-develop-pedago.20251125160034"
167
+ "@edifice.io/client": "2.4.2-develop-b2school-actualites.20251126112549",
168
+ "@edifice.io/config": "2.4.2-develop-b2school-actualites.20251126112549"
169
169
  },
170
170
  "peerDependencies": {
171
171
  "@react-spring/web": "^9.7.5",