fastapi-rtk 2.9.1 → 2.9.2
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/index10.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index6.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index7.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index8.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/index9.cjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index10.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index6.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index7.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index8.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/_virtual/index9.mjs +2 -2
- package/dist/.external/cjs/ajv@8.17.1/ajv/dist/compile/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/applicator/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/core/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/format/index.cjs +1 -1
- package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/validation/index.cjs +1 -1
- package/dist/.external/cjs/html-parse-stringify@3.0.1/html-parse-stringify/dist/html-parse-stringify.module.cjs +1 -1
- package/dist/.external/cjs/toposort@2.0.2/toposort/index.cjs +1 -1
- package/dist/.external/cjs/yup@1.7.1/yup/index.esm.cjs +788 -1
- package/dist/.external/esm/ajv@8.17.1/ajv/dist/compile/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/applicator/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/core/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/format/index.mjs +1 -1
- package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/validation/index.mjs +1 -1
- package/dist/.external/esm/html-parse-stringify@3.0.1/html-parse-stringify/dist/html-parse-stringify.module.mjs +1 -1
- package/dist/.external/esm/toposort@2.0.2/toposort/index.mjs +1 -1
- package/dist/.external/esm/yup@1.7.1/yup/index.esm.mjs +789 -2
- package/dist/api/cjs/ApiProvider/utils/getValidationSchema.cjs +3 -3
- package/dist/api/cjs/_virtual/_commonjsHelpers.cjs +6 -0
- package/dist/api/cjs/_virtual/index.cjs +5 -0
- package/dist/api/esm/ApiProvider/utils/getValidationSchema.mjs +4 -3
- package/dist/api/esm/_virtual/_commonjsHelpers.mjs +6 -0
- package/dist/api/esm/_virtual/index.mjs +5 -0
- package/dist/api/lib/ApiProvider/utils/getValidationSchema.d.ts +1 -1
- package/dist/contexts/cjs/_virtual/index.cjs +5 -4
- package/dist/contexts/cjs/index.cjs +0 -2
- package/dist/contexts/esm/_virtual/index.mjs +5 -3
- package/dist/contexts/esm/index.mjs +1 -3
- package/dist/contexts/lib/index.d.ts +0 -1
- package/dist/core/cjs/Tables/DataGrid/Toolbar/Filter/FilterMenu.cjs +9 -8
- package/dist/core/cjs/_virtual/_commonjsHelpers.cjs +6 -0
- package/dist/core/cjs/_virtual/index6.cjs +4 -2
- package/dist/core/cjs/_virtual/index7.cjs +5 -3
- package/dist/core/cjs/_virtual/index8.cjs +4 -0
- package/dist/core/esm/Tables/DataGrid/Toolbar/Filter/FilterMenu.mjs +9 -8
- package/dist/core/esm/_virtual/_commonjsHelpers.mjs +6 -0
- package/dist/core/esm/_virtual/index6.mjs +5 -2
- package/dist/core/esm/_virtual/index7.mjs +5 -2
- package/dist/core/esm/_virtual/index8.mjs +4 -0
- package/package.json +1 -1
- package/dist/contexts/cjs/_virtual/index5.cjs +0 -6
- package/dist/contexts/esm/_virtual/index5.mjs +0 -7
- /package/dist/{contexts → api}/cjs/_virtual/index2.cjs +0 -0
- /package/dist/{contexts → api}/cjs/_virtual/index3.cjs +0 -0
- /package/dist/{contexts → api}/cjs/_virtual/index4.cjs +0 -0
- /package/dist/{contexts → api}/esm/_virtual/index2.mjs +0 -0
- /package/dist/{contexts → api}/esm/_virtual/index3.mjs +0 -0
- /package/dist/{contexts → api}/esm/_virtual/index4.mjs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const index_esm = require("../../../../.external/cjs/yup@1.7.1/yup/index.esm.cjs");
|
|
4
4
|
const getValidationSchema = (columns) => {
|
|
5
5
|
const schema = columns.reduce((schema2, column) => {
|
|
6
6
|
const { name, required } = column;
|
|
@@ -23,7 +23,7 @@ const getValidationSchema = (columns) => {
|
|
|
23
23
|
}
|
|
24
24
|
let validator;
|
|
25
25
|
try {
|
|
26
|
-
const factory =
|
|
26
|
+
const factory = index_esm[type];
|
|
27
27
|
if (required) {
|
|
28
28
|
validator = factory().typeError(`Field must be of type ${type}`).required("Field is required");
|
|
29
29
|
} else {
|
|
@@ -37,6 +37,6 @@ const getValidationSchema = (columns) => {
|
|
|
37
37
|
}
|
|
38
38
|
return schema2;
|
|
39
39
|
}, {});
|
|
40
|
-
return
|
|
40
|
+
return index_esm.object().shape(schema);
|
|
41
41
|
};
|
|
42
42
|
exports.getValidationSchema = getValidationSchema;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function getDefaultExportFromCjs(x) {
|
|
4
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
5
|
+
}
|
|
6
|
+
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index = require("../../../.external/cjs/property-expr@2.0.6/property-expr/index.cjs");
|
|
4
|
+
var propertyExprExports = index.__require();
|
|
5
|
+
exports.propertyExprExports = propertyExprExports;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as index_esm from "../../../../.external/esm/yup@1.7.1/yup/index.esm.mjs";
|
|
2
|
+
import { object as create$3 } from "../../../../.external/esm/yup@1.7.1/yup/index.esm.mjs";
|
|
2
3
|
const getValidationSchema = (columns) => {
|
|
3
4
|
const schema = columns.reduce((schema2, column) => {
|
|
4
5
|
const { name, required } = column;
|
|
@@ -21,7 +22,7 @@ const getValidationSchema = (columns) => {
|
|
|
21
22
|
}
|
|
22
23
|
let validator;
|
|
23
24
|
try {
|
|
24
|
-
const factory =
|
|
25
|
+
const factory = index_esm[type];
|
|
25
26
|
if (required) {
|
|
26
27
|
validator = factory().typeError(`Field must be of type ${type}`).required("Field is required");
|
|
27
28
|
} else {
|
|
@@ -35,7 +36,7 @@ const getValidationSchema = (columns) => {
|
|
|
35
36
|
}
|
|
36
37
|
return schema2;
|
|
37
38
|
}, {});
|
|
38
|
-
return
|
|
39
|
+
return create$3().shape(schema);
|
|
39
40
|
};
|
|
40
41
|
export {
|
|
41
42
|
getValidationSchema
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnyColumnInfo } from 'fastapi-rtk/api-types';
|
|
2
|
-
import
|
|
2
|
+
import * as yup from '../../../../.external/lib/yup';
|
|
3
3
|
export declare const getValidationSchema: (columns: AnyColumnInfo[]) => yup.ObjectSchema<{
|
|
4
4
|
[x: string]: unknown;
|
|
5
5
|
}, yup.AnyObject, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
const index = require("../../../.external/cjs/
|
|
4
|
-
var
|
|
5
|
-
|
|
2
|
+
const _commonjsHelpers = require("./_commonjsHelpers.cjs");
|
|
3
|
+
const index = require("../../../.external/cjs/void-elements@3.1.0/void-elements/index.cjs");
|
|
4
|
+
var voidElementsExports = index.__require();
|
|
5
|
+
const e = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(voidElementsExports);
|
|
6
|
+
module.exports = e;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const ApiContext = require("./ApiContext/ApiContext.cjs");
|
|
4
4
|
const LangContext = require("./LangContext/LangContext.cjs");
|
|
5
|
-
const index_esm = require("../../.external/cjs/yup@1.7.1/yup/index.esm.cjs");
|
|
6
5
|
const index = require("../../.external/cjs/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/index.cjs");
|
|
7
6
|
const useTranslation = require("../../.external/cjs/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/useTranslation.cjs");
|
|
8
7
|
exports.ApiContextProvider = ApiContext.ApiContextProvider;
|
|
@@ -11,6 +10,5 @@ exports.useApiProvider = ApiContext.useApiProvider;
|
|
|
11
10
|
exports.InnerInnerLangContextProvider = LangContext.InnerInnerLangContextProvider;
|
|
12
11
|
exports.useLang = LangContext.useLang;
|
|
13
12
|
exports.useLangProvider = LangContext.useLangProvider;
|
|
14
|
-
exports.yup = index_esm;
|
|
15
13
|
exports.i18nr = index;
|
|
16
14
|
exports.useTranslation = useTranslation.useTranslation;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getDefaultExportFromCjs } from "./_commonjsHelpers.mjs";
|
|
2
|
+
import { __require as requireVoidElements } from "../../../.external/esm/void-elements@3.1.0/void-elements/index.mjs";
|
|
3
|
+
var voidElementsExports = requireVoidElements();
|
|
4
|
+
const e = /* @__PURE__ */ getDefaultExportFromCjs(voidElementsExports);
|
|
3
5
|
export {
|
|
4
|
-
|
|
6
|
+
e as default
|
|
5
7
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ApiContextProvider, useApi, useApiProvider } from "./ApiContext/ApiContext.mjs";
|
|
2
2
|
import { InnerInnerLangContextProvider, useLang, useLangProvider } from "./LangContext/LangContext.mjs";
|
|
3
|
-
import * as index_esm from "../../.external/esm/yup@1.7.1/yup/index.esm.mjs";
|
|
4
3
|
import * as index from "../../.external/esm/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/index.mjs";
|
|
5
4
|
import { useTranslation } from "../../.external/esm/react-i18next@15.7.4_i18next@25.8.0_typescript@5.9.3__react-dom@19.2.3_react@19.2.3__react@19.2.3_typescript@5.9.3/react-i18next/dist/es/useTranslation.mjs";
|
|
6
5
|
export {
|
|
@@ -11,6 +10,5 @@ export {
|
|
|
11
10
|
useApiProvider,
|
|
12
11
|
useLang,
|
|
13
12
|
useLangProvider,
|
|
14
|
-
useTranslation
|
|
15
|
-
index_esm as yup
|
|
13
|
+
useTranslation
|
|
16
14
|
};
|
|
@@ -6,9 +6,10 @@ const form = require("@mantine/form");
|
|
|
6
6
|
const hooks = require("@mantine/hooks");
|
|
7
7
|
const index = require("../../../../../../.external/cjs/mantine-form-yup-resolver@2.0.0_@mantine_form@9.1.0_react@19.2.3__yup@1.7.1/mantine-form-yup-resolver/dist/esm/index.cjs");
|
|
8
8
|
const React = require("react");
|
|
9
|
-
const
|
|
9
|
+
const index_esm = require("../../../../../../.external/cjs/yup@1.7.1/yup/index.esm.cjs");
|
|
10
10
|
const plus = require("../../../../_virtual/plus.cjs");
|
|
11
11
|
const trash = require("../../../../_virtual/trash.cjs");
|
|
12
|
+
const contexts = require("fastapi-rtk/contexts");
|
|
12
13
|
const FormField = require("../../FormField/FormField.cjs");
|
|
13
14
|
const FormFilterField = require("./FormFilterField.cjs");
|
|
14
15
|
const FormFilterIn = require("./FormFilterIn.cjs");
|
|
@@ -21,17 +22,17 @@ function FilterMenu(props) {
|
|
|
21
22
|
filters: []
|
|
22
23
|
},
|
|
23
24
|
validate: index.yupResolver(
|
|
24
|
-
|
|
25
|
-
filters:
|
|
26
|
-
|
|
27
|
-
col:
|
|
28
|
-
opr:
|
|
29
|
-
value:
|
|
25
|
+
index_esm.object({
|
|
26
|
+
filters: index_esm.array().of(
|
|
27
|
+
index_esm.object({
|
|
28
|
+
col: index_esm.string().transform((v) => !v ? void 0 : v).required("Field is required"),
|
|
29
|
+
opr: index_esm.string().transform((v) => !v ? void 0 : v).required(`${"col"} is required`),
|
|
30
|
+
value: index_esm.mixed().when("col", {
|
|
30
31
|
is: (col) => {
|
|
31
32
|
return col && info.filters[col].schema.required;
|
|
32
33
|
},
|
|
33
34
|
then: () => {
|
|
34
|
-
return
|
|
35
|
+
return index_esm.mixed().required("Value is required");
|
|
35
36
|
}
|
|
36
37
|
})
|
|
37
38
|
})
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function getDefaultExportFromCjs(x) {
|
|
4
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
5
|
+
}
|
|
6
|
+
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
index.
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index = require("../../../.external/cjs/tiny-case@1.0.3/tiny-case/index.cjs");
|
|
4
|
+
var tinyCaseExports = index.__require();
|
|
5
|
+
exports.tinyCaseExports = tinyCaseExports;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
const _commonjsHelpers = require("./_commonjsHelpers.cjs");
|
|
3
|
+
const index = require("../../../.external/cjs/toposort@2.0.2/toposort/index.cjs");
|
|
4
|
+
var toposortExports = index.__require();
|
|
5
|
+
const toposort = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(toposortExports);
|
|
6
|
+
module.exports = toposort;
|
|
@@ -4,9 +4,10 @@ import { useForm } from "@mantine/form";
|
|
|
4
4
|
import { randomId } from "@mantine/hooks";
|
|
5
5
|
import { yupResolver } from "../../../../../../.external/esm/mantine-form-yup-resolver@2.0.0_@mantine_form@9.1.0_react@19.2.3__yup@1.7.1/mantine-form-yup-resolver/dist/esm/index.mjs";
|
|
6
6
|
import { useEffect } from "react";
|
|
7
|
-
import {
|
|
7
|
+
import { object as create$3, array as create$2, mixed as create$8, string as create$6 } from "../../../../../../.external/esm/yup@1.7.1/yup/index.esm.mjs";
|
|
8
8
|
import ForwardRef$1 from "../../../../_virtual/plus.mjs";
|
|
9
9
|
import ForwardRef from "../../../../_virtual/trash.mjs";
|
|
10
|
+
import { useApi } from "fastapi-rtk/contexts";
|
|
10
11
|
import { FormField } from "../../FormField/FormField.mjs";
|
|
11
12
|
import FormFilterField from "./FormFilterField.mjs";
|
|
12
13
|
import { FormFilterIn } from "./FormFilterIn.mjs";
|
|
@@ -19,17 +20,17 @@ function FilterMenu(props) {
|
|
|
19
20
|
filters: []
|
|
20
21
|
},
|
|
21
22
|
validate: yupResolver(
|
|
22
|
-
|
|
23
|
-
filters:
|
|
24
|
-
|
|
25
|
-
col:
|
|
26
|
-
opr:
|
|
27
|
-
value:
|
|
23
|
+
create$3({
|
|
24
|
+
filters: create$2().of(
|
|
25
|
+
create$3({
|
|
26
|
+
col: create$6().transform((v) => !v ? void 0 : v).required("Field is required"),
|
|
27
|
+
opr: create$6().transform((v) => !v ? void 0 : v).required(`${"col"} is required`),
|
|
28
|
+
value: create$8().when("col", {
|
|
28
29
|
is: (col) => {
|
|
29
30
|
return col && info.filters[col].schema.required;
|
|
30
31
|
},
|
|
31
32
|
then: () => {
|
|
32
|
-
return
|
|
33
|
+
return create$8().required("Value is required");
|
|
33
34
|
}
|
|
34
35
|
})
|
|
35
36
|
})
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import { __require as
|
|
2
|
-
|
|
1
|
+
import { __require as requireTinyCase } from "../../../.external/esm/tiny-case@1.0.3/tiny-case/index.mjs";
|
|
2
|
+
var tinyCaseExports = requireTinyCase();
|
|
3
|
+
export {
|
|
4
|
+
tinyCaseExports as t
|
|
5
|
+
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { getDefaultExportFromCjs } from "./_commonjsHelpers.mjs";
|
|
2
|
+
import { __require as requireToposort } from "../../../.external/esm/toposort@2.0.2/toposort/index.mjs";
|
|
3
|
+
var toposortExports = requireToposort();
|
|
4
|
+
const toposort = /* @__PURE__ */ getDefaultExportFromCjs(toposortExports);
|
|
2
5
|
export {
|
|
3
|
-
toposort as
|
|
6
|
+
toposort as default
|
|
4
7
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const _commonjsHelpers = require("./_commonjsHelpers.cjs");
|
|
3
|
-
const index = require("../../../.external/cjs/void-elements@3.1.0/void-elements/index.cjs");
|
|
4
|
-
var voidElementsExports = index.__require();
|
|
5
|
-
const e = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(voidElementsExports);
|
|
6
|
-
module.exports = e;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs } from "./_commonjsHelpers.mjs";
|
|
2
|
-
import { __require as requireVoidElements } from "../../../.external/esm/void-elements@3.1.0/void-elements/index.mjs";
|
|
3
|
-
var voidElementsExports = requireVoidElements();
|
|
4
|
-
const e = /* @__PURE__ */ getDefaultExportFromCjs(voidElementsExports);
|
|
5
|
-
export {
|
|
6
|
-
e as default
|
|
7
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|