@nolwenture/formik-jsonschema-form 1.0.0-beta.20 → 1.0.0-beta.21
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/cjs/FormView/FormView.js +4 -5
- package/dist/cjs/FormView/index.js +12 -2
- package/dist/cjs/FormView/types/index.js +2 -0
- package/dist/cjs/index.js +1 -24
- package/dist/esm/FormView/FormView.js +4 -5
- package/dist/esm/FormView/index.js +9 -2
- package/dist/esm/FormView/types/index.js +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/types/FormView/FormView.d.ts +1 -3
- package/dist/types/FormView/index.d.ts +10 -2
- package/dist/types/FormView/templates/CollapsibleObjectFieldTemplate/CollapsibleObjectFieldTemplate.d.ts +1 -1
- package/dist/types/FormView/templates/index.d.ts +1 -1
- package/dist/types/FormView/types/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -12,8 +12,8 @@ const components_1 = require("./components");
|
|
|
12
12
|
const templates_1 = require("./templates");
|
|
13
13
|
const FormViewRegistry_1 = require("./FormViewRegistry");
|
|
14
14
|
exports.FormWrapper = styled_components_1.default.div `
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
font-family: ${(props) => props.theme.typography.fontFamily.base};
|
|
16
|
+
//padding: ${(props) => props.theme.spacing.xxxxxl};
|
|
17
17
|
`;
|
|
18
18
|
const FormView = (props) => {
|
|
19
19
|
(0, utils_1.warnFromUnsupportedKeys)("Form", props, [
|
|
@@ -28,9 +28,8 @@ const FormView = (props) => {
|
|
|
28
28
|
"formContext",
|
|
29
29
|
"components",
|
|
30
30
|
"hideUnmarkedAdditionalProperties",
|
|
31
|
-
"values",
|
|
32
31
|
]);
|
|
33
|
-
const { schema, uiSchema = {}, className, fields = {}, templates = {}, components = {}, formContext = {}, useItemsAsAdditionalItems = false, hideUnmarkedAdditionalProperties = false,
|
|
32
|
+
const { schema, uiSchema = {}, className, fields = {}, templates = {}, components = {}, formContext = {}, useItemsAsAdditionalItems = false, hideUnmarkedAdditionalProperties = false, } = props;
|
|
34
33
|
const schemaDefinitions = schema.definitions;
|
|
35
34
|
const uiSchemaDefinitions = uiSchema.definitions;
|
|
36
35
|
const registry = {
|
|
@@ -45,6 +44,6 @@ const FormView = (props) => {
|
|
|
45
44
|
};
|
|
46
45
|
const { Form: FormEl } = registry.components;
|
|
47
46
|
const SchemaField = registry.fields.SchemaField;
|
|
48
|
-
return ((0, jsx_runtime_1.jsx)(exports.FormWrapper, { children: (0, jsx_runtime_1.jsx)(FormViewRegistry_1.FormViewRegistry.Provider, { value: registry, children: (0, jsx_runtime_1.jsx)(FormEl, { className: className, children: (0, jsx_runtime_1.jsx)(SchemaField, { name: "", schema: schema, uiSchema: uiSchema
|
|
47
|
+
return ((0, jsx_runtime_1.jsx)(exports.FormWrapper, { children: (0, jsx_runtime_1.jsx)(FormViewRegistry_1.FormViewRegistry.Provider, { value: registry, children: (0, jsx_runtime_1.jsx)(FormEl, { className: className, children: (0, jsx_runtime_1.jsx)(SchemaField, { name: "", schema: schema, uiSchema: uiSchema }) }) }) }));
|
|
49
48
|
};
|
|
50
49
|
exports.FormView = FormView;
|
|
@@ -14,6 +14,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("
|
|
17
|
+
exports.FormViewTemplates = exports.FormViewFields = exports.FormViewComponents = void 0;
|
|
18
|
+
__exportStar(require("../utils"), exports);
|
|
19
|
+
__exportStar(require("../common/types"), exports);
|
|
20
|
+
__exportStar(require("../common/constants"), exports);
|
|
21
|
+
__exportStar(require("../common/FileUploadContext"), exports);
|
|
22
|
+
const fields_1 = require("./fields");
|
|
23
|
+
Object.defineProperty(exports, "FormViewFields", { enumerable: true, get: function () { return fields_1.fields; } });
|
|
24
|
+
const components_1 = require("./components");
|
|
25
|
+
Object.defineProperty(exports, "FormViewComponents", { enumerable: true, get: function () { return components_1.components; } });
|
|
26
|
+
const templates_1 = require("./templates");
|
|
27
|
+
Object.defineProperty(exports, "FormViewTemplates", { enumerable: true, get: function () { return templates_1.templates; } });
|
|
19
28
|
__exportStar(require("./FormView"), exports);
|
|
29
|
+
__exportStar(require("./FormViewRegistry"), exports);
|
package/dist/cjs/index.js
CHANGED
|
@@ -10,33 +10,10 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
15
|
};
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.view = void 0;
|
|
40
17
|
//This file exists for purpose releasing "moduleResolution": "node" compatible version (until we split this to multiple packages)
|
|
41
18
|
__exportStar(require("./Form"), exports);
|
|
42
|
-
|
|
19
|
+
__exportStar(require("./FormView"), exports);
|
|
@@ -6,8 +6,8 @@ import { components as defaultComponents } from "./components";
|
|
|
6
6
|
import { templates as defaultTemplates } from "./templates";
|
|
7
7
|
import { FormViewRegistry } from "./FormViewRegistry";
|
|
8
8
|
export const FormWrapper = styled.div `
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
font-family: ${(props) => props.theme.typography.fontFamily.base};
|
|
10
|
+
//padding: ${(props) => props.theme.spacing.xxxxxl};
|
|
11
11
|
`;
|
|
12
12
|
export const FormView = (props) => {
|
|
13
13
|
warnFromUnsupportedKeys("Form", props, [
|
|
@@ -22,9 +22,8 @@ export const FormView = (props) => {
|
|
|
22
22
|
"formContext",
|
|
23
23
|
"components",
|
|
24
24
|
"hideUnmarkedAdditionalProperties",
|
|
25
|
-
"values",
|
|
26
25
|
]);
|
|
27
|
-
const { schema, uiSchema = {}, className, fields = {}, templates = {}, components = {}, formContext = {}, useItemsAsAdditionalItems = false, hideUnmarkedAdditionalProperties = false,
|
|
26
|
+
const { schema, uiSchema = {}, className, fields = {}, templates = {}, components = {}, formContext = {}, useItemsAsAdditionalItems = false, hideUnmarkedAdditionalProperties = false, } = props;
|
|
28
27
|
const schemaDefinitions = schema.definitions;
|
|
29
28
|
const uiSchemaDefinitions = uiSchema.definitions;
|
|
30
29
|
const registry = {
|
|
@@ -39,5 +38,5 @@ export const FormView = (props) => {
|
|
|
39
38
|
};
|
|
40
39
|
const { Form: FormEl } = registry.components;
|
|
41
40
|
const SchemaField = registry.fields.SchemaField;
|
|
42
|
-
return (_jsx(FormWrapper, { children: _jsx(FormViewRegistry.Provider, { value: registry, children: _jsx(FormEl, { className: className, children: _jsx(SchemaField, { name: "", schema: schema, uiSchema: uiSchema
|
|
41
|
+
return (_jsx(FormWrapper, { children: _jsx(FormViewRegistry.Provider, { value: registry, children: _jsx(FormEl, { className: className, children: _jsx(SchemaField, { name: "", schema: schema, uiSchema: uiSchema }) }) }) }));
|
|
43
42
|
};
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
export * from "
|
|
2
|
-
export * from "
|
|
1
|
+
export * from "../utils";
|
|
2
|
+
export * from "../common/types";
|
|
3
|
+
export * from "../common/constants";
|
|
4
|
+
export * from "../common/FileUploadContext";
|
|
5
|
+
import { fields as FormViewFields } from "./fields";
|
|
6
|
+
import { components as FormViewComponents } from "./components";
|
|
7
|
+
import { templates as FormViewTemplates } from "./templates";
|
|
3
8
|
export * from "./FormView";
|
|
9
|
+
export * from "./FormViewRegistry";
|
|
10
|
+
export { FormViewComponents, FormViewFields, FormViewTemplates };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { FormProps } from "../common/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
export declare const FormWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
-
export declare const FormView: <T>(props: FormProps<T>
|
|
5
|
-
values: Record<string, any>;
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const FormView: <T>(props: FormProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
export * from "
|
|
2
|
-
export * from "
|
|
1
|
+
export * from "../utils";
|
|
2
|
+
export * from "../common/types";
|
|
3
|
+
export * from "../common/constants";
|
|
4
|
+
export * from "../common/FileUploadContext";
|
|
5
|
+
import { fields as FormViewFields } from "./fields";
|
|
6
|
+
import { components as FormViewComponents } from "./components";
|
|
7
|
+
import { templates as FormViewTemplates } from "./templates";
|
|
3
8
|
export * from "./FormView";
|
|
9
|
+
export * from "./FormViewRegistry";
|
|
10
|
+
export { FormViewComponents, FormViewFields, FormViewTemplates };
|
|
11
|
+
export type * from "./types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CollapsibleObjectFieldTemplate: import("
|
|
1
|
+
export declare const CollapsibleObjectFieldTemplate: import("../..").Field;
|
|
@@ -13,7 +13,7 @@ export declare const templateComponents: {
|
|
|
13
13
|
ArrayFieldTemplateDescription: typeof import("../components").FieldDescription | undefined;
|
|
14
14
|
};
|
|
15
15
|
export declare const templates: {
|
|
16
|
-
CollapsibleObjectFieldTemplate: import("
|
|
16
|
+
CollapsibleObjectFieldTemplate: import("..").Field;
|
|
17
17
|
ObjectFieldTemplate: React.FC<import("./ObjectFieldTemplate/types").ObjectFieldTemplateProps>;
|
|
18
18
|
FieldTemplate: React.FC<import("./FieldTemplate/types").FieldTemplateProps>;
|
|
19
19
|
ArrayFieldTemplate: React.FC<import("./ArrayFieldTemplate/types").ArrayFieldTemplateProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./FormViewRegistryContext";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./Form";
|
|
2
|
-
export *
|
|
2
|
+
export * from "./FormView";
|
package/package.json
CHANGED