survey-react-ui 1.12.58 → 1.12.59

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,10 +1,10 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v2.5.0
3
- * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
2
+ * surveyjs - Survey JavaScript library v2.5.7
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
  */
6
6
 
7
- import { SurveyModel, Helpers, createSvg, LocalizableString, createPopupViewModel, CssClassBuilder, ActionDropdownViewModel, RendererFactory, doKey2ClickUp, SvgRegistry, settings, createPopupModalViewModel, ScrollViewModel, doKey2ClickBlur, doKey2ClickDown, addIconsToThemeSet, Question, SurveyProgressModel, ProgressButtonsResponsivityManager, PopupSurveyModel, ButtonGroupItemModel, checkLibraryVersion } from 'survey-core';
7
+ import { SurveyModel, Helpers, createSvg, LocalizableString, createPopupViewModel, CssClassBuilder, ActionDropdownViewModel, RendererFactory, doKey2ClickUp, SvgRegistry, settings, createPopupModalViewModel, ScrollViewModel, addIconsToThemeSet, doKey2ClickBlur, doKey2ClickDown, Question, SurveyProgressModel, ProgressButtonsResponsivityManager, PopupSurveyModel, ButtonGroupItemModel, checkLibraryVersion } from 'survey-core';
8
8
  export { SurveyModel as Model, SurveyModel, SurveyWindowModel, settings, surveyLocalization, surveyStrings } from 'survey-core';
9
9
  import * as React from 'react';
10
10
  import * as ReactDOM from 'react-dom';
