survey-js-ui 2.5.0 → 2.5.2

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.0
2
+ * surveyjs - Survey JavaScript library v2.5.2
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
  */
@@ -1167,7 +1167,7 @@ class PopupModal extends SurveyElementBase {
1167
1167
  PopupModal.modalDescriptors = [];
1168
1168
 
1169
1169
  /*!
1170
- * surveyjs - Survey JavaScript library v2.5.0
1170
+ * surveyjs - Survey JavaScript library v2.5.2
1171
1171
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1172
1172
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
1173
1173
  */
@@ -1237,7 +1237,7 @@ var iconsV1 = {
1237
1237
  };
1238
1238
 
1239
1239
  /*!
1240
- * surveyjs - Survey JavaScript library v2.5.0
1240
+ * surveyjs - Survey JavaScript library v2.5.2
1241
1241
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1242
1242
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
1243
1243
  */
@@ -1602,11 +1602,19 @@ function attachKey2click(element, viewModel, options = { processEsc: true, disab
1602
1602
  options = Object.assign({}, options);
1603
1603
  return _n(element, {
1604
1604
  tabIndex: 0,
1605
+ onPointerUp: (evt) => {
1606
+ if (evt.pointerType === "pen") {
1607
+ evt.preventDefault();
1608
+ evt.stopPropagation();
1609
+ const element = evt.target;
1610
+ if (element === null || element === void 0 ? void 0 : element.click)
1611
+ element.click();
1612
+ }
1613
+ },
1605
1614
  onKeyUp: (evt) => {
1606
1615
  evt.preventDefault();
1607
1616
  evt.stopPropagation();
1608
1617
  doKey2ClickUp(evt, options);
1609
- return false;
1610
1618
  },
1611
1619
  onKeyDown: (evt) => doKey2ClickDown(evt, options),
1612
1620
  onBlur: (evt) => doKey2ClickBlur(evt),
@@ -3126,7 +3134,7 @@ class RatingItemBase extends SurveyElementBase {
3126
3134
  class RatingItem extends RatingItemBase {
3127
3135
  render() {
3128
3136
  var itemText = this.renderLocString(this.item.locText);
3129
- return (_$1("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
3137
+ return (_$1("label", { className: this.item.className, onMouseDown: this.handleOnMouseDown },
3130
3138
  _$1("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 }),
3131
3139
  _$1("span", { className: this.question.cssClasses.itemText, "data-text": this.item.text }, itemText)));
3132
3140
  }
@@ -3140,7 +3148,7 @@ ReactElementFactory.Instance.registerElement("sv-rating-item", (props) => {
3140
3148
 
3141
3149
  class RatingItemStar extends RatingItemBase {
3142
3150
  render() {
3143
- return (_$1("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 },
3151
+ return (_$1("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 },
3144
3152
  _$1("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 }),
3145
3153
  _$1(SvgIcon, { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon }),
3146
3154
  _$1(SvgIcon, { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt })));
@@ -3152,9 +3160,9 @@ ReactElementFactory.Instance.registerElement("sv-rating-item-star", (props) => {
3152
3160
 
3153
3161
  class RatingItemSmiley extends RatingItemBase {
3154
3162
  render() {
3155
- return (_$1("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 },
3163
+ return (_$1("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 },
3156
3164
  _$1("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 }),
3157
- _$1(SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item.itemValue) })));
3165
+ _$1(SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item) })));
3158
3166
  }
3159
3167
  }
3160
3168
  ReactElementFactory.Instance.registerElement("sv-rating-item-smiley", (props) => {
@@ -3332,7 +3340,7 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
3332
3340
  return this.questionBase.renderedValue;
3333
3341
  }
3334
3342
  renderReadOnlyElement() {
3335
- if (this.question.locReadOnlyText) {
3343
+ if (this.question.readOnlyText) {
3336
3344
  return (_$1("div", { className: this.question.cssClasses.controlValue }, this.renderLocString(this.question.locReadOnlyText)));
3337
3345
  }
3338
3346
  else {
@@ -3586,7 +3594,7 @@ class SurveyQuestionMatrix extends SurveyQuestionElementBase {
3586
3594
  _$1("tr", null,
3587
3595
  rowsTH,
3588
3596
  headers)));
3589
- return (_$1("div", { className: cssClasses.tableWrapper, ref: root => (this.setControl(root)) },
3597
+ return (_$1("div", { className: this.question.getTableWrapperCss(), ref: root => (this.setControl(root)) },
3590
3598
  _$1("fieldset", { role: "radiogroup" },
3591
3599
  _$1("legend", { className: "sv-visuallyhidden" }, this.question.locTitle.renderedHtml),
3592
3600
  _$1("table", { className: this.question.getTableCss(), role: "presentation" },
@@ -4516,7 +4524,7 @@ class SurveyQuestionMatrixDropdownBase extends SurveyQuestionElementBase {
4516
4524
  return this.renderTableDiv();
4517
4525
  }
4518
4526
  renderTableDiv() {
4519
- return (_$1("div", { className: this.question.cssClasses.tableWrapper, ref: (root) => (this.setControl(root)) },
4527
+ return (_$1("div", { className: this.question.getTableWrapperCss(), ref: (root) => (this.setControl(root)) },
4520
4528
  _$1(SurveyQuestionMatrixTable, { question: this.question, creator: this.creator, wrapCell: (cell, element, reason) => this.wrapCell(cell, element, reason) })));
4521
4529
  }
4522
4530
  }
@@ -6265,7 +6273,7 @@ SurveyModel.prototype["render"] = function (element = null) {
6265
6273
  }
6266
6274
  };
6267
6275
  const preact = React;
6268
- checkLibraryVersion(`${"2.5.0"}`, "survey-js-ui");
6276
+ checkLibraryVersion(`${"2.5.2"}`, "survey-js-ui");
6269
6277
 
6270
6278
  export { CharacterCounterComponent, O as Children, x$2 as Component, ComponentsContainer, k$2 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, 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$1 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$1 as useCallback, x$1 as useContext, P$1 as useDebugValue, w as useDeferredValue, y as useEffect, g$1 as useId, F$1 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$1 as useMemo, h as useReducer, A$1 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
6271
6279
  //# sourceMappingURL=survey-js-ui.mjs.map