survey-react-ui 2.2.0 → 2.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-react-ui",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
5
5
  "keywords": [
6
6
  "Survey",
@@ -29,7 +29,7 @@
29
29
  }
30
30
  },
31
31
  "peerDependencies": {
32
- "survey-core": "2.2.0",
32
+ "survey-core": "2.2.2",
33
33
  "react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
34
34
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0"
35
35
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v2.2.0
2
+ * surveyjs - Survey JavaScript library v2.2.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
  */
@@ -28,7 +28,7 @@ __webpack_require__.r(__webpack_exports__);
28
28
  /* harmony export */ icons: () => (/* binding */ iconsV1)
29
29
  /* harmony export */ });
30
30
  /*!
31
- * surveyjs - Survey JavaScript library v2.2.0
31
+ * surveyjs - Survey JavaScript library v2.2.2
32
32
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
33
33
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
34
34
  */
@@ -114,7 +114,7 @@ __webpack_require__.r(__webpack_exports__);
114
114
  /* harmony export */ icons: () => (/* binding */ iconsV2)
115
115
  /* harmony export */ });
116
116
  /*!
117
- * surveyjs - Survey JavaScript library v2.2.0
117
+ * surveyjs - Survey JavaScript library v2.2.2
118
118
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
119
119
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
120
120
  */
@@ -1139,7 +1139,7 @@ var SurveyActionBar = /** @class */ (function (_super) {
1139
1139
  });
1140
1140
  SurveyActionBar.prototype.componentDidMount = function () {
1141
1141
  _super.prototype.componentDidMount.call(this);
1142
- if (!this.model.hasActions)
1142
+ if (!this.model.hasVisibleActions)
1143
1143
  return;
1144
1144
  var container = this.rootRef.current;
1145
1145
  if (!!container) {
@@ -1155,7 +1155,7 @@ var SurveyActionBar = /** @class */ (function (_super) {
1155
1155
  if (prevProps.model != this.props.model) {
1156
1156
  prevProps.model.resetResponsivityManager();
1157
1157
  }
1158
- if (!!this.model.hasActions) {
1158
+ if (!!this.model.hasVisibleActions) {
1159
1159
  var container = this.rootRef.current;
1160
1160
  if (!!container) {
1161
1161
  this.model.initResponsivityManager(container, function (callback) { setTimeout(callback, 100); });
@@ -1169,7 +1169,7 @@ var SurveyActionBar = /** @class */ (function (_super) {
1169
1169
  if (!this.model.hasActions)
1170
1170
  return null;
1171
1171
  var items = this.renderItems();
1172
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { ref: this.rootRef, className: this.model.getRootCss(), onClick: this.handleClick ? function (event) {
1172
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { ref: this.rootRef, style: this.model.getRootStyle(), className: this.model.getRootCss(), onClick: this.handleClick ? function (event) {
1173
1173
  event.stopPropagation();
1174
1174
  } : undefined }, items));
1175
1175
  };
@@ -2626,7 +2626,7 @@ var MatrixRow = /** @class */ (function (_super) {
2626
2626
  var model = this.model;
2627
2627
  if (!model.visible)
2628
2628
  return null;
2629
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr", { ref: this.root, className: model.className, "data-sv-drop-target-matrix-row": model.row && model.row.id, onPointerDown: function (event) { return _this.onPointerDownHandler(event); } }, this.props.children));
2629
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr", { ref: this.root, className: model.className, "data-sv-drop-target-matrix-row": model.dropTargetId, onPointerDown: function (event) { return _this.onPointerDownHandler(event); } }, this.props.children));
2630
2630
  };
2631
2631
  return MatrixRow;
2632
2632
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
@@ -4673,7 +4673,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
4673
4673
  else {
4674
4674
  selectElement = react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
4675
4675
  this.renderInput(),
4676
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_popup_popup__WEBPACK_IMPORTED_MODULE_2__.Popup, { model: dropdownListModel.popupModel }));
4676
+ this.question.isInputReadOnly ? null : react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_popup_popup__WEBPACK_IMPORTED_MODULE_2__.Popup, { model: dropdownListModel.popupModel }));
4677
4677
  }
4678
4678
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.selectWrapper, onClick: this.click }, selectElement));
4679
4679
  };
@@ -4690,12 +4690,6 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
4690
4690
  var _this = this;
4691
4691
  var dropdownListModel = this.dropdownListModel;
4692
4692
  var valueElement = this.renderValueElement();
4693
- var root = survey_core__WEBPACK_IMPORTED_MODULE_1__.settings.environment.root;
4694
- var onInputChange = function (e) {
4695
- if (e.target === root.activeElement) {
4696
- dropdownListModel.inputStringRendered = e.target.value;
4697
- }
4698
- };
4699
4693
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
4700
4694
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
4701
4695
  // @ts-ignore
@@ -4709,9 +4703,20 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
4709
4703
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
4710
4704
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, dropdownListModel.hintStringSuffix))) : null,
4711
4705
  valueElement,
