fastapi-rtk 1.0.31 → 1.0.32
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/.bundled/jsonforms/cjs/_virtual/index3.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index4.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index5.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineImageInput.cjs +9 -3
- package/dist/.bundled/jsonforms/esm/_virtual/index3.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index4.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index5.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineImageInput.mjs +9 -3
- package/dist/.external/cjs/ajv@8.17.1/ajv/dist/compile/codegen/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.17.1/ajv/dist/compile/validate/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/discriminator/index.cjs +1 -1
- package/dist/.external/cjs/{i18next@25.8.5_typescript@5.9.3 → i18next@25.8.6_typescript@5.9.3}/i18next/dist/esm/i18next.cjs +4 -2
- package/dist/.external/esm/ajv@8.17.1/ajv/dist/compile/codegen/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.17.1/ajv/dist/compile/validate/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/discriminator/index.mjs +1 -1
- package/dist/.external/esm/{i18next@25.8.5_typescript@5.9.3 → i18next@25.8.6_typescript@5.9.3}/i18next/dist/esm/i18next.mjs +4 -2
- package/dist/core/cjs/ActionIcons/Add/Add.cjs +1 -1
- package/dist/core/cjs/ActionIcons/Delete/Delete.cjs +1 -1
- package/dist/core/cjs/ActionIcons/Download/Download.cjs +1 -1
- package/dist/core/cjs/ActionIcons/Edit/Edit.cjs +1 -1
- package/dist/core/cjs/ActionIcons/Refresh/Refresh.cjs +1 -1
- package/dist/core/cjs/ActionIcons/View/View.cjs +1 -1
- package/dist/core/cjs/Dialogs/AddDialog.cjs +1 -1
- package/dist/core/cjs/Dialogs/DeleteDialog.cjs +1 -1
- package/dist/core/cjs/Dialogs/EditDialog.cjs +1 -1
- package/dist/core/cjs/Modals/CommonModal.cjs +1 -1
- package/dist/core/cjs/Tables/DataGrid/ErrorDialog.cjs +1 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.cjs +1 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/HeaderInputs/HeaderBetweenInput.cjs +1 -1
- package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.cjs +1 -1
- package/dist/core/cjs/Wrappers/ApiProvider/hooks/useProvideApi.cjs +6 -0
- package/dist/core/cjs/Wrappers/Provider/Contexts/LangContext.cjs +3 -3
- package/dist/core/cjs/Wrappers/Provider/hooks/useProvideLang.cjs +1 -1
- package/dist/core/cjs/index.cjs +1 -1
- package/dist/core/esm/ActionIcons/Add/Add.mjs +1 -1
- package/dist/core/esm/ActionIcons/Delete/Delete.mjs +1 -1
- package/dist/core/esm/ActionIcons/Download/Download.mjs +1 -1
- package/dist/core/esm/ActionIcons/Edit/Edit.mjs +1 -1
- package/dist/core/esm/ActionIcons/Refresh/Refresh.mjs +1 -1
- package/dist/core/esm/ActionIcons/View/View.mjs +1 -1
- package/dist/core/esm/Dialogs/AddDialog.mjs +1 -1
- package/dist/core/esm/Dialogs/DeleteDialog.mjs +1 -1
- package/dist/core/esm/Dialogs/EditDialog.mjs +1 -1
- package/dist/core/esm/Modals/CommonModal.mjs +1 -1
- package/dist/core/esm/Tables/DataGrid/ErrorDialog.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/ColumnHeaderFilterInput.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/ColumnHeaderFilterInput/HeaderInputs/HeaderBetweenInput.mjs +1 -1
- package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.mjs +1 -1
- package/dist/core/esm/Wrappers/ApiProvider/hooks/useProvideApi.mjs +6 -0
- package/dist/core/esm/Wrappers/Provider/Contexts/LangContext.mjs +3 -3
- package/dist/core/esm/Wrappers/Provider/hooks/useProvideLang.mjs +1 -1
- package/dist/core/esm/index.mjs +1 -1
- package/dist/core/lib/Tables/NextGenDataGrid/NextGenDataGrid.d.ts +8 -0
- package/dist/core/lib/Wrappers/ApiProvider/hooks/useProvideApi.d.ts +2 -0
- package/dist/core/lib/hooks/api/useApi.d.ts +8 -0
- package/dist/jsonforms/cjs/MantineInputs/MantineImageInput.cjs +9 -3
- package/dist/jsonforms/esm/MantineInputs/MantineImageInput.mjs +9 -3
- package/package.json +1 -1
- /package/dist/.external/cjs/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/I18nextProvider.cjs +0 -0
- /package/dist/.external/cjs/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/context.cjs +0 -0
- /package/dist/.external/cjs/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/defaults.cjs +0 -0
- /package/dist/.external/cjs/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/i18nInstance.cjs +0 -0
- /package/dist/.external/cjs/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/initReactI18next.cjs +0 -0
- /package/dist/.external/cjs/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/unescape.cjs +0 -0
- /package/dist/.external/cjs/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/useTranslation.cjs +0 -0
- /package/dist/.external/cjs/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/utils.cjs +0 -0
- /package/dist/.external/esm/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/I18nextProvider.mjs +0 -0
- /package/dist/.external/esm/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/context.mjs +0 -0
- /package/dist/.external/esm/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/defaults.mjs +0 -0
- /package/dist/.external/esm/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/i18nInstance.mjs +0 -0
- /package/dist/.external/esm/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/initReactI18next.mjs +0 -0
- /package/dist/.external/esm/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/unescape.mjs +0 -0
- /package/dist/.external/esm/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/useTranslation.mjs +0 -0
- /package/dist/.external/esm/{react-i18next@15.7.4_i18next@25.8.5_react-dom@19.2.4_react@19.2.4_typescript@5.9.3 → react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3}/react-i18next/dist/es/utils.mjs +0 -0
package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineImageInput.cjs
CHANGED
|
@@ -5,12 +5,18 @@ const core = require("fastapi-rtk/core");
|
|
|
5
5
|
const core$1 = require("@mantine/core");
|
|
6
6
|
const MantineFileInput = require("./MantineFileInput.cjs");
|
|
7
7
|
function MantineImageInput(props) {
|
|
8
|
-
const { path } = core.useApi({
|
|
8
|
+
const { path, getImageURL } = core.useApi({
|
|
9
|
+
throwOnError: false,
|
|
10
|
+
defaultValue: {
|
|
11
|
+
path: "",
|
|
12
|
+
getImageURL: (item) => typeof item === "string" ? item : URL.createObjectURL(item)
|
|
13
|
+
}
|
|
14
|
+
});
|
|
9
15
|
return /* @__PURE__ */ jsxRuntime.jsx(MantineFileInput.InnerMantineFileInput, { ...props, contextName: "Image", children: ({ jsonFormsProps }) => jsonFormsProps.data ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
16
|
core$1.Image,
|
|
11
17
|
{
|
|
12
|
-
src:
|
|
13
|
-
alt: "
|
|
18
|
+
src: getImageURL(jsonFormsProps.data),
|
|
19
|
+
alt: "Selected Image",
|
|
14
20
|
mah: 200,
|
|
15
21
|
fit: "scale-down",
|
|
16
22
|
radius: "md",
|
package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineImageInput.mjs
CHANGED
|
@@ -3,12 +3,18 @@ import { useApi } from "fastapi-rtk/core";
|
|
|
3
3
|
import { Image } from "@mantine/core";
|
|
4
4
|
import { InnerMantineFileInput } from "./MantineFileInput.mjs";
|
|
5
5
|
function MantineImageInput(props) {
|
|
6
|
-
const { path } = useApi({
|
|
6
|
+
const { path, getImageURL } = useApi({
|
|
7
|
+
throwOnError: false,
|
|
8
|
+
defaultValue: {
|
|
9
|
+
path: "",
|
|
10
|
+
getImageURL: (item) => typeof item === "string" ? item : URL.createObjectURL(item)
|
|
11
|
+
}
|
|
12
|
+
});
|
|
7
13
|
return /* @__PURE__ */ jsx(InnerMantineFileInput, { ...props, contextName: "Image", children: ({ jsonFormsProps }) => jsonFormsProps.data ? /* @__PURE__ */ jsx(
|
|
8
14
|
Image,
|
|
9
15
|
{
|
|
10
|
-
src:
|
|
11
|
-
alt: "
|
|
16
|
+
src: getImageURL(jsonFormsProps.data),
|
|
17
|
+
alt: "Selected Image",
|
|
12
18
|
mah: 200,
|
|
13
19
|
fit: "scale-down",
|
|
14
20
|
radius: "md",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/
|
|
3
|
+
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index3.cjs");
|
|
4
4
|
const code = require("./code.cjs");
|
|
5
5
|
const scope = require("./scope.cjs");
|
|
6
6
|
var hasRequiredCodegen;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/
|
|
3
|
+
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index5.cjs");
|
|
4
4
|
const boolSchema = require("./boolSchema.cjs");
|
|
5
5
|
const dataType = require("./dataType.cjs");
|
|
6
6
|
const applicability = require("./applicability.cjs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/
|
|
3
|
+
const index = require("../../../../../../../.bundled/jsonforms/cjs/_virtual/index4.cjs");
|
|
4
4
|
const index$1 = require("../../compile/codegen/index.cjs");
|
|
5
5
|
const types = require("./types.cjs");
|
|
6
6
|
const index$2 = require("../../compile/index.cjs");
|
|
@@ -1705,6 +1705,7 @@ const bindMemberFunctions = (inst) => {
|
|
|
1705
1705
|
}
|
|
1706
1706
|
});
|
|
1707
1707
|
};
|
|
1708
|
+
let supportNoticeShown = false;
|
|
1708
1709
|
const usesLocize = (inst) => {
|
|
1709
1710
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
1710
1711
|
if (((_c = (_b = (_a = inst == null ? void 0 : inst.modules) == null ? void 0 : _a.backend) == null ? void 0 : _b.name) == null ? void 0 : _c.indexOf("Locize")) > 0) return true;
|
|
@@ -1769,8 +1770,9 @@ class I18n extends EventEmitter {
|
|
|
1769
1770
|
if (typeof this.options.overloadTranslationOptionHandler !== "function") {
|
|
1770
1771
|
this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;
|
|
1771
1772
|
}
|
|
1772
|
-
if (this.options.showSupportNotice !== false && !usesLocize(this)) {
|
|
1773
|
-
if (typeof console !== "undefined" && typeof console.info !== "undefined") console.info("🌐 i18next is maintained with support from
|
|
1773
|
+
if (this.options.showSupportNotice !== false && !usesLocize(this) && !supportNoticeShown) {
|
|
1774
|
+
if (typeof console !== "undefined" && typeof console.info !== "undefined") console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");
|
|
1775
|
+
supportNoticeShown = true;
|
|
1774
1776
|
}
|
|
1775
1777
|
const createClassOnDemand = (ClassOrObject) => {
|
|
1776
1778
|
if (!ClassOrObject) return null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as codegen } from "../../../../../../../.bundled/jsonforms/esm/_virtual/
|
|
1
|
+
import { __exports as codegen } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index3.mjs";
|
|
2
2
|
import { __require as requireCode } from "./code.mjs";
|
|
3
3
|
import { __require as requireScope } from "./scope.mjs";
|
|
4
4
|
var hasRequiredCodegen;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as validate } from "../../../../../../../.bundled/jsonforms/esm/_virtual/
|
|
1
|
+
import { __exports as validate } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index5.mjs";
|
|
2
2
|
import { __require as requireBoolSchema } from "./boolSchema.mjs";
|
|
3
3
|
import { __require as requireDataType } from "./dataType.mjs";
|
|
4
4
|
import { __require as requireApplicability } from "./applicability.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __exports as discriminator } from "../../../../../../../.bundled/jsonforms/esm/_virtual/
|
|
1
|
+
import { __exports as discriminator } from "../../../../../../../.bundled/jsonforms/esm/_virtual/index4.mjs";
|
|
2
2
|
import { __require as requireCodegen } from "../../compile/codegen/index.mjs";
|
|
3
3
|
import { __require as requireTypes } from "./types.mjs";
|
|
4
4
|
import { __require as requireCompile } from "../../compile/index.mjs";
|
|
@@ -1703,6 +1703,7 @@ const bindMemberFunctions = (inst) => {
|
|
|
1703
1703
|
}
|
|
1704
1704
|
});
|
|
1705
1705
|
};
|
|
1706
|
+
let supportNoticeShown = false;
|
|
1706
1707
|
const usesLocize = (inst) => {
|
|
1707
1708
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
1708
1709
|
if (((_c = (_b = (_a = inst == null ? void 0 : inst.modules) == null ? void 0 : _a.backend) == null ? void 0 : _b.name) == null ? void 0 : _c.indexOf("Locize")) > 0) return true;
|
|
@@ -1767,8 +1768,9 @@ class I18n extends EventEmitter {
|
|
|
1767
1768
|
if (typeof this.options.overloadTranslationOptionHandler !== "function") {
|
|
1768
1769
|
this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;
|
|
1769
1770
|
}
|
|
1770
|
-
if (this.options.showSupportNotice !== false && !usesLocize(this)) {
|
|
1771
|
-
if (typeof console !== "undefined" && typeof console.info !== "undefined") console.info("🌐 i18next is maintained with support from
|
|
1771
|
+
if (this.options.showSupportNotice !== false && !usesLocize(this) && !supportNoticeShown) {
|
|
1772
|
+
if (typeof console !== "undefined" && typeof console.info !== "undefined") console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");
|
|
1773
|
+
supportNoticeShown = true;
|
|
1772
1774
|
}
|
|
1773
1775
|
const createClassOnDemand = (ClassOrObject) => {
|
|
1774
1776
|
if (!ClassOrObject) return null;
|
|
@@ -6,7 +6,7 @@ const core = require("@mantine/core");
|
|
|
6
6
|
const React = require("react");
|
|
7
7
|
const useForms = require("../../hooks/api/useForms.cjs");
|
|
8
8
|
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
9
|
-
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
9
|
+
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
10
10
|
const IconPlus = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconPlus.cjs");
|
|
11
11
|
const Add = React.memo(({ tooltipProps, ...props }) => {
|
|
12
12
|
const { t } = useTranslation.useTranslation();
|
|
@@ -6,7 +6,7 @@ const core = require("@mantine/core");
|
|
|
6
6
|
const React = require("react");
|
|
7
7
|
const useForms = require("../../hooks/api/useForms.cjs");
|
|
8
8
|
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
9
|
-
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
9
|
+
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
10
10
|
const IconTrash = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconTrash.cjs");
|
|
11
11
|
const Delete = React.memo(({ id, ...props }) => {
|
|
12
12
|
const { t } = useTranslation.useTranslation();
|
|
@@ -8,7 +8,7 @@ const hooks = require("@mantine/hooks");
|
|
|
8
8
|
const React = require("react");
|
|
9
9
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
10
10
|
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
11
|
-
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
11
|
+
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
12
12
|
const IconSeparatorVertical = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconSeparatorVertical.cjs");
|
|
13
13
|
const IconDownload = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconDownload.cjs");
|
|
14
14
|
const Download = React.memo(({ tooltipProps, ...props }) => {
|
|
@@ -9,7 +9,7 @@ const React = require("react");
|
|
|
9
9
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
10
10
|
const useForms = require("../../hooks/api/useForms.cjs");
|
|
11
11
|
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
12
|
-
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
12
|
+
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
13
13
|
const IconPencil = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconPencil.cjs");
|
|
14
14
|
const Edit = React.memo(({ id, ...props }) => {
|
|
15
15
|
const { getEntry } = useApi.useApi();
|
|
@@ -6,7 +6,7 @@ const core = require("@mantine/core");
|
|
|
6
6
|
const React = require("react");
|
|
7
7
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
8
8
|
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
9
|
-
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
9
|
+
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
10
10
|
const IconRefresh = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconRefresh.cjs");
|
|
11
11
|
const Refresh = React.memo(({ tooltipProps, ...props }) => {
|
|
12
12
|
const { t } = useTranslation.useTranslation();
|
|
@@ -9,7 +9,7 @@ const React = require("react");
|
|
|
9
9
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
10
10
|
const useForms = require("../../hooks/api/useForms.cjs");
|
|
11
11
|
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
12
|
-
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
12
|
+
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
13
13
|
const IconEye = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconEye.cjs");
|
|
14
14
|
const View = React.memo(({ id, ...props }) => {
|
|
15
15
|
const { getEntry } = useApi.useApi();
|
|
@@ -17,7 +17,7 @@ const CommonModal = require("../Modals/CommonModal.cjs");
|
|
|
17
17
|
const normalProps = require("../Modals/normalProps.cjs");
|
|
18
18
|
const overlayProps = require("../Modals/overlayProps.cjs");
|
|
19
19
|
const FormField = require("../Tables/DataGrid/FormField/FormField.cjs");
|
|
20
|
-
const useTranslation = require("../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
20
|
+
const useTranslation = require("../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
21
21
|
function AddDialog({
|
|
22
22
|
jsonForms: __jsonForms,
|
|
23
23
|
onSuccess,
|
|
@@ -10,7 +10,7 @@ const overlayProps = require("../Modals/overlayProps.cjs");
|
|
|
10
10
|
const useApi = require("../hooks/api/useApi.cjs");
|
|
11
11
|
const useForms = require("../hooks/api/useForms.cjs");
|
|
12
12
|
require("../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
13
|
-
const useTranslation = require("../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
13
|
+
const useTranslation = require("../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
14
14
|
const DeleteDialog = ({ deleteText, onSuccess, onError, ...props }) => {
|
|
15
15
|
const { refetch, refetchInfo, deleteEntry } = useApi.useApi();
|
|
16
16
|
const { t } = useTranslation.useTranslation();
|
|
@@ -20,7 +20,7 @@ const CommonModal = require("../Modals/CommonModal.cjs");
|
|
|
20
20
|
const normalProps = require("../Modals/normalProps.cjs");
|
|
21
21
|
const overlayProps = require("../Modals/overlayProps.cjs");
|
|
22
22
|
const FormField = require("../Tables/DataGrid/FormField/FormField.cjs");
|
|
23
|
-
const useTranslation = require("../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
23
|
+
const useTranslation = require("../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
24
24
|
function EditDialog({
|
|
25
25
|
jsonForms: __jsonForms,
|
|
26
26
|
onSuccess,
|
|
@@ -7,7 +7,7 @@ const iconify = require("../../../.external/cjs/@iconify_react@6.0.2_react@19.2.
|
|
|
7
7
|
const core = require("@mantine/core");
|
|
8
8
|
const useInfo = require("../hooks/auth/useInfo.cjs");
|
|
9
9
|
require("../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
10
|
-
const useTranslation = require("../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
10
|
+
const useTranslation = require("../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
11
11
|
function CommonModal({
|
|
12
12
|
children,
|
|
13
13
|
view,
|
|
@@ -5,7 +5,7 @@ const core = require("@mantine/core");
|
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const useApi = require("../../hooks/api/useApi.cjs");
|
|
7
7
|
require("../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
8
|
-
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
8
|
+
const useTranslation = require("../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
9
9
|
const IconAlertCircle = require("../../../../.external/cjs/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconAlertCircle.cjs");
|
|
10
10
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11
11
|
const MessageRenderer = ({ message }) => {
|
|
@@ -13,7 +13,7 @@ const useApi = require("../../../../../hooks/api/useApi.cjs");
|
|
|
13
13
|
require("../../../../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
14
14
|
const utils$1 = require("../utils.cjs");
|
|
15
15
|
const HeaderInput = require("./HeaderInput.cjs");
|
|
16
|
-
const useTranslation = require("../../../../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
16
|
+
const useTranslation = require("../../../../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
17
17
|
const getLocalStorageValue = (key, defaultValue) => {
|
|
18
18
|
const value = localStorage.getItem(key);
|
|
19
19
|
if (value === null) {
|
|
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const core = require("@mantine/core");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
require("../../../../../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
7
|
-
const useTranslation = require("../../../../../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
7
|
+
const useTranslation = require("../../../../../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
8
8
|
const IconX = require("../../../../../../../../.external/cjs/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconX.cjs");
|
|
9
9
|
const criteria = (v) => v !== void 0 && v !== null && v !== "";
|
|
10
10
|
const HeaderBetweenInput = React.forwardRef(({ clearIcon: _, mrtprops: { textinputprops }, ...props }, ref) => {
|
package/dist/core/cjs/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.cjs
CHANGED
|
@@ -8,7 +8,7 @@ const useAuth = require("../../../../hooks/auth/useAuth.cjs");
|
|
|
8
8
|
require("../../../../Wrappers/Provider/Contexts/LangContext.cjs");
|
|
9
9
|
const AdvancedFilters = require("./AdvancedFilters.cjs");
|
|
10
10
|
const FilterMenuButton = require("./FilterMenuButton.cjs");
|
|
11
|
-
const useTranslation = require("../../../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
11
|
+
const useTranslation = require("../../../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
12
12
|
const HeaderAdvancedFiltersMenuButton = ({ filters, mrtProps }) => {
|
|
13
13
|
const { t } = useTranslation.useTranslation();
|
|
14
14
|
const { table, column } = mrtProps;
|
|
@@ -271,6 +271,10 @@ function useProvideApi({
|
|
|
271
271
|
},
|
|
272
272
|
[api, resetError, throwOnError]
|
|
273
273
|
);
|
|
274
|
+
const getItemURL = React.useCallback(
|
|
275
|
+
(type, item) => typeof item === "string" ? utils.urlJoin(path, `_${type}`, item) : URL.createObjectURL(item),
|
|
276
|
+
[path]
|
|
277
|
+
);
|
|
274
278
|
const [streaming, setStreaming] = hooks.useSetState({
|
|
275
279
|
data: {},
|
|
276
280
|
isEnd: false,
|
|
@@ -342,6 +346,8 @@ function useProvideApi({
|
|
|
342
346
|
deleteEntry,
|
|
343
347
|
download,
|
|
344
348
|
upload,
|
|
349
|
+
getFileURL: (item) => getItemURL("file", item),
|
|
350
|
+
getImageURL: (item) => getItemURL("image", item),
|
|
345
351
|
resetError
|
|
346
352
|
};
|
|
347
353
|
}
|
|
@@ -5,12 +5,12 @@ const constants = require("fastapi-rtk/constants");
|
|
|
5
5
|
const utils = require("fastapi-rtk/utils");
|
|
6
6
|
const zustand = require("fastapi-rtk/zustand");
|
|
7
7
|
const hooks = require("@mantine/hooks");
|
|
8
|
-
const i18next = require("../../../../../.external/cjs/i18next@25.8.
|
|
8
|
+
const i18next = require("../../../../../.external/cjs/i18next@25.8.6_typescript@5.9.3/i18next/dist/esm/i18next.cjs");
|
|
9
9
|
const React = require("react");
|
|
10
10
|
const de = require("../../../translations/de.cjs");
|
|
11
11
|
const useProvideLang = require("../hooks/useProvideLang.cjs");
|
|
12
|
-
const I18nextProvider = require("../../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
13
|
-
const initReactI18next = require("../../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
12
|
+
const I18nextProvider = require("../../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/I18nextProvider.cjs");
|
|
13
|
+
const initReactI18next = require("../../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/initReactI18next.cjs");
|
|
14
14
|
const getI18n = ({ initProps, callback, translations } = {}) => {
|
|
15
15
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
16
16
|
const i18n = i18next.createInstance();
|
|
@@ -4,7 +4,7 @@ const constants = require("fastapi-rtk/constants");
|
|
|
4
4
|
const utils = require("fastapi-rtk/utils");
|
|
5
5
|
const hooks = require("@mantine/hooks");
|
|
6
6
|
const React = require("react");
|
|
7
|
-
const useTranslation = require("../../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
7
|
+
const useTranslation = require("../../../../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
8
8
|
const useProvideLang = (baseMRTLocalization = {}) => {
|
|
9
9
|
const translation = useTranslation.useTranslation();
|
|
10
10
|
const [localStorageLanguage, setLocalStorageLanguage] = hooks.useLocalStorage(constants.LANG_LOCAL_STORAGE_PROPS);
|
package/dist/core/cjs/index.cjs
CHANGED
|
@@ -39,7 +39,7 @@ const utils = require("fastapi-rtk/utils");
|
|
|
39
39
|
const zustand = require("fastapi-rtk/zustand");
|
|
40
40
|
const index = require("../../.external/cjs/@tanstack_react-query@5.90.21_react@19.2.4/@tanstack/react-query/build/modern/index.cjs");
|
|
41
41
|
const index_esm = require("../../.external/cjs/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._7jqiyi5sshrifwwn7z7vmkfdl4/mantine-react-table/dist/index.esm.cjs");
|
|
42
|
-
const useTranslation = require("../../.external/cjs/react-i18next@15.7.4_i18next@25.8.
|
|
42
|
+
const useTranslation = require("../../.external/cjs/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
43
43
|
exports.Actions = Actions.Actions;
|
|
44
44
|
exports.Add = Add.Add;
|
|
45
45
|
exports.Delete = Delete.Delete;
|
|
@@ -4,7 +4,7 @@ import { Tooltip, ActionIcon } from "@mantine/core";
|
|
|
4
4
|
import { memo } from "react";
|
|
5
5
|
import { useForms } from "../../hooks/api/useForms.mjs";
|
|
6
6
|
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
7
|
-
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
7
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
8
8
|
import IconPlus from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconPlus.mjs";
|
|
9
9
|
const Add = memo(({ tooltipProps, ...props }) => {
|
|
10
10
|
const { t } = useTranslation();
|
|
@@ -4,7 +4,7 @@ import { Tooltip, ActionIcon } from "@mantine/core";
|
|
|
4
4
|
import { memo } from "react";
|
|
5
5
|
import { useForms } from "../../hooks/api/useForms.mjs";
|
|
6
6
|
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
7
|
-
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
7
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
8
8
|
import IconTrash from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconTrash.mjs";
|
|
9
9
|
const Delete = memo(({ id, ...props }) => {
|
|
10
10
|
const { t } = useTranslation();
|
|
@@ -6,7 +6,7 @@ import { useDisclosure, useDebouncedState } from "@mantine/hooks";
|
|
|
6
6
|
import { memo, useState } from "react";
|
|
7
7
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
8
8
|
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
9
|
-
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
9
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
10
10
|
import IconSeparatorVertical from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconSeparatorVertical.mjs";
|
|
11
11
|
import IconDownload from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconDownload.mjs";
|
|
12
12
|
const Download = memo(({ tooltipProps, ...props }) => {
|
|
@@ -7,7 +7,7 @@ import { memo } from "react";
|
|
|
7
7
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
8
8
|
import { useForms } from "../../hooks/api/useForms.mjs";
|
|
9
9
|
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
10
|
-
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
10
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
11
11
|
import IconPencil from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconPencil.mjs";
|
|
12
12
|
const Edit = memo(({ id, ...props }) => {
|
|
13
13
|
const { getEntry } = useApi();
|
|
@@ -4,7 +4,7 @@ import { ThemeIcon, Loader, Tooltip, ActionIcon } from "@mantine/core";
|
|
|
4
4
|
import { memo, useState } from "react";
|
|
5
5
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
6
6
|
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
7
|
-
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
7
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
8
8
|
import IconRefresh from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconRefresh.mjs";
|
|
9
9
|
const Refresh = memo(({ tooltipProps, ...props }) => {
|
|
10
10
|
const { t } = useTranslation();
|
|
@@ -7,7 +7,7 @@ import { memo } from "react";
|
|
|
7
7
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
8
8
|
import { useForms } from "../../hooks/api/useForms.mjs";
|
|
9
9
|
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
10
|
-
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
10
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
11
11
|
import IconEye from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconEye.mjs";
|
|
12
12
|
const View = memo(({ id, ...props }) => {
|
|
13
13
|
const { getEntry } = useApi();
|
|
@@ -15,7 +15,7 @@ import { CommonModal } from "../Modals/CommonModal.mjs";
|
|
|
15
15
|
import { normalProps } from "../Modals/normalProps.mjs";
|
|
16
16
|
import { overlayProps } from "../Modals/overlayProps.mjs";
|
|
17
17
|
import { FormField } from "../Tables/DataGrid/FormField/FormField.mjs";
|
|
18
|
-
import { useTranslation } from "../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
18
|
+
import { useTranslation } from "../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
19
19
|
function AddDialog({
|
|
20
20
|
jsonForms: __jsonForms,
|
|
21
21
|
onSuccess,
|
|
@@ -8,7 +8,7 @@ import { overlayProps } from "../Modals/overlayProps.mjs";
|
|
|
8
8
|
import { useApi } from "../hooks/api/useApi.mjs";
|
|
9
9
|
import { useForms } from "../hooks/api/useForms.mjs";
|
|
10
10
|
import "../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
11
|
-
import { useTranslation } from "../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
11
|
+
import { useTranslation } from "../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
12
12
|
const DeleteDialog = ({ deleteText, onSuccess, onError, ...props }) => {
|
|
13
13
|
const { refetch, refetchInfo, deleteEntry } = useApi();
|
|
14
14
|
const { t } = useTranslation();
|
|
@@ -18,7 +18,7 @@ import { CommonModal } from "../Modals/CommonModal.mjs";
|
|
|
18
18
|
import { normalProps } from "../Modals/normalProps.mjs";
|
|
19
19
|
import { overlayProps } from "../Modals/overlayProps.mjs";
|
|
20
20
|
import { FormField } from "../Tables/DataGrid/FormField/FormField.mjs";
|
|
21
|
-
import { useTranslation } from "../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
21
|
+
import { useTranslation } from "../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
22
22
|
function EditDialog({
|
|
23
23
|
jsonForms: __jsonForms,
|
|
24
24
|
onSuccess,
|
|
@@ -5,7 +5,7 @@ import { Icon } from "../../../.external/esm/@iconify_react@6.0.2_react@19.2.4/@
|
|
|
5
5
|
import { Modal, Box, Group, Button, CloseButton } from "@mantine/core";
|
|
6
6
|
import { useInfo } from "../hooks/auth/useInfo.mjs";
|
|
7
7
|
import "../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
8
|
-
import { useTranslation } from "../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
8
|
+
import { useTranslation } from "../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
9
9
|
function CommonModal({
|
|
10
10
|
children,
|
|
11
11
|
view,
|
|
@@ -3,7 +3,7 @@ import { Modal, Group, Text, List, Grid, Card } from "@mantine/core";
|
|
|
3
3
|
import { useMemo, Fragment } from "react";
|
|
4
4
|
import { useApi } from "../../hooks/api/useApi.mjs";
|
|
5
5
|
import "../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
6
|
-
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
6
|
+
import { useTranslation } from "../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
7
7
|
import IconAlertCircle from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconAlertCircle.mjs";
|
|
8
8
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
9
9
|
const MessageRenderer = ({ message }) => {
|
|
@@ -11,7 +11,7 @@ import { useApi } from "../../../../../hooks/api/useApi.mjs";
|
|
|
11
11
|
import "../../../../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
12
12
|
import { getBasicInput } from "../utils.mjs";
|
|
13
13
|
import { HeaderInput } from "./HeaderInput.mjs";
|
|
14
|
-
import { useTranslation } from "../../../../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
14
|
+
import { useTranslation } from "../../../../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
15
15
|
const getLocalStorageValue = (key, defaultValue) => {
|
|
16
16
|
const value = localStorage.getItem(key);
|
|
17
17
|
if (value === null) {
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { ActionIcon, Group, NumberInput } from "@mantine/core";
|
|
3
3
|
import { forwardRef, useState, useEffect, useCallback } from "react";
|
|
4
4
|
import "../../../../../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
5
|
-
import { useTranslation } from "../../../../../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
5
|
+
import { useTranslation } from "../../../../../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
6
6
|
import IconX from "../../../../../../../../.external/esm/@tabler_icons-react@3.18.0_react@19.2.4/@tabler/icons-react/dist/esm/icons/IconX.mjs";
|
|
7
7
|
const criteria = (v) => v !== void 0 && v !== null && v !== "";
|
|
8
8
|
const HeaderBetweenInput = forwardRef(({ clearIcon: _, mrtprops: { textinputprops }, ...props }, ref) => {
|
package/dist/core/esm/Tables/NextGenDataGrid/hooks/useColumns/HeaderAdvancedFiltersMenuButton.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { useAuth } from "../../../../hooks/auth/useAuth.mjs";
|
|
|
6
6
|
import "../../../../Wrappers/Provider/Contexts/LangContext.mjs";
|
|
7
7
|
import { AdvancedFilters } from "./AdvancedFilters.mjs";
|
|
8
8
|
import { FilterMenuButton } from "./FilterMenuButton.mjs";
|
|
9
|
-
import { useTranslation } from "../../../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
9
|
+
import { useTranslation } from "../../../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
10
10
|
const HeaderAdvancedFiltersMenuButton = ({ filters, mrtProps }) => {
|
|
11
11
|
const { t } = useTranslation();
|
|
12
12
|
const { table, column } = mrtProps;
|
|
@@ -269,6 +269,10 @@ function useProvideApi({
|
|
|
269
269
|
},
|
|
270
270
|
[api, resetError, throwOnError]
|
|
271
271
|
);
|
|
272
|
+
const getItemURL = useCallback(
|
|
273
|
+
(type, item) => typeof item === "string" ? urlJoin(path, `_${type}`, item) : URL.createObjectURL(item),
|
|
274
|
+
[path]
|
|
275
|
+
);
|
|
272
276
|
const [streaming, setStreaming] = useSetState({
|
|
273
277
|
data: {},
|
|
274
278
|
isEnd: false,
|
|
@@ -340,6 +344,8 @@ function useProvideApi({
|
|
|
340
344
|
deleteEntry,
|
|
341
345
|
download,
|
|
342
346
|
upload,
|
|
347
|
+
getFileURL: (item) => getItemURL("file", item),
|
|
348
|
+
getImageURL: (item) => getItemURL("image", item),
|
|
343
349
|
resetError
|
|
344
350
|
};
|
|
345
351
|
}
|
|
@@ -3,12 +3,12 @@ import { LANG_LOCAL_STORAGE_PROPS } from "fastapi-rtk/constants";
|
|
|
3
3
|
import { createSafeContext, parseFromValuesOrFunc } from "fastapi-rtk/utils";
|
|
4
4
|
import { useProxy } from "fastapi-rtk/zustand";
|
|
5
5
|
import { useLocalStorage } from "@mantine/hooks";
|
|
6
|
-
import { createInstance } from "../../../../../.external/esm/i18next@25.8.
|
|
6
|
+
import { createInstance } from "../../../../../.external/esm/i18next@25.8.6_typescript@5.9.3/i18next/dist/esm/i18next.mjs";
|
|
7
7
|
import { useRef, useMemo, useEffect } from "react";
|
|
8
8
|
import de from "../../../translations/de.mjs";
|
|
9
9
|
import { useProvideLang } from "../hooks/useProvideLang.mjs";
|
|
10
|
-
import { I18nextProvider } from "../../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
11
|
-
import { initReactI18next } from "../../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
10
|
+
import { I18nextProvider } from "../../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/I18nextProvider.mjs";
|
|
11
|
+
import { initReactI18next } from "../../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/initReactI18next.mjs";
|
|
12
12
|
const getI18n = ({ initProps, callback, translations } = {}) => {
|
|
13
13
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
14
14
|
const i18n = createInstance();
|
|
@@ -2,7 +2,7 @@ import { LANG_LOCAL_STORAGE_PROPS, MRT_LOCALIZATION_IMPORT_MAP } from "fastapi-r
|
|
|
2
2
|
import { FastAPIRTKLogger } from "fastapi-rtk/utils";
|
|
3
3
|
import { useLocalStorage, useSetState } from "@mantine/hooks";
|
|
4
4
|
import { useCallback, useEffect } from "react";
|
|
5
|
-
import { useTranslation } from "../../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
5
|
+
import { useTranslation } from "../../../../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
6
6
|
const useProvideLang = (baseMRTLocalization = {}) => {
|
|
7
7
|
const translation = useTranslation();
|
|
8
8
|
const [localStorageLanguage, setLocalStorageLanguage] = useLocalStorage(LANG_LOCAL_STORAGE_PROPS);
|
package/dist/core/esm/index.mjs
CHANGED
|
@@ -37,7 +37,7 @@ export * from "fastapi-rtk/utils";
|
|
|
37
37
|
export * from "fastapi-rtk/zustand";
|
|
38
38
|
import * as index from "../../.external/esm/@tanstack_react-query@5.90.21_react@19.2.4/@tanstack/react-query/build/modern/index.mjs";
|
|
39
39
|
import * as index_esm from "../../.external/esm/mantine-react-table@2.0.0-beta.9_@mantine_core@7.17.8_@mantine_dates@7.17.8_@mantine_hooks@7._7jqiyi5sshrifwwn7z7vmkfdl4/mantine-react-table/dist/index.esm.mjs";
|
|
40
|
-
import { useTranslation } from "../../.external/esm/react-i18next@15.7.4_i18next@25.8.
|
|
40
|
+
import { useTranslation } from "../../.external/esm/react-i18next@15.7.4_i18next@25.8.6_react-dom@19.2.4_react@19.2.4_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
41
41
|
export {
|
|
42
42
|
Actions,
|
|
43
43
|
Add,
|
|
@@ -449,6 +449,14 @@ export type ApiContext = {
|
|
|
449
449
|
* - A function to upload a file to the API.
|
|
450
450
|
*/
|
|
451
451
|
upload: (file: File, options?: APIUploadOptions) => Promise<Record<string, any>>;
|
|
452
|
+
/**
|
|
453
|
+
* - A function to get the URL for a file item, which can be either a string (representing the file name) or a File object.
|
|
454
|
+
*/
|
|
455
|
+
getFileURL: (item: string | File) => string;
|
|
456
|
+
/**
|
|
457
|
+
* - A function to get the URL for an image item, which can be either a string (representing the image name) or a File object.
|
|
458
|
+
*/
|
|
459
|
+
getImageURL: (item: string | File) => string;
|
|
452
460
|
/**
|
|
453
461
|
* - A function to reset the error state.
|
|
454
462
|
*/
|
|
@@ -59,5 +59,7 @@ export function useProvideApi({ path, initialQueryParams, relation, fetchInfo, c
|
|
|
59
59
|
deleteEntry: (id: any) => Promise<string | Record<string, any>>;
|
|
60
60
|
download: (label: any, { export_mode, delimiter, quotechar }?: {}) => Promise<void>;
|
|
61
61
|
upload: (file: any, { delimiter, quotechar }?: {}) => Promise<string | Record<string, any>>;
|
|
62
|
+
getFileURL: (item: any) => string;
|
|
63
|
+
getImageURL: (item: any) => string;
|
|
62
64
|
resetError: () => void;
|
|
63
65
|
};
|
|
@@ -456,6 +456,14 @@ export type ApiContext = {
|
|
|
456
456
|
* - A function to upload a file to the API.
|
|
457
457
|
*/
|
|
458
458
|
upload: (file: File, options?: APIUploadOptions) => Promise<Record<string, any>>;
|
|
459
|
+
/**
|
|
460
|
+
* - A function to get the URL for a file item, which can be either a string (representing the file name) or a File object.
|
|
461
|
+
*/
|
|
462
|
+
getFileURL: (item: string | File) => string;
|
|
463
|
+
/**
|
|
464
|
+
* - A function to get the URL for an image item, which can be either a string (representing the image name) or a File object.
|
|
465
|
+
*/
|
|
466
|
+
getImageURL: (item: string | File) => string;
|
|
459
467
|
/**
|
|
460
468
|
* - A function to reset the error state.
|
|
461
469
|
*/
|
|
@@ -5,12 +5,18 @@ const core = require("fastapi-rtk/core");
|
|
|
5
5
|
const core$1 = require("@mantine/core");
|
|
6
6
|
const MantineFileInput = require("./MantineFileInput.cjs");
|
|
7
7
|
function MantineImageInput(props) {
|
|
8
|
-
const { path } = core.useApi({
|
|
8
|
+
const { path, getImageURL } = core.useApi({
|
|
9
|
+
throwOnError: false,
|
|
10
|
+
defaultValue: {
|
|
11
|
+
path: "",
|
|
12
|
+
getImageURL: (item) => typeof item === "string" ? item : URL.createObjectURL(item)
|
|
13
|
+
}
|
|
14
|
+
});
|
|
9
15
|
return /* @__PURE__ */ jsxRuntime.jsx(MantineFileInput.InnerMantineFileInput, { ...props, contextName: "Image", children: ({ jsonFormsProps }) => jsonFormsProps.data ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
16
|
core$1.Image,
|
|
11
17
|
{
|
|
12
|
-
src:
|
|
13
|
-
alt: "
|
|
18
|
+
src: getImageURL(jsonFormsProps.data),
|
|
19
|
+
alt: "Selected Image",
|
|
14
20
|
mah: 200,
|
|
15
21
|
fit: "scale-down",
|
|
16
22
|
radius: "md",
|
|
@@ -3,12 +3,18 @@ import { useApi } from "fastapi-rtk/core";
|
|
|
3
3
|
import { Image } from "@mantine/core";
|
|
4
4
|
import { InnerMantineFileInput } from "./MantineFileInput.mjs";
|
|
5
5
|
function MantineImageInput(props) {
|
|
6
|
-
const { path } = useApi({
|
|
6
|
+
const { path, getImageURL } = useApi({
|
|
7
|
+
throwOnError: false,
|
|
8
|
+
defaultValue: {
|
|
9
|
+
path: "",
|
|
10
|
+
getImageURL: (item) => typeof item === "string" ? item : URL.createObjectURL(item)
|
|
11
|
+
}
|
|
12
|
+
});
|
|
7
13
|
return /* @__PURE__ */ jsx(InnerMantineFileInput, { ...props, contextName: "Image", children: ({ jsonFormsProps }) => jsonFormsProps.data ? /* @__PURE__ */ jsx(
|
|
8
14
|
Image,
|
|
9
15
|
{
|
|
10
|
-
src:
|
|
11
|
-
alt: "
|
|
16
|
+
src: getImageURL(jsonFormsProps.data),
|
|
17
|
+
alt: "Selected Image",
|
|
12
18
|
mah: 200,
|
|
13
19
|
fit: "scale-down",
|
|
14
20
|
radius: "md",
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|