survey-react-ui 2.5.23 → 2.5.25

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.5.23
2
+ * surveyjs - Survey JavaScript library v2.5.25
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
  */
@@ -6159,11 +6159,16 @@ class SurveyQuestionPanelDynamicAction extends ReactSurveyElement {
6159
6159
  get question() {
6160
6160
  return (this.props.item && this.props.item.data.question) || this.props.data.question;
6161
6161
  }
6162
+ get isActionEnabled() {
6163
+ return !this.props.item || this.props.item.enabled !== false;
6164
+ }
6162
6165
  }
6163
6166
  class SurveyQuestionPanelDynamicAddButton extends SurveyQuestionPanelDynamicAction {
6164
6167
  constructor() {
6165
6168
  super(...arguments);
6166
6169
  this.handleClick = (event) => {
6170
+ if (!this.isActionEnabled)
6171
+ return;
6167
6172
  this.question.addPanelUI();
6168
6173
  };
6169
6174
  }
@@ -6171,7 +6176,7 @@ class SurveyQuestionPanelDynamicAddButton extends SurveyQuestionPanelDynamicActi
6171
6176
  if (!this.question.canAddPanel)
6172
6177
  return null;
6173
6178
  const btnText = this.renderLocString(this.question.locAddPanelText);
6174
- return (React.createElement("button", { type: "button", id: this.question.addButtonId, className: this.question.getAddButtonCss(), onClick: this.handleClick },
6179
+ return (React.createElement("button", { type: "button", id: this.question.addButtonId, className: this.question.getAddButtonCss(), onClick: this.handleClick, disabled: !this.isActionEnabled },
6175
6180
  React.createElement("span", { className: this.question.cssClasses.buttonAddText }, btnText)));
6176
6181
  }
6177
6182
  }
@@ -6183,13 +6188,15 @@ class SurveyQuestionPanelDynamicRemoveButton extends SurveyQuestionPanelDynamicA
6183
6188
  constructor() {
6184
6189
  super(...arguments);
6185
6190
  this.handleClick = (event) => {
6191
+ if (!this.isActionEnabled)
6192
+ return;
6186
6193
  this.question.removePanelUI(this.data.panel);
6187
6194
  };
6188
6195
  }
6189
6196
  renderElement() {
6190
6197
  const btnText = this.renderLocString(this.question.locRemovePanelText);
6191
6198
  const id = this.question.getPanelRemoveButtonId(this.data.panel);
6192
- return (React.createElement("button", { id: id, className: this.question.getPanelRemoveButtonCss(), onClick: this.handleClick, type: "button" },
6199
+ return (React.createElement("button", { id: id, className: this.question.getPanelRemoveButtonCss(), onClick: this.handleClick, disabled: !this.isActionEnabled, type: "button" },
6193
6200
  React.createElement("span", { className: this.question.cssClasses.buttonRemoveText }, btnText),
6194
6201
  React.createElement("span", { className: this.question.cssClasses.iconRemove })));
6195
6202
  }
@@ -6437,7 +6444,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
6437
6444
  return React.createElement(SurveyLocStringEditor, props);
6438
6445
  });
6439
6446
 
6440
- checkLibraryVersion(`${"2.5.23"}`, "survey-react-ui");
6447
+ checkLibraryVersion(`${"2.5.25"}`, "survey-react-ui");
6441
6448
 
6442
6449
  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 };
6443
6450
  //# sourceMappingURL=survey-react-ui.mjs.map