@@ -553,7 +553,7 @@ class SurveyActionBarItem extends SurveyElementBase {
553
553
  const title = this.item.tooltip || this.item.title;
554
554
  const buttonContent = this.renderButtonContent();
555
555
  const tabIndex = this.item.disableTabStop ? -1 : undefined;
556
- const button = attachKey2click(React.createElement("button", { className: className, type: "button", disabled: this.item.disabled, onMouseDown: (args) => this.item.doMouseDown(args), onFocus: (args) => this.item.doFocus(args), onClick: (args) => this.item.doAction(args), title: title, tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
556
+ const button = attachKey2click(React.createElement("button", { className: className, type: "button", disabled: this.item.disabled, onMouseDown: (args) => this.item.doMouseDown(args), onFocus: (args) => this.item.doFocus(args), onClick: (args) => this.item.doAction(args), title: title, tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, "aria-labelledby": this.item.ariaLabelledBy, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
557
557
  return button;
558
558
  }
559
559
  }
@@ -1114,8 +1114,8 @@ class PopupModal extends SurveyElementBase {
1114
1114
  PopupModal.modalDescriptors = [];
1115
1115
 
1116
1116
  /*!
1117
- * surveyjs - Survey JavaScript library v2.5.0
1118
- * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1117
+ * surveyjs - Survey JavaScript library v2.5.7
1118
+ * Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
1119
1119
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
1120
1120
  */
1121
1121
 
@@ -1184,8 +1184,8 @@ var iconsV1 = {
1184
1184
  };
1185
1185
 
1186
1186
  /*!
1187
- * surveyjs - Survey JavaScript library v2.5.0
1188
- * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1187
+ * surveyjs - Survey JavaScript library v2.5.7
1188
+ * Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
1189
1189
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
1190
1190
  */
1191
1191
 
@@ -1543,21 +1543,33 @@ ReactElementFactory.Instance.registerElement("survey", (props) => {
1543
1543
  return React.createElement(Survey, props);
1544
1544
  });
1545
1545
  function attachKey2click(element, viewModel, options = { processEsc: true, disableTabStop: false }) {
1546
+ let props = {};
1546
1547
  if ((!!viewModel && viewModel.disableTabStop) || (!!options && options.disableTabStop)) {
1547
- return React.cloneElement(element, { tabIndex: -1 });
1548
+ props = { tabIndex: -1 };
1549
+ }
1550
+ else {
1551
+ options = Object.assign({}, options);
1552
+ props = {
1553
+ tabIndex: 0,
1554
+ onKeyUp: (evt) => {
1555
+ evt.preventDefault();
1556
+ evt.stopPropagation();
1557
+ doKey2ClickUp(evt, options);
1558
+ },
1559
+ onKeyDown: (evt) => doKey2ClickDown(evt, options),
1560
+ onBlur: (evt) => doKey2ClickBlur(evt),
1561
+ };
1548
1562
  }
1549
- options = Object.assign({}, options);
1550
- return React.cloneElement(element, {
1551
- tabIndex: 0,
1552
- onKeyUp: (evt) => {
1563
+ props["onPointerUp"] = (evt) => {
1564
+ if (evt.pointerType === "pen") {
1553
1565
  evt.preventDefault();
1554
1566
  evt.stopPropagation();
1555
- doKey2ClickUp(evt, options);
1556
- return false;
1557
- },
1558
- onKeyDown: (evt) => doKey2ClickDown(evt, options),
1559
- onBlur: (evt) => doKey2ClickBlur(evt),
1560
- });
1567
+ const element = evt.target;
1568
+ if (element === null || element === void 0 ? void 0 : element.click)
1569
+ element.click();
1570
+ }
1571
+ };
1572
+ return React.cloneElement(element, props);
1561
1573
  }
1562
1574
 
1563
1575
  class SurveyNavigationBase extends React.Component {
@@ -3073,7 +3085,7 @@ class RatingItemBase extends SurveyElementBase {
3073
3085
  class RatingItem extends RatingItemBase {
3074
3086
  render() {
3075
3087
  var itemText = this.renderLocString(this.item.locText);
3076
- return (React.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
3088
+ return (React.createElement("label", { className: this.item.className, onMouseDown: this.handleOnMouseDown },
3077
3089
  React.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: () => { }, "aria-label": this.question.ariaLabel }),
3078
3090
  React.createElement("span", { className: this.question.cssClasses.itemText, "data-text": this.item.text }, itemText)));
3079
3091
  }
@@ -3087,7 +3099,7 @@ ReactElementFactory.Instance.registerElement("sv-rating-item", (props) => {
3087
3099
 
3088
3100
  class RatingItemStar extends RatingItemBase {
3089
3101
  render() {
3090
- return (React.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClass(this.item.itemValue), onMouseOver: e => this.question.onItemMouseIn(this.item), onMouseOut: e => this.question.onItemMouseOut(this.item), title: this.item.text },
3102
+ return (React.createElement("label", { className: this.item.className, onMouseDown: this.handleOnMouseDown, onMouseOver: e => this.question.onItemMouseIn(this.item), onMouseOut: e => this.question.onItemMouseOut(this.item), title: this.item.text },
3091
3103
  React.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: () => { }, "aria-label": this.question.ariaLabel }),
3092
3104
  React.createElement(SvgIcon, { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon }),
3093
3105
  React.createElement(SvgIcon, { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt })));
@@ -3099,9 +3111,9 @@ ReactElementFactory.Instance.registerElement("sv-rating-item-star", (props) => {
3099
3111
 
3100
3112
  class RatingItemSmiley extends RatingItemBase {
3101
3113
  render() {
3102
- return (React.createElement("label", { onMouseDown: this.handleOnMouseDown, style: this.question.getItemStyle(this.item.itemValue, this.item.highlight), className: this.question.getItemClass(this.item.itemValue), onMouseOver: e => this.question.onItemMouseIn(this.item), onMouseOut: e => this.question.onItemMouseOut(this.item), title: this.item.text },
3114
+ return (React.createElement("label", { style: this.item.style, className: this.item.className, onMouseDown: this.handleOnMouseDown, onMouseOver: e => this.question.onItemMouseIn(this.item), onMouseOut: e => this.question.onItemMouseOut(this.item), title: this.item.text },
3103
3115
  React.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: () => { }, "aria-label": this.question.ariaLabel }),
3104
- React.createElement(SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item.itemValue) })));
3116
+ React.createElement(SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item) })));
3105
3117
  }
3106
3118
  }
3107
3119
  ReactElementFactory.Instance.registerElement("sv-rating-item-smiley", (props) => {
@@ -3279,7 +3291,7 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
3279
3291
  return this.questionBase.renderedValue;
3280
3292
  }
3281
3293
  renderReadOnlyElement() {
3282
- if (this.question.locReadOnlyText) {
3294
+ if (this.question.readOnlyText) {
3283
3295
  return (React.createElement("div", { className: this.question.cssClasses.controlValue }, this.renderLocString(this.question.locReadOnlyText)));
3284
3296
  }
3285
3297
  else {
@@ -3533,7 +3545,7 @@ class SurveyQuestionMatrix extends SurveyQuestionElementBase {
3533
3545
  React.createElement("tr", null,
3534
3546
  rowsTH,
3535
3547
  headers)));
3536
- return (React.createElement("div", { className: cssClasses.tableWrapper, ref: root => (this.setControl(root)) },
3548
+ return (React.createElement("div", { className: this.question.getTableWrapperCss(), ref: root => (this.setControl(root)) },
3537
3549
  React.createElement("fieldset", { role: "radiogroup" },
3538
3550
  React.createElement("legend", { className: "sv-visuallyhidden" }, this.question.locTitle.renderedHtml),
3539
3551
  React.createElement("table", { className: this.question.getTableCss(), role: "presentation" },
@@ -4463,7 +4475,7 @@ class SurveyQuestionMatrixDropdownBase extends SurveyQuestionElementBase {
4463
4475
  return this.renderTableDiv();
4464
4476
  }
4465
4477
  renderTableDiv() {
4466
- return (React.createElement("div", { className: this.question.cssClasses.tableWrapper, ref: (root) => (this.setControl(root)) },
4478
+ return (React.createElement("div", { className: this.question.getTableWrapperCss(), ref: (root) => (this.setControl(root)) },
4467
4479
  React.createElement(SurveyQuestionMatrixTable, { question: this.question, creator: this.creator, wrapCell: (cell, element, reason) => this.wrapCell(cell, element, reason) })));
4468
4480
  }
4469
4481
  }
@@ -5538,6 +5550,30 @@ ReactQuestionFactory.Instance.registerQuestion("imagepicker", (props) => {
5538
5550
  return React.createElement(SurveyQuestionImagePicker, props);
5539
5551
  });
5540
5552
 
5553
+ class SurveyQuestionImageMap extends SurveyQuestionElementBase {
5554
+ constructor(props) {
5555
+ super(props);
5556
+ this.state = { width: undefined, height: undefined, scale: undefined };
5557
+ }
5558
+ get question() {
5559
+ return this.questionBase;
5560
+ }
5561
+ componentDidMount() {
5562
+ super.componentDidMount();
5563
+ }
5564
+ componentWillUnmount() {
5565
+ super.componentWillUnmount();
5566
+ }
5567
+ renderElement() {
5568
+ return (React.createElement("div", { className: this.question.cssClasses.root, ref: (root) => (this.setControl(root)) },
5569
+ React.createElement("img", { className: this.question.cssClasses.bg, id: `${this.question.id}-bg`, src: this.question.imageLink, role: "presentation" }),
5570
+ React.createElement("svg", { className: this.question.cssClasses.svg, id: `${this.question.id}-svg` })));
5571
+ }
5572
+ }
5573
+ ReactQuestionFactory.Instance.registerQuestion("imagemap", (props) => {
5574
+ return React.createElement(SurveyQuestionImageMap, props);
5575
+ });
5576
+
5541
5577
  class SurveyQuestionImage extends SurveyQuestionElementBase {
5542
5578
  constructor(props) {
5543
5579
  super(props);
@@ -6163,7 +6199,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
6163
6199
  return React.createElement(SurveyLocStringEditor, props);
6164
6200
  });
6165
6201
 
6166
- checkLibraryVersion(`${"2.5.0"}`, "survey-react-ui");
6202
+ checkLibraryVersion(`${"2.5.7"}`, "survey-react-ui");
6167
6203
 
6168
- 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, 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 };
6204
+ 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 };
6169
6205
  //# sourceMappingURL=survey-react-ui.mjs.map