survey-react-ui 2.0.3 → 2.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.
- package/fesm/survey-react-ui.mjs +110 -180
- package/fesm/survey-react-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-react-ui.js +38 -124
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +1 -1
- package/survey-react-ui.min.js.LICENSE.txt +1 -1
- package/typings/src/reactquestion.d.ts +0 -1
- package/typings/src/reactquestion_file.d.ts +0 -2
- package/typings/src/reactquestion_paneldynamic.d.ts +0 -4
- package/typings/src/reactquestion_rating.d.ts +1 -1
package/fesm/survey-react-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.0.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.0.5
|
|
3
3
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -1369,21 +1369,13 @@ class SurveyQuestion extends SurveyElementBase {
|
|
|
1369
1369
|
};
|
|
1370
1370
|
var cssClasses = question.cssClasses;
|
|
1371
1371
|
var questionRender = this.renderQuestion();
|
|
1372
|
-
var errorsTop = this.question.showErrorOnTop
|
|
1373
|
-
? this.renderErrors(cssClasses, "top")
|
|
1374
|
-
: null;
|
|
1375
|
-
var errorsBottom = this.question.showErrorOnBottom
|
|
1376
|
-
? this.renderErrors(cssClasses, "bottom")
|
|
1377
|
-
: null;
|
|
1378
1372
|
var comment = question && question.hasComment ? this.renderComment(cssClasses) : null;
|
|
1379
1373
|
var descriptionUnderInput = question.hasDescriptionUnderInput
|
|
1380
1374
|
? this.renderDescription()
|
|
1381
1375
|
: null;
|
|
1382
1376
|
return (React.createElement("div", { className: question.cssContent || undefined, style: contentStyle, role: "presentation" },
|
|
1383
|
-
errorsTop,
|
|
1384
1377
|
questionRender,
|
|
1385
1378
|
comment,
|
|
1386
|
-
errorsBottom,
|
|
1387
1379
|
descriptionUnderInput));
|
|
1388
1380
|
}
|
|
1389
1381
|
renderElement() {
|
|
@@ -1401,7 +1393,7 @@ class SurveyQuestion extends SurveyElementBase {
|
|
|
1401
1393
|
let rootStyle = question.getRootStyle();
|
|
1402
1394
|
let questionContent = this.wrapQuestionContent(this.renderQuestionContent());
|
|
1403
1395
|
return (React.createElement(React.Fragment, null,
|
|
1404
|
-
React.createElement("div", { ref: this.rootRef, id: question.id, className: question.getRootCss(), style: rootStyle, role: question.ariaRole, "aria-required": this.question.ariaRequired, "aria-invalid": this.question.ariaInvalid, "aria-labelledby": question.ariaLabelledBy, "aria-describedby": question.ariaDescribedBy, "aria-expanded": question.ariaExpanded, "data-name": question.name },
|
|
1396
|
+
React.createElement("div", { ref: this.rootRef, id: question.id, className: question.getRootCss(), style: rootStyle, role: question.ariaRole, "aria-required": this.question.ariaRequired, "aria-invalid": this.question.ariaInvalid, "aria-label": this.question.ariaLabel, "aria-labelledby": question.ariaLabelledBy, "aria-describedby": question.ariaDescribedBy, "aria-expanded": question.ariaExpanded, "data-name": question.name },
|
|
1405
1397
|
errorsAboveQuestion,
|
|
1406
1398
|
headerTop,
|
|
1407
1399
|
questionContent,
|
|
@@ -1460,9 +1452,6 @@ class SurveyElementErrors extends ReactSurveyElement {
|
|
|
1460
1452
|
get creator() {
|
|
1461
1453
|
return this.props.creator;
|
|
1462
1454
|
}
|
|
1463
|
-
get location() {
|
|
1464
|
-
return this.props.location;
|
|
1465
|
-
}
|
|
1466
1455
|
getState(prevState = null) {
|
|
1467
1456
|
return !prevState ? { error: 0 } : { error: prevState.error + 1 };
|
|
1468
1457
|
}
|
|
@@ -1842,7 +1831,7 @@ class PopupModal extends SurveyElementBase {
|
|
|
1842
1831
|
PopupModal.modalDescriptors = [];
|
|
1843
1832
|
|
|
1844
1833
|
/*!
|
|
1845
|
-
* surveyjs - Survey JavaScript library v2.0.
|
|
1834
|
+
* surveyjs - Survey JavaScript library v2.0.5
|
|
1846
1835
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1847
1836
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1848
1837
|
*/
|
|
@@ -1910,7 +1899,7 @@ var iconsV1 = {
|
|
|
1910
1899
|
};
|
|
1911
1900
|
|
|
1912
1901
|
/*!
|
|
1913
|
-
* surveyjs - Survey JavaScript library v2.0.
|
|
1902
|
+
* surveyjs - Survey JavaScript library v2.0.5
|
|
1914
1903
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1915
1904
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1916
1905
|
*/
|
|
@@ -2580,8 +2569,9 @@ class SurveyQuestionCheckbox extends SurveyQuestionElementBase {
|
|
|
2580
2569
|
if (this.question.blockedRow) {
|
|
2581
2570
|
return React.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
|
|
2582
2571
|
}
|
|
2583
|
-
else
|
|
2572
|
+
else {
|
|
2584
2573
|
return React.createElement(React.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
|
|
2574
|
+
}
|
|
2585
2575
|
}
|
|
2586
2576
|
getItems(cssClasses, choices) {
|
|
2587
2577
|
var renderedItems = [];
|
|
@@ -3118,7 +3108,7 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
|
|
|
3118
3108
|
return (React.createElement("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
|
|
3119
3109
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3120
3110
|
// @ts-ignore
|
|
3121
|
-
disabled: this.question.isDisabledAttr, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, onFocus: this.focus, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, ref: (div) => (this.setControl(div)) },
|
|
3111
|
+
disabled: this.question.isDisabledAttr, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, onFocus: this.focus, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-labelledby": this.question.ariaLabelledBy, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, ref: (div) => (this.setControl(div)) },
|
|
3122
3112
|
dropdownListModel.showHintPrefix ?
|
|
3123
3113
|
(React.createElement("div", { className: this.question.cssClasses.hintPrefix },
|
|
3124
3114
|
React.createElement("span", null, dropdownListModel.hintStringPrefix))) : null,
|
|
@@ -3329,14 +3319,14 @@ class SurveyQuestionMatrix extends SurveyQuestionElementBase {
|
|
|
3329
3319
|
var key = "row-" + row.name + "-" + i;
|
|
3330
3320
|
rows.push(React.createElement(SurveyQuestionMatrixRow, { key: key, question: this.question, cssClasses: cssClasses, row: row, isFirst: i == 0 }));
|
|
3331
3321
|
}
|
|
3332
|
-
var header = !this.question.showHeader ? null : (React.createElement("thead",
|
|
3322
|
+
var header = !this.question.showHeader ? null : (React.createElement("thead", { role: "presentation" },
|
|
3333
3323
|
React.createElement("tr", null,
|
|
3334
3324
|
rowsTH,
|
|
3335
3325
|
headers)));
|
|
3336
3326
|
return (React.createElement("div", { className: cssClasses.tableWrapper, ref: root => (this.setControl(root)) },
|
|
3337
|
-
React.createElement("fieldset",
|
|
3338
|
-
React.createElement("legend", { className: "sv-
|
|
3339
|
-
React.createElement("table", { className: this.question.getTableCss() },
|
|
3327
|
+
React.createElement("fieldset", { role: "radiogroup" },
|
|
3328
|
+
React.createElement("legend", { className: "sv-visuallyhidden" }, this.question.locTitle.renderedHtml),
|
|
3329
|
+
React.createElement("table", { className: this.question.getTableCss(), role: "presentation" },
|
|
3340
3330
|
header,
|
|
3341
3331
|
React.createElement("tbody", null, rows)))));
|
|
3342
3332
|
}
|
|
@@ -3514,24 +3504,6 @@ class LoadingIndicatorComponent extends React.Component {
|
|
|
3514
3504
|
}
|
|
3515
3505
|
}
|
|
3516
3506
|
|
|
3517
|
-
class SurveyFileChooseButton extends ReactSurveyElement {
|
|
3518
|
-
constructor(props) {
|
|
3519
|
-
super(props);
|
|
3520
|
-
}
|
|
3521
|
-
get question() {
|
|
3522
|
-
return (this.props.item && this.props.item.data.question) || this.props.data.question;
|
|
3523
|
-
}
|
|
3524
|
-
render() {
|
|
3525
|
-
return attachKey2click(React.createElement("label", { tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonText, onClick: (e) => this.question.chooseFile(e.nativeEvent) },
|
|
3526
|
-
(!!this.question.cssClasses.chooseFileIconId) ? React.createElement(SvgIcon, { title: this.question.chooseButtonText, iconName: this.question.cssClasses.chooseFileIconId, size: "auto" }) : null,
|
|
3527
|
-
React.createElement("span", null, this.question.chooseButtonText)));
|
|
3528
|
-
}
|
|
3529
|
-
}
|
|
3530
|
-
ReactElementFactory.Instance.registerElement("sv-file-choose-btn", (props) => {
|
|
3531
|
-
return React.createElement(SurveyFileChooseButton, props);
|
|
3532
|
-
});
|
|
3533
|
-
|
|
3534
|
-
// import { ReactElementFactory, SurveyFileChooseButton } from "../entries/react-ui-model";
|
|
3535
3507
|
class SurveyQuestionFile extends SurveyQuestionElementBase {
|
|
3536
3508
|
constructor(props) {
|
|
3537
3509
|
super(props);
|
|
@@ -3544,8 +3516,6 @@ class SurveyQuestionFile extends SurveyQuestionElementBase {
|
|
|
3544
3516
|
const loadingIndicator = this.question.showLoadingIndicator ? this.renderLoadingIndicator() : null;
|
|
3545
3517
|
const video = this.question.isPlayingVideo ? this.renderVideo() : null;
|
|
3546
3518
|
const fileDecorator = this.question.showFileDecorator ? this.renderFileDecorator() : null;
|
|
3547
|
-
const clearButton = this.question.showRemoveButton ? this.renderClearButton(this.question.cssClasses.removeButton) : null;
|
|
3548
|
-
const clearButtonBottom = this.question.showRemoveButtonBottom ? this.renderClearButton(this.question.cssClasses.removeButtonBottom) : null;
|
|
3549
3519
|
const fileNavigator = this.question.fileNavigatorVisible ? (React.createElement(SurveyActionBar, { model: this.question.fileNavigator })) : null;
|
|
3550
3520
|
let fileInput;
|
|
3551
3521
|
if (this.question.isReadOnlyAttr) {
|
|
@@ -3566,30 +3536,18 @@ class SurveyQuestionFile extends SurveyQuestionElementBase {
|
|
|
3566
3536
|
fileDecorator,
|
|
3567
3537
|
loadingIndicator,
|
|
3568
3538
|
video,
|
|
3569
|
-
clearButton,
|
|
3570
3539
|
preview,
|
|
3571
|
-
clearButtonBottom,
|
|
3572
3540
|
fileNavigator)));
|
|
3573
3541
|
}
|
|
3574
3542
|
renderFileDecorator() {
|
|
3575
|
-
const chooseButton = this.question.showChooseButton ? this.renderChooseButton() : null;
|
|
3576
3543
|
const actionsContainer = this.question.actionsContainerVisible ? React.createElement(SurveyActionBar, { model: this.question.actionsContainer }) : null;
|
|
3577
3544
|
const noFileChosen = this.question.isEmpty() ? (React.createElement("span", { className: this.question.cssClasses.noFileChosen }, this.question.noFileChosenCaption)) : null;
|
|
3578
3545
|
return (React.createElement("div", { className: this.question.getFileDecoratorCss() },
|
|
3579
3546
|
React.createElement("span", { className: this.question.cssClasses.dragAreaPlaceholder }, this.renderLocString(this.question.locRenderedPlaceholder)),
|
|
3580
3547
|
React.createElement("div", { className: this.question.cssClasses.wrapper },
|
|
3581
|
-
chooseButton,
|
|
3582
3548
|
actionsContainer,
|
|
3583
3549
|
noFileChosen)));
|
|
3584
3550
|
}
|
|
3585
|
-
renderChooseButton() {
|
|
3586
|
-
return React.createElement(SurveyFileChooseButton, { data: { question: this.question } });
|
|
3587
|
-
}
|
|
3588
|
-
renderClearButton(className) {
|
|
3589
|
-
return !this.question.isUploading ? (React.createElement("button", { type: "button", onClick: this.question.doClean, className: className },
|
|
3590
|
-
React.createElement("span", null, this.question.clearButtonCaption),
|
|
3591
|
-
(!!this.question.cssClasses.removeButtonIconId) ? React.createElement(SvgIcon, { iconName: this.question.cssClasses.removeButtonIconId, size: "auto", title: this.question.clearButtonCaption }) : null)) : null;
|
|
3592
|
-
}
|
|
3593
3551
|
renderPreview() {
|
|
3594
3552
|
return ReactElementFactory.Instance.createElement("sv-file-preview", { question: this.question });
|
|
3595
3553
|
}
|
|
@@ -3609,6 +3567,23 @@ ReactQuestionFactory.Instance.registerQuestion("file", props => {
|
|
|
3609
3567
|
return React.createElement(SurveyQuestionFile, props);
|
|
3610
3568
|
});
|
|
3611
3569
|
|
|
3570
|
+
class SurveyFileChooseButton extends ReactSurveyElement {
|
|
3571
|
+
constructor(props) {
|
|
3572
|
+
super(props);
|
|
3573
|
+
}
|
|
3574
|
+
get question() {
|
|
3575
|
+
return (this.props.item && this.props.item.data.question) || this.props.data.question;
|
|
3576
|
+
}
|
|
3577
|
+
render() {
|
|
3578
|
+
return attachKey2click(React.createElement("label", { tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonText, onClick: (e) => this.question.chooseFile(e.nativeEvent) },
|
|
3579
|
+
(!!this.question.cssClasses.chooseFileIconId) ? React.createElement(SvgIcon, { title: this.question.chooseButtonText, iconName: this.question.cssClasses.chooseFileIconId, size: "auto" }) : null,
|
|
3580
|
+
React.createElement("span", null, this.question.chooseButtonText)));
|
|
3581
|
+
}
|
|
3582
|
+
}
|
|
3583
|
+
ReactElementFactory.Instance.registerElement("sv-file-choose-btn", (props) => {
|
|
3584
|
+
return React.createElement(SurveyFileChooseButton, props);
|
|
3585
|
+
});
|
|
3586
|
+
|
|
3612
3587
|
class SurveyFileItem extends SurveyElementBase {
|
|
3613
3588
|
get question() {
|
|
3614
3589
|
return this.props.question;
|
|
@@ -3667,8 +3642,7 @@ class SurveyFilePreview extends SurveyElementBase {
|
|
|
3667
3642
|
}, title: val.name, download: val.name, style: { width: this.question.imageWidth } }, val.name)));
|
|
3668
3643
|
}
|
|
3669
3644
|
renderElement() {
|
|
3670
|
-
const content = this.question.
|
|
3671
|
-
: this.question.previewValue.map((item, index) => { return (React.createElement(SurveyFileItem, { item: item, question: this.question, key: index })); });
|
|
3645
|
+
const content = this.question.renderedPages.map((page, index) => { return (React.createElement(SurveyFilePage, { page: page, question: this.question, key: page.id })); });
|
|
3672
3646
|
return React.createElement("div", { className: this.question.cssClasses.fileList || undefined }, content);
|
|
3673
3647
|
}
|
|
3674
3648
|
canRender() {
|
|
@@ -3796,8 +3770,9 @@ class SurveyQuestionRadiogroup extends SurveyQuestionElementBase {
|
|
|
3796
3770
|
if (this.question.blockedRow) {
|
|
3797
3771
|
return React.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
|
|
3798
3772
|
}
|
|
3799
|
-
else
|
|
3773
|
+
else {
|
|
3800
3774
|
return React.createElement(React.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
|
|
3775
|
+
}
|
|
3801
3776
|
}
|
|
3802
3777
|
getItems(cssClasses, choices) {
|
|
3803
3778
|
var items = [];
|
|
@@ -4036,7 +4011,7 @@ class SurveyQuestionBoolean extends SurveyQuestionElementBase {
|
|
|
4036
4011
|
const cssClasses = this.question.cssClasses;
|
|
4037
4012
|
const itemClass = this.question.getItemCss();
|
|
4038
4013
|
return (React.createElement("div", { className: cssClasses.root, onKeyDown: this.handleOnKeyDown },
|
|
4039
|
-
React.createElement("label", { className: itemClass
|
|
4014
|
+
React.createElement("label", { className: itemClass },
|
|
4040
4015
|
React.createElement("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
|
|
4041
4016
|
? ""
|
|
4042
4017
|
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.control, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.booleanValue || false, onChange: this.handleOnChange, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }),
|
|
@@ -4068,7 +4043,7 @@ class SurveyQuestionBooleanCheckbox extends SurveyQuestionBoolean {
|
|
|
4068
4043
|
React.createElement("label", { className: cssClasses.checkboxLabel },
|
|
4069
4044
|
React.createElement("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
|
|
4070
4045
|
? ""
|
|
4071
|
-
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.controlCheckbox, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.booleanValue || false, onChange: this.handleOnChange, "aria-required": this.question.
|
|
4046
|
+
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.controlCheckbox, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.booleanValue || false, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }),
|
|
4072
4047
|
React.createElement("span", { className: cssClasses.checkboxMaterialDecorator },
|
|
4073
4048
|
this.question.svgIcon ?
|
|
4074
4049
|
React.createElement("svg", { className: cssClasses.checkboxItemDecorator },
|
|
@@ -4379,10 +4354,7 @@ class SurveyQuestionMatrixDropdownBase extends SurveyQuestionElementBase {
|
|
|
4379
4354
|
return this.renderTableDiv();
|
|
4380
4355
|
}
|
|
4381
4356
|
renderTableDiv() {
|
|
4382
|
-
|
|
4383
|
-
? { overflowX: "scroll" }
|
|
4384
|
-
: {};
|
|
4385
|
-
return (React.createElement("div", { style: divStyle, className: this.question.cssClasses.tableWrapper, ref: (root) => (this.setControl(root)) },
|
|
4357
|
+
return (React.createElement("div", { className: this.question.cssClasses.tableWrapper, ref: (root) => (this.setControl(root)) },
|
|
4386
4358
|
React.createElement(SurveyQuestionMatrixTable, { question: this.question, creator: this.creator, wrapCell: (cell, element, reason) => this.wrapCell(cell, element, reason) })));
|
|
4387
4359
|
}
|
|
4388
4360
|
}
|
|
@@ -4471,7 +4443,7 @@ class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {
|
|
|
4471
4443
|
row: this.cell.row,
|
|
4472
4444
|
column: this.cell.cell.column,
|
|
4473
4445
|
};
|
|
4474
|
-
this.question.survey.matrixAfterCellRender(
|
|
4446
|
+
this.question.survey.matrixAfterCellRender(options);
|
|
4475
4447
|
this.question.afterRenderCore(el);
|
|
4476
4448
|
}
|
|
4477
4449
|
}
|
|
@@ -4616,77 +4588,6 @@ ReactElementFactory.Instance.registerElement("sv-matrixdynamic-add-btn", (props)
|
|
|
4616
4588
|
return React.createElement(SurveyQuestionMatrixDynamicAddButton, props);
|
|
4617
4589
|
});
|
|
4618
4590
|
|
|
4619
|
-
class SurveyQuestionPanelDynamicAction extends ReactSurveyElement {
|
|
4620
|
-
constructor(props) {
|
|
4621
|
-
super(props);
|
|
4622
|
-
}
|
|
4623
|
-
get data() {
|
|
4624
|
-
return (this.props.item && this.props.item.data) || this.props.data;
|
|
4625
|
-
}
|
|
4626
|
-
get question() {
|
|
4627
|
-
return (this.props.item && this.props.item.data.question) || this.props.data.question;
|
|
4628
|
-
}
|
|
4629
|
-
}
|
|
4630
|
-
class SurveyQuestionPanelDynamicAddButton extends SurveyQuestionPanelDynamicAction {
|
|
4631
|
-
constructor() {
|
|
4632
|
-
super(...arguments);
|
|
4633
|
-
this.handleClick = (event) => {
|
|
4634
|
-
this.question.addPanelUI();
|
|
4635
|
-
};
|
|
4636
|
-
}
|
|
4637
|
-
renderElement() {
|
|
4638
|
-
if (!this.question.canAddPanel)
|
|
4639
|
-
return null;
|
|
4640
|
-
const btnText = this.renderLocString(this.question.locAddPanelText);
|
|
4641
|
-
return (React.createElement("button", { type: "button", id: this.question.addButtonId, className: this.question.getAddButtonCss(), onClick: this.handleClick },
|
|
4642
|
-
React.createElement("span", { className: this.question.cssClasses.buttonAddText }, btnText)));
|
|
4643
|
-
}
|
|
4644
|
-
}
|
|
4645
|
-
ReactElementFactory.Instance.registerElement("sv-paneldynamic-add-btn", (props) => {
|
|
4646
|
-
return React.createElement(SurveyQuestionPanelDynamicAddButton, props);
|
|
4647
|
-
});
|
|
4648
|
-
|
|
4649
|
-
class SurveyQuestionPanelDynamicNextButton extends SurveyQuestionPanelDynamicAction {
|
|
4650
|
-
constructor() {
|
|
4651
|
-
super(...arguments);
|
|
4652
|
-
this.handleClick = (event) => {
|
|
4653
|
-
this.question.goToNextPanel();
|
|
4654
|
-
};
|
|
4655
|
-
}
|
|
4656
|
-
renderElement() {
|
|
4657
|
-
return (React.createElement("div", { title: this.question.panelNextText, onClick: this.handleClick, className: this.question.getNextButtonCss() },
|
|
4658
|
-
React.createElement(SvgIcon, { iconName: this.question.cssClasses.progressBtnIcon, size: "auto" })));
|
|
4659
|
-
}
|
|
4660
|
-
}
|
|
4661
|
-
ReactElementFactory.Instance.registerElement("sv-paneldynamic-next-btn", (props) => {
|
|
4662
|
-
return React.createElement(SurveyQuestionPanelDynamicNextButton, props);
|
|
4663
|
-
});
|
|
4664
|
-
|
|
4665
|
-
class SurveyQuestionPanelDynamicPrevButton extends SurveyQuestionPanelDynamicAction {
|
|
4666
|
-
constructor() {
|
|
4667
|
-
super(...arguments);
|
|
4668
|
-
this.handleClick = (event) => {
|
|
4669
|
-
this.question.goToPrevPanel();
|
|
4670
|
-
};
|
|
4671
|
-
}
|
|
4672
|
-
renderElement() {
|
|
4673
|
-
return (React.createElement("div", { title: this.question.panelPrevText, onClick: this.handleClick, className: this.question.getPrevButtonCss() },
|
|
4674
|
-
React.createElement(SvgIcon, { iconName: this.question.cssClasses.progressBtnIcon, size: "auto" })));
|
|
4675
|
-
}
|
|
4676
|
-
}
|
|
4677
|
-
ReactElementFactory.Instance.registerElement("sv-paneldynamic-prev-btn", (props) => {
|
|
4678
|
-
return React.createElement(SurveyQuestionPanelDynamicPrevButton, props);
|
|
4679
|
-
});
|
|
4680
|
-
|
|
4681
|
-
class SurveyQuestionPanelDynamicProgressText extends SurveyQuestionPanelDynamicAction {
|
|
4682
|
-
renderElement() {
|
|
4683
|
-
return (React.createElement("div", { className: this.question.cssClasses.progressText }, this.question.progressText));
|
|
4684
|
-
}
|
|
4685
|
-
}
|
|
4686
|
-
ReactElementFactory.Instance.registerElement("sv-paneldynamic-progress-text", (props) => {
|
|
4687
|
-
return React.createElement(SurveyQuestionPanelDynamicProgressText, props);
|
|
4688
|
-
});
|
|
4689
|
-
|
|
4690
4591
|
class SurveyQuestionPanelDynamic extends SurveyQuestionElementBase {
|
|
4691
4592
|
constructor(props) {
|
|
4692
4593
|
super(props);
|
|
@@ -4724,14 +4625,8 @@ class SurveyQuestionPanelDynamic extends SurveyQuestionElementBase {
|
|
|
4724
4625
|
this.question.renderedPanels.forEach((panel, index) => {
|
|
4725
4626
|
panels.push(React.createElement(SurveyQuestionPanelDynamicItem, { key: panel.id, element: panel, question: this.question, index: index, cssClasses: this.question.cssClasses, isDisplayMode: this.isDisplayMode, creator: this.creator }));
|
|
4726
4627
|
});
|
|
4727
|
-
const
|
|
4728
|
-
? this.
|
|
4729
|
-
: null;
|
|
4730
|
-
const navTop = this.question.isProgressTopShowing
|
|
4731
|
-
? this.renderNavigator()
|
|
4732
|
-
: null;
|
|
4733
|
-
const navBottom = this.question.isProgressBottomShowing
|
|
4734
|
-
? this.renderNavigator()
|
|
4628
|
+
const rangeTop = this.question.isRangeShowing && this.question.isProgressTopShowing
|
|
4629
|
+
? this.renderRange()
|
|
4735
4630
|
: null;
|
|
4736
4631
|
const navV2 = this.renderNavigatorV2();
|
|
4737
4632
|
const noEntriesPlaceholder = this.renderPlaceholder();
|
|
@@ -4739,46 +4634,10 @@ class SurveyQuestionPanelDynamic extends SurveyQuestionElementBase {
|
|
|
4739
4634
|
this.question.hasTabbedMenu ? React.createElement("div", { className: this.question.getTabsContainerCss() },
|
|
4740
4635
|
React.createElement(SurveyActionBar, { model: this.question.tabbedMenu })) : null,
|
|
4741
4636
|
noEntriesPlaceholder,
|
|
4742
|
-
|
|
4637
|
+
rangeTop,
|
|
4743
4638
|
React.createElement("div", { className: this.question.cssClasses.panelsContainer }, panels),
|
|
4744
|
-
navBottom,
|
|
4745
|
-
btnAdd,
|
|
4746
4639
|
navV2));
|
|
4747
4640
|
}
|
|
4748
|
-
renderNavigator() {
|
|
4749
|
-
if (!this.question["showLegacyNavigation"]) {
|
|
4750
|
-
if (this.question.isRangeShowing && this.question.isProgressTopShowing) {
|
|
4751
|
-
return this.renderRange();
|
|
4752
|
-
}
|
|
4753
|
-
else {
|
|
4754
|
-
return null;
|
|
4755
|
-
}
|
|
4756
|
-
}
|
|
4757
|
-
const range = this.question.isRangeShowing ? this.renderRange() : null;
|
|
4758
|
-
const btnPrev = this.rendrerPrevButton();
|
|
4759
|
-
const btnNext = this.rendrerNextButton();
|
|
4760
|
-
const btnAdd = this.renderAddRowButton();
|
|
4761
|
-
const progressClass = this.question.isProgressTopShowing
|
|
4762
|
-
? this.question.cssClasses.progressTop
|
|
4763
|
-
: this.question.cssClasses.progressBottom;
|
|
4764
|
-
return (React.createElement("div", { className: progressClass },
|
|
4765
|
-
React.createElement("div", { style: { clear: "both" } },
|
|
4766
|
-
React.createElement("div", { className: this.question.cssClasses.progressContainer },
|
|
4767
|
-
btnPrev,
|
|
4768
|
-
range,
|
|
4769
|
-
btnNext),
|
|
4770
|
-
btnAdd,
|
|
4771
|
-
this.renderProgressText())));
|
|
4772
|
-
}
|
|
4773
|
-
renderProgressText() {
|
|
4774
|
-
return (React.createElement(SurveyQuestionPanelDynamicProgressText, { data: { question: this.question } }));
|
|
4775
|
-
}
|
|
4776
|
-
rendrerPrevButton() {
|
|
4777
|
-
return (React.createElement(SurveyQuestionPanelDynamicPrevButton, { data: { question: this.question } }));
|
|
4778
|
-
}
|
|
4779
|
-
rendrerNextButton() {
|
|
4780
|
-
return (React.createElement(SurveyQuestionPanelDynamicNextButton, { data: { question: this.question } }));
|
|
4781
|
-
}
|
|
4782
4641
|
renderRange() {
|
|
4783
4642
|
return (React.createElement("div", { className: this.question.cssClasses.progress },
|
|
4784
4643
|
React.createElement("div", { className: this.question.cssClasses.progressBar, style: { width: this.question.progress }, role: "progressbar" })));
|
|
@@ -5768,6 +5627,36 @@ ReactElementFactory.Instance.registerElement("sv-matrix-detail-button", props =>
|
|
|
5768
5627
|
return React.createElement(SurveyQuestionMatrixDetailButton, props);
|
|
5769
5628
|
});
|
|
5770
5629
|
|
|
5630
|
+
class SurveyQuestionPanelDynamicAction extends ReactSurveyElement {
|
|
5631
|
+
constructor(props) {
|
|
5632
|
+
super(props);
|
|
5633
|
+
}
|
|
5634
|
+
get data() {
|
|
5635
|
+
return (this.props.item && this.props.item.data) || this.props.data;
|
|
5636
|
+
}
|
|
5637
|
+
get question() {
|
|
5638
|
+
return (this.props.item && this.props.item.data.question) || this.props.data.question;
|
|
5639
|
+
}
|
|
5640
|
+
}
|
|
5641
|
+
class SurveyQuestionPanelDynamicAddButton extends SurveyQuestionPanelDynamicAction {
|
|
5642
|
+
constructor() {
|
|
5643
|
+
super(...arguments);
|
|
5644
|
+
this.handleClick = (event) => {
|
|
5645
|
+
this.question.addPanelUI();
|
|
5646
|
+
};
|
|
5647
|
+
}
|
|
5648
|
+
renderElement() {
|
|
5649
|
+
if (!this.question.canAddPanel)
|
|
5650
|
+
return null;
|
|
5651
|
+
const btnText = this.renderLocString(this.question.locAddPanelText);
|
|
5652
|
+
return (React.createElement("button", { type: "button", id: this.question.addButtonId, className: this.question.getAddButtonCss(), onClick: this.handleClick },
|
|
5653
|
+
React.createElement("span", { className: this.question.cssClasses.buttonAddText }, btnText)));
|
|
5654
|
+
}
|
|
5655
|
+
}
|
|
5656
|
+
ReactElementFactory.Instance.registerElement("sv-paneldynamic-add-btn", (props) => {
|
|
5657
|
+
return React.createElement(SurveyQuestionPanelDynamicAddButton, props);
|
|
5658
|
+
});
|
|
5659
|
+
|
|
5771
5660
|
class SurveyQuestionPanelDynamicRemoveButton extends SurveyQuestionPanelDynamicAction {
|
|
5772
5661
|
constructor() {
|
|
5773
5662
|
super(...arguments);
|
|
@@ -5787,6 +5676,47 @@ ReactElementFactory.Instance.registerElement("sv-paneldynamic-remove-btn", (prop
|
|
|
5787
5676
|
return React.createElement(SurveyQuestionPanelDynamicRemoveButton, props);
|
|
5788
5677
|
});
|
|
5789
5678
|
|
|
5679
|
+
class SurveyQuestionPanelDynamicPrevButton extends SurveyQuestionPanelDynamicAction {
|
|
5680
|
+
constructor() {
|
|
5681
|
+
super(...arguments);
|
|
5682
|
+
this.handleClick = (event) => {
|
|
5683
|
+
this.question.goToPrevPanel();
|
|
5684
|
+
};
|
|
5685
|
+
}
|
|
5686
|
+
renderElement() {
|
|
5687
|
+
return (React.createElement("div", { title: this.question.panelPrevText, onClick: this.handleClick, className: this.question.getPrevButtonCss() },
|
|
5688
|
+
React.createElement(SvgIcon, { iconName: this.question.cssClasses.progressBtnIcon, size: "auto" })));
|
|
5689
|
+
}
|
|
5690
|
+
}
|
|
5691
|
+
ReactElementFactory.Instance.registerElement("sv-paneldynamic-prev-btn", (props) => {
|
|
5692
|
+
return React.createElement(SurveyQuestionPanelDynamicPrevButton, props);
|
|
5693
|
+
});
|
|
5694
|
+
|
|
5695
|
+
class SurveyQuestionPanelDynamicNextButton extends SurveyQuestionPanelDynamicAction {
|
|
5696
|
+
constructor() {
|
|
5697
|
+
super(...arguments);
|
|
5698
|
+
this.handleClick = (event) => {
|
|
5699
|
+
this.question.goToNextPanel();
|
|
5700
|
+
};
|
|
5701
|
+
}
|
|
5702
|
+
renderElement() {
|
|
5703
|
+
return (React.createElement("div", { title: this.question.panelNextText, onClick: this.handleClick, className: this.question.getNextButtonCss() },
|
|
5704
|
+
React.createElement(SvgIcon, { iconName: this.question.cssClasses.progressBtnIcon, size: "auto" })));
|
|
5705
|
+
}
|
|
5706
|
+
}
|
|
5707
|
+
ReactElementFactory.Instance.registerElement("sv-paneldynamic-next-btn", (props) => {
|
|
5708
|
+
return React.createElement(SurveyQuestionPanelDynamicNextButton, props);
|
|
5709
|
+
});
|
|
5710
|
+
|
|
5711
|
+
class SurveyQuestionPanelDynamicProgressText extends SurveyQuestionPanelDynamicAction {
|
|
5712
|
+
renderElement() {
|
|
5713
|
+
return (React.createElement("div", { className: this.question.cssClasses.progressText }, this.question.progressText));
|
|
5714
|
+
}
|
|
5715
|
+
}
|
|
5716
|
+
ReactElementFactory.Instance.registerElement("sv-paneldynamic-progress-text", (props) => {
|
|
5717
|
+
return React.createElement(SurveyQuestionPanelDynamicProgressText, props);
|
|
5718
|
+
});
|
|
5719
|
+
|
|
5790
5720
|
class SurveyNavigationButton extends ReactSurveyElement {
|
|
5791
5721
|
get item() {
|
|
5792
5722
|
return this.props.item;
|
|
@@ -6003,7 +5933,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
|
|
|
6003
5933
|
return React.createElement(SurveyLocStringEditor, props);
|
|
6004
5934
|
});
|
|
6005
5935
|
|
|
6006
|
-
checkLibraryVersion(`${"2.0.
|
|
5936
|
+
checkLibraryVersion(`${"2.0.5"}`, "survey-react-ui");
|
|
6007
5937
|
|
|
6008
5938
|
export { CharacterCounterComponent, ComponentsContainer, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, Survey, SurveyActionBar, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyNavigationButton, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionButtonGroup, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImagePicker, SurveyQuestionMatrix, SurveyQuestionMatrixCell, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixRow, SurveyQuestionMultipleText, SurveyQuestionOptionItem, SurveyQuestionPanelDynamic, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicProgressText, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionRadioItem, SurveyQuestionRadiogroup, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionSignaturePad, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyRow, SurveyTimerPanel, SurveyWindow, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click };
|
|
6009
5939
|
//# sourceMappingURL=survey-react-ui.mjs.map
|