survey-react-ui 2.2.6 → 2.3.0

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,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v2.2.6
2
+ * surveyjs - Survey JavaScript library v2.3.0
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
  */
@@ -1207,6 +1207,9 @@ class SurveyQuestionCommentItem extends ReactSurveyElement {
1207
1207
  getKey() { return undefined; }
1208
1208
  }
1209
1209
  class SurveyQuestionCommentValueItem extends SurveyQuestionCommentItem {
1210
+ constructor(props) {
1211
+ super(props);
1212
+ }
1210
1213
  getTextAreaModel() {
1211
1214
  return this.props.question.getCommentTextAreaModel(this.props.item);
1212
1215
  }
@@ -1520,7 +1523,7 @@ class SurveyQuestion extends SurveyElementBase {
1520
1523
  const commentText = SurveyElementBase.renderLocString(this.question.locCommentText);
1521
1524
  return (React.createElement("div", { className: this.question.getCommentAreaCss() },
1522
1525
  React.createElement("div", null, commentText),
1523
- React.createElement(SurveyQuestionCommentItem, { question: this.question, cssClasses: cssClasses, otherCss: cssClasses.other, isDisplayMode: this.question.isInputReadOnly })));
1526
+ React.createElement(SurveyQuestionCommentItem, { question: this.question, cssClasses: cssClasses, isDisplayMode: this.question.isInputReadOnly })));
1524
1527
  }
1525
1528
  renderHeader(question) {
1526
1529
  if (question.singleInputHideHeader)
@@ -1562,7 +1565,7 @@ class SurveyElementErrors extends ReactSurveyElement {
1562
1565
  const key = "error" + i;
1563
1566
  errors.push(this.creator.renderError(key, this.element.errors[i], this.cssClasses, this.element));
1564
1567
  }
1565
- return (React.createElement("div", { role: "alert", "aria-live": "polite", className: this.element.cssError, id: this.id }, errors));
1568
+ return (React.createElement("div", { className: this.element.cssError, id: this.id }, errors));
1566
1569
  }
1567
1570
  }
