@edifice.io/react 2.5.2-develop-b2school.20251124152203 → 2.5.2-develop-b2school-actualites.20251127174432
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.
- package/dist/components/AppIcon/index.d.ts +1 -0
- package/dist/components/Divider/Divider.d.ts +5 -0
- package/dist/components/Divider/Divider.js +21 -0
- package/dist/components/Divider/index.d.ts +1 -0
- package/dist/components/Flex/Flex.js +1 -1
- package/dist/components/Menu/components/MenuButton.d.ts +2 -0
- package/dist/components/Menu/components/MenuButton.js +13 -4
- package/dist/components/Select/Select.d.ts +6 -2
- package/dist/components/Select/Select.js +10 -4
- package/dist/components/SeparatedInfo/SeparatedInfo.d.ts +6 -0
- package/dist/components/SeparatedInfo/SeparatedInfo.js +13 -0
- package/dist/components/SeparatedInfo/index.d.ts +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/editor.js +40 -36
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useInfiniteScroll/index.d.ts +1 -0
- package/dist/hooks/useInfiniteScroll/useInfiniteScroll.d.ts +33 -0
- package/dist/hooks/useInfiniteScroll/useInfiniteScroll.js +20 -0
- package/dist/icons.js +294 -292
- package/dist/index.js +86 -74
- package/dist/modals.js +8 -6
- package/dist/modules/comments/components/Comment.js +5 -3
- package/dist/modules/comments/components/CommentList.js +1 -1
- package/dist/modules/comments/constants.d.ts +4 -0
- package/dist/modules/comments/constants.js +2 -1
- package/dist/modules/comments/provider/CommentProvider.js +2 -1
- package/dist/modules/comments/types.d.ts +4 -0
- package/dist/modules/editor/components/Editor/EditorPreview.d.ts +14 -0
- package/dist/modules/editor/components/Editor/EditorPreview.js +56 -0
- package/dist/modules/editor/components/Editor/EditorPreviewSkeleton.d.ts +8 -0
- package/dist/modules/editor/components/Editor/EditorPreviewSkeleton.js +24 -0
- package/dist/modules/editor/components/Editor/index.d.ts +2 -0
- package/dist/modules/icons/components/IconClockAlert.d.ts +7 -0
- package/dist/modules/icons/components/IconClockAlert.js +17 -0
- package/dist/modules/icons/components/index.d.ts +1 -0
- package/dist/modules/modals/ShareModal/ShareBookmark.d.ts +1 -1
- package/dist/modules/modals/ShareModal/ShareBookmark.js +5 -2
- package/dist/modules/modals/ShareModal/ShareModal.d.ts +1 -11
- package/dist/modules/modals/ShareModal/ShareModal.js +13 -105
- package/dist/modules/modals/ShareModal/ShareResources.d.ts +168 -0
- package/dist/modules/modals/ShareModal/ShareResources.js +137 -0
- package/dist/modules/modals/ShareModal/hooks/useSearch.d.ts +2 -1
- package/dist/modules/modals/ShareModal/hooks/useSearch.js +3 -2
- package/dist/modules/modals/ShareModal/hooks/useShare.d.ts +12 -5
- package/dist/modules/modals/ShareModal/hooks/useShare.js +20 -13
- package/dist/modules/modals/ShareModal/hooks/useShareBookmark.d.ts +1 -1
- package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +1 -1
- package/dist/modules/modals/ShareModal/index.d.ts +3 -1
- package/dist/providers/AntThemeProvider/AntProvider.d.ts +10 -0
- package/dist/providers/AntThemeProvider/AntProvider.js +11 -0
- package/dist/providers/AntThemeProvider/antThemeConfig.d.ts +7 -0
- package/dist/providers/AntThemeProvider/antThemeConfig.js +10 -0
- package/dist/providers/EdificeThemeProvider/EdificeThemeProvider.js +2 -1
- package/dist/providers/index.d.ts +1 -0
- package/dist/style.css +1 -0
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/react-query/index.d.ts +1 -0
- package/dist/utilities/react-query/react-query-utils.d.ts +21 -0
- package/dist/utilities/react-query/react-query-utils.js +13 -0
- package/package.json +8 -6
|
@@ -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
|
+
};
|
|
@@ -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
|
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)}
|
|
@@ -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.
|
|
3
|
+
"version": "2.5.2-develop-b2school-actualites.20251127174432",
|
|
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",
|
|
@@ -118,6 +119,7 @@
|
|
|
118
119
|
"@tiptap/extension-ordered-list": "2.11.0",
|
|
119
120
|
"@tiptap/extension-strike": "2.11.0",
|
|
120
121
|
"@uidotdev/usehooks": "^2.4.1",
|
|
122
|
+
"antd": "^5.27.4",
|
|
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/
|
|
135
|
-
"@edifice.io/
|
|
136
|
-
"@edifice.io/
|
|
136
|
+
"@edifice.io/bootstrap": "2.5.2-develop-b2school-actualites.20251127174432",
|
|
137
|
+
"@edifice.io/tiptap-extensions": "2.5.2-develop-b2school-actualites.20251127174432",
|
|
138
|
+
"@edifice.io/utilities": "2.5.2-develop-b2school-actualites.20251127174432"
|
|
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/
|
|
168
|
-
"@edifice.io/
|
|
169
|
+
"@edifice.io/config": "2.5.2-develop-b2school-actualites.20251127174432",
|
|
170
|
+
"@edifice.io/client": "2.5.2-develop-b2school-actualites.20251127174432"
|
|
169
171
|
},
|
|
170
172
|
"peerDependencies": {
|
|
171
173
|
"@react-spring/web": "^9.7.5",
|