= {
const PrimitivesTemplate: Story = (args) => (
-
+
);
@@ -129,7 +129,7 @@ Formats.args = {
const DefaultValueTemplate: Story = (args) => (
-
+
);
@@ -143,7 +143,7 @@ const ThemedTemplate: Story = (args) => {
return (
-
+
);
@@ -196,7 +196,7 @@ const customTemplate = {
const FaqTemplate: Story = (args) => (
-
+
);
export const CustomTemplate = FaqTemplate.bind({});
@@ -210,7 +210,7 @@ const ControlledTemplate: Story = (args) => {
{JSON.stringify(schema, null, 2)}
- setSchema(updatedSchema)} {...args} />
+ setSchema(updatedSchema)} {...args} />
>
);
diff --git a/src/test/JsonSchemaBuilder.test.ts b/src/test/JsonSchemaBuilder.test.ts
index afb2314..7b2e8af 100644
--- a/src/test/JsonSchemaBuilder.test.ts
+++ b/src/test/JsonSchemaBuilder.test.ts
@@ -1,6 +1,6 @@
import { JsonSchemaBuilder } from '../builder/JsonSchemaBuilder';
import { SCHEMA_TYPE } from '../constants';
-import { Format, JsonSchema } from '../types';
+import type { Format, JsonSchema } from '../types';
describe('JsonSchemaBuilder', () => {
let builder: JsonSchemaBuilder;
diff --git a/src/types.ts b/src/types.ts
index 507bdd6..630c7e6 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -73,3 +73,8 @@ export type DataVisualizationType = {
name: string;
path: string;
};
+
+export type SchemaAction = {
+ type: 'ADD_PROPERTY' | 'UPDATE_PROPERTY' | 'DELETE_PROPERTY' | 'ADD_REQUIRED' | 'DELETE_REQUIRED';
+ payload: { name: string; schema?: JsonSchema; value?: never };
+};
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 57bf568..272a578 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -1,5 +1,5 @@
import { RJSFSchema } from '@rjsf/utils';
-import { DataVisualizationType } from '../types';
+import type { DataVisualizationType } from '../types';
import { SCHEMA_TYPE } from '../constants';
import React from 'react';
diff --git a/tsconfig.json b/tsconfig.json
index d351120..4f06bd9 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -8,8 +8,7 @@
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
- "outDir": "./lib"
+ "outDir": "./dist",
},
"include": ["src"]
}
-
\ No newline at end of file