1568
1571
  class SurveyQuestionAndErrorsWrapped extends ReactSurveyElement {
@@ -1927,7 +1930,7 @@ class PopupModal extends SurveyElementBase {
1927
1930
  PopupModal.modalDescriptors = [];
1928
1931
 
1929
1932
  /*!
1930
- * surveyjs - Survey JavaScript library v2.2.6
1933
+ * surveyjs - Survey JavaScript library v2.3.0
1931
1934
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1932
1935
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
1933
1936
  */
@@ -1997,7 +2000,7 @@ var iconsV1 = {
1997
2000
  };
1998
2001
 
1999
2002
  /*!
2000
- * surveyjs - Survey JavaScript library v2.2.6
2003
+ * surveyjs - Survey JavaScript library v2.3.0
2001
2004
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
2002
2005
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
2003
2006
  */
@@ -2777,7 +2780,7 @@ class SurveyQuestionCheckboxItem extends ReactSurveyElement {
2777
2780
  if (!this.item.isCommentShowing)
2778
2781
  return null;
2779
2782
  return React.createElement("div", { className: this.question.getCommentAreaCss(true) },
2780
- React.createElement(SurveyQuestionCommentValueItem, { question: this.question, item: this.item, isDisplayMode: this.isDisplayMode, cssClasses: this.question.cssClasses, otherCss: this.question.getCommentAreaCss(false) }));
2783
+ React.createElement(SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
2781
2784
  }
2782
2785
  renderCheckbox(isChecked, otherItem) {
2783
2786
  const id = this.question.getItemId(this.item);
@@ -3244,7 +3247,7 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
3244
3247
  if (!item || !item.isCommentShowing)
3245
3248
  return null;
3246
3249
  return (React.createElement("div", { key: item.normalizedId, className: this.question.getCommentAreaCss(true) },
3247
- React.createElement(SurveyQuestionCommentValueItem, { question: this.question, item: item, isDisplayMode: this.isDisplayMode, cssClasses: this.question.cssClasses, otherCss: this.question.getCommentAreaCss(false) })));
3250
+ React.createElement(SurveyQuestionCommentValueItem, { question: this.question, item: item, cssClasses: this.question.cssClasses })));
3248
3251
  }
3249
3252
  renderEditorButtons() {
3250
3253
  return React.createElement(SurveyActionBar, { model: this.dropdownListModel.editorButtons });
@@ -3514,8 +3517,8 @@ class SurveyQuestionMatrixRow extends ReactSurveyElement {
3514
3517
  return tds;
3515
3518
  }
3516
3519
  cellClick(row, column) {
3517
- row.value = column.value;
3518
- this.setState({ value: this.row.value });
3520
+ row.cellClick(column);
3521
+ this.setState({ value: row.value });
3519
3522
  }
3520
3523
  }
3521
3524
  class SurveyQuestionMatrixCell extends ReactSurveyElement {
@@ -3528,6 +3531,7 @@ class SurveyQuestionMatrixCell extends ReactSurveyElement {
3528
3531
  if (!!this.props.cellChanged) {
3529
3532
  this.props.cellChanged();
3530
3533
  }
3534
+ this.setState({ value: this.row.isChecked(this.column) });
3531
3535
  }
3532
3536
  handleOnMouseDown(event) {
3533
3537
  this.question.onMouseDown();
@@ -3548,22 +3552,22 @@ class SurveyQuestionMatrixCell extends ReactSurveyElement {
3548
3552
  return !!this.question && !!this.row;
3549
3553
  }
3550
3554
  renderElement() {
3551
- const isChecked = this.row.value == this.column.value;
3555
+ const isChecked = this.row.isChecked(this.column);
3552
3556
  const inputId = this.question.inputId + "_" + this.row.name + "_" + this.columnIndex;
3553
3557
  const itemClass = this.question.getItemClass(this.row, this.column);
3558
+ const itemSvgIcon = this.question.getItemSvgIcon(this.row, this.column);
3554
3559
  const mobileSpan = this.question.isMobile ?
3555
3560
  (React.createElement("span", { className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(this.column.locText)))
3556
3561
  : undefined;
3557
3562
  return (React.createElement("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
3558
3563
  this.renderInput(inputId, isChecked),
3559
- React.createElement("span", { className: this.question.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
3560
- React.createElement("svg", { className: this.cssClasses.itemDecorator },
3561
- React.createElement("use", { xlinkHref: this.question.itemSvgIcon })) :
3562
- null),
3564
+ React.createElement("span", { className: this.question.cssMaterialDecorator }, itemSvgIcon ?
3565
+ React.createElement("svg", { className: this.question.cssItemDecorator },
3566
+ React.createElement("use", { xlinkHref: itemSvgIcon })) : null),
3563
3567
  mobileSpan));
3564
3568
  }
3565
3569
  renderInput(inputId, isChecked) {
3566
- return (React.createElement("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.isDisabledAttr, readOnly: this.row.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row, this.column), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }));
3570
+ return (React.createElement("input", { id: inputId, type: this.question.checkType, className: this.question.cssItemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.isDisabledAttr, readOnly: this.row.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row, this.column), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }));
3567
3571
  }
3568
3572
  }
3569
3573
  ReactElementFactory.Instance.registerElement("survey-matrix-cell", props => {
@@ -3984,7 +3988,7 @@ class SurveyQuestionRadioItem extends ReactSurveyElement {
3984
3988
  if (!this.item.isCommentShowing)
3985
3989
  return null;
3986
3990
  return React.createElement("div", { className: this.question.getCommentAreaCss(true) },
3987
- React.createElement(SurveyQuestionCommentValueItem, { question: this.question, item: this.item, isDisplayMode: this.isDisplayMode, cssClasses: this.question.cssClasses, otherCss: this.question.getCommentAreaCss(false) }));
3991
+ React.createElement(SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
3988
3992
  }
3989
3993
  renderRadioButton() {
3990
3994
  var itemClass = this.question.getItemClass(this.item);
@@ -4610,7 +4614,7 @@ class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {
4610
4614
  renderOtherComment() {
4611
4615
  const question = this.cell.question;
4612
4616
  const cssClasses = question.cssClasses || {};
4613
- return React.createElement(SurveyQuestionCommentValueItem, { question: question, item: question.otherItem, cssClasses: cssClasses, otherCss: cssClasses.other, isDisplayMode: question.isInputReadOnly });
4617
+ return React.createElement(SurveyQuestionCommentValueItem, { question: question, item: question.otherItem, cssClasses: cssClasses });
4614
4618
  }
4615
4619
  renderCellCheckboxButton() {
4616
4620
  var key = this.cell.question.id + "item" + this.cell.choiceIndex;
@@ -6207,7 +6211,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
6207
6211
  return React.createElement(SurveyLocStringEditor, props);
6208
6212
  });
6209
6213
 
6210
- checkLibraryVersion(`${"2.2.6"}`, "survey-react-ui");
6214
+ checkLibraryVersion(`${"2.3.0"}`, "survey-react-ui");
6211
6215
 
6212
6216
  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, 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, 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 };
6213
6217
  //# sourceMappingURL=survey-react-ui.mjs.map