survey-js-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-js-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",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {},
33
33
  "peerDependencies": {
34
- "survey-core": "2.2.0",
34
+ "survey-core": "2.2.2",
35
35
  "@types/react-dom": "*",
36
36
  "@types/react": "*"
37
37
  }
package/survey-js-ui.js CHANGED
@@ -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
  */
@@ -23,7 +23,7 @@ return /******/ (() => { // webpackBootstrap
23
23
  /***/ (function(module) {
24
24
 
25
25
  /*!
26
- * surveyjs - Survey JavaScript library v2.2.0
26
+ * surveyjs - Survey JavaScript library v2.2.2
27
27
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
28
28
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
29
29
  */
@@ -830,7 +830,7 @@ path.keys().forEach(function (key) {
830
830
  /***/ (function(module) {
831
831
 
832
832
  /*!
833
- * surveyjs - Survey JavaScript library v2.2.0
833
+ * surveyjs - Survey JavaScript library v2.2.2
834
834
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
835
835
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
836
836
  */
@@ -2579,7 +2579,7 @@ var SurveyActionBar = /** @class */ (function (_super) {
2579
2579
  });
2580
2580
  SurveyActionBar.prototype.componentDidMount = function () {
2581
2581
  _super.prototype.componentDidMount.call(this);
2582
- if (!this.model.hasActions)
2582
+ if (!this.model.hasVisibleActions)
2583
2583
  return;
2584
2584
  var container = this.rootRef.current;
2585
2585
  if (!!container) {
@@ -2595,7 +2595,7 @@ var SurveyActionBar = /** @class */ (function (_super) {
2595
2595
  if (prevProps.model != this.props.model) {
2596
2596
  prevProps.model.resetResponsivityManager();
2597
2597
  }
2598
- if (!!this.model.hasActions) {
2598
+ if (!!this.model.hasVisibleActions) {
2599
2599
  var container = this.rootRef.current;
2600
2600
  if (!!container) {
2601
2601
  this.model.initResponsivityManager(container, function (callback) { setTimeout(callback, 100); });
@@ -2609,7 +2609,7 @@ var SurveyActionBar = /** @class */ (function (_super) {
2609
2609
  if (!this.model.hasActions)
2610
2610
  return null;
2611
2611
  var items = this.renderItems();
2612
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { ref: this.rootRef, className: this.model.getRootCss(), onClick: this.handleClick ? function (event) {
2612
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { ref: this.rootRef, style: this.model.getRootStyle(), className: this.model.getRootCss(), onClick: this.handleClick ? function (event) {
2613
2613
  event.stopPropagation();
2614
2614
  } : undefined }, items));
2615
2615
  };
@@ -4066,7 +4066,7 @@ var MatrixRow = /** @class */ (function (_super) {
4066
4066
  var model = this.model;
4067
4067
  if (!model.visible)
4068
4068
  return null;
4069
- 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));
4069
+ 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));
4070
4070
  };
4071
4071
  return MatrixRow;
4072
4072
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__.SurveyElementBase));
@@ -6111,7 +6111,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
6111
6111
  else {
6112
6112
  selectElement = react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
6113
6113
  this.renderInput(),
6114
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_popup_popup__WEBPACK_IMPORTED_MODULE_2__.Popup, { model: dropdownListModel.popupModel }));
6114
+ this.question.isInputReadOnly ? null : react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_popup_popup__WEBPACK_IMPORTED_MODULE_2__.Popup, { model: dropdownListModel.popupModel }));
6115
6115
  }
6116
6116
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.selectWrapper, onClick: this.click }, selectElement));
6117
6117
  };
@@ -6128,12 +6128,6 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
6128
6128
  var _this = this;
6129
6129
  var dropdownListModel = this.dropdownListModel;
6130
6130
  var valueElement = this.renderValueElement();
6131
- var root = survey_core__WEBPACK_IMPORTED_MODULE_1__.settings.environment.root;
6132
- var onInputChange = function (e) {
6133
- if (e.target === root.activeElement) {
6134
- dropdownListModel.inputStringRendered = e.target.value;
6135
- }
6136
- };
6137
6131
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
6138
6132
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6139
6133
  // @ts-ignore
@@ -6147,9 +6141,20 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
6147
6141
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
6148
6142
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", null, dropdownListModel.hintStringSuffix))) : null,
6149
6143
  valueElement,
6150
- 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 })),
6144
+ dropdownListModel.needRenderInput ? this.renderFilterInput() : null),
6151
6145
  this.renderEditorButtons()));
6152
6146
  };
6147
+ SurveyQuestionDropdownBase.prototype.renderFilterInput = function () {
6148
+ var _this = this;
6149
+ var root = survey_core__WEBPACK_IMPORTED_MODULE_1__.settings.environment.root;
6150
+ var dropdownListModel = this.dropdownListModel;
6151
+ var onInputChange = function (e) {
6152
+ if (e.target === root.activeElement) {
6153
+ dropdownListModel.inputStringRendered = e.target.value;
6154
+ }
6155
+ };
6156
+ 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 });
6157
+ };
6153
6158
  SurveyQuestionDropdownBase.prototype.renderOther = function (cssClasses) {
6154
6159
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
6155
6160
  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 })));
@@ -8502,7 +8507,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
8502
8507
  var descriptionUnderInput = question.hasDescriptionUnderInput
8503
8508
  ? this.renderDescription()
8504
8509
  : null;
8505
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: question.cssContent || undefined, style: contentStyle, role: "presentation" },
8510
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: question.cssContent || undefined, style: contentStyle, "aria-hidden": question.contentAriaHidden, role: "presentation" },
8506
8511
  questionRender,
8507
8512
  comment,
8508
8513
  descriptionUnderInput));
@@ -11385,7 +11390,7 @@ var SurveyQuestionPanelDynamic = /** @class */ (function (_super) {
11385
11390
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.footer },
11386
11391
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("hr", { className: this.question.cssClasses.separator }),
11387
11392
  range,
11388
- this.question.footerToolbar.visibleActions.length ? (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.footerButtonsContainer },
11393
+ this.question.footerToolbar.hasVisibleActions ? (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.footerButtonsContainer },
11389
11394
  react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_4__.SurveyActionBar, { model: this.question.footerToolbar }))) : null));
11390
11395
  };
11391
11396
  SurveyQuestionPanelDynamic.prototype.renderPlaceholder = function (cssClasses) {
@@ -12288,7 +12293,7 @@ var SurveyQuestionSlider = /** @class */ (function (_super) {
12288
12293
  SurveyQuestionSlider.prototype.getRangeInput = function () {
12289
12294
  var _this = this;
12290
12295
  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;
12291
- 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); } });
12296
+ 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); } });
12292
12297
  };
12293
12298
  SurveyQuestionSlider.prototype.getLabels = function () {
12294
12299
  var labels = [];
@@ -12365,7 +12370,7 @@ var SurveyQuestionTagbox = /** @class */ (function (_super) {
12365
12370
  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)); } },
12366
12371
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.controlValue },
12367
12372
  items,
12368
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tagbox_filter__WEBPACK_IMPORTED_MODULE_4__.TagboxFilterString, { model: dropdownListModel, question: this.question })),
12373
+ dropdownListModel.needRenderInput ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tagbox_filter__WEBPACK_IMPORTED_MODULE_4__.TagboxFilterString, { model: dropdownListModel, question: this.question }) : null),
12369
12374
  this.renderEditorButtons()));
12370
12375
  };
12371
12376
  SurveyQuestionTagbox.prototype.renderElement = function () {
@@ -13785,7 +13790,7 @@ var preact = react__WEBPACK_IMPORTED_MODULE_0__;
13785
13790
 
13786
13791
 
13787
13792
 
13788
- (0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.2.0"), "survey-js-ui");
13793
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.2.2"), "survey-js-ui");
13789
13794
 
13790
13795
  })();
13791
13796