survey-react-ui 2.3.10 → 2.3.12
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/fesm/survey-react-ui.mjs +35 -34
- package/fesm/survey-react-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-react-ui.js +40 -34
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +1 -1
- package/survey-react-ui.min.js.LICENSE.txt +1 -1
- package/typings/src/components/title/title-actions.d.ts +1 -0
- package/typings/src/imagepicker.d.ts +1 -1
- package/typings/src/reactquestion_comment.d.ts +2 -2
- package/typings/src/reactquestion_element.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-react-ui",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.12",
|
|
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.3.
|
|
32
|
+
"survey-core": "2.3.12",
|
|
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
|
}
|
package/survey-react-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.3.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.3.12
|
|
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.3.
|
|
31
|
+
* surveyjs - Survey JavaScript library v2.3.12
|
|
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.3.
|
|
117
|
+
* surveyjs - Survey JavaScript library v2.3.12
|
|
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
|
*/
|
|
@@ -3867,7 +3867,7 @@ var SliderLabelItem = /** @class */ (function (_super) {
|
|
|
3867
3867
|
else {
|
|
3868
3868
|
labelText = react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelText }, this.renderLocString(locText));
|
|
3869
3869
|
}
|
|
3870
|
-
return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: this.item.
|
|
3870
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: this.item.uniqueId, className: getLabelCss(locText), style: { left: getPercent(value) + "%" }, onPointerUp: function (e) { handleLabelPointerUp(e.nativeEvent, value); } },
|
|
3871
3871
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelTick }),
|
|
3872
3872
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelTextContainer },
|
|
3873
3873
|
labelText,
|
|
@@ -4304,13 +4304,20 @@ var TitleActions = /** @class */ (function (_super) {
|
|
|
4304
4304
|
enumerable: false,
|
|
4305
4305
|
configurable: true
|
|
4306
4306
|
});
|
|
4307
|
+
Object.defineProperty(TitleActions.prototype, "renderActions", {
|
|
4308
|
+
get: function () {
|
|
4309
|
+
return this.props.renderActions === undefined ? true : this.props.renderActions;
|
|
4310
|
+
},
|
|
4311
|
+
enumerable: false,
|
|
4312
|
+
configurable: true
|
|
4313
|
+
});
|
|
4307
4314
|
TitleActions.prototype.render = function () {
|
|
4308
4315
|
var titleContent = react__WEBPACK_IMPORTED_MODULE_0__.createElement(_title_content__WEBPACK_IMPORTED_MODULE_4__.TitleContent, { element: this.element, cssClasses: this.cssClasses });
|
|
4309
4316
|
if (!this.element.hasTitleActions)
|
|
4310
4317
|
return titleContent;
|
|
4311
4318
|
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "sv-title-actions" },
|
|
4312
4319
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "sv-title-actions__title" }, titleContent),
|
|
4313
|
-
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_3__.SurveyActionBar, { model: this.element.getTitleToolbar() })));
|
|
4320
|
+
(this.renderActions ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_3__.SurveyActionBar, { model: this.element.getTitleToolbar() }) : null)));
|
|
4314
4321
|
};
|
|
4315
4322
|
return TitleActions;
|
|
4316
4323
|
}(react__WEBPACK_IMPORTED_MODULE_0__.Component));
|
|
@@ -4472,7 +4479,7 @@ var TitleElement = /** @class */ (function (_super) {
|
|
|
4472
4479
|
return null;
|
|
4473
4480
|
var ariaLabel = element.titleAriaLabel || undefined;
|
|
4474
4481
|
var titleExpandableSvg = this.renderTitleExpandableSvg();
|
|
4475
|
-
var titleContent = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_title_actions__WEBPACK_IMPORTED_MODULE_2__.TitleActions, { element: element, cssClasses: element.cssClasses }));
|
|
4482
|
+
var titleContent = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_title_actions__WEBPACK_IMPORTED_MODULE_2__.TitleActions, { element: element, cssClasses: element.cssClasses, renderActions: this.props.renderActions }));
|
|
4476
4483
|
var onClick = undefined;
|
|
4477
4484
|
var onKeyUp = undefined;
|
|
4478
4485
|
if (element.hasTitleEvents) {
|
|
@@ -4745,7 +4752,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
4745
4752
|
SurveyQuestionDropdownBase.prototype.renderOther = function (item, cssClasses) {
|
|
4746
4753
|
if (!item || !item.isCommentShowing)
|
|
4747
4754
|
return null;
|
|
4748
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: item.
|
|
4755
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: item.uniqueId, className: this.question.getCommentAreaCss(true) },
|
|
4749
4756
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_4__.SurveyQuestionCommentValueItem, { question: this.question, item: item, cssClasses: this.question.cssClasses })));
|
|
4750
4757
|
};
|
|
4751
4758
|
SurveyQuestionDropdownBase.prototype.renderEditorButtons = function () {
|
|
@@ -4921,7 +4928,7 @@ var SurveyQuestionDropdownSelect = /** @class */ (function (_super) {
|
|
|
4921
4928
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { id: this.question.inputId, className: this.question.getControlClass(), disabled: true }, this.question.readOnlyText)) :
|
|
4922
4929
|
(react__WEBPACK_IMPORTED_MODULE_0__.createElement("select", { id: this.question.inputId, className: this.question.getControlClass(), ref: function (select) { return (_this.setControl(select)); }, autoComplete: this.question.autocomplete, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onClick: click, onKeyUp: keyup, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage, required: this.question.isRequired },
|
|
4923
4930
|
this.question.allowClear ? (react__WEBPACK_IMPORTED_MODULE_0__.createElement("option", { value: "" }, this.question.placeholder)) : null,
|
|
4924
|
-
this.question.visibleChoices.map(function (item
|
|
4931
|
+
this.question.visibleChoices.map(function (item) { return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_dropdown_item__WEBPACK_IMPORTED_MODULE_4__.SurveyQuestionOptionItem, { key: item.uniqueId, item: item }); })));
|
|
4925
4932
|
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.selectWrapper },
|
|
4926
4933
|
selectElement,
|
|
4927
4934
|
this.createChevronButton()));
|
|
@@ -5521,7 +5528,7 @@ var SurveyQuestionImagePicker = /** @class */ (function (_super) {
|
|
|
5521
5528
|
var _this = this;
|
|
5522
5529
|
return this.question.columns.map(function (column, ci) {
|
|
5523
5530
|
var items = column.map(function (item, ii) {
|
|
5524
|
-
return _this.renderItem(
|
|
5531
|
+
return _this.renderItem(item, cssClasses);
|
|
5525
5532
|
});
|
|
5526
5533
|
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
|
|
5527
5534
|
});
|
|
@@ -5530,8 +5537,7 @@ var SurveyQuestionImagePicker = /** @class */ (function (_super) {
|
|
|
5530
5537
|
var items = [];
|
|
5531
5538
|
for (var i = 0; i < this.question.visibleChoices.length; i++) {
|
|
5532
5539
|
var item = this.question.visibleChoices[i];
|
|
5533
|
-
|
|
5534
|
-
items.push(this.renderItem(key, item, cssClasses));
|
|
5540
|
+
items.push(this.renderItem(item, cssClasses));
|
|
5535
5541
|
}
|
|
5536
5542
|
return items;
|
|
5537
5543
|
};
|
|
@@ -5542,8 +5548,8 @@ var SurveyQuestionImagePicker = /** @class */ (function (_super) {
|
|
|
5542
5548
|
enumerable: false,
|
|
5543
5549
|
configurable: true
|
|
5544
5550
|
});
|
|
5545
|
-
SurveyQuestionImagePicker.prototype.renderItem = function (
|
|
5546
|
-
var renderedItem = react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionImagePickerItem, { key:
|
|
5551
|
+
SurveyQuestionImagePicker.prototype.renderItem = function (item, cssClasses) {
|
|
5552
|
+
var renderedItem = react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionImagePickerItem, { key: item.uniqueId, question: this.question, item: item, cssClasses: cssClasses });
|
|
5547
5553
|
var survey = this.question.survey;
|
|
5548
5554
|
var wrappedItem = null;
|
|
5549
5555
|
if (!!survey) {
|
|
@@ -7738,7 +7744,7 @@ var SurveyQuestionCommentValueItem = /** @class */ (function (_super) {
|
|
|
7738
7744
|
SurveyQuestionCommentValueItem.prototype.getTextAreaModel = function () {
|
|
7739
7745
|
return this.props.question.getCommentTextAreaModel(this.props.item);
|
|
7740
7746
|
};
|
|
7741
|
-
SurveyQuestionCommentValueItem.prototype.getKey = function () { return this.props.item.
|
|
7747
|
+
SurveyQuestionCommentValueItem.prototype.getKey = function () { return this.props.item.uniqueId; };
|
|
7742
7748
|
return SurveyQuestionCommentValueItem;
|
|
7743
7749
|
}(SurveyQuestionCommentItem));
|
|
7744
7750
|
|
|
@@ -7942,6 +7948,16 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
7942
7948
|
});
|
|
7943
7949
|
}
|
|
7944
7950
|
};
|
|
7951
|
+
_this.onArrayChangedCallback = function (stateElement, options) {
|
|
7952
|
+
if (_this.isRendering)
|
|
7953
|
+
return;
|
|
7954
|
+
_this.changedStatePropNameValue = options.name;
|
|
7955
|
+
_this.setState(function (state) {
|
|
7956
|
+
var newState = {};
|
|
7957
|
+
newState[options.name] = options.newValue;
|
|
7958
|
+
return newState;
|
|
7959
|
+
});
|
|
7960
|
+
};
|
|
7945
7961
|
return _this;
|
|
7946
7962
|
}
|
|
7947
7963
|
SurveyElementBase.renderLocString = function (locStr, style, key) {
|
|
@@ -8097,16 +8113,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
8097
8113
|
var val = hash[key];
|
|
8098
8114
|
if (Array.isArray(val)) {
|
|
8099
8115
|
var val = val;
|
|
8100
|
-
val
|
|
8101
|
-
if (_this.isRendering)
|
|
8102
|
-
return;
|
|
8103
|
-
_this.changedStatePropNameValue = key;
|
|
8104
|
-
_this.setState(function (state) {
|
|
8105
|
-
var newState = {};
|
|
8106
|
-
newState[key] = val;
|
|
8107
|
-
return newState;
|
|
8108
|
-
});
|
|
8109
|
-
};
|
|
8116
|
+
stateElement.addOnArrayChangedCallback(val, _this.onArrayChangedCallback);
|
|
8110
8117
|
}
|
|
8111
8118
|
});
|
|
8112
8119
|
stateElement.setPropertyValueCoreHandler = this.propertyValueChangedHandler;
|
|
@@ -8115,6 +8122,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
8115
8122
|
return true;
|
|
8116
8123
|
};
|
|
8117
8124
|
SurveyElementBase.prototype.unMakeBaseElementReact = function (stateElement) {
|
|
8125
|
+
var _this = this;
|
|
8118
8126
|
if (!this.canMakeReact(stateElement))
|
|
8119
8127
|
return;
|
|
8120
8128
|
if (!this.isCurrentStateElement(stateElement)) {
|
|
@@ -8127,7 +8135,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
8127
8135
|
var val = hash[key];
|
|
8128
8136
|
if (Array.isArray(val)) {
|
|
8129
8137
|
var val = val;
|
|
8130
|
-
val
|
|
8138
|
+
stateElement.removeOnArrayChangedCallback(val, _this.onArrayChangedCallback);
|
|
8131
8139
|
}
|
|
8132
8140
|
});
|
|
8133
8141
|
};
|
|
@@ -8707,21 +8715,19 @@ var SurveyQuestionMatrix = /** @class */ (function (_super) {
|
|
|
8707
8715
|
var headers = [];
|
|
8708
8716
|
for (var i = 0; i < this.question.visibleColumns.length; i++) {
|
|
8709
8717
|
var column = this.question.visibleColumns[i];
|
|
8710
|
-
var key = "column" + i;
|
|
8711
8718
|
var columText = this.renderLocString(column.locText);
|
|
8712
8719
|
var style = {};
|
|
8713
8720
|
if (!!this.question.columnMinWidth) {
|
|
8714
8721
|
style.minWidth = this.question.columnMinWidth;
|
|
8715
8722
|
style.width = this.question.columnMinWidth;
|
|
8716
8723
|
}
|
|
8717
|
-
headers.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement("th", { className: this.question.cssClasses.headerCell, style: style, key:
|
|
8724
|
+
headers.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement("th", { className: this.question.cssClasses.headerCell, style: style, key: column.uniqueId }, this.wrapCell({ column: column }, columText, "column-header")));
|
|
8718
8725
|
}
|
|
8719
8726
|
var rows = [];
|
|
8720
8727
|
var visibleRows = this.question.visibleRows;
|
|
8721
8728
|
for (var i = 0; i < visibleRows.length; i++) {
|
|
8722
8729
|
var row = visibleRows[i];
|
|
8723
|
-
|
|
8724
|
-
rows.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionMatrixRow, { key: key, question: this.question, cssClasses: cssClasses, row: row, isFirst: i == 0 }));
|
|
8730
|
+
rows.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionMatrixRow, { key: row.uniqueId, question: this.question, cssClasses: cssClasses, row: row, isFirst: i == 0 }));
|
|
8725
8731
|
}
|
|
8726
8732
|
var header = !this.question.showHeader ? null : (react__WEBPACK_IMPORTED_MODULE_0__.createElement("thead", { role: "presentation" },
|
|
8727
8733
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr", null,
|
|
@@ -8799,7 +8805,7 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
|
|
|
8799
8805
|
var _loop_1 = function () {
|
|
8800
8806
|
var td = null;
|
|
8801
8807
|
var column = this_1.question.visibleColumns[i];
|
|
8802
|
-
var key =
|
|
8808
|
+
var key = column.uniqueId;
|
|
8803
8809
|
var itemClass = this_1.question.getItemClass(row, column);
|
|
8804
8810
|
if (this_1.question.hasCellText) {
|
|
8805
8811
|
var getHandler = function (column) { return function () { return _this.cellClick(row, column); }; };
|
|
@@ -9627,7 +9633,7 @@ var SurveyQuestionMultipleText = /** @class */ (function (_super) {
|
|
|
9627
9633
|
else {
|
|
9628
9634
|
cellContent = react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyMultipleTextItem, { question: this.question, item: cell.item, creator: this.creator, cssClasses: cssClasses });
|
|
9629
9635
|
}
|
|
9630
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("td", { key:
|
|
9636
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("td", { key: cell.item.id, className: cell.className, onFocus: focusIn }, cellContent));
|
|
9631
9637
|
};
|
|
9632
9638
|
SurveyQuestionMultipleText.prototype.renderRow = function (rowIndex, cells, cssClasses) {
|
|
9633
9639
|
var key = "item" + rowIndex;
|
|
@@ -10135,7 +10141,7 @@ var SurveyQuestionRanking = /** @class */ (function (_super) {
|
|
|
10135
10141
|
var index = i;
|
|
10136
10142
|
var indexText = this.question.getNumberByIndex(index);
|
|
10137
10143
|
var tabIndex = this.question.getItemTabIndex(item);
|
|
10138
|
-
var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRankingItem, { key: item.
|
|
10144
|
+
var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRankingItem, { key: item.uniqueId, text: text, index: index, indexText: indexText, itemTabIndex: tabIndex, handleKeydown: handleKeydown, handlePointerDown: handlePointerDown, handlePointerUp: handlePointerUp, cssClasses: cssClasses, itemClass: itemClass, question: question, unrankedItem: unrankedItem, item: item }));
|
|
10139
10145
|
var survey = this.question.survey;
|
|
10140
10146
|
var wrappedItem = null;
|
|
10141
10147
|
if (!!survey) {
|
|
@@ -10496,7 +10502,7 @@ var SurveyQuestionSelectbase = /** @class */ (function (_super) {
|
|
|
10496
10502
|
});
|
|
10497
10503
|
SurveyQuestionSelectbase.prototype.renderItem = function (item, isFirst, cssClasses, index, isChecked) {
|
|
10498
10504
|
var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_4__.ReactElementFactory.Instance.createElement(this.question.itemComponent, {
|
|
10499
|
-
key: item.
|
|
10505
|
+
key: item.uniqueId,
|
|
10500
10506
|
question: this.question,
|
|
10501
10507
|
cssClasses: cssClasses,
|
|
10502
10508
|
isDisplayMode: this.isDisplayMode,
|
|
@@ -12115,7 +12121,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12115
12121
|
|
|
12116
12122
|
|
|
12117
12123
|
|
|
12118
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.3.
|
|
12124
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.3.12"), "survey-react-ui");
|
|
12119
12125
|
|
|
12120
12126
|
})();
|
|
12121
12127
|
|