taskforge-forms 0.0.1
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 +189 -0
- package/dist/excel/Options sheet.xlsx +0 -0
- package/dist/excel/list_sheet.xlsx +0 -0
- package/dist/excel/table_sheet.xlsx +0 -0
- package/dist/index.css +1 -0
- package/dist/place.png +0 -0
- package/dist/taskforge-forms.es.js +8253 -0
- package/dist/taskforge-forms.umd.js +60 -0
- package/dist/vite.svg +1 -0
- package/package.json +92 -0
- package/types/App.d.ts +3 -0
- package/types/assets/svgs/back.d.ts +1 -0
- package/types/assets/svgs/calendar.d.ts +1 -0
- package/types/assets/svgs/close.d.ts +1 -0
- package/types/components/ApiExample.d.ts +2 -0
- package/types/components/ColumnExample.d.ts +2 -0
- package/types/components/CustomSearchSelect.d.ts +14 -0
- package/types/components/CustomSelect.d.ts +23 -0
- package/types/components/CutomDatePicker.d.ts +16 -0
- package/types/components/DataTable/index.d.ts +22 -0
- package/types/components/DocumentSign.d.ts +2 -0
- package/types/components/FileReaderComponent.d.ts +8 -0
- package/types/components/ImageViewer.d.ts +4 -0
- package/types/components/Loader.d.ts +2 -0
- package/types/components/MultiSelectInput.d.ts +13 -0
- package/types/components/OptionsExample.d.ts +2 -0
- package/types/components/PhoneInput.d.ts +19 -0
- package/types/components/SearchSelect.d.ts +21 -0
- package/types/components/TableInputColumns.d.ts +1 -0
- package/types/components/TableInputElement.d.ts +6 -0
- package/types/components/UniversalFileViewer.d.ts +1 -0
- package/types/components/ValidateExample.d.ts +2 -0
- package/types/components/editor/bottom-bar.d.ts +5 -0
- package/types/components/editor/element-canvas.d.ts +17 -0
- package/types/components/editor/element-render.d.ts +3 -0
- package/types/components/editor/form-preview.d.ts +4 -0
- package/types/components/editor/index.d.ts +2 -0
- package/types/components/editor/layout.d.ts +16 -0
- package/types/components/editor/main.d.ts +5 -0
- package/types/components/editor/preview-modal.d.ts +9 -0
- package/types/components/editor/sidebar.d.ts +2 -0
- package/types/components/editor/topbar.d.ts +10 -0
- package/types/components/elements/amount-input.d.ts +4 -0
- package/types/components/elements/basic-text.d.ts +4 -0
- package/types/components/elements/cascade-dropdown.d.ts +25 -0
- package/types/components/elements/checkbox-input.d.ts +4 -0
- package/types/components/elements/country-bank.d.ts +6 -0
- package/types/components/elements/data-grid.d.ts +4 -0
- package/types/components/elements/date-input.d.ts +4 -0
- package/types/components/elements/divider.d.ts +3 -0
- package/types/components/elements/document-sign.d.ts +17 -0
- package/types/components/elements/element-container.d.ts +13 -0
- package/types/components/elements/element-editor.d.ts +8 -0
- package/types/components/elements/email-input.d.ts +4 -0
- package/types/components/elements/file-input.d.ts +4 -0
- package/types/components/elements/grid-input.d.ts +20 -0
- package/types/components/elements/header.d.ts +4 -0
- package/types/components/elements/link-element.d.ts +5 -0
- package/types/components/elements/long-text.d.ts +4 -0
- package/types/components/elements/matrix-input.d.ts +4 -0
- package/types/components/elements/multi-input-options.d.ts +13 -0
- package/types/components/elements/multi-input.d.ts +15 -0
- package/types/components/elements/multi-select-input.d.ts +5 -0
- package/types/components/elements/password-input.d.ts +4 -0
- package/types/components/elements/phone-input.d.ts +4 -0
- package/types/components/elements/radio-input.d.ts +4 -0
- package/types/components/elements/rating-input.d.ts +13 -0
- package/types/components/elements/section-editor.d.ts +7 -0
- package/types/components/elements/section-input.d.ts +4 -0
- package/types/components/elements/select-input.d.ts +4 -0
- package/types/components/elements/spacer.d.ts +3 -0
- package/types/components/elements/table-input.d.ts +4 -0
- package/types/components/elements/text-input.d.ts +5 -0
- package/types/components/elements/validate-input.d.ts +4 -0
- package/types/components/elements/visibility-editor.d.ts +1 -0
- package/types/components/forms/dynamic-input.d.ts +24 -0
- package/types/components/forms/file-uploader.d.ts +18 -0
- package/types/components/ui/AppButton.d.ts +18 -0
- package/types/components/ui/AppIcon.d.ts +5 -0
- package/types/components/ui/AppTab.d.ts +17 -0
- package/types/components/viewer/elements-render.d.ts +4 -0
- package/types/components/viewer/index.d.ts +21 -0
- package/types/components/viewer/multi-page.d.ts +5 -0
- package/types/components/viewer/single-page.d.ts +5 -0
- package/types/components/viewer/validation.d.ts +25 -0
- package/types/context/editor-context.d.ts +38 -0
- package/types/index.d.ts +3 -0
- package/types/main.d.ts +1 -0
- package/types/pages/builder/index.d.ts +3 -0
- package/types/pages/viewer/index.d.ts +16 -0
- package/types/utils/contants.d.ts +123 -0
- package/types/utils/getAllQuestions.d.ts +8 -0
- package/types/utils/isValidImage.d.ts +1 -0
- package/types/utils/localStorageControl.d.ts +4 -0
- package/types/utils/mapIdToValue.d.ts +1 -0
- package/types/utils/normalizeRows.d.ts +4 -0
package/dist/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "taskforge-forms",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A React-based form builder component library.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/taskforge-forms.umd.js",
|
|
7
|
+
"module": "./dist/taskforge-forms.es.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/taskforge-forms.es.js",
|
|
11
|
+
"require": "./dist/taskforge-forms.umd.js"
|
|
12
|
+
},
|
|
13
|
+
"./style.css": "./dist/index.css"
|
|
14
|
+
},
|
|
15
|
+
"types": "./types/index.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"dist/index.css",
|
|
19
|
+
"types"
|
|
20
|
+
],
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "vite --config demo/vite.config.ts",
|
|
24
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
25
|
+
"build:js": "vite build",
|
|
26
|
+
"build": "npm run build:types && npm run build:js",
|
|
27
|
+
"lint": "eslint .",
|
|
28
|
+
"preview": "vite preview",
|
|
29
|
+
"analyze": "vite build && npx serve dist",
|
|
30
|
+
"deploy": "npm run build && npm publish"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"react",
|
|
34
|
+
"taskforge-forms",
|
|
35
|
+
"taskforge",
|
|
36
|
+
"react-library",
|
|
37
|
+
"vite",
|
|
38
|
+
"component-library"
|
|
39
|
+
],
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "https://github.com/TaskForgeGlobal/Taskforge.Form.Builder.git"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/TaskForgeGlobal/Taskforge.Form.Builder#readme",
|
|
45
|
+
"author": {
|
|
46
|
+
"name": "Success Ahon",
|
|
47
|
+
"url": "https://github.com/arudovwen"
|
|
48
|
+
},
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"@headlessui/react": "^2.2.0",
|
|
52
|
+
"@hookform/resolvers": "^3.0.0",
|
|
53
|
+
"axios": "^1.0.0",
|
|
54
|
+
"papaparse": "^5.5.0",
|
|
55
|
+
"react": "^18.0.0",
|
|
56
|
+
"react-currency-input-field": "^3.9.0",
|
|
57
|
+
"react-datepicker": "^8.0.0",
|
|
58
|
+
"react-dom": "^18.0.0",
|
|
59
|
+
"react-draggable": "^4.4.0",
|
|
60
|
+
"react-hook-form": "^7.0.0",
|
|
61
|
+
"react-router": "^7.0.0",
|
|
62
|
+
"react-router-dom": "^7.0.0",
|
|
63
|
+
"tailwindcss": "^3.0.0",
|
|
64
|
+
"uuid": "^11.0.0",
|
|
65
|
+
"xlsx": "^0.18.0",
|
|
66
|
+
"yup": "^1.0.0"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"clsx": "^2.1.1",
|
|
70
|
+
"sonner": "^2.0.7"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@eslint/js": "^9.15.0",
|
|
74
|
+
"@iconify/react": "^6.0.2",
|
|
75
|
+
"@types/node": "^22.10.2",
|
|
76
|
+
"@types/react": "^18.3.12",
|
|
77
|
+
"@types/react-dom": "^18.3.1",
|
|
78
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
79
|
+
"autoprefixer": "^10.4.20",
|
|
80
|
+
"eslint": "^9.15.0",
|
|
81
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
82
|
+
"eslint-plugin-react-refresh": "^0.4.14",
|
|
83
|
+
"globals": "^15.12.0",
|
|
84
|
+
"postcss": "^8.4.49",
|
|
85
|
+
"sass": "^1.83.0",
|
|
86
|
+
"sass-embedded": "^1.83.0",
|
|
87
|
+
"tailwindcss": "^3.4.16",
|
|
88
|
+
"typescript": "~5.6.2",
|
|
89
|
+
"typescript-eslint": "^8.15.0",
|
|
90
|
+
"vite": "^6.0.1"
|
|
91
|
+
}
|
|
92
|
+
}
|
package/types/App.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function BackSvg(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function CalendarSvg({ type, className }: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function CloseSvg(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Option {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
interface CustomSearchSelectProps {
|
|
6
|
+
options: Option[];
|
|
7
|
+
value?: string;
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
onGetValue: (name: string, option: Option | null) => void;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
export default function CustomSearchSelect({ options, value, defaultValue, onGetValue, readOnly, name, }: CustomSearchSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface CustomSelectProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
options: any[];
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
errors?: {
|
|
7
|
+
message?: string;
|
|
8
|
+
};
|
|
9
|
+
register?: any;
|
|
10
|
+
setValue?: (name: string, value: any) => void;
|
|
11
|
+
name: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
value?: any;
|
|
14
|
+
trigger?: (name: string) => void;
|
|
15
|
+
isMultiple?: boolean;
|
|
16
|
+
isFloatingLabel?: boolean;
|
|
17
|
+
subText?: string;
|
|
18
|
+
labelClass?: string;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const CustomSelect: React.FC<CustomSelectProps>;
|
|
23
|
+
export default CustomSelect;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "react-datepicker/dist/react-datepicker.css";
|
|
3
|
+
import "@/assets/scss/_date-picker.scss";
|
|
4
|
+
interface CustomDatePickerProps {
|
|
5
|
+
value?: Date | string | null;
|
|
6
|
+
onGetValue?: (name: string, date: Date | null) => void;
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
dateFormat?: string;
|
|
9
|
+
name: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
minDate?: null;
|
|
12
|
+
maxDate?: null;
|
|
13
|
+
showYearDropdown?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const CustomDatePicker: React.FC<CustomDatePickerProps>;
|
|
16
|
+
export default CustomDatePicker;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type ColumnType = "text" | "number" | "checkbox";
|
|
2
|
+
export interface DataGridColumn<T> {
|
|
3
|
+
field: keyof T;
|
|
4
|
+
headerName?: string;
|
|
5
|
+
editable?: boolean;
|
|
6
|
+
type?: ColumnType;
|
|
7
|
+
validate?: boolean;
|
|
8
|
+
id: string;
|
|
9
|
+
}
|
|
10
|
+
interface CustomDataGridProps<T extends {
|
|
11
|
+
id: string;
|
|
12
|
+
}> {
|
|
13
|
+
value?: T[];
|
|
14
|
+
onChange?: (rows: T[]) => void;
|
|
15
|
+
isReadOnly?: boolean;
|
|
16
|
+
columns: DataGridColumn<T>[];
|
|
17
|
+
url?: string;
|
|
18
|
+
}
|
|
19
|
+
export default function CustomDataGrid<T extends {
|
|
20
|
+
id: string;
|
|
21
|
+
}>({ value, onChange, isReadOnly, columns, }: CustomDataGridProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const FileReaderComponent: ({ setValue, name, isFloating, label, type, }: {
|
|
2
|
+
setValue: (e: string, n: any) => void;
|
|
3
|
+
name: string;
|
|
4
|
+
isFloating?: boolean;
|
|
5
|
+
label: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default FileReaderComponent;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./CustomSelect.css";
|
|
2
|
+
interface Option {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
value?: any;
|
|
6
|
+
}
|
|
7
|
+
interface MultiSelectInputProps {
|
|
8
|
+
value?: Option[];
|
|
9
|
+
onChange?: (value: Option[]) => void;
|
|
10
|
+
options: Option[];
|
|
11
|
+
}
|
|
12
|
+
export default function MultiSelectInput({ value, onChange, options, }: MultiSelectInputProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface PhoneInputProps {
|
|
2
|
+
label?: string;
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
classLabel?: string;
|
|
5
|
+
isRequired?: boolean;
|
|
6
|
+
isOptional?: boolean;
|
|
7
|
+
name?: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
horizontal?: boolean;
|
|
13
|
+
description?: string;
|
|
14
|
+
validate?: string;
|
|
15
|
+
onChange?: (val: string) => void;
|
|
16
|
+
onError?: (err: string | null) => void;
|
|
17
|
+
}
|
|
18
|
+
export default function PhoneInput({ label, placeholder, classLabel, isRequired, isOptional, name, value, error, disabled, readOnly, horizontal, description, validate, onChange, onError, }: PhoneInputProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface CustomSelectProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
options: any[];
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
errors?: any;
|
|
7
|
+
register?: any;
|
|
8
|
+
setValue?: any;
|
|
9
|
+
name: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
value?: any;
|
|
12
|
+
trigger?: any;
|
|
13
|
+
isMultiple?: boolean;
|
|
14
|
+
isFloatingLabel?: boolean;
|
|
15
|
+
subText?: string;
|
|
16
|
+
labelClass?: string;
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const CustomSelect: React.FC<CustomSelectProps>;
|
|
21
|
+
export default CustomSelect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function TableInputColumn({ value, onChange, onGetValue, }: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function UniversalFileViewer({ fileUrl, fileName, removeFile, }: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface FormElement {
|
|
2
|
+
id: string;
|
|
3
|
+
isReadOnly?: false;
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}
|
|
6
|
+
export interface EditorContextType {
|
|
7
|
+
formData: FormElement[];
|
|
8
|
+
setFormData: (data: FormElement[]) => void;
|
|
9
|
+
updateElementPosition: (newData: FormElement[], sectionId: string) => void;
|
|
10
|
+
updateElement: any;
|
|
11
|
+
removeElement: any;
|
|
12
|
+
isDragging: boolean;
|
|
13
|
+
uploadUrl?: string;
|
|
14
|
+
}
|
|
15
|
+
declare function ElementCanvas({ elementData, sectionId }: any): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const _default: import("react").MemoExoticComponent<typeof ElementCanvas>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface BuilderProps {
|
|
2
|
+
onSubmit?: (e: any) => void;
|
|
3
|
+
questionData?: any;
|
|
4
|
+
isReadOnly?: boolean;
|
|
5
|
+
config?: any;
|
|
6
|
+
title?: string;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
goBackUrl?: () => void;
|
|
9
|
+
onPublish?: (e: any) => void;
|
|
10
|
+
previewLoading?: boolean;
|
|
11
|
+
saveLoading?: boolean;
|
|
12
|
+
publishLoading?: boolean;
|
|
13
|
+
onTitleChange?: (string: any) => void;
|
|
14
|
+
uploadUrl?: string;
|
|
15
|
+
}
|
|
16
|
+
export default function Layout({ onSubmit, questionData, title, goBackUrl, loading, onPublish, previewLoading, saveLoading, publishLoading, onTitleChange, uploadUrl, }: BuilderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function TopBar({ title, goBackUrl, onSubmit, onPublish, previewLoading, saveLoading, publishLoading, onTitleChange, }: {
|
|
2
|
+
title: string;
|
|
3
|
+
goBackUrl: () => void;
|
|
4
|
+
onSubmit?: (e: any) => void;
|
|
5
|
+
onPublish?: (e: any) => void;
|
|
6
|
+
previewLoading?: boolean;
|
|
7
|
+
saveLoading?: boolean;
|
|
8
|
+
publishLoading?: boolean;
|
|
9
|
+
onTitleChange?: (newTitle: string) => void;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type DropdownOption = {
|
|
3
|
+
key?: string;
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
type CascadeDropdownProps = {
|
|
8
|
+
element: {
|
|
9
|
+
id: string;
|
|
10
|
+
customClass?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
options?: DropdownOption[];
|
|
13
|
+
options1?: DropdownOption[];
|
|
14
|
+
childLabel?: string;
|
|
15
|
+
};
|
|
16
|
+
validationData: {
|
|
17
|
+
register?: any;
|
|
18
|
+
trigger?: (name: string) => Promise<boolean>;
|
|
19
|
+
setValue?: (name: string, value: string) => void;
|
|
20
|
+
watch?: (name?: string) => any;
|
|
21
|
+
isReadOnly?: boolean;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
declare const CascadeDropdown: React.FC<CascadeDropdownProps>;
|
|
25
|
+
export default CascadeDropdown;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type SignDocumentProps = {
|
|
2
|
+
element: {
|
|
3
|
+
id: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
inputType?: string;
|
|
6
|
+
customClass?: string;
|
|
7
|
+
validationUrl: string;
|
|
8
|
+
documentObj: string;
|
|
9
|
+
signatureLink?: string;
|
|
10
|
+
};
|
|
11
|
+
validationData: {
|
|
12
|
+
register?: (id: string) => any;
|
|
13
|
+
isReadOnly?: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default function SignDocument({ element, validationData, }: SignDocumentProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
interface ElementType {
|
|
3
|
+
id: string;
|
|
4
|
+
inputLabel?: string;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
interface ElementContainerProps {
|
|
8
|
+
element: ElementType;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
state?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const ElementContainer: React.MemoExoticComponent<({ state, element, children }: ElementContainerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
|
+
export default ElementContainer;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
interface GridInputProps {
|
|
3
|
+
element: any;
|
|
4
|
+
sectionId?: string;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
customClass?: string;
|
|
7
|
+
state?: string;
|
|
8
|
+
/** Id of the element currently being dragged on the canvas (passed down so
|
|
9
|
+
* grid cells can show a "ready to receive" style even before hovering them) */
|
|
10
|
+
draggedElementId?: string | null;
|
|
11
|
+
}
|
|
12
|
+
interface GridItemProps {
|
|
13
|
+
col: number;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
customClass?: string;
|
|
16
|
+
state?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const GridItem: ({ col, children, customClass }: GridItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare const _default: React.MemoExoticComponent<({ element, sectionId, children, customClass, state, draggedElementId, }: GridInputProps) => import("react/jsx-runtime").JSX.Element>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type FieldType = {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
type: string;
|
|
7
|
+
};
|
|
8
|
+
type DynamicInputOptionListProps = {
|
|
9
|
+
initialFields?: FieldType[];
|
|
10
|
+
onChange: (fields: FieldType[]) => void;
|
|
11
|
+
};
|
|
12
|
+
declare const DynamicInputOptionList: React.FC<DynamicInputOptionListProps>;
|
|
13
|
+
export default DynamicInputOptionList;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type FieldType = {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
type: string;
|
|
7
|
+
};
|
|
8
|
+
type DynamicInputListProps = {
|
|
9
|
+
initialFields?: FieldType[];
|
|
10
|
+
watch?: (values: Record<string, string>) => void;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
tempDefaultValue?: Record<string, string>;
|
|
13
|
+
};
|
|
14
|
+
declare const DynamicInputList: React.FC<DynamicInputListProps>;
|
|
15
|
+
export default DynamicInputList;
|