@mosip/json-form-builder 0.1.0-beta.0
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/README.md +335 -0
- package/dist/JsonFormBuilder.d.ts +26 -0
- package/dist/JsonFormBuilder.esm.js +2 -0
- package/dist/JsonFormBuilder.esm.js.map +1 -0
- package/dist/JsonFormBuilder.umd.js +2 -0
- package/dist/JsonFormBuilder.umd.js.map +1 -0
- package/dist/__tests__/JsonFormBuilder.test.d.ts +1 -0
- package/dist/__tests__/setup.d.ts +1 -0
- package/dist/components/CheckboxComponent.d.ts +8 -0
- package/dist/components/DateComponent.d.ts +8 -0
- package/dist/components/DropdownComponent.d.ts +8 -0
- package/dist/components/PasswordComponent.d.ts +8 -0
- package/dist/components/PhoneInputComponent.d.ts +8 -0
- package/dist/components/PhotoComponent.d.ts +2 -0
- package/dist/components/SimpleTypeComponent.d.ts +9 -0
- package/dist/components/TextInputComponent.d.ts +8 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/index.d.ts +2 -0
- package/dist/stories/JsonFormBuilder.stories.d.ts +8 -0
- package/dist/types.d.ts +130 -0
- package/dist/utils/constants.d.ts +21 -0
- package/dist/utils/recaptcha.d.ts +15 -0
- package/dist/utils/responsive-style.d.ts +9 -0
- package/dist/utils/utils.d.ts +122 -0
- package/package.json +78 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FormState, FormField } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* This function creates a simple textbox form element that supports multilingual labels and validation.
|
|
4
|
+
* It handles multiple languages, required validation, and regex validation.
|
|
5
|
+
* @param {FormState} state Current form state containing schema, container, and other properties.
|
|
6
|
+
* @param {FormField} field Form field object containing type, id, label, required, and other properties.
|
|
7
|
+
* @returns {HTMLDivElement} A div element containing the form field with its label and input.
|
|
8
|
+
*/
|
|
9
|
+
export declare const createSimpleTextbox: (state: FormState, field: FormField) => HTMLDivElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FormState, FormField } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a string input form element.
|
|
4
|
+
* @param {FormState} state Current form state containing schema, container, and other properties.
|
|
5
|
+
* @param {FormField} field Form field object containing type, id, label, required, and other properties.
|
|
6
|
+
* @returns {HTMLDivElement} A div element containing the form field with its label and input.
|
|
7
|
+
*/
|
|
8
|
+
export declare const createStringField: (state: FormState, field: FormField) => HTMLDivElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createCheckboxField } from "./CheckboxComponent";
|
|
2
|
+
import { createDateField } from "./DateComponent";
|
|
3
|
+
import { createDropdownField } from "./DropdownComponent";
|
|
4
|
+
import { createSimpleTextbox } from "./SimpleTypeComponent";
|
|
5
|
+
import { createPasswordField } from "./PasswordComponent";
|
|
6
|
+
import { createStringField } from "./TextInputComponent";
|
|
7
|
+
import { createPhoneField } from "./PhoneInputComponent";
|
|
8
|
+
import { createPhotoField } from "./PhotoComponent";
|
|
9
|
+
export { createCheckboxField, createDateField, createDropdownField, createSimpleTextbox, createPasswordField, createStringField, createPhoneField, createPhotoField, };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { JsonFormBuilder } from "../JsonFormBuilder";
|
|
4
|
+
declare const JsonFormBuilderWrapper: React.FC<any>;
|
|
5
|
+
declare const _default: Meta<typeof JsonFormBuilderWrapper>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type Story = StoryObj<typeof JsonFormBuilder>;
|
|
8
|
+
export declare const JsonFormBuilderExample: Story;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
export interface KeyValuePair {
|
|
2
|
+
[key: string]: string;
|
|
3
|
+
}
|
|
4
|
+
export interface Label extends KeyValuePair {
|
|
5
|
+
}
|
|
6
|
+
export interface FormField {
|
|
7
|
+
id: string;
|
|
8
|
+
controlType: "textbox" | "password" | "date" | "dropdown" | "checkbox" | "phone" | "photo";
|
|
9
|
+
type?: "string" | "simpleType";
|
|
10
|
+
labelName: Label;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
validators?: Validator[];
|
|
13
|
+
alignmentGroup?: string;
|
|
14
|
+
cssClasses?: string[];
|
|
15
|
+
placeholder?: Label;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
info?: Label;
|
|
18
|
+
capsLockCheck?: boolean;
|
|
19
|
+
prefix?: string[];
|
|
20
|
+
acceptedFileTypes?: string[];
|
|
21
|
+
format?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface AllowedValues {
|
|
24
|
+
[key: string]: {
|
|
25
|
+
[key: string]: Label;
|
|
26
|
+
} | string;
|
|
27
|
+
}
|
|
28
|
+
export interface SubmitButtonConfig {
|
|
29
|
+
label: string;
|
|
30
|
+
action: (data: FormData) => void;
|
|
31
|
+
}
|
|
32
|
+
export interface LanguageConfig {
|
|
33
|
+
currentLanguage?: string;
|
|
34
|
+
defaultLanguage?: string;
|
|
35
|
+
showLanguageSwitcher?: boolean;
|
|
36
|
+
languageSwitcherPosition?: "top" | "bottom";
|
|
37
|
+
availableLanguages?: string[];
|
|
38
|
+
rtlLanguages?: string[];
|
|
39
|
+
}
|
|
40
|
+
export interface ReCaptchaConfig {
|
|
41
|
+
siteKey: string;
|
|
42
|
+
enabled?: boolean;
|
|
43
|
+
language?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface AdditionalSchema {
|
|
46
|
+
[id: string]: {
|
|
47
|
+
label: Label;
|
|
48
|
+
placeholder: Label;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export interface AdditionalConfig {
|
|
52
|
+
submitButton: SubmitButtonConfig;
|
|
53
|
+
language?: LanguageConfig;
|
|
54
|
+
recaptcha?: ReCaptchaConfig;
|
|
55
|
+
additionalSchema?: AdditionalSchema;
|
|
56
|
+
}
|
|
57
|
+
export interface Errors {
|
|
58
|
+
[key: string]: KeyValuePair;
|
|
59
|
+
}
|
|
60
|
+
export interface FormConfig {
|
|
61
|
+
schema: FormField[];
|
|
62
|
+
language: LanguageSettings;
|
|
63
|
+
allowedValues?: AllowedValues;
|
|
64
|
+
errors?: Errors;
|
|
65
|
+
maxUploadFileSize?: number;
|
|
66
|
+
i18nValues?: {
|
|
67
|
+
errors?: Errors;
|
|
68
|
+
labels?: {
|
|
69
|
+
[id: string]: Label;
|
|
70
|
+
};
|
|
71
|
+
placeholders?: {
|
|
72
|
+
[id: string]: Label;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export interface FileUploadData {
|
|
77
|
+
value: string | Blob;
|
|
78
|
+
docType: string;
|
|
79
|
+
format: string;
|
|
80
|
+
refId: string;
|
|
81
|
+
}
|
|
82
|
+
export type FormValue = string | boolean | KeyValuePair | KeyValuePair[] | File | FileUploadData | undefined;
|
|
83
|
+
export interface FormData {
|
|
84
|
+
[key: string]: FormValue;
|
|
85
|
+
}
|
|
86
|
+
export interface LanguageSettings {
|
|
87
|
+
mandatory: string[];
|
|
88
|
+
langCodeMap: KeyValuePair;
|
|
89
|
+
optional?: string[];
|
|
90
|
+
}
|
|
91
|
+
export interface Validator {
|
|
92
|
+
regex?: RegExp | string;
|
|
93
|
+
error?: KeyValuePair;
|
|
94
|
+
langCode?: string;
|
|
95
|
+
}
|
|
96
|
+
export interface FormState {
|
|
97
|
+
schema: FormField[];
|
|
98
|
+
allowedValues: AllowedValues;
|
|
99
|
+
mandatoryLanguages: string[];
|
|
100
|
+
optionalLanguages: string[];
|
|
101
|
+
container: HTMLElement;
|
|
102
|
+
formData: FormData;
|
|
103
|
+
formElements: {
|
|
104
|
+
[key: string]: HTMLElement | {
|
|
105
|
+
[key: string]: HTMLElement;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
submitLabel: string;
|
|
109
|
+
submitAction: (data: FormData) => void;
|
|
110
|
+
currentLanguage: string;
|
|
111
|
+
defaultLanguage: string;
|
|
112
|
+
showLanguageSwitcher: boolean;
|
|
113
|
+
languageSwitcherPosition: "top" | "bottom";
|
|
114
|
+
availableLanguages: string[];
|
|
115
|
+
rtlLanguages: string[];
|
|
116
|
+
isRTL: boolean;
|
|
117
|
+
recaptcha?: ReCaptchaConfig;
|
|
118
|
+
fallbackErrors: Errors;
|
|
119
|
+
lastErrors?: Record<string, "required" | "mismatch" | number | null>;
|
|
120
|
+
languageMap: KeyValuePair;
|
|
121
|
+
additionalSchema?: AdditionalSchema;
|
|
122
|
+
isSubmitting: boolean;
|
|
123
|
+
maxUploadFileSize: number;
|
|
124
|
+
labels: {
|
|
125
|
+
[id: string]: Label;
|
|
126
|
+
};
|
|
127
|
+
placeholders: {
|
|
128
|
+
[id: string]: Label;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const ControlType: {
|
|
2
|
+
TEXTBOX: string;
|
|
3
|
+
PASSWORD: string;
|
|
4
|
+
DATE: string;
|
|
5
|
+
DROPDOWN: string;
|
|
6
|
+
CHECKBOX: string;
|
|
7
|
+
PHONE: string;
|
|
8
|
+
PHOTO: string;
|
|
9
|
+
FILE: string;
|
|
10
|
+
};
|
|
11
|
+
declare const InputType: {
|
|
12
|
+
STRING: string;
|
|
13
|
+
SIMPLE_TYPE: string;
|
|
14
|
+
};
|
|
15
|
+
declare const CameraErrorCodes: {
|
|
16
|
+
PERMISSION_DENIED: string;
|
|
17
|
+
NOT_ACCESSIBLE: string;
|
|
18
|
+
CAMERA_NOT_FOUND: string;
|
|
19
|
+
NOT_READABLE: string;
|
|
20
|
+
};
|
|
21
|
+
export { ControlType, InputType, CameraErrorCodes };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormState } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Loads the reCAPTCHA script asynchronously and checks if it is already loaded.
|
|
4
|
+
* @returns {Promise<boolean>} A promise that resolves to true if reCAPTCHA script is loaded successfully, false otherwise.
|
|
5
|
+
*/
|
|
6
|
+
declare const loadRecaptcha: (state: FormState) => Promise<boolean>;
|
|
7
|
+
/**
|
|
8
|
+
* Adds the reCAPTCHA script to the document if reCAPTCHA is enabled and site key is provided.
|
|
9
|
+
*/
|
|
10
|
+
declare const addRecaptchaScript: (state: FormState) => Promise<void>;
|
|
11
|
+
declare const enableRecaptcha: (state: FormState, form: HTMLElement) => void;
|
|
12
|
+
declare const initializeRecaptcha: (state: FormState) => void;
|
|
13
|
+
declare const reInitializeRecaptcha: (state: FormState) => void;
|
|
14
|
+
declare const validateRecaptcha: (state: FormState) => boolean;
|
|
15
|
+
export { enableRecaptcha, addRecaptchaScript, initializeRecaptcha, loadRecaptcha, reInitializeRecaptcha, validateRecaptcha, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds responsive styles to the form elements to ensure they are displayed correctly on different screen sizes.
|
|
3
|
+
*/
|
|
4
|
+
declare const addResponsiveStyles: () => void;
|
|
5
|
+
/**
|
|
6
|
+
* Adds styles for right-to-left (RTL) languages to ensure proper layout and alignment.
|
|
7
|
+
*/
|
|
8
|
+
declare const addRTLStyles: () => void;
|
|
9
|
+
export { addRTLStyles, addResponsiveStyles };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { FormField, FormState, Label } from "../types";
|
|
2
|
+
type LabelObject = Record<string, string>;
|
|
3
|
+
/**
|
|
4
|
+
* Helps to get the label text for a form field, including a required indicator if the field is marked as required.
|
|
5
|
+
* @param {FormState} state form state containing current language and default language
|
|
6
|
+
* @param {FormField | null} field form field object containing label and required properties
|
|
7
|
+
* @param {LabelObject} additionalLabel Optional additional label object to use instead of the field's label.
|
|
8
|
+
* @returns {string} The label text for the field, including a required indicator if applicable.
|
|
9
|
+
*/
|
|
10
|
+
declare const getLabelText: (state: FormState, field: FormField | null, additionalLabel?: LabelObject) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Gets the label text for a form field, including a required indicator if the field is marked as required.
|
|
13
|
+
* @param {FormState} state Current form state containing schema, container, and other properties.
|
|
14
|
+
* @param {LabelObject | undefined} labels Labels object containing multilingual labels for the field.
|
|
15
|
+
* @param {boolean} strictOnly Boolean flag to determine if strict fallback is required.
|
|
16
|
+
* @param {string} currLang Current language code to use for fetching the label.
|
|
17
|
+
* @param {string} defaultLang Default language code to use if no label is found in the current language.
|
|
18
|
+
* @returns {string} The label text for the field, including a required indicator if applicable.
|
|
19
|
+
*/
|
|
20
|
+
declare const getMultiLangText: (state: FormState, labels: LabelObject | undefined, strictOnly?: boolean, currLang?: string, defaultLang?: string) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Appends an error message to the specified container.
|
|
23
|
+
* It creates an error icon and a text node, and appends them to the container.
|
|
24
|
+
* @param {HTMLDivElement} container Container element where the error message will be appended.
|
|
25
|
+
* @param {Label|string} message Message to display in the error container, can be a string or a multilingual label object.
|
|
26
|
+
* @param {FormState} state Current form state containing schema, container, and other properties.
|
|
27
|
+
*/
|
|
28
|
+
declare const appendError: (container: HTMLDivElement, message: string | Label, // Label = { [langCode: string]: string }
|
|
29
|
+
state?: FormState) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Handles the required validation for a form field.
|
|
32
|
+
* @param {FormState} state Current form state containing schema, container, and other properties.
|
|
33
|
+
* @param {string} normalizedLang Current language code normalized to a 3-letter code.
|
|
34
|
+
* @param {string} normalizedDefault Default language code normalized to a 3-letter code.
|
|
35
|
+
* @param {HTMLDivElement} errorContainer Error container element where error messages will be appended.
|
|
36
|
+
* @returns { lastError: 'required'; isValid: false }
|
|
37
|
+
*/
|
|
38
|
+
declare const handleRequiredValidation: (state: FormState, errorContainer: HTMLDivElement, normalizedLang?: string, normalizedDefault?: string) => {
|
|
39
|
+
lastError: "required";
|
|
40
|
+
isValid: false;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Handles regex validation for a form field.
|
|
44
|
+
* @param {FormState} state Current form state containing schema, container, and other properties.
|
|
45
|
+
* @param {HTMLDivElement} errorContainer Error container element where error messages will be appended.
|
|
46
|
+
* @param {any[]} validators Validators array containing regex or validator functions.
|
|
47
|
+
* @param {string} value Value to validate against the regex.
|
|
48
|
+
* @param {boolean} useLangCode Language code usage flag to filter validators based on language.
|
|
49
|
+
* @param {string} currentLang Current language code normalized to a 3-letter code.
|
|
50
|
+
* @param {string} defaultLang Default language code normalized to a 3-letter code.
|
|
51
|
+
* @returns { lastError: number | null; isValid: boolean }
|
|
52
|
+
*/
|
|
53
|
+
declare const handleRegexValidation: (state: FormState, errorContainer: HTMLDivElement, validators: any[], value: string, useLangCode: boolean, currentLang?: string, defaultLang?: string) => {
|
|
54
|
+
lastError: number;
|
|
55
|
+
isValid: boolean;
|
|
56
|
+
} | {
|
|
57
|
+
lastError: null;
|
|
58
|
+
isValid: boolean;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Creates an SVG element representing an info icon.
|
|
62
|
+
* @param {number | string} size size of the info icon in px
|
|
63
|
+
* @returns {SVGSVGElement} returns an SVG element with the info icon.
|
|
64
|
+
*/
|
|
65
|
+
declare const createInfoIconSvg: (size?: number | string) => SVGSVGElement;
|
|
66
|
+
/**
|
|
67
|
+
* Create Info icon for a form field
|
|
68
|
+
* @param {string} infoMessage The message to display in the info icon tooltip.
|
|
69
|
+
* @returns {HTMLSpanElement} Returns a span element containing the info icon and tooltip.
|
|
70
|
+
*/
|
|
71
|
+
declare const createInfoIcon: (infoMessage: string) => HTMLSpanElement;
|
|
72
|
+
/**
|
|
73
|
+
* Get caps lock span
|
|
74
|
+
* @param {FormState} state Current form state containing schema, container, and other properties.
|
|
75
|
+
* @param {FormField} field form field object containing label and required properties
|
|
76
|
+
* @returns {HTMLSpanElement} returns a span element for caps lock info
|
|
77
|
+
*/
|
|
78
|
+
declare const getCapsLockSpan: (state: FormState, field: FormField) => HTMLSpanElement;
|
|
79
|
+
/**
|
|
80
|
+
* Toggle caps lock info on click of caps lock button
|
|
81
|
+
* @param {KeyboardEvent | MouseEvent} event event from click or keyup
|
|
82
|
+
* @param {HTMLSpanElement} capsLockSpan span element of the caps lock span
|
|
83
|
+
*/
|
|
84
|
+
declare const checkCapsLock: (event: KeyboardEvent | MouseEvent, capsLockSpan: HTMLSpanElement) => void;
|
|
85
|
+
/**
|
|
86
|
+
* Enables caps lock check for a form field.
|
|
87
|
+
* @param {FormField} field Form field object containing type, id, label, required, and other properties.
|
|
88
|
+
* @param {HTMLDivElement} wrapper Wrapper HTMLDivElement that contains the form field.
|
|
89
|
+
* @param {HTMLInputElement} input Input HTMLInputElement that will have the caps lock check enabled.
|
|
90
|
+
*/
|
|
91
|
+
declare const enableCapsLockCheck: (field: FormField, wrapper: HTMLDivElement, input: HTMLInputElement) => void;
|
|
92
|
+
/**
|
|
93
|
+
* Prevents the default action of an event.
|
|
94
|
+
* @param {Event} e Event to prevent default action for.
|
|
95
|
+
*/
|
|
96
|
+
declare const preventDefaultFn: (e: Event) => void;
|
|
97
|
+
/**
|
|
98
|
+
* Disables a form field by preventing user input and interaction.
|
|
99
|
+
* @param {HTMLInputElement | HTMLSelectElement} field HTMLInputElement or HTMLSelectElement to disable.
|
|
100
|
+
*/
|
|
101
|
+
declare const disableField: (field: HTMLInputElement | HTMLSelectElement) => void;
|
|
102
|
+
/**
|
|
103
|
+
* Creates a new div element to be used as an error container.
|
|
104
|
+
* @returns {HTMLDivElement} A new div element to be used as an error container.
|
|
105
|
+
*/
|
|
106
|
+
declare const createErrorContainer: () => HTMLDivElement;
|
|
107
|
+
/**
|
|
108
|
+
* Converts a one-way language map into a two-way map.
|
|
109
|
+
* This allows for bidirectional lookup where both keys and values are language codes.
|
|
110
|
+
* @param {Record<string, string>}oneWayMap A map where keys are language codes and values are their corresponding labels.
|
|
111
|
+
* @returns Two-way map where both keys and values are language codes, allowing for bidirectional lookup.
|
|
112
|
+
*/
|
|
113
|
+
declare function buildBidirectionalLanguageMap(oneWayMap: Record<string, string>): Record<string, string>;
|
|
114
|
+
declare const dataUrlToBlob: (dataUrl: string) => Blob;
|
|
115
|
+
/**
|
|
116
|
+
* Validate Form
|
|
117
|
+
* @param {FormState} state Current form state containing schema, container, and other properties.
|
|
118
|
+
* @returns {boolean} Returns true if the form is valid, false otherwise.
|
|
119
|
+
*/
|
|
120
|
+
declare const validateForm: (state: FormState) => boolean;
|
|
121
|
+
declare const emptyInvalidFn: (input: HTMLInputElement | HTMLSelectElement) => (() => void);
|
|
122
|
+
export { getLabelText, getMultiLangText, appendError, handleRequiredValidation, handleRegexValidation, createInfoIconSvg, createInfoIcon, getCapsLockSpan, checkCapsLock, disableField, preventDefaultFn, createErrorContainer, buildBidirectionalLanguageMap, enableCapsLockCheck, dataUrlToBlob, validateForm, emptyInvalidFn, };
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mosip/json-form-builder",
|
|
3
|
+
"version": "0.1.0-beta.0",
|
|
4
|
+
"description": "A dynamic JSON form builder with multi-language support, validation, and responsive design",
|
|
5
|
+
"main": "dist/JsonFormBuilder.umd.js",
|
|
6
|
+
"module": "dist/JsonFormBuilder.esm.js",
|
|
7
|
+
"types": "dist/JsonFormBuilder.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"storybook": "storybook dev -p 6006",
|
|
13
|
+
"build-storybook": "build-storybook",
|
|
14
|
+
"build": "rimraf dist && rollup -c",
|
|
15
|
+
"dev": "rollup -c -w",
|
|
16
|
+
"test": "jest",
|
|
17
|
+
"lint": "eslint src/**/*.ts",
|
|
18
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
19
|
+
"prepare": "npm run build",
|
|
20
|
+
"prepublishOnly": "npm run lint",
|
|
21
|
+
"watch": "npm-watch",
|
|
22
|
+
"verify": "npm run build"
|
|
23
|
+
},
|
|
24
|
+
"watch": {
|
|
25
|
+
"build": {
|
|
26
|
+
"patterns": [
|
|
27
|
+
"src"
|
|
28
|
+
],
|
|
29
|
+
"extensions": "ts"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"form",
|
|
34
|
+
"builder",
|
|
35
|
+
"json",
|
|
36
|
+
"multilingual",
|
|
37
|
+
"validation",
|
|
38
|
+
"responsive"
|
|
39
|
+
],
|
|
40
|
+
"author": "MOSIP",
|
|
41
|
+
"license": "MPL-2.0",
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
44
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
45
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
46
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
47
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
48
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
49
|
+
"@storybook/addon-interactions": "^8.6.14",
|
|
50
|
+
"@storybook/cli": "^8.6.14",
|
|
51
|
+
"@storybook/react-vite": "^8.6.14",
|
|
52
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
53
|
+
"@types/jest": "^29.5.12",
|
|
54
|
+
"@types/react": "^18.2.55",
|
|
55
|
+
"@types/react-dom": "^18.2.19",
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "^7.0.1",
|
|
57
|
+
"@typescript-eslint/parser": "^7.0.1",
|
|
58
|
+
"eslint": "^8.56.0",
|
|
59
|
+
"identity-obj-proxy": "^3.0.0",
|
|
60
|
+
"jest": "^29.7.0",
|
|
61
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
62
|
+
"npm-watch": "^0.13.0",
|
|
63
|
+
"prettier": "^3.2.5",
|
|
64
|
+
"rimraf": "^5.0.5",
|
|
65
|
+
"rollup": "^4.9.6",
|
|
66
|
+
"ts-jest": "^29.1.2",
|
|
67
|
+
"tslib": "^2.8.1",
|
|
68
|
+
"typescript": "^5.3.3",
|
|
69
|
+
"vite": "^6.3.6"
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"react": "^18.2.0",
|
|
73
|
+
"react-dom": "^18.2.0"
|
|
74
|
+
},
|
|
75
|
+
"dependencies": {
|
|
76
|
+
"date-fns": "^4.1.0"
|
|
77
|
+
}
|
|
78
|
+
}
|