survey-react-ui 2.5.25 → 2.5.27
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 +28 -8
- package/fesm/survey-react-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-react-ui.js +31 -9
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -2
- package/typings/src/components/paneldynamic-actions/paneldynamic-add-btn.d.ts +1 -0
- package/typings/src/components/survey-actions/survey-nav-button.d.ts +3 -0
package/fesm/survey-react-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.5.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.5.27
|
|
3
3
|
* Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -451,8 +451,8 @@ class SurveyLocStringViewer extends React.Component {
|
|
|
451
451
|
this.locStr.onStringChanged.remove(this.onChangedHandler);
|
|
452
452
|
}
|
|
453
453
|
componentDidUpdate(prevProps, prevState) {
|
|
454
|
-
if (!!prevProps.
|
|
455
|
-
prevProps.
|
|
454
|
+
if (!!prevProps.model) {
|
|
455
|
+
prevProps.model.onStringChanged.remove(this.onChangedHandler);
|
|
456
456
|
}
|
|
457
457
|
this.reactOnStrChanged();
|
|
458
458
|
}
|
|
@@ -4410,11 +4410,13 @@ class SurveyQuestionBooleanRadio extends SurveyQuestionBoolean {
|
|
|
4410
4410
|
renderRadioItem(value, locText) {
|
|
4411
4411
|
const cssClasses = this.question.cssClasses;
|
|
4412
4412
|
const handleOnChange = () => {
|
|
4413
|
-
this.question.
|
|
4413
|
+
if (!this.question.isInputReadOnly) {
|
|
4414
|
+
this.question.value = value;
|
|
4415
|
+
}
|
|
4414
4416
|
};
|
|
4415
4417
|
return (React.createElement("div", { role: "presentation", className: this.question.getRadioItemClass(cssClasses, value) },
|
|
4416
4418
|
React.createElement("label", { className: cssClasses.radioLabel },
|
|
4417
|
-
React.createElement("input", { type: "radio", name: this.question.
|
|
4419
|
+
React.createElement("input", { type: "radio", name: this.question.questionName, value: value, "aria-errormessage": this.question.ariaErrormessage, checked: value === this.question.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: cssClasses.itemRadioControl, onChange: handleOnChange }),
|
|
4418
4420
|
this.question.cssClasses.materialRadioDecorator ?
|
|
4419
4421
|
(React.createElement("span", { className: cssClasses.materialRadioDecorator }, this.question.itemSvgIcon ?
|
|
4420
4422
|
(React.createElement("svg", { className: cssClasses.itemRadioDecorator },
|
|
@@ -4423,7 +4425,7 @@ class SurveyQuestionBooleanRadio extends SurveyQuestionBoolean {
|
|
|
4423
4425
|
}
|
|
4424
4426
|
renderElement() {
|
|
4425
4427
|
const cssClasses = this.question.cssClasses;
|
|
4426
|
-
return (React.createElement("div", { className: cssClasses.rootRadio },
|
|
4428
|
+
return (React.createElement("div", { className: cssClasses.rootRadio, onKeyDown: this.handleOnKeyDown },
|
|
4427
4429
|
React.createElement("fieldset", { role: "presentation", className: cssClasses.radioFieldset }, !this.question.swapOrder ?
|
|
4428
4430
|
(React.createElement(React.Fragment, null,
|
|
4429
4431
|
this.renderRadioItem(this.question.getValueFalse(), this.question.locLabelFalse),
|
|
@@ -6172,6 +6174,11 @@ class SurveyQuestionPanelDynamicAddButton extends SurveyQuestionPanelDynamicActi
|
|
|
6172
6174
|
this.question.addPanelUI();
|
|
6173
6175
|
};
|
|
6174
6176
|
}
|
|
6177
|
+
get isActionEnabled() {
|
|
6178
|
+
if (this.props.item)
|
|
6179
|
+
return this.props.item.enabled !== false;
|
|
6180
|
+
return this.question.enableAddPanel !== false;
|
|
6181
|
+
}
|
|
6175
6182
|
renderElement() {
|
|
6176
6183
|
if (!this.question.canAddPanel)
|
|
6177
6184
|
return null;
|
|
@@ -6247,6 +6254,19 @@ ReactElementFactory.Instance.registerElement("sv-paneldynamic-progress-text", (p
|
|
|
6247
6254
|
});
|
|
6248
6255
|
|
|
6249
6256
|
class SurveyNavigationButton extends ReactSurveyElement {
|
|
6257
|
+
constructor() {
|
|
6258
|
+
super(...arguments);
|
|
6259
|
+
this.inputElement = null;
|
|
6260
|
+
this.inputParent = null;
|
|
6261
|
+
this.setInputRef = (element) => {
|
|
6262
|
+
var _a;
|
|
6263
|
+
if (!element && !!this.inputElement && !!this.inputParent && this.inputElement.parentNode !== this.inputParent) {
|
|
6264
|
+
this.inputParent.appendChild(this.inputElement);
|
|
6265
|
+
}
|
|
6266
|
+
this.inputElement = element;
|
|
6267
|
+
this.inputParent = (_a = element === null || element === void 0 ? void 0 : element.parentNode) !== null && _a !== void 0 ? _a : this.inputParent;
|
|
6268
|
+
};
|
|
6269
|
+
}
|
|
6250
6270
|
get item() {
|
|
6251
6271
|
return this.props.item;
|
|
6252
6272
|
}
|
|
@@ -6254,7 +6274,7 @@ class SurveyNavigationButton extends ReactSurveyElement {
|
|
|
6254
6274
|
return this.item.isVisible;
|
|
6255
6275
|
}
|
|
6256
6276
|
renderElement() {
|
|
6257
|
-
return (React.createElement("input", { className: this.item.innerCss, type: "button", disabled: this.item.disabled, onMouseDown: this.item.data && this.item.data.mouseDown, onClick: this.item.action, title: this.item.getTooltip(), value: this.item.title }));
|
|
6277
|
+
return (React.createElement("input", { ref: this.setInputRef, className: this.item.innerCss, type: "button", disabled: this.item.disabled, onMouseDown: this.item.data && this.item.data.mouseDown, onClick: this.item.action, title: this.item.getTooltip(), value: this.item.title }));
|
|
6258
6278
|
}
|
|
6259
6279
|
}
|
|
6260
6280
|
ReactElementFactory.Instance.registerElement("sv-nav-btn", (props) => {
|
|
@@ -6444,7 +6464,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
|
|
|
6444
6464
|
return React.createElement(SurveyLocStringEditor, props);
|
|
6445
6465
|
});
|
|
6446
6466
|
|
|
6447
|
-
checkLibraryVersion(`${"2.5.
|
|
6467
|
+
checkLibraryVersion(`${"2.5.27"}`, "survey-react-ui");
|
|
6448
6468
|
|
|
6449
6469
|
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, SliderLabelItem, Survey, SurveyActionBar, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFileItem, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyNavigationButton, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionButtonGroup, SurveyQuestionButtonGroupDropdown, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImageMap, 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, SurveyQuestionSlider, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyRow, SurveyTimerPanel, SurveyWindow, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click };
|
|
6450
6470
|
//# sourceMappingURL=survey-react-ui.mjs.map
|