4712
- react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.ariaInputRole, "aria-required": dropdownListModel.ariaInputRequired, "aria-invalid": dropdownListModel.ariaInputInvalid, "aria-errormessage": dropdownListModel.ariaInputErrorMessage, "aria-expanded": dropdownListModel.ariaInputExpanded, "aria-label": dropdownListModel.ariaInputLabel, "aria-labelledby": dropdownListModel.ariaInputLabelledby, "aria-describedby": dropdownListModel.ariaInputDescribedby, "aria-controls": dropdownListModel.ariaInputControls, "aria-activedescendant": dropdownListModel.ariaInputActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: dropdownListModel.filterReadOnly ? true : undefined, tabIndex: dropdownListModel.noTabIndex ? undefined : -1, disabled: this.question.isDisabledAttr, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
4706
+ dropdownListModel.needRenderInput ? this.renderFilterInput() : null),
4713
4707
  this.renderEditorButtons()));
4714
4708
  };
4709
+ SurveyQuestionDropdownBase.prototype.renderFilterInput = function () {
4710
+ var _this = this;
4711
+ var root = survey_core__WEBPACK_IMPORTED_MODULE_1__.settings.environment.root;
4712
+ var dropdownListModel = this.dropdownListModel;
4713
+ var onInputChange = function (e) {
4714
+ if (e.target === root.activeElement) {
4715
+ dropdownListModel.inputStringRendered = e.target.value;
4716
+ }
4717
+ };
4718
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.ariaInputRole, "aria-required": dropdownListModel.ariaInputRequired, "aria-invalid": dropdownListModel.ariaInputInvalid, "aria-errormessage": dropdownListModel.ariaInputErrorMessage, "aria-expanded": dropdownListModel.ariaInputExpanded, "aria-label": dropdownListModel.ariaInputLabel, "aria-labelledby": dropdownListModel.ariaInputLabelledby, "aria-describedby": dropdownListModel.ariaInputDescribedby, "aria-controls": dropdownListModel.ariaInputControls, "aria-activedescendant": dropdownListModel.ariaInputActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: dropdownListModel.filterReadOnly ? true : undefined, tabIndex: dropdownListModel.noTabIndex ? undefined : -1, disabled: this.question.isDisabledAttr, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus });
4719
+ };
4715
4720
  SurveyQuestionDropdownBase.prototype.renderOther = function (cssClasses) {
4716
4721
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
4717
4722
  react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_4__.SurveyQuestionOtherValueItem, { question: this.question, otherCss: cssClasses.other, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode, isOther: true })));
@@ -7061,7 +7066,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
7061
7066
  var descriptionUnderInput = question.hasDescriptionUnderInput
7062
7067
  ? this.renderDescription()
7063
7068
  : null;
7064
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: question.cssContent || undefined, style: contentStyle, role: "presentation" },
7069
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: question.cssContent || undefined, style: contentStyle, "aria-hidden": question.contentAriaHidden, role: "presentation" },
7065
7070
  questionRender,
7066
7071
  comment,
7067
7072
  descriptionUnderInput));
@@ -9943,7 +9948,7 @@ var SurveyQuestionPanelDynamic = /** @class */ (function (_super) {
9943
9948
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.footer },
9944
9949
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("hr", { className: this.question.cssClasses.separator }),
9945
9950
  range,
9946
- this.question.footerToolbar.visibleActions.length ? (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.footerButtonsContainer },
9951
+ this.question.footerToolbar.hasVisibleActions ? (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.footerButtonsContainer },
9947
9952
  react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_4__.SurveyActionBar, { model: this.question.footerToolbar }))) : null));
9948
9953
  };
9949
9954
  SurveyQuestionPanelDynamic.prototype.renderPlaceholder = function (cssClasses) {
@@ -10846,7 +10851,7 @@ var SurveyQuestionSlider = /** @class */ (function (_super) {
10846
10851
  SurveyQuestionSlider.prototype.getRangeInput = function () {
10847
10852
  var _this = this;
10848
10853
  var _a = this.question, max = _a.renderedMax, min = _a.renderedMin, step = _a.step, cssClasses = _a.cssClasses, handleRangeOnChange = _a.handleRangeOnChange, handleRangePointerDown = _a.handleRangePointerDown, handleRangePointerUp = _a.handleRangePointerUp;
10849
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", { name: "range-input", ref: this.rangeInputRef, className: cssClasses.input, type: "range", "aria-hidden": "true", min: min, max: max, step: step, tabIndex: -1, onChange: function (e) { handleRangeOnChange(e.nativeEvent); }, onPointerDown: function (e) { e.persist(); handleRangePointerDown(e.nativeEvent, _this.control); }, onPointerUp: function (e) { handleRangePointerUp(e.nativeEvent, _this.control); } });
10854
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", { name: "range-input", id: "sjs-slider-input-range-input", ref: this.rangeInputRef, className: cssClasses.input, type: "range", "aria-hidden": "true", min: min, max: max, step: step, tabIndex: -1, onChange: function (e) { handleRangeOnChange(e.nativeEvent); }, onPointerDown: function (e) { e.persist(); handleRangePointerDown(e.nativeEvent, _this.control); }, onPointerUp: function (e) { handleRangePointerUp(e.nativeEvent, _this.control); } });
10850
10855
  };
10851
10856
  SurveyQuestionSlider.prototype.getLabels = function () {
10852
10857
  var labels = [];
@@ -10923,7 +10928,7 @@ var SurveyQuestionTagbox = /** @class */ (function (_super) {
10923
10928
  disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: dropdownListModel.ariaQuestionRole, "aria-required": dropdownListModel.ariaQuestionRequired, "aria-invalid": dropdownListModel.ariaQuestionInvalid, "aria-errormessage": dropdownListModel.ariaQuestionErrorMessage, "aria-label": dropdownListModel.ariaQuestionLabel, "aria-labelledby": dropdownListModel.ariaQuestionLabelledby, "aria-describedby": dropdownListModel.ariaQuestionDescribedby, "aria-expanded": dropdownListModel.ariaQuestionExpanded, "aria-controls": dropdownListModel.ariaQuestionControls, "aria-activedescendant": dropdownListModel.ariaQuestionActivedescendant, ref: function (div) { return (_this.setControl(div)); } },
10924
10929
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.controlValue },
10925
10930
  items,
10926
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tagbox_filter__WEBPACK_IMPORTED_MODULE_4__.TagboxFilterString, { model: dropdownListModel, question: this.question })),
10931
+ dropdownListModel.needRenderInput ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tagbox_filter__WEBPACK_IMPORTED_MODULE_4__.TagboxFilterString, { model: dropdownListModel, question: this.question }) : null),
10927
10932
  this.renderEditorButtons()));
10928
10933
  };
10929
10934
  SurveyQuestionTagbox.prototype.renderElement = function () {
@@ -12111,7 +12116,7 @@ __webpack_require__.r(__webpack_exports__);
12111
12116
 
12112
12117
 
12113
12118
 
12114
- (0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.2.0"), "survey-react-ui");
12119
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.2.2"), "survey-react-ui");
12115
12120
 
12116
12121
  })();
12117
12122