@arudovwen/form-builder-react 1.9.17 → 1.9.18

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.
@@ -1,7 +1,7 @@
1
1
  import { jsxs as ce, jsx as D, Fragment as De } from "react/jsx-runtime";
2
2
  import ht, { memo as le, useState as xe, useCallback as we, forwardRef as Oo, useRef as ne, useEffect as ie, useContext as gt, createContext as fn, useMemo as be, useLayoutEffect as Aa } from "react";
3
3
  import "react-dom";
4
- import { A as Ia } from "./index-B51ctr_U.js";
4
+ import { A as Ia } from "./index-DJlw_s73.js";
5
5
  function ue(e) {
6
6
  if (typeof e == "string" || typeof e == "number") return "" + e;
7
7
  let t = "";
@@ -6804,7 +6804,7 @@ function Jg({ formData: e }) {
6804
6804
  let u = null;
6805
6805
  return (f = e == null ? void 0 : e.filter((h) => !(h != null && h.isFieldDeleted))) == null || f.forEach((h, y) => {
6806
6806
  var _;
6807
- const x = Lo[y % Lo.length], p = ((_ = h == null ? void 0 : h.questionData) == null ? void 0 : _.filter((E) => !(E != null && E.isFieldDeleted))) || [], v = y * 400, m = 0, w = 320, S = 60 + p.length * 110;
6807
+ const x = Lo[y % Lo.length], p = ((_ = h == null ? void 0 : h.formData) == null ? void 0 : _.filter((E) => !(E != null && E.isFieldDeleted))) || [], v = y * 400, m = 0, w = 320, S = 60 + p.length * 110;
6808
6808
  l.push({
6809
6809
  id: h.id,
6810
6810
  type: "sectionGroup",
@@ -6851,7 +6851,7 @@ function Jg({ formData: e }) {
6851
6851
  });
6852
6852
  }), (g = e == null ? void 0 : e.filter((h) => !(h != null && h.isFieldDeleted))) == null || g.forEach((h) => {
6853
6853
  var y, x;
6854
- (x = (y = h == null ? void 0 : h.questionData) == null ? void 0 : y.filter((p) => !(p != null && p.isFieldDeleted))) == null || x.forEach((p) => {
6854
+ (x = (y = h == null ? void 0 : h.formData) == null ? void 0 : y.filter((p) => !(p != null && p.isFieldDeleted))) == null || x.forEach((p) => {
6855
6855
  var v;
6856
6856
  p.isHidden && ((v = p.visibilityDependentFields) == null ? void 0 : v.length) > 0 && p.visibilityDependentFields.forEach((m) => {
6857
6857
  d.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arudovwen/form-builder-react",
3
- "version": "1.9.17",
3
+ "version": "1.9.18",
4
4
  "description": "A React-based form builder component library.",
5
5
  "type": "module",
6
6
  "main": "./dist/form-builder.umd.js",
@@ -3,7 +3,7 @@ export interface BuilderProps {
3
3
  onSubmit?: (e: any) => void;
4
4
  onChange?: (data: any) => void;
5
5
  onLogAction?: (action: string, value: any) => void;
6
- questionData?: any;
6
+ formData?: any;
7
7
  isReadOnly?: boolean;
8
8
  config?: any;
9
9
  deleteMode?: DeleteMode;
@@ -22,4 +22,4 @@ export interface BuilderProps {
22
22
  onShowVersion?: () => void;
23
23
  formType?: "default" | "poll";
24
24
  }
25
- export default function Layout({ onSubmit, onChange, onLogAction, questionData, deleteMode, mode, config, title, goBackUrl, loading, onPublish, previewLoading, saveLoading, publishLoading, onTitleChange, uploadUrl, onAddTemplate, templates, onShowVersion, formType, }: BuilderProps): import("react/jsx-runtime").JSX.Element;
25
+ export default function Layout({ onSubmit, onChange, onLogAction, formData, deleteMode, mode, config, title, goBackUrl, loading, onPublish, previewLoading, saveLoading, publishLoading, onTitleChange, uploadUrl, onAddTemplate, templates, onShowVersion, formType, }: BuilderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- export default function MainPage({ questionData, uploadUrl, onAddTemplate, templates, viewMode, }: {
2
- questionData: any[];
1
+ export default function MainPage({ initialFormData, uploadUrl, onAddTemplate, templates, viewMode, }: {
2
+ initialFormData: any[];
3
3
  isReadOnly?: boolean;
4
4
  uploadUrl?: string;
5
5
  onAddTemplate?: () => void;
@@ -1,5 +1 @@
1
- export default function MultiPage({ form_data, options, current }: {
2
- form_data: any;
3
- options: any;
4
- current: any;
5
- }): import("react/jsx-runtime").JSX.Element;
1
+ export default function MultiPage({ form_data, options, current }: any): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import * as yup from "yup";
2
- interface QuestionData {
2
+ interface formData {
3
3
  id: string;
4
4
  type: "textField" | "longText" | "numberField" | "amountField" | "selectField" | "checkbox" | "email" | "date" | "matrix" | "url";
5
5
  isRequired?: boolean;
@@ -15,7 +15,7 @@ interface QuestionData {
15
15
  isDisabled?: boolean;
16
16
  }
17
17
  interface Section {
18
- questionData: QuestionData[];
18
+ formData: formData[];
19
19
  }
20
20
  export declare const evaluateVisibility: (question: any, answerData: any) => any;
21
21
  export declare function generateDynamicSchema({ formData, isReadOnly, ignoreValidation, answerData, }: {
@@ -134,7 +134,7 @@ export declare const demoQuestionDa: {
134
134
  id: string;
135
135
  disabled: boolean;
136
136
  isHidden: boolean;
137
- questionData: ({
137
+ formData: ({
138
138
  id: string;
139
139
  sectionId: string;
140
140
  type: string;
@@ -310,7 +310,7 @@ export declare const demoFormData: ({
310
310
  title: string;
311
311
  description: string;
312
312
  id: string;
313
- questionData: ({
313
+ formData: ({
314
314
  required: boolean;
315
315
  description: string;
316
316
  value: any;
@@ -509,7 +509,7 @@ export declare const demoFormData: ({
509
509
  title: string;
510
510
  description: string;
511
511
  id: string;
512
- questionData: ({
512
+ formData: ({
513
513
  required: boolean;
514
514
  description: string;
515
515
  value: any;
@@ -1014,7 +1014,7 @@ export declare const demoFormData: ({
1014
1014
  title: string;
1015
1015
  description: string;
1016
1016
  id: string;
1017
- questionData: ({
1017
+ formData: ({
1018
1018
  required: boolean;
1019
1019
  description: string;
1020
1020
  value: any;
@@ -1292,7 +1292,7 @@ export declare const demoFormData: ({
1292
1292
  title: string;
1293
1293
  description: string;
1294
1294
  id: string;
1295
- questionData: ({
1295
+ formData: ({
1296
1296
  required: boolean;
1297
1297
  description: string;
1298
1298
  value: any;
@@ -1506,7 +1506,7 @@ export declare const demoFormData: ({
1506
1506
  title: string;
1507
1507
  description: string;
1508
1508
  id: string;
1509
- questionData: ({
1509
+ formData: ({
1510
1510
  required: boolean;
1511
1511
  description: string;
1512
1512
  value: any;
@@ -1721,7 +1721,7 @@ export declare const demoFormData: ({
1721
1721
  title: string;
1722
1722
  description: string;
1723
1723
  id: string;
1724
- questionData: ({
1724
+ formData: ({
1725
1725
  required: boolean;
1726
1726
  description: string;
1727
1727
  value: any;
@@ -1,3 +1,3 @@
1
1
  import { BuilderProps } from "../../components/editor/layout";
2
- declare const HomePage: ({ onSubmit, onChange, onLogAction, questionData, isReadOnly, deleteMode, mode, config, title, loading, goBackUrl, onPublish, previewLoading, saveLoading, publishLoading, onTitleChange, uploadUrl, onAddTemplate, templates, onShowVersion, formType, }: BuilderProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const HomePage: ({ onSubmit, onChange, onLogAction, formData, isReadOnly, deleteMode, mode, config, title, loading, goBackUrl, onPublish, previewLoading, saveLoading, publishLoading, onTitleChange, uploadUrl, onAddTemplate, templates, onShowVersion, formType, }: BuilderProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default HomePage;
@@ -100,6 +100,7 @@ export interface ElementType {
100
100
  minChecked?: number | null;
101
101
  allowCheckAll?: boolean;
102
102
  requireAllChecked?: boolean;
103
+ selectionType?: string;
103
104
  isMultiple: boolean;
104
105
  acceptedFiles: any[];
105
106
  maxFileSize?: number;
@@ -6,7 +6,7 @@ export declare const defaultTemplates: ({
6
6
  id: string;
7
7
  title: string;
8
8
  description: string;
9
- questionData: ({
9
+ formData: ({
10
10
  id: string;
11
11
  type: string;
12
12
  label: string;
@@ -27,7 +27,7 @@ export declare const defaultTemplates: ({
27
27
  sections: {
28
28
  id: string;
29
29
  title: string;
30
- questionData: ({
30
+ formData: ({
31
31
  id: string;
32
32
  type: string;
33
33
  label: string;
@@ -48,7 +48,7 @@ export declare const defaultTemplates: ({
48
48
  sections: {
49
49
  id: string;
50
50
  title: string;
51
- questionData: ({
51
+ formData: ({
52
52
  id: string;
53
53
  type: string;
54
54
  label: string;
@@ -2,8 +2,8 @@ type Section = {
2
2
  id: string;
3
3
  title: string;
4
4
  description: string;
5
- questionData?: any[];
5
+ formData?: any[];
6
6
  isFieldDeleted?: boolean;
7
7
  };
8
- export declare function getAllQuestionData(sections: Section[]): any[];
8
+ export declare function getAllformData(sections: Section[]): any[];
9
9
  export {};