survey-js-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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v2.5.25
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
  */
@@ -506,8 +506,8 @@ class SurveyLocStringViewer extends x$3 {
506
506
  this.locStr.onStringChanged.remove(this.onChangedHandler);
507
507
  }
508
508
  componentDidUpdate(prevProps, prevState) {
509
- if (!!prevProps.locStr) {
510
- prevProps.locStr.onStringChanged.remove(this.onChangedHandler);
509
+ if (!!prevProps.model) {
510
+ prevProps.model.onStringChanged.remove(this.onChangedHandler);
511
511
  }
512
512
  this.reactOnStrChanged();
513
513
  }
@@ -4509,11 +4509,13 @@ class SurveyQuestionBooleanRadio extends SurveyQuestionBoolean {
4509
4509
  renderRadioItem(value, locText) {
4510
4510
  const cssClasses = this.question.cssClasses;
4511
4511
  const handleOnChange = () => {
4512
- this.question.value = value;
4512
+ if (!this.question.isInputReadOnly) {
4513
+ this.question.value = value;
4514
+ }
4513
4515
  };
4514
4516
  return (_$1("div", { role: "presentation", className: this.question.getRadioItemClass(cssClasses, value) },
4515
4517
  _$1("label", { className: cssClasses.radioLabel },
4516
- _$1("input", { type: "radio", name: this.question.name, 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 }),
4518
+ _$1("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 }),
4517
4519
  this.question.cssClasses.materialRadioDecorator ?
4518
4520
  (_$1("span", { className: cssClasses.materialRadioDecorator }, this.question.itemSvgIcon ?
4519
4521
  (_$1("svg", { className: cssClasses.itemRadioDecorator },
@@ -4522,7 +4524,7 @@ class SurveyQuestionBooleanRadio extends SurveyQuestionBoolean {
4522
4524
  }
4523
4525
  renderElement() {
4524
4526
  const cssClasses = this.question.cssClasses;
4525
- return (_$1("div", { className: cssClasses.rootRadio },
4527
+ return (_$1("div", { className: cssClasses.rootRadio, onKeyDown: this.handleOnKeyDown },
4526
4528
  _$1("fieldset", { role: "presentation", className: cssClasses.radioFieldset }, !this.question.swapOrder ?
4527
4529
  (_$1(k$3, null,
4528
4530
  this.renderRadioItem(this.question.getValueFalse(), this.question.locLabelFalse),
@@ -6271,6 +6273,11 @@ class SurveyQuestionPanelDynamicAddButton extends SurveyQuestionPanelDynamicActi
6271
6273
  this.question.addPanelUI();
6272
6274
  };
6273
6275
  }
6276
+ get isActionEnabled() {
6277
+ if (this.props.item)
6278
+ return this.props.item.enabled !== false;
6279
+ return this.question.enableAddPanel !== false;
6280
+ }
6274
6281
  renderElement() {
6275
6282
  if (!this.question.canAddPanel)
6276
6283
  return null;
@@ -6346,6 +6353,19 @@ ReactElementFactory.Instance.registerElement("sv-paneldynamic-progress-text", (p
6346
6353
  });
6347
6354
 
6348
6355
  class SurveyNavigationButton extends ReactSurveyElement {
6356
+ constructor() {
6357
+ super(...arguments);
6358
+ this.inputElement = null;
6359
+ this.inputParent = null;
6360
+ this.setInputRef = (element) => {
6361
+ var _a;
6362
+ if (!element && !!this.inputElement && !!this.inputParent && this.inputElement.parentNode !== this.inputParent) {
6363
+ this.inputParent.appendChild(this.inputElement);
6364
+ }
6365
+ this.inputElement = element;
6366
+ this.inputParent = (_a = element === null || element === void 0 ? void 0 : element.parentNode) !== null && _a !== void 0 ? _a : this.inputParent;
6367
+ };
6368
+ }
6349
6369
  get item() {
6350
6370
  return this.props.item;
6351
6371
  }
@@ -6353,7 +6373,7 @@ class SurveyNavigationButton extends ReactSurveyElement {
6353
6373
  return this.item.isVisible;
6354
6374
  }
6355
6375
  renderElement() {
6356
- return (_$1("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 }));
6376
+ return (_$1("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 }));
6357
6377
  }
6358
6378
  }
6359
6379
  ReactElementFactory.Instance.registerElement("sv-nav-btn", (props) => {
@@ -6592,7 +6612,7 @@ SurveyModel.prototype["render"] = function (element = null) {
6592
6612
  }
6593
6613
  };
6594
6614
  const preact = React;
6595
- checkLibraryVersion(`${"2.5.25"}`, "survey-js-ui");
6615
+ checkLibraryVersion(`${"2.5.27"}`, "survey-js-ui");
6596
6616
 
6597
6617
  export { CharacterCounterComponent, O as Children, x$3 as Component, ComponentsContainer, k$3 as Fragment, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, N as PureComponent, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, SliderLabelItem, Cn as StrictMode, 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, P as Suspense, B as SuspenseList, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click, _n as cloneElement, Q$2 as createContext, _$1 as createElement, dn as createFactory, $ as createPortal, b$1 as createRef, Sn as findDOMNode, En as flushSync, D as forwardRef, tn as hydrate, pn as isFragment, yn as isMemo, mn as isValidElement, z as lazy, M as memo, preact, nn as render, renderPopupSurvey, renderSurvey, R as startTransition, bn as unmountComponentAtNode, gn as unstable_batchedUpdates, q$2 as useCallback, x$2 as useContext, P$2 as useDebugValue, w as useDeferredValue, y as useEffect, g$2 as useId, F$2 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$2 as useMemo, h as useReducer, A$2 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
6598
6618
  //# sourceMappingURL=survey-js-ui.mjs.map