react-survey-builder 1.0.4 → 1.0.5
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.
@@ -20,7 +20,7 @@ var ComponentLabel = function ComponentLabel(props) {
|
|
20
20
|
__html: labelText
|
21
21
|
}
|
22
22
|
}), hasRequiredLabel && !props.hide_required_alert && /*#__PURE__*/_react["default"].createElement("span", {
|
23
|
-
className: "label-required badge
|
23
|
+
className: "label-required badge bg-danger"
|
24
24
|
}, "Required"));
|
25
25
|
};
|
26
26
|
var _default = exports["default"] = ComponentLabel;
|
@@ -296,6 +296,9 @@ var NumberInput = /*#__PURE__*/function (_React$Component8) {
|
|
296
296
|
props.defaultValue = this.props.defaultValue;
|
297
297
|
props.ref = this.inputField;
|
298
298
|
}
|
299
|
+
props.min = this.props.data.min_value;
|
300
|
+
props.max = this.props.data.max_value;
|
301
|
+
props.step = this.props.data.step;
|
299
302
|
if (this.props.read_only) {
|
300
303
|
props.disabled = 'disabled';
|
301
304
|
}
|
package/lib/toolbar.js
CHANGED
@@ -159,6 +159,7 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
159
159
|
id: 'place-holder-label'
|
160
160
|
}),
|
161
161
|
field_name: 'dropdown_',
|
162
|
+
show_custom_name: true,
|
162
163
|
options: []
|
163
164
|
}, {
|
164
165
|
key: 'Tags',
|
@@ -171,6 +172,7 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
171
172
|
id: 'place-holder-label'
|
172
173
|
}),
|
173
174
|
field_name: 'tags_',
|
175
|
+
show_custom_name: true,
|
174
176
|
options: []
|
175
177
|
}, {
|
176
178
|
key: 'Checkboxes',
|
@@ -183,6 +185,7 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
183
185
|
id: 'place-holder-label'
|
184
186
|
}),
|
185
187
|
field_name: 'checkboxes_',
|
188
|
+
show_custom_name: true,
|
186
189
|
options: []
|
187
190
|
}, {
|
188
191
|
key: 'Checkbox',
|
@@ -195,6 +198,7 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
195
198
|
id: 'place-holder-label'
|
196
199
|
}),
|
197
200
|
field_name: 'checkbox_',
|
201
|
+
show_custom_name: true,
|
198
202
|
boxLabel: 'Agree To Rules & Regs'
|
199
203
|
}, {
|
200
204
|
key: 'RadioButtons',
|
@@ -207,6 +211,7 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
207
211
|
id: 'place-holder-label'
|
208
212
|
}),
|
209
213
|
field_name: 'radiobuttons_',
|
214
|
+
show_custom_name: true,
|
210
215
|
options: []
|
211
216
|
}, {
|
212
217
|
key: 'TextInput',
|
@@ -218,7 +223,8 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
218
223
|
id: 'place-holder-label'
|
219
224
|
}),
|
220
225
|
icon: _fa.FaFont,
|
221
|
-
field_name: 'text_input_'
|
226
|
+
field_name: 'text_input_',
|
227
|
+
show_custom_name: true
|
222
228
|
}, {
|
223
229
|
key: 'EmailInput',
|
224
230
|
canHaveAnswer: true,
|
@@ -230,6 +236,7 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
230
236
|
}),
|
231
237
|
icon: _fa.FaEnvelope,
|
232
238
|
field_name: 'email_input_',
|
239
|
+
show_custom_name: true,
|
233
240
|
placeholder: ''
|
234
241
|
}, {
|
235
242
|
key: 'NumberInput',
|
@@ -241,7 +248,11 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
241
248
|
id: 'place-holder-label'
|
242
249
|
}),
|
243
250
|
icon: _fa.FaPlus,
|
244
|
-
field_name: 'number_input_'
|
251
|
+
field_name: 'number_input_',
|
252
|
+
show_custom_name: true,
|
253
|
+
step: 1,
|
254
|
+
min_value: 1,
|
255
|
+
max_value: 5
|
245
256
|
}, {
|
246
257
|
key: 'PhoneNumber',
|
247
258
|
canHaveAnswer: true,
|
@@ -252,7 +263,8 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
252
263
|
id: 'place-holder-phone-number'
|
253
264
|
}),
|
254
265
|
icon: _fa.FaPhone,
|
255
|
-
field_name: 'phone_input_'
|
266
|
+
field_name: 'phone_input_',
|
267
|
+
show_custom_name: true
|
256
268
|
}, {
|
257
269
|
key: 'TextArea',
|
258
270
|
canHaveAnswer: true,
|
@@ -263,7 +275,8 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
263
275
|
id: 'place-holder-label'
|
264
276
|
}),
|
265
277
|
icon: _fa.FaTextHeight,
|
266
|
-
field_name: 'text_area_'
|
278
|
+
field_name: 'text_area_',
|
279
|
+
show_custom_name: true
|
267
280
|
}, {
|
268
281
|
key: 'FieldSet',
|
269
282
|
canHaveAnswer: false,
|
@@ -348,7 +361,8 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
348
361
|
id: 'place-holder-label'
|
349
362
|
}),
|
350
363
|
icon: _fa.FaStar,
|
351
|
-
field_name: 'rating_'
|
364
|
+
field_name: 'rating_',
|
365
|
+
show_custom_name: true
|
352
366
|
}, {
|
353
367
|
key: 'DatePicker',
|
354
368
|
canDefaultToday: true,
|
@@ -365,7 +379,8 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
365
379
|
label: intl.formatMessage({
|
366
380
|
id: 'place-holder-label'
|
367
381
|
}),
|
368
|
-
field_name: 'date_picker_'
|
382
|
+
field_name: 'date_picker_',
|
383
|
+
show_custom_name: true
|
369
384
|
}, {
|
370
385
|
key: 'Signature',
|
371
386
|
canReadOnly: true,
|
@@ -420,7 +435,8 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
|
|
420
435
|
}),
|
421
436
|
max_label: intl.formatMessage({
|
422
437
|
id: 'difficult'
|
423
|
-
})
|
438
|
+
}),
|
439
|
+
show_custom_name: true
|
424
440
|
}, {
|
425
441
|
key: 'Camera',
|
426
442
|
name: intl.formatMessage({
|