@edifice.io/react 2.5.2-develop-b2school.20251124152203 → 2.5.2-develop-b2school-actualites.20251201115331

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 (60) 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 +86 -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/provider/CommentProvider.js +2 -1
  27. package/dist/modules/comments/types.d.ts +4 -0
  28. package/dist/modules/editor/components/Editor/EditorPreview.d.ts +14 -0
  29. package/dist/modules/editor/components/Editor/EditorPreview.js +56 -0
  30. package/dist/modules/editor/components/Editor/EditorPreviewSkeleton.d.ts +8 -0
  31. package/dist/modules/editor/components/Editor/EditorPreviewSkeleton.js +24 -0
  32. package/dist/modules/editor/components/Editor/index.d.ts +2 -0
  33. package/dist/modules/icons/components/IconClockAlert.d.ts +7 -0
  34. package/dist/modules/icons/components/IconClockAlert.js +17 -0
  35. package/dist/modules/icons/components/index.d.ts +1 -0
  36. package/dist/modules/modals/ShareModal/ShareBookmark.d.ts +1 -1
  37. package/dist/modules/modals/ShareModal/ShareBookmark.js +5 -2
  38. package/dist/modules/modals/ShareModal/ShareModal.d.ts +1 -11
  39. package/dist/modules/modals/ShareModal/ShareModal.js +13 -105
  40. package/dist/modules/modals/ShareModal/ShareResources.d.ts +173 -0
  41. package/dist/modules/modals/ShareModal/ShareResources.js +137 -0
  42. package/dist/modules/modals/ShareModal/hooks/useSearch.d.ts +2 -1
  43. package/dist/modules/modals/ShareModal/hooks/useSearch.js +3 -2
  44. package/dist/modules/modals/ShareModal/hooks/useShare.d.ts +12 -5
  45. package/dist/modules/modals/ShareModal/hooks/useShare.js +20 -13
  46. package/dist/modules/modals/ShareModal/hooks/useShareBookmark.d.ts +1 -1
  47. package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +1 -1
  48. package/dist/modules/modals/ShareModal/index.d.ts +3 -1
  49. package/dist/providers/AntThemeProvider/AntProvider.d.ts +10 -0
  50. package/dist/providers/AntThemeProvider/AntProvider.js +11 -0
  51. package/dist/providers/AntThemeProvider/antThemeConfig.d.ts +7 -0
  52. package/dist/providers/AntThemeProvider/antThemeConfig.js +10 -0
  53. package/dist/providers/EdificeThemeProvider/EdificeThemeProvider.js +2 -1
  54. package/dist/providers/index.d.ts +1 -0
  55. package/dist/style.css +1 -0
  56. package/dist/utilities/index.d.ts +1 -0
  57. package/dist/utilities/react-query/index.d.ts +1 -0
  58. package/dist/utilities/react-query/react-query-utils.d.ts +21 -0
  59. package/dist/utilities/react-query/react-query-utils.js +13 -0
  60. package/package.json +20 -18
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ interface AntProviderProps {
3
+ children: React.ReactNode;
4
+ }
5
+ /**
6
+ * Provider pour Ant Design qui intègre le thème personnalisé
7
+ * avec le système de design existant d'Edifice
8
+ */
9
+ export declare const AntProvider: React.FC<AntProviderProps>;
10
+ export default AntProvider;
@@ -0,0 +1,11 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { ConfigProvider } from "antd";
3
+ import { antTheme } from "./antThemeConfig.js";
4
+ /* empty css */
5
+ const AntProvider = ({
6
+ children
7
+ }) => /* @__PURE__ */ jsx(ConfigProvider, { theme: antTheme, children });
8
+ export {
9
+ AntProvider,
10
+ AntProvider as default
11
+ };
@@ -0,0 +1,7 @@
1
+ export declare const antTheme: {
2
+ cssVar: {
3
+ key: string;
4
+ };
5
+ hashed: boolean;
6
+ };
7
+ export default antTheme;
@@ -0,0 +1,10 @@
1
+ const antTheme = {
2
+ cssVar: {
3
+ key: "edifice"
4
+ },
5
+ hashed: !1
6
+ };
7
+ export {
8
+ antTheme,
9
+ antTheme as default
10
+ };
@@ -1,5 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo } from "react";
3
+ import { AntProvider } from "../AntThemeProvider/AntProvider.js";
3
4
  import { useEdificeClient } from "../EdificeClientProvider/EdificeClientProvider.hook.js";
4
5
  import { EdificeThemeContext } from "./EdificeThemeProvider.context.js";
5
6
  import useConf from "../../hooks/useConf/useConf.js";
@@ -39,7 +40,7 @@ function EdificeThemeProvider({
39
40
  theme: (_a2 = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _a2.theme
40
41
  };
41
42
  }, [(_a = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _a.theme]);
42
- return /* @__PURE__ */ jsx(EdificeThemeContext.Provider, { value: values, children });
43
+ return /* @__PURE__ */ jsx(EdificeThemeContext.Provider, { value: values, children: /* @__PURE__ */ jsx(AntProvider, { children }) });
43
44
  }
44
45
  export {
45
46
  EdificeThemeProvider
@@ -1,3 +1,4 @@
1
+ export * from './AntThemeProvider/AntProvider';
1
2
  export * from './EdificeClientProvider/EdificeClientProvider';
2
3
  export * from './EdificeClientProvider/EdificeClientProvider.context';
3
4
  export * from './EdificeClientProvider/EdificeClientProvider.hook';
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ :root .edifice{--ant-color-primary: var(--edifice-primary);--ant-color-success: var(--edifice-success);--ant-color-warning: var(--edifice-warning);--ant-blue: var(--edifice-blue);--ant-purple: var(--edifice-purple);--ant-cyan: var(--edifice-cyan);--ant-green: var(--edifice-green);--ant-magenta: var(--edifice-magenta);--ant-pink: var(--edifice-pink);--ant-red: var(--edifice-red);--ant-orange: var(--edifice-orange);--ant-yellow: var(--edifice-yellow);--ant-color-text-base: var(--edifice-body-color);--ant-color-bg-base: var(--edifice-body-bg)}
@@ -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.5.2-develop-b2school.20251124152203",
3
+ "version": "2.5.2-develop-b2school-actualites.20251201115331",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -73,6 +73,7 @@
73
73
  "dist"
74
74
  ],
75
75
  "dependencies": {
76
+ "@ant-design/icons": "^6.0.2",
76
77
  "@dnd-kit/core": "^6.1.0",
77
78
  "@dnd-kit/sortable": "^8.0.0",
78
79
  "@dnd-kit/utilities": "^3.2.2",
@@ -81,17 +82,29 @@
81
82
  "@pixi/react": "7.1.2",
82
83
  "@popperjs/core": "2.11.8",
83
84
  "@tiptap/core": "2.11.0",
85
+ "@tiptap/extension-blockquote": "2.11.0",
86
+ "@tiptap/extension-bullet-list": "2.11.0",
84
87
  "@tiptap/extension-character-count": "2.11.0",
88
+ "@tiptap/extension-code": "2.11.0",
89
+ "@tiptap/extension-code-block": "2.11.0",
85
90
  "@tiptap/extension-color": "2.11.0",
91
+ "@tiptap/extension-dropcursor": "2.11.0",
86
92
  "@tiptap/extension-focus": "2.11.0",
87
93
  "@tiptap/extension-font-family": "2.11.0",
94
+ "@tiptap/extension-gapcursor": "2.11.0",
95
+ "@tiptap/extension-hard-break": "2.11.0",
88
96
  "@tiptap/extension-heading": "2.11.0",
89
97
  "@tiptap/extension-highlight": "2.11.0",
98
+ "@tiptap/extension-history": "2.11.0",
99
+ "@tiptap/extension-horizontal-rule": "2.11.0",
90
100
  "@tiptap/extension-image": "2.11.0",
101
+ "@tiptap/extension-italic": "2.11.0",
91
102
  "@tiptap/extension-link": "2.11.0",
92
103
  "@tiptap/extension-list-item": "2.11.0",
93
104
  "@tiptap/extension-mathematics": "2.22.0",
105
+ "@tiptap/extension-ordered-list": "2.11.0",
94
106
  "@tiptap/extension-placeholder": "2.11.0",
107
+ "@tiptap/extension-strike": "2.11.0",
95
108
  "@tiptap/extension-subscript": "2.11.0",
96
109
  "@tiptap/extension-superscript": "2.11.0",
97
110
  "@tiptap/extension-table": "2.11.0",
@@ -105,19 +118,8 @@
105
118
  "@tiptap/pm": "2.11.0",
106
119
  "@tiptap/react": "2.11.0",
107
120
  "@tiptap/starter-kit": "2.11.0",
108
- "@tiptap/extension-blockquote": "2.11.0",
109
- "@tiptap/extension-bullet-list": "2.11.0",
110
- "@tiptap/extension-code": "2.11.0",
111
- "@tiptap/extension-code-block": "2.11.0",
112
- "@tiptap/extension-dropcursor": "2.11.0",
113
- "@tiptap/extension-gapcursor": "2.11.0",
114
- "@tiptap/extension-hard-break": "2.11.0",
115
- "@tiptap/extension-history": "2.11.0",
116
- "@tiptap/extension-horizontal-rule": "2.11.0",
117
- "@tiptap/extension-italic": "2.11.0",
118
- "@tiptap/extension-ordered-list": "2.11.0",
119
- "@tiptap/extension-strike": "2.11.0",
120
121
  "@uidotdev/usehooks": "^2.4.1",
122
+ "antd": "^6.0.0",
121
123
  "clsx": "^2.1.1",
122
124
  "dayjs": "1.11.10",
123
125
  "emoji-picker-react": "4.5.2",
@@ -131,9 +133,9 @@
131
133
  "react-slugify": "^3.0.3",
132
134
  "swiper": "^10.1.0",
133
135
  "ua-parser-js": "^1.0.36",
134
- "@edifice.io/tiptap-extensions": "2.5.2-develop-b2school.20251124152203",
135
- "@edifice.io/utilities": "2.5.2-develop-b2school.20251124152203",
136
- "@edifice.io/bootstrap": "2.5.2-develop-b2school.20251124152203"
136
+ "@edifice.io/bootstrap": "2.5.2-develop-b2school-actualites.20251201115331",
137
+ "@edifice.io/tiptap-extensions": "2.5.2-develop-b2school-actualites.20251201115331",
138
+ "@edifice.io/utilities": "2.5.2-develop-b2school-actualites.20251201115331"
137
139
  },
138
140
  "devDependencies": {
139
141
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -164,8 +166,8 @@
164
166
  "vite": "^5.4.11",
165
167
  "vite-plugin-dts": "^4.1.0",
166
168
  "vite-tsconfig-paths": "^5.0.1",
167
- "@edifice.io/client": "2.5.2-develop-b2school.20251124152203",
168
- "@edifice.io/config": "2.5.2-develop-b2school.20251124152203"
169
+ "@edifice.io/client": "2.5.2-develop-b2school-actualites.20251201115331",
170
+ "@edifice.io/config": "2.5.2-develop-b2school-actualites.20251201115331"
169
171
  },
170
172
  "peerDependencies": {
171
173
  "@react-spring/web": "^9.7.5",