react-survey-builder 1.0.7 → 1.0.9

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/types/index.d.ts CHANGED
@@ -28,6 +28,9 @@ type BaseElement = {
28
28
  | "Range"
29
29
  | "Camera";
30
30
  showDescription?: boolean;
31
+ showLabelLocationPicker?: boolean;
32
+ showHelp?: boolean;
33
+ hideRequiredAlert?: boolean;
31
34
  required: boolean;
32
35
  canHaveAlternateForm: boolean;
33
36
  canHaveDisplayHorizontal: boolean;
@@ -46,7 +49,7 @@ export type StaticElement = {
46
49
  };
47
50
  export type SurveyBuilderInput = {
48
51
  canHaveAnswer?: true;
49
- field_name: string;
52
+ fieldName: string;
50
53
  label: string;
51
54
  };
52
55
  export type Option = {
@@ -59,7 +62,7 @@ export type SelectableElement = {
59
62
  options: Option[];
60
63
  } & SurveyBuilderInput;
61
64
  export type ImageElement = {
62
- field_name: string;
65
+ fieldName: string;
63
66
  src: string;
64
67
  };
65
68
  export type DateElement = {
@@ -72,15 +75,16 @@ export type DateElement = {
72
75
  timeFormat: string;
73
76
  } & SurveyBuilderInput;
74
77
  export type RangeElement = {
75
- max_label: string;
76
- max_value: number;
77
- min_label: string;
78
- min_value: number;
78
+ maxLabel: string;
79
+ maxValue: number;
80
+ minLabel: string;
81
+ minValue: number;
82
+ step: number;
79
83
  } & SurveyBuilderInput;
80
84
  export type FileElement = {
81
85
  _href: string;
82
- file_path: string;
83
- field_name: string;
86
+ filePath: string;
87
+ fieldName: string;
84
88
  } & StaticElement;
85
89
  export type WebsiteElement = {
86
90
  href: string;
@@ -104,7 +108,7 @@ export type TaskData = BaseElement &
104
108
  export type SurveyBuilderLayout = {
105
109
  isContainer: true;
106
110
  childItems: TaskData[];
107
- field_name: string;
111
+ fieldName: string;
108
112
  };
109
113
  export type SurveyBuilderPostData = {
110
114
  task_data: TaskData[];
@@ -123,7 +127,7 @@ export interface SurveyBuilderProps {
123
127
  files?: any[];
124
128
  url?: string;
125
129
  showCorrectColumn?: boolean;
126
- show_description?: boolean;
130
+ showDescription?: boolean;
127
131
  onLoad?: () => Promise<SurveyBuilderPostData>;
128
132
  onPost?: (data: SurveyBuilderPostData) => void;
129
133
  saveUrl?: string;
@@ -137,31 +141,35 @@ export class ReactSurveyBuilder extends React.Component<SurveyBuilderProps> {}
137
141
  export interface SurveyGeneratorOnSubmitParams {
138
142
  id: number;
139
143
  name: string;
140
- custom_name: string;
144
+ customName: string;
141
145
  help: string;
142
146
  value: string | string[];
147
+ label: string;
143
148
  }
144
149
 
145
150
  export interface SurveyGeneratorProps {
146
- form_action: string;
147
- form_method: string;
148
- action_name?: string;
151
+ formAction: string;
152
+ formMethod: string;
153
+ actionName?: string;
149
154
  onBlur?: (info: SurveyGeneratorOnSubmitParams[]) => void;
150
155
  onSubmit?: (info: SurveyGeneratorOnSubmitParams[]) => void;
151
156
  onChange?: (info: SurveyGeneratorOnSubmitParams[]) => void;
152
157
  data: any[];
153
- back_action?: string;
154
- back_name?: string;
158
+ backAction?: string;
159
+ backName?: string;
155
160
  task_id?: number;
156
- answer_data?: any[];
161
+ answerData?: any[];
157
162
  authenticity_token?: string;
158
- hide_actions?: boolean;
159
- skip_validations?: boolean;
160
- display_short?: boolean;
161
- read_only?: boolean;
163
+ hideActions?: boolean;
164
+ skipValidations?: boolean;
165
+ displayShort?: boolean;
166
+ readOnly?: boolean;
162
167
  // eslint-disable-next-line no-undef
163
168
  variables?: Record<any, any>;
164
169
  submitButton?: JSX.Element;
170
+ backButton?: JSX.Element;
171
+ buttons?: JSX.Element;
172
+ buttonClassName?: string;
165
173
  }
166
174
 
167
175
  export class ReactSurveyGenerator extends React.Component<SurveyGeneratorProps> {}
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _itIt = _interopRequireDefault(require("../locales/it-it.json"));
10
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
- var ItLang = {
13
- messages: _objectSpread({}, _itIt["default"]),
14
- locale: 'it-IT'
15
- };
16
- var _default = exports["default"] = ItLang;
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _viVn = _interopRequireDefault(require("../locales/vi-vn.json"));
10
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
- var VnLang = {
13
- messages: _objectSpread({}, _viVn["default"]),
14
- locale: 'vi-VN'
15
- };
16
- var _default = exports["default"] = VnLang;
@@ -1,92 +0,0 @@
1
- {
2
- "display-label": "Visualizza etichetta",
3
- "choose-file": "Scegli file",
4
- "choose-file-type": "Scegli tipo di file",
5
- "select-file-type": "Scegli tipo di file",
6
- "text-to-display": "Testo visualizzato",
7
- "link-to": "Link to",
8
- "center": "Centro",
9
- "width": "Larghezza",
10
- "height": "Altezza",
11
- "required": "Obbligatorio",
12
- "read-only": "Sola lettura",
13
- "default-to-today": "Default oggi",
14
- "show-time-select": "Visualizza selettore orario",
15
- "show-time-select-only": "Visualizza solo orario",
16
- "show-time-input": "Visualizza input orario",
17
- "display-horizontal": "Visualizza orizzontale",
18
- "variable-key": "Chiave variabile",
19
- "variable-key-desc": "Ciò fornirà all'elemento una chiave che può essere utilizzata per sostituire il contenuto con un valore di runtime",
20
- "print-options": "Opzioni di stampa",
21
- "page-break-before-elements": "Interruzione di pagina prima dell'elemento",
22
- "alternate-signature-page": "Pagina alternativa/firma",
23
- "display-on-alternate-signature-page": "Visualizza su pagina alternativa/firma",
24
- "step": "Step",
25
- "min": "Min",
26
- "max": "Max",
27
- "default-selected": "Selezionato di default",
28
- "text-style": "Stile testo",
29
- "bold": "Grassetto",
30
- "italic": "Corsivo",
31
- "description": "Descrizione",
32
- "correct-answer": "Risposta corretta",
33
- "populate-options-from-api": "Popola opzione da API",
34
- "populate": "Popola",
35
- "pdf": "PDF",
36
- "word": "Word",
37
- "excel": "Excel",
38
- "ppt": "PPT",
39
- "options": "Opzioni",
40
- "value": "Valore",
41
- "correct": "Corretto",
42
- "dismiss": "Scarta",
43
- "place-holder-option-1": "Segnaposto opzione 1",
44
- "place-holder-option-2": "Segnaposto opzione 2",
45
- "place-holder-option-3": "Segnaposto opzione 3",
46
- "place-holder-tag-1": "Segnaposto opzione 1",
47
- "place-holder-tag-2": "Segnaposto opzione 2",
48
- "place-holder-tag-3": "Segnaposto opzione 3",
49
- "toolbox": "Toolbox",
50
- "header-text": "Testo Header",
51
- "label": "Etichetta",
52
- "paragraph": "Paragrafo",
53
- "line-break": "Linea Interruzione",
54
- "dropdown": "Dropdown",
55
- "tags": "Tags",
56
- "checkboxes": "Checkboxes",
57
- "multiple-choice": "Scelta multipla",
58
- "text-input": "Input testo",
59
- "email-input": "Email",
60
- "phone-input": "Numero di telefono",
61
- "number-input": "Input numerico",
62
- "multi-line-input": "Input multi linea",
63
- "fieldset": "Set di campi",
64
- "two-columns-row": "Layout 2 colonne",
65
- "three-columns-row": "Layout 3 colonne",
66
- "four-columns-row": "Layout 4 colonne",
67
- "five-columns-row": "Layout 5 colonne",
68
- "six-columns-row": "Layout 6 colonne",
69
- "image": "Immagine",
70
- "rating": "Valutazione",
71
- "date": "Data",
72
- "signature": "Firma",
73
- "website": "Sito web",
74
- "file-attachment": "Allegato file",
75
- "range": "Range",
76
- "camera": "Camera",
77
- "file-upload": "Upload file",
78
- "place-holder-text": "Testo segnaposto...",
79
- "place-holder-label": "Etichetta segnaposto",
80
- "place-holder-website-link": "Segnaposto link sito...",
81
- "place-holder-file-name": "Segnaposto nome file...",
82
- "place-holder-email": "E-Mail",
83
- "place-holder-phone-number": "Numero di telefono",
84
- "easy": "Facile",
85
- "difficult": "Difficile",
86
- "drop-zone": "Dropzone",
87
- "message.is-required": "è obbligatorio",
88
- "message.was-answered-incorrectly": "è stato risposto in modo errato",
89
- "message.was-not-registered": "non è stato registrato",
90
- "message.invalid-email": "il campo richiede un indirizzo email valido",
91
- "message.invalid-phone-number": "campo richiede un numero di telefono valido"
92
- }
@@ -1,82 +0,0 @@
1
- {
2
- "display-label": "Nhãn hiển thị",
3
- "choose-file": "Chọn tệp tin",
4
- "text-to-display": "Chữ hiển thị",
5
- "link-to": "Liên kết tới",
6
- "center": "Giữa",
7
- "width": "Độ rộng",
8
- "height": "Chiều cao",
9
- "required": "Bắt buộc nhập",
10
- "read-only": "Chỉ đọc",
11
- "default-to-today": "Mặc định hôm nay",
12
- "show-time-select": "Hiển thị chọn thời gian",
13
- "show-time-select-only": "Chỉ hiển thị thời gian",
14
- "show-time-input": "Hiển thị đầu vào thời gian",
15
- "display-horizontal": "Hiển thị theo chiều ngang",
16
- "variable-key": "Khóa tham chiếu",
17
- "variable-key-desc": "Tùy chọn này cung cấp từ khóa dùng để thay thế nội dung khi biểu mẫu hoạt động",
18
- "print-options": "Tùy chọn in ấn",
19
- "page-break-before-elements": "Phân trang trước thành phần điểu khiển",
20
- "alternate-signature-page": "Trang thay thế / ký",
21
- "display-on-alternate-signature-page": "Hiển thị trên trang thay thế / ký",
22
- "step": "Bước nhảy",
23
- "min": "Nhỏ nhất",
24
- "max": "Lớn nhất",
25
- "default-selected": "Mặc Định Chọn",
26
- "text-style": "Kiểu Chữ",
27
- "bold": "Đậm",
28
- "italic": "Nghiêng",
29
- "description": "Mô tả",
30
- "correct-answer": "Lựa chọn đúng",
31
- "populate-options-from-api": "Lấy dữ liệu từ API",
32
- "populate": "Thực hiện",
33
- "options": "Tùy chọn",
34
- "value": "Giá trị",
35
- "correct": "Đúng",
36
- "dismiss": "Bỏ qua",
37
- "place-holder-option-1": "Lựa chọn 1",
38
- "place-holder-option-2": "Lựa chọn 2",
39
- "place-holder-option-3": "Lựa chọn 3",
40
- "place-holder-tag-1": "Lựa chọn 1",
41
- "place-holder-tag-2": "Lựa chọn 2",
42
- "place-holder-tag-3": "Lựa chọn 3",
43
- "toolbox": "Công cụ",
44
- "header-text": "Tiêu đề",
45
- "label": "Nhãn",
46
- "paragraph": "Đoạn văn",
47
- "line-break": "Đường kẻ dòng",
48
- "dropdown": "Danh sách chọn",
49
- "tags": "Thẻ",
50
- "checkboxes": "Hộp chọn",
51
- "checkbox": "Hộp chọn",
52
- "default-checked": "Hộp chọn",
53
- "checkbox-label-text": "Hộp chọn",
54
- "multiple-choice": "Nhiều lựa chọn",
55
- "text-input": "Nhập chữ",
56
- "number-input": "Nhập số",
57
- "fieldset": "bộ trường",
58
- "multi-line-input": "Nhập nhiều dòng",
59
- "two-columns-row": "Dòng có hai cột",
60
- "three-columns-row": "Dòng có ba cột",
61
- "four-columns-row": "Dòng có bốn cột",
62
- "image": "Liên kết ảnh",
63
- "rating": "Đánh giá",
64
- "date": "Ngày",
65
- "signature": "Chữ kí",
66
- "website": "Trang web",
67
- "file-attachment": "Tệp đính kèm",
68
- "range": "Khoảng",
69
- "camera": "Tải ảnh",
70
- "place-holder-text": "Nội dung...",
71
- "place-holder-label": "Nhãn",
72
- "place-holder-text-label": "Điền vào chỗ trống.",
73
- "place-holder-website-link": "Đường dẫn tới website...",
74
- "place-holder-file-name": "Tên tệp...",
75
- "easy": "Easy",
76
- "difficult": "Difficult",
77
- "drop-zone": "Khu vực kéo thả",
78
- "custom-name-label": "A Name To Give This Input That Will Show Up In Data Retrieval",
79
- "message.is-required": "không được bỏ trống",
80
- "message.was-answered incorrectly": "đã trả lời sai",
81
- "message.was-not-registered": "chưa đăng ký"
82
- }