extended-dynamic-forms 0.1.5 → 0.1.7
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/extended-dynamic-forms-vanilla.js +38 -0
- package/package.json +32 -25
- package/dist/ExtendedForm.d.ts +0 -4
- package/dist/components/fields/AddressField.d.ts +0 -4
- package/dist/components/fields/CurrencyField.d.ts +0 -4
- package/dist/components/fields/PhoneField.d.ts +0 -4
- package/dist/components/index.d.ts +0 -10
- package/dist/components/ui/badge.d.ts +0 -9
- package/dist/components/ui/button.d.ts +0 -11
- package/dist/components/ui/card.d.ts +0 -8
- package/dist/components/ui/input.d.ts +0 -5
- package/dist/components/ui/label.d.ts +0 -5
- package/dist/components/ui/slider.d.ts +0 -4
- package/dist/events/FormEventContext.d.ts +0 -20
- package/dist/events/FormEventHub.d.ts +0 -27
- package/dist/events/FormEventManager.d.ts +0 -10
- package/dist/events/index.d.ts +0 -4
- package/dist/index.d.ts +0 -13
- package/dist/index.es.js +0 -4124
- package/dist/index.umd.js +0 -21
- package/dist/layouts/grid/GridLayout.d.ts +0 -11
- package/dist/layouts/horizontal/HorizontalLayout.d.ts +0 -10
- package/dist/layouts/index.d.ts +0 -3
- package/dist/layouts/vertical/VerticalLayout.d.ts +0 -9
- package/dist/lib/utils.d.ts +0 -3
- package/dist/style.css +0 -1
- package/dist/types/index.d.ts +0 -47
- package/dist/utils/formDataUtils.d.ts +0 -22
- package/dist/utils/index.d.ts +0 -3
- package/dist/utils/schemaUtils.d.ts +0 -24
- package/dist/utils/validationUtils.d.ts +0 -26
- package/dist/widgets/date/DateWidget.d.ts +0 -4
- package/dist/widgets/file/FileWidget.d.ts +0 -4
- package/dist/widgets/index.d.ts +0 -14
- package/dist/widgets/input/ColorWidget.d.ts +0 -4
- package/dist/widgets/input/RangeWidget.d.ts +0 -4
- package/dist/widgets/input/RatingWidget.d.ts +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "extended-dynamic-forms",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Extended React JSON Schema Form (RJSF) v6 with custom components, widgets, templates, layouts, and form events",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -11,11 +11,13 @@
|
|
|
11
11
|
"scripts": {
|
|
12
12
|
"dev": "vite",
|
|
13
13
|
"build": "tsc && vite build",
|
|
14
|
+
"build:vanilla": "vite build --config vite.vanilla.config.ts",
|
|
15
|
+
"build:all": "npm run build && npm run build:vanilla",
|
|
14
16
|
"preview": "vite preview",
|
|
15
17
|
"test": "vitest",
|
|
16
18
|
"test:ui": "vitest --ui",
|
|
17
19
|
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
18
|
-
"prepublishOnly": "npm run build"
|
|
20
|
+
"prepublishOnly": "npm run build:all"
|
|
19
21
|
},
|
|
20
22
|
"keywords": [
|
|
21
23
|
"react",
|
|
@@ -28,46 +30,51 @@
|
|
|
28
30
|
"author": "",
|
|
29
31
|
"license": "MIT",
|
|
30
32
|
"peerDependencies": {
|
|
33
|
+
"@rjsf/core": "^6.0.0-beta.10",
|
|
34
|
+
"@rjsf/shadcn": "^6.0.0-beta.10",
|
|
35
|
+
"@rjsf/utils": "^6.0.0-beta.10",
|
|
36
|
+
"@rjsf/validator-ajv8": "^6.0.0-beta.10",
|
|
31
37
|
"react": "^18.0.0",
|
|
32
|
-
"react-dom": "^18.0.0"
|
|
33
|
-
"@rjsf/core": "^6.0.0-beta.11",
|
|
34
|
-
"@rjsf/utils": "^6.0.0-beta.11",
|
|
35
|
-
"@rjsf/validator-ajv8": "^6.0.0-beta.11",
|
|
36
|
-
"@rjsf/shadcn": "^6.0.0-beta.10"
|
|
38
|
+
"react-dom": "^18.0.0"
|
|
37
39
|
},
|
|
38
40
|
"devDependencies": {
|
|
41
|
+
"@radix-ui/react-label": "^2.0.2",
|
|
42
|
+
"@radix-ui/react-select": "^2.0.0",
|
|
43
|
+
"@radix-ui/react-slider": "^1.1.2",
|
|
44
|
+
"@radix-ui/react-switch": "^1.0.3",
|
|
45
|
+
"@rjsf/core": "^6.0.0-beta.10",
|
|
46
|
+
"@rjsf/utils": "^6.0.0-beta.10",
|
|
47
|
+
"@rjsf/validator-ajv8": "^6.0.0-beta.10",
|
|
39
48
|
"@types/react": "^18.2.43",
|
|
40
49
|
"@types/react-dom": "^18.2.17",
|
|
41
50
|
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
|
42
51
|
"@typescript-eslint/parser": "^6.14.0",
|
|
43
52
|
"@vitejs/plugin-react": "^4.2.1",
|
|
53
|
+
"autoprefixer": "^10.4.16",
|
|
54
|
+
"class-variance-authority": "^0.7.0",
|
|
55
|
+
"clsx": "^2.1.0",
|
|
44
56
|
"eslint": "^8.55.0",
|
|
45
57
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
46
58
|
"eslint-plugin-react-refresh": "^0.4.5",
|
|
59
|
+
"lucide-react": "^0.303.0",
|
|
60
|
+
"postcss": "^8.4.32",
|
|
47
61
|
"react": "^18.2.0",
|
|
48
62
|
"react-dom": "^18.2.0",
|
|
63
|
+
"tailwind-merge": "^2.2.0",
|
|
64
|
+
"tailwindcss": "^3.4.0",
|
|
65
|
+
"tailwindcss-animate": "^1.0.7",
|
|
66
|
+
"terser": "^5.40.0",
|
|
49
67
|
"typescript": "^5.2.2",
|
|
50
68
|
"vite": "^5.0.8",
|
|
51
69
|
"vite-plugin-dts": "^3.7.0",
|
|
52
|
-
"vitest": "^1.0.0"
|
|
53
|
-
"@rjsf/core": "^5.15.0",
|
|
54
|
-
"@rjsf/utils": "^5.15.0",
|
|
55
|
-
"@rjsf/validator-ajv8": "^5.15.0",
|
|
56
|
-
"@rjsf/shadcn": "^0.1.0",
|
|
57
|
-
"@radix-ui/react-label": "^2.0.2",
|
|
58
|
-
"@radix-ui/react-select": "^2.0.0",
|
|
59
|
-
"@radix-ui/react-slider": "^1.1.2",
|
|
60
|
-
"@radix-ui/react-switch": "^1.0.3",
|
|
61
|
-
"class-variance-authority": "^0.7.0",
|
|
62
|
-
"clsx": "^2.1.0",
|
|
63
|
-
"lucide-react": "^0.303.0",
|
|
64
|
-
"tailwind-merge": "^2.2.0",
|
|
65
|
-
"tailwindcss-animate": "^1.0.7",
|
|
66
|
-
"autoprefixer": "^10.4.16",
|
|
67
|
-
"postcss": "^8.4.32",
|
|
68
|
-
"tailwindcss": "^3.4.0"
|
|
70
|
+
"vitest": "^1.0.0"
|
|
69
71
|
},
|
|
70
72
|
"dependencies": {
|
|
71
|
-
"@radix-ui/react-
|
|
73
|
+
"@radix-ui/react-checkbox": "^1.3.2",
|
|
74
|
+
"@radix-ui/react-popover": "^1.1.14",
|
|
75
|
+
"@radix-ui/react-slot": "^1.0.2",
|
|
76
|
+
"@rjsf/shadcn": "^6.0.0-beta.10",
|
|
77
|
+
"date-fns": "^4.1.0",
|
|
78
|
+
"react-day-picker": "^9.7.0"
|
|
72
79
|
}
|
|
73
80
|
}
|
package/dist/ExtendedForm.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AddressField } from './fields/AddressField';
|
|
2
|
-
import { PhoneField } from './fields/PhoneField';
|
|
3
|
-
import { CurrencyField } from './fields/CurrencyField';
|
|
4
|
-
|
|
5
|
-
export declare const customFields: {
|
|
6
|
-
address: import('react').FC<import('@rjsf/utils').FieldProps<any, import('@rjsf/utils').RJSFSchema, any>>;
|
|
7
|
-
phone: import('react').FC<import('@rjsf/utils').FieldProps<any, import('@rjsf/utils').RJSFSchema, any>>;
|
|
8
|
-
currency: import('react').FC<import('@rjsf/utils').FieldProps<any, import('@rjsf/utils').RJSFSchema, any>>;
|
|
9
|
-
};
|
|
10
|
-
export { AddressField, PhoneField, CurrencyField, };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
-
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
-
}
|
|
8
|
-
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { Badge, badgeVariants };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
-
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
-
export { Button, buttonVariants };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
-
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
5
|
-
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
6
|
-
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
-
export { Label };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3
|
-
declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
4
|
-
export { Slider };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import { FormEventHub } from './FormEventHub';
|
|
3
|
-
|
|
4
|
-
interface FormEventContextType {
|
|
5
|
-
eventHub: FormEventHub;
|
|
6
|
-
formData?: any;
|
|
7
|
-
}
|
|
8
|
-
interface FormEventProviderProps {
|
|
9
|
-
eventHub: FormEventHub;
|
|
10
|
-
formData?: any;
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
}
|
|
13
|
-
export declare const FormEventProvider: React.FC<FormEventProviderProps>;
|
|
14
|
-
export declare const useFormEventHub: () => FormEventContextType;
|
|
15
|
-
export declare const useFieldEventHandlers: (fieldId: string, schema?: any, fieldPath?: string[]) => {
|
|
16
|
-
onFocus: (value: any) => Promise<void>;
|
|
17
|
-
onBlur: (value: any) => Promise<void>;
|
|
18
|
-
onChange: (value: any) => Promise<void>;
|
|
19
|
-
};
|
|
20
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { FormEventHandlers, FieldEventHandlers, WebhookConfig } from '../types';
|
|
2
|
-
|
|
3
|
-
export declare class FormEventHub {
|
|
4
|
-
private formHandlers;
|
|
5
|
-
private fieldHandlers;
|
|
6
|
-
private webhooks;
|
|
7
|
-
private debounceTimers;
|
|
8
|
-
private webhookQueue;
|
|
9
|
-
private isProcessingQueue;
|
|
10
|
-
constructor(formHandlers: FormEventHandlers, fieldHandlers?: FieldEventHandlers, webhooks?: WebhookConfig[]);
|
|
11
|
-
handleBeforeSubmit(data: any): Promise<any>;
|
|
12
|
-
handleAfterSubmit(data: any): Promise<void>;
|
|
13
|
-
handleBeforeValidation(data: any): Promise<any>;
|
|
14
|
-
handleAfterValidation(data: any, errors: any): Promise<void>;
|
|
15
|
-
handleFieldEvent(eventType: 'focus' | 'blur' | 'change', fieldId: string, fieldValue: any, schema?: any, formData?: any, fieldPath?: string[]): Promise<void>;
|
|
16
|
-
private processWebhooks;
|
|
17
|
-
private debounceWebhook;
|
|
18
|
-
private queueWebhook;
|
|
19
|
-
private processWebhookQueue;
|
|
20
|
-
private callWebhook;
|
|
21
|
-
createFieldEventHandlers(fieldId: string, schema?: any, formData?: any, fieldPath?: string[]): {
|
|
22
|
-
onFocus: (value: any) => Promise<void>;
|
|
23
|
-
onBlur: (value: any) => Promise<void>;
|
|
24
|
-
onChange: (value: any) => Promise<void>;
|
|
25
|
-
};
|
|
26
|
-
cleanup(): void;
|
|
27
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FormEventHandlers } from '../types';
|
|
2
|
-
|
|
3
|
-
export declare class FormEventManager {
|
|
4
|
-
private handlers;
|
|
5
|
-
constructor(handlers: FormEventHandlers);
|
|
6
|
-
handleBeforeSubmit(data: any): Promise<any>;
|
|
7
|
-
handleAfterSubmit(data: any): Promise<void>;
|
|
8
|
-
handleBeforeValidation(data: any): Promise<any>;
|
|
9
|
-
handleAfterValidation(data: any, errors: any): Promise<void>;
|
|
10
|
-
}
|
package/dist/events/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { FormEventManager } from './FormEventManager';
|
|
2
|
-
export { FormEventHub } from './FormEventHub';
|
|
3
|
-
export { FormEventProvider, useFormEventHub, useFieldEventHandlers } from './FormEventContext';
|
|
4
|
-
export type { FormEventHandlers, FieldEventHandlers, FormFieldEvent, WebhookConfig } from '../types';
|
package/dist/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './components';
|
|
3
|
-
export * from './widgets';
|
|
4
|
-
export * from './layouts';
|
|
5
|
-
export * from './events';
|
|
6
|
-
export * from './types';
|
|
7
|
-
export * from './utils';
|
|
8
|
-
export * from './lib/utils';
|
|
9
|
-
export type { FormProps, IChangeEvent } from '@rjsf/core';
|
|
10
|
-
export type { RJSFSchema, UiSchema, WidgetProps, FieldProps, ArrayFieldTemplateProps, ObjectFieldTemplateProps, FieldTemplateProps, ErrorSchema, RJSFValidationError } from '@rjsf/utils';
|
|
11
|
-
export { default as validator } from '@rjsf/validator-ajv8';
|
|
12
|
-
export { generateTheme } from '@rjsf/shadcn';
|
|
13
|
-
export { ExtendedForm } from './ExtendedForm';
|