@edifice.io/react 2.5.6 → 2.5.8-develop-b2school.20260122173252
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/_virtual/_commonjsHelpers.js +8 -0
- package/dist/_virtual/common.js +4 -0
- package/dist/_virtual/de_DE.js +4 -0
- package/dist/_virtual/de_DE2.js +4 -0
- package/dist/_virtual/de_DE3.js +4 -0
- package/dist/_virtual/de_DE4.js +4 -0
- package/dist/_virtual/de_DE5.js +4 -0
- package/dist/_virtual/de_DE6.js +4 -0
- package/dist/_virtual/defineProperty.js +4 -0
- package/dist/_virtual/es_ES.js +4 -0
- package/dist/_virtual/es_ES2.js +4 -0
- package/dist/_virtual/es_ES3.js +4 -0
- package/dist/_virtual/es_ES4.js +4 -0
- package/dist/_virtual/es_ES5.js +4 -0
- package/dist/_virtual/es_ES6.js +4 -0
- package/dist/_virtual/fr_FR.js +4 -0
- package/dist/_virtual/fr_FR2.js +4 -0
- package/dist/_virtual/fr_FR3.js +4 -0
- package/dist/_virtual/fr_FR4.js +4 -0
- package/dist/_virtual/fr_FR5.js +4 -0
- package/dist/_virtual/fr_FR6.js +4 -0
- package/dist/_virtual/interopRequireDefault.js +4 -0
- package/dist/_virtual/it_IT.js +4 -0
- package/dist/_virtual/it_IT2.js +4 -0
- package/dist/_virtual/it_IT3.js +4 -0
- package/dist/_virtual/it_IT4.js +4 -0
- package/dist/_virtual/it_IT5.js +4 -0
- package/dist/_virtual/it_IT6.js +4 -0
- package/dist/_virtual/localeData.js +4 -0
- package/dist/_virtual/objectSpread2.js +4 -0
- package/dist/_virtual/pt_PT.js +4 -0
- package/dist/_virtual/pt_PT2.js +4 -0
- package/dist/_virtual/pt_PT3.js +4 -0
- package/dist/_virtual/pt_PT4.js +4 -0
- package/dist/_virtual/pt_PT5.js +4 -0
- package/dist/_virtual/pt_PT6.js +4 -0
- package/dist/_virtual/toPrimitive.js +4 -0
- package/dist/_virtual/toPropertyKey.js +4 -0
- package/dist/_virtual/typeof.js +4 -0
- package/dist/_virtual/weekday.js +4 -0
- package/dist/components/AppIcon/index.d.ts +1 -0
- package/dist/components/Badge/Badge.d.ts +12 -1
- package/dist/components/Badge/Badge.js +15 -2
- package/dist/components/Combobox/Combobox.js +1 -1
- package/dist/components/Combobox/ComboboxTrigger.js +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +57 -0
- package/dist/components/DatePicker/DatePicker.js +38 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/Divider/Divider.d.ts +38 -0
- package/dist/components/Divider/Divider.js +11 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Dropdown/DropdownContext.js +1 -1
- package/dist/components/Flex/Flex.js +1 -1
- package/dist/components/Form/FormContext.js +1 -1
- package/dist/components/Layout/Layout.js +1 -2
- package/dist/components/Menu/components/MenuButton.d.ts +2 -0
- package/dist/components/Menu/components/MenuButton.js +13 -4
- package/dist/components/Modal/Modal.d.ts +4 -0
- package/dist/components/Modal/Modal.js +13 -12
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +59 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +24 -0
- package/dist/components/SegmentedControl/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +6 -2
- package/dist/components/Select/Select.js +10 -4
- package/dist/components/Toolbar/Toolbar.js +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/editor.js +42 -38
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useConversation/useConversation.js +3 -1
- package/dist/hooks/useDropdown/useDropdown.js +1 -1
- package/dist/hooks/useDropzone/useDropzone.d.ts +2 -2
- package/dist/hooks/useDropzone/useDropzone.js +24 -4
- 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 +302 -298
- package/dist/index.js +230 -212
- package/dist/modals.js +14 -12
- package/dist/modules/comments/components/Comment.js +8 -6
- package/dist/modules/comments/components/CommentDate.js +7 -10
- package/dist/modules/comments/components/CommentDeleted.js +1 -1
- package/dist/modules/comments/components/CommentForm.d.ts +1 -1
- package/dist/modules/comments/components/CommentForm.js +6 -6
- package/dist/modules/comments/components/CommentList.js +1 -1
- package/dist/modules/comments/components/CommentTitle.js +1 -1
- package/dist/modules/comments/components/DeleteModal.js +14 -8
- package/dist/modules/comments/provider/CommentProvider.js +4 -4
- package/dist/modules/comments/types.d.ts +3 -1
- package/dist/modules/editor/components/Editor/Editor.js +1 -1
- 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/editor/components/Renderer/AttachmentRenderer.js +2 -2
- package/dist/modules/editor/hooks/useMediaLibraryEditor.js +4 -3
- package/dist/modules/editor/hooks/useTipTapEditor.js +4 -4
- package/dist/modules/icons/components/IconClockAlert.d.ts +7 -0
- package/dist/modules/icons/components/IconClockAlert.js +17 -0
- package/dist/modules/icons/components/IconSubmitToValidate.d.ts +7 -0
- package/dist/modules/icons/components/IconSubmitToValidate.js +12 -0
- package/dist/modules/icons/components/index.d.ts +2 -0
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js +5 -5
- package/dist/modules/modals/ResourceModal/ResourceModal.js +1 -2
- package/dist/modules/modals/ShareModal/ShareBookmark.d.ts +1 -1
- package/dist/modules/modals/ShareModal/ShareBookmark.js +6 -3
- package/dist/modules/modals/ShareModal/ShareBookmarkLine.js +4 -4
- 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 +187 -0
- package/dist/modules/modals/ShareModal/ShareResources.js +148 -0
- package/dist/modules/modals/ShareModal/hooks/useSearch.d.ts +5 -3
- package/dist/modules/modals/ShareModal/hooks/useSearch.js +12 -16
- 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/modules/multimedia/Linker/ExternalLinker/ExternalLinker.js +1 -2
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +1 -2
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +1 -1
- package/dist/modules/multimedia/MediaLibrary/index.d.ts +2 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js +1 -1
- package/dist/modules/multimedia/index.d.ts +1 -0
- package/dist/multimedia.js +20 -14
- package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/defineProperty.js +18 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/interopRequireDefault.js +13 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/objectSpread2.js +31 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/toPrimitive.js +20 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/toPropertyKey.js +15 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/typeof.js +16 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/de_DE.js +11 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/es_ES.js +11 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/fr_FR.js +11 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/it_IT.js +11 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/pt_PT.js +11 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/de_DE.js +22 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/es_ES.js +22 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/fr_FR.js +27 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/it_IT.js +20 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/pt_PT.js +45 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/de_DE.js +145 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/es_ES.js +145 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/fr_FR.js +144 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/it_IT.js +156 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/pt_PT.js +158 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/de_DE.js +10 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/es_ES.js +10 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/fr_FR.js +10 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/it_IT.js +10 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/pt_PT.js +10 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/de_DE.js +8 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/es_ES.js +8 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/fr_FR.js +8 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/it_IT.js +8 -0
- package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/pt_PT.js +8 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/localeData.js +82 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/weekday.js +19 -0
- package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/de_DE.js +21 -0
- package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/es_ES.js +21 -0
- package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/fr_FR.js +21 -0
- package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/it_IT.js +21 -0
- package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/pt_PT.js +21 -0
- package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/common.js +14 -0
- package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/de_DE.js +37 -0
- package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/es_ES.js +37 -0
- package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/fr_FR.js +38 -0
- package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/it_IT.js +37 -0
- package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/pt_PT.js +39 -0
- package/dist/providers/AntThemeProvider/AntProvider.d.ts +2 -2
- package/dist/providers/AntThemeProvider/AntProvider.js +19 -2
- package/dist/providers/AntThemeProvider/antThemeConfig.js +1 -2
- package/dist/style.css +1 -1
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/mime-types/index.d.ts +1 -0
- package/dist/utilities/mime-types/mime-types-utils.d.ts +1 -0
- package/dist/utilities/mime-types/mime-types-utils.js +4 -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 -7
- package/dist/modules/comments/components/CommentHeader.d.ts +0 -3
- package/dist/modules/comments/components/CommentHeader.js +0 -8
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __exports as pt_PT } from "../../../../../../../_virtual/pt_PT6.js";
|
|
2
|
+
import { i as interopRequireDefaultExports } from "../../../../../@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/interopRequireDefault.js";
|
|
3
|
+
import { o as objectSpread2Exports } from "../../../../../@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/objectSpread2.js";
|
|
4
|
+
import "./common.js";
|
|
5
|
+
import { __exports as common } from "../../../../../../../_virtual/common.js";
|
|
6
|
+
var _interopRequireDefault = interopRequireDefaultExports.default;
|
|
7
|
+
Object.defineProperty(pt_PT, "__esModule", {
|
|
8
|
+
value: !0
|
|
9
|
+
});
|
|
10
|
+
pt_PT.default = void 0;
|
|
11
|
+
var _objectSpread2 = _interopRequireDefault(objectSpread2Exports), _common = common, locale = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _common.commonLocale), {}, {
|
|
12
|
+
locale: "pt_PT",
|
|
13
|
+
today: "Hoje",
|
|
14
|
+
now: "Agora",
|
|
15
|
+
backToToday: "Hoje",
|
|
16
|
+
ok: "OK",
|
|
17
|
+
clear: "Limpar",
|
|
18
|
+
week: "Semana",
|
|
19
|
+
month: "Mês",
|
|
20
|
+
year: "Ano",
|
|
21
|
+
timeSelect: "Selecionar hora",
|
|
22
|
+
dateSelect: "Selecionar data",
|
|
23
|
+
monthSelect: "Selecionar mês",
|
|
24
|
+
yearSelect: "Selecionar ano",
|
|
25
|
+
decadeSelect: "Selecionar década",
|
|
26
|
+
dateFormat: "D/M/YYYY",
|
|
27
|
+
dateTimeFormat: "D/M/YYYY HH:mm:ss",
|
|
28
|
+
previousMonth: "Mês anterior (PageUp)",
|
|
29
|
+
nextMonth: "Mês seguinte (PageDown)",
|
|
30
|
+
previousYear: "Ano anterior (Control + left)",
|
|
31
|
+
nextYear: "Ano seguinte (Control + right)",
|
|
32
|
+
previousDecade: "Década anterior",
|
|
33
|
+
nextDecade: "Década seguinte",
|
|
34
|
+
previousCentury: "Século anterior",
|
|
35
|
+
nextCentury: "Século seguinte",
|
|
36
|
+
shortWeekDays: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
|
|
37
|
+
shortMonths: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"]
|
|
38
|
+
});
|
|
39
|
+
pt_PT.default = locale;
|
|
@@ -3,8 +3,8 @@ interface AntProviderProps {
|
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
|
-
* Provider
|
|
7
|
-
*
|
|
6
|
+
* Provider for Ant Design that integrates the custom theme
|
|
7
|
+
* with Edifice's existing design system
|
|
8
8
|
*/
|
|
9
9
|
export declare const AntProvider: React.FC<AntProviderProps>;
|
|
10
10
|
export default AntProvider;
|
|
@@ -2,9 +2,26 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { ConfigProvider } from "antd";
|
|
3
3
|
import { antTheme } from "./antThemeConfig.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
|
|
5
|
+
import { useEdificeClient } from "../EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
6
|
+
import frFR from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/fr_FR.js";
|
|
7
|
+
import deDE from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/de_DE.js";
|
|
8
|
+
import esES from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/es_ES.js";
|
|
9
|
+
import itIT from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/it_IT.js";
|
|
10
|
+
import ptPT from "../../node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/pt_PT.js";
|
|
11
|
+
const antdLocaleMap = {
|
|
12
|
+
fr: frFR,
|
|
13
|
+
de: deDE,
|
|
14
|
+
es: esES,
|
|
15
|
+
it: itIT,
|
|
16
|
+
pt: ptPT
|
|
17
|
+
}, AntProvider = ({
|
|
6
18
|
children
|
|
7
|
-
}) =>
|
|
19
|
+
}) => {
|
|
20
|
+
const {
|
|
21
|
+
currentLanguage
|
|
22
|
+
} = useEdificeClient(), locale = currentLanguage ? antdLocaleMap[currentLanguage] ?? frFR : frFR;
|
|
23
|
+
return /* @__PURE__ */ jsx(ConfigProvider, { theme: antTheme, locale, children });
|
|
24
|
+
};
|
|
8
25
|
export {
|
|
9
26
|
AntProvider,
|
|
10
27
|
AntProvider as default
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root .edifice{--ant-
|
|
1
|
+
:root .edifice{--ant-border-radius: var(--edifice-border-radius)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './mime-types-utils';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const HEIC_MIME_TYPES: string[];
|
|
@@ -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.
|
|
3
|
+
"version": "2.5.8-develop-b2school.20260122173252",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -121,8 +121,9 @@
|
|
|
121
121
|
"@uidotdev/usehooks": "^2.4.1",
|
|
122
122
|
"antd": "^5.29.1",
|
|
123
123
|
"clsx": "^2.1.1",
|
|
124
|
-
"dayjs": "1.11.
|
|
124
|
+
"dayjs": "1.11.19",
|
|
125
125
|
"emoji-picker-react": "4.5.2",
|
|
126
|
+
"heic2any": "0.0.4",
|
|
126
127
|
"html-react-parser": "4.2.1",
|
|
127
128
|
"ohash": "1.1.3",
|
|
128
129
|
"pako": "2.1.0",
|
|
@@ -133,9 +134,9 @@
|
|
|
133
134
|
"react-slugify": "^3.0.3",
|
|
134
135
|
"swiper": "^10.1.0",
|
|
135
136
|
"ua-parser-js": "^1.0.36",
|
|
136
|
-
"@edifice.io/bootstrap": "2.5.
|
|
137
|
-
"@edifice.io/tiptap-extensions": "2.5.
|
|
138
|
-
"@edifice.io/utilities": "2.5.
|
|
137
|
+
"@edifice.io/bootstrap": "2.5.8-develop-b2school.20260122173252",
|
|
138
|
+
"@edifice.io/tiptap-extensions": "2.5.8-develop-b2school.20260122173252",
|
|
139
|
+
"@edifice.io/utilities": "2.5.8-develop-b2school.20260122173252"
|
|
139
140
|
},
|
|
140
141
|
"devDependencies": {
|
|
141
142
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
@@ -166,8 +167,8 @@
|
|
|
166
167
|
"vite": "^5.4.11",
|
|
167
168
|
"vite-plugin-dts": "^4.1.0",
|
|
168
169
|
"vite-tsconfig-paths": "^5.0.1",
|
|
169
|
-
"@edifice.io/client": "2.5.
|
|
170
|
-
"@edifice.io/config": "2.5.
|
|
170
|
+
"@edifice.io/client": "2.5.8-develop-b2school.20260122173252",
|
|
171
|
+
"@edifice.io/config": "2.5.8-develop-b2school.20260122173252"
|
|
171
172
|
},
|
|
172
173
|
"peerDependencies": {
|
|
173
174
|
"@react-spring/web": "^9.7.5",
|