survey-js-ui 2.3.10 → 2.3.11
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-js-ui.mjs +35 -34
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +40 -34
- package/survey-js-ui.js.map +1 -1
- package/survey-js-ui.min.js +1 -1
- package/survey-js-ui.min.js.LICENSE.txt +1 -1
- package/typings/survey-react-ui/src/components/title/title-actions.d.ts +1 -0
- package/typings/survey-react-ui/src/imagepicker.d.ts +1 -1
- package/typings/survey-react-ui/src/reactquestion_comment.d.ts +2 -2
- package/typings/survey-react-ui/src/reactquestion_element.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-js-ui",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.11",
|
|
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.3.
|
|
34
|
+
"survey-core": "2.3.11",
|
|
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.3.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.3.11
|
|
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.3.
|
|
26
|
+
* surveyjs - Survey JavaScript library v2.3.11
|
|
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.3.
|
|
833
|
+
* surveyjs - Survey JavaScript library v2.3.11
|
|
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
|
*/
|
|
@@ -5305,7 +5305,7 @@ var SliderLabelItem = /** @class */ (function (_super) {
|
|
|
5305
5305
|
else {
|
|
5306
5306
|
labelText = react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelText }, this.renderLocString(locText));
|
|
5307
5307
|
}
|
|
5308
|
-
return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: this.item.
|
|
5308
|
+
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); } },
|
|
5309
5309
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelTick }),
|
|
5310
5310
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.labelTextContainer },
|
|
5311
5311
|
labelText,
|
|
@@ -5742,13 +5742,20 @@ var TitleActions = /** @class */ (function (_super) {
|
|
|
5742
5742
|
enumerable: false,
|
|
5743
5743
|
configurable: true
|
|
5744
5744
|
});
|
|
5745
|
+
Object.defineProperty(TitleActions.prototype, "renderActions", {
|
|
5746
|
+
get: function () {
|
|
5747
|
+
return this.props.renderActions === undefined ? true : this.props.renderActions;
|
|
5748
|
+
},
|
|
5749
|
+
enumerable: false,
|
|
5750
|
+
configurable: true
|
|
5751
|
+
});
|
|
5745
5752
|
TitleActions.prototype.render = function () {
|
|
5746
5753
|
var titleContent = react__WEBPACK_IMPORTED_MODULE_0__.createElement(_title_content__WEBPACK_IMPORTED_MODULE_4__.TitleContent, { element: this.element, cssClasses: this.cssClasses });
|
|
5747
5754
|
if (!this.element.hasTitleActions)
|
|
5748
5755
|
return titleContent;
|
|
5749
5756
|
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "sv-title-actions" },
|
|
5750
5757
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "sv-title-actions__title" }, titleContent),
|
|
5751
|
-
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_3__.SurveyActionBar, { model: this.element.getTitleToolbar() })));
|
|
5758
|
+
(this.renderActions ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_3__.SurveyActionBar, { model: this.element.getTitleToolbar() }) : null)));
|
|
5752
5759
|
};
|
|
5753
5760
|
return TitleActions;
|
|
5754
5761
|
}(react__WEBPACK_IMPORTED_MODULE_0__.Component));
|
|
@@ -5910,7 +5917,7 @@ var TitleElement = /** @class */ (function (_super) {
|
|
|
5910
5917
|
return null;
|
|
5911
5918
|
var ariaLabel = element.titleAriaLabel || undefined;
|
|
5912
5919
|
var titleExpandableSvg = this.renderTitleExpandableSvg();
|
|
5913
|
-
var titleContent = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_title_actions__WEBPACK_IMPORTED_MODULE_2__.TitleActions, { element: element, cssClasses: element.cssClasses }));
|
|
5920
|
+
var titleContent = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_title_actions__WEBPACK_IMPORTED_MODULE_2__.TitleActions, { element: element, cssClasses: element.cssClasses, renderActions: this.props.renderActions }));
|
|
5914
5921
|
var onClick = undefined;
|
|
5915
5922
|
var onKeyUp = undefined;
|
|
5916
5923
|
if (element.hasTitleEvents) {
|
|
@@ -6183,7 +6190,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
6183
6190
|
SurveyQuestionDropdownBase.prototype.renderOther = function (item, cssClasses) {
|
|
6184
6191
|
if (!item || !item.isCommentShowing)
|
|
6185
6192
|
return null;
|
|
6186
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: item.
|
|
6193
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: item.uniqueId, className: this.question.getCommentAreaCss(true) },
|
|
6187
6194
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_4__.SurveyQuestionCommentValueItem, { question: this.question, item: item, cssClasses: this.question.cssClasses })));
|
|
6188
6195
|
};
|
|
6189
6196
|
SurveyQuestionDropdownBase.prototype.renderEditorButtons = function () {
|
|
@@ -6359,7 +6366,7 @@ var SurveyQuestionDropdownSelect = /** @class */ (function (_super) {
|
|
|
6359
6366
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { id: this.question.inputId, className: this.question.getControlClass(), disabled: true }, this.question.readOnlyText)) :
|
|
6360
6367
|
(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 },
|
|
6361
6368
|
this.question.allowClear ? (react__WEBPACK_IMPORTED_MODULE_0__.createElement("option", { value: "" }, this.question.placeholder)) : null,
|
|
6362
|
-
this.question.visibleChoices.map(function (item
|
|
6369
|
+
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 }); })));
|
|
6363
6370
|
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.selectWrapper },
|
|
6364
6371
|
selectElement,
|
|
6365
6372
|
this.createChevronButton()));
|
|
@@ -6960,7 +6967,7 @@ var SurveyQuestionImagePicker = /** @class */ (function (_super) {
|
|
|
6960
6967
|
var _this = this;
|
|
6961
6968
|
return this.question.columns.map(function (column, ci) {
|
|
6962
6969
|
var items = column.map(function (item, ii) {
|
|
6963
|
-
return _this.renderItem(
|
|
6970
|
+
return _this.renderItem(item, cssClasses);
|
|
6964
6971
|
});
|
|
6965
6972
|
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
|
|
6966
6973
|
});
|
|
@@ -6969,8 +6976,7 @@ var SurveyQuestionImagePicker = /** @class */ (function (_super) {
|
|
|
6969
6976
|
var items = [];
|
|
6970
6977
|
for (var i = 0; i < this.question.visibleChoices.length; i++) {
|
|
6971
6978
|
var item = this.question.visibleChoices[i];
|
|
6972
|
-
|
|
6973
|
-
items.push(this.renderItem(key, item, cssClasses));
|
|
6979
|
+
items.push(this.renderItem(item, cssClasses));
|
|
6974
6980
|
}
|
|
6975
6981
|
return items;
|
|
6976
6982
|
};
|
|
@@ -6981,8 +6987,8 @@ var SurveyQuestionImagePicker = /** @class */ (function (_super) {
|
|
|
6981
6987
|
enumerable: false,
|
|
6982
6988
|
configurable: true
|
|
6983
6989
|
});
|
|
6984
|
-
SurveyQuestionImagePicker.prototype.renderItem = function (
|
|
6985
|
-
var renderedItem = react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionImagePickerItem, { key:
|
|
6990
|
+
SurveyQuestionImagePicker.prototype.renderItem = function (item, cssClasses) {
|
|
6991
|
+
var renderedItem = react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionImagePickerItem, { key: item.uniqueId, question: this.question, item: item, cssClasses: cssClasses });
|
|
6986
6992
|
var survey = this.question.survey;
|
|
6987
6993
|
var wrappedItem = null;
|
|
6988
6994
|
if (!!survey) {
|
|
@@ -9179,7 +9185,7 @@ var SurveyQuestionCommentValueItem = /** @class */ (function (_super) {
|
|
|
9179
9185
|
SurveyQuestionCommentValueItem.prototype.getTextAreaModel = function () {
|
|
9180
9186
|
return this.props.question.getCommentTextAreaModel(this.props.item);
|
|
9181
9187
|
};
|
|
9182
|
-
SurveyQuestionCommentValueItem.prototype.getKey = function () { return this.props.item.
|
|
9188
|
+
SurveyQuestionCommentValueItem.prototype.getKey = function () { return this.props.item.uniqueId; };
|
|
9183
9189
|
return SurveyQuestionCommentValueItem;
|
|
9184
9190
|
}(SurveyQuestionCommentItem));
|
|
9185
9191
|
|
|
@@ -9383,6 +9389,16 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
9383
9389
|
});
|
|
9384
9390
|
}
|
|
9385
9391
|
};
|
|
9392
|
+
_this.onArrayChangedCallback = function (stateElement, options) {
|
|
9393
|
+
if (_this.isRendering)
|
|
9394
|
+
return;
|
|
9395
|
+
_this.changedStatePropNameValue = options.name;
|
|
9396
|
+
_this.setState(function (state) {
|
|
9397
|
+
var newState = {};
|
|
9398
|
+
newState[options.name] = options.newValue;
|
|
9399
|
+
return newState;
|
|
9400
|
+
});
|
|
9401
|
+
};
|
|
9386
9402
|
return _this;
|
|
9387
9403
|
}
|
|
9388
9404
|
SurveyElementBase.renderLocString = function (locStr, style, key) {
|
|
@@ -9538,16 +9554,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
9538
9554
|
var val = hash[key];
|
|
9539
9555
|
if (Array.isArray(val)) {
|
|
9540
9556
|
var val = val;
|
|
9541
|
-
val
|
|
9542
|
-
if (_this.isRendering)
|
|
9543
|
-
return;
|
|
9544
|
-
_this.changedStatePropNameValue = key;
|
|
9545
|
-
_this.setState(function (state) {
|
|
9546
|
-
var newState = {};
|
|
9547
|
-
newState[key] = val;
|
|
9548
|
-
return newState;
|
|
9549
|
-
});
|
|
9550
|
-
};
|
|
9557
|
+
stateElement.addOnArrayChangedCallback(val, _this.onArrayChangedCallback);
|
|
9551
9558
|
}
|
|
9552
9559
|
});
|
|
9553
9560
|
stateElement.setPropertyValueCoreHandler = this.propertyValueChangedHandler;
|
|
@@ -9556,6 +9563,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
9556
9563
|
return true;
|
|
9557
9564
|
};
|
|
9558
9565
|
SurveyElementBase.prototype.unMakeBaseElementReact = function (stateElement) {
|
|
9566
|
+
var _this = this;
|
|
9559
9567
|
if (!this.canMakeReact(stateElement))
|
|
9560
9568
|
return;
|
|
9561
9569
|
if (!this.isCurrentStateElement(stateElement)) {
|
|
@@ -9568,7 +9576,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
9568
9576
|
var val = hash[key];
|
|
9569
9577
|
if (Array.isArray(val)) {
|
|
9570
9578
|
var val = val;
|
|
9571
|
-
val
|
|
9579
|
+
stateElement.removeOnArrayChangedCallback(val, _this.onArrayChangedCallback);
|
|
9572
9580
|
}
|
|
9573
9581
|
});
|
|
9574
9582
|
};
|
|
@@ -10149,21 +10157,19 @@ var SurveyQuestionMatrix = /** @class */ (function (_super) {
|
|
|
10149
10157
|
var headers = [];
|
|
10150
10158
|
for (var i = 0; i < this.question.visibleColumns.length; i++) {
|
|
10151
10159
|
var column = this.question.visibleColumns[i];
|
|
10152
|
-
var key = "column" + i;
|
|
10153
10160
|
var columText = this.renderLocString(column.locText);
|
|
10154
10161
|
var style = {};
|
|
10155
10162
|
if (!!this.question.columnMinWidth) {
|
|
10156
10163
|
style.minWidth = this.question.columnMinWidth;
|
|
10157
10164
|
style.width = this.question.columnMinWidth;
|
|
10158
10165
|
}
|
|
10159
|
-
headers.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement("th", { className: this.question.cssClasses.headerCell, style: style, key:
|
|
10166
|
+
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")));
|
|
10160
10167
|
}
|
|
10161
10168
|
var rows = [];
|
|
10162
10169
|
var visibleRows = this.question.visibleRows;
|
|
10163
10170
|
for (var i = 0; i < visibleRows.length; i++) {
|
|
10164
10171
|
var row = visibleRows[i];
|
|
10165
|
-
|
|
10166
|
-
rows.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionMatrixRow, { key: key, question: this.question, cssClasses: cssClasses, row: row, isFirst: i == 0 }));
|
|
10172
|
+
rows.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionMatrixRow, { key: row.uniqueId, question: this.question, cssClasses: cssClasses, row: row, isFirst: i == 0 }));
|
|
10167
10173
|
}
|
|
10168
10174
|
var header = !this.question.showHeader ? null : (react__WEBPACK_IMPORTED_MODULE_0__.createElement("thead", { role: "presentation" },
|
|
10169
10175
|
react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr", null,
|
|
@@ -10241,7 +10247,7 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
|
|
|
10241
10247
|
var _loop_1 = function () {
|
|
10242
10248
|
var td = null;
|
|
10243
10249
|
var column = this_1.question.visibleColumns[i];
|
|
10244
|
-
var key =
|
|
10250
|
+
var key = column.uniqueId;
|
|
10245
10251
|
var itemClass = this_1.question.getItemClass(row, column);
|
|
10246
10252
|
if (this_1.question.hasCellText) {
|
|
10247
10253
|
var getHandler = function (column) { return function () { return _this.cellClick(row, column); }; };
|
|
@@ -11069,7 +11075,7 @@ var SurveyQuestionMultipleText = /** @class */ (function (_super) {
|
|
|
11069
11075
|
else {
|
|
11070
11076
|
cellContent = react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyMultipleTextItem, { question: this.question, item: cell.item, creator: this.creator, cssClasses: cssClasses });
|
|
11071
11077
|
}
|
|
11072
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("td", { key:
|
|
11078
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("td", { key: cell.item.id, className: cell.className, onFocus: focusIn }, cellContent));
|
|
11073
11079
|
};
|
|
11074
11080
|
SurveyQuestionMultipleText.prototype.renderRow = function (rowIndex, cells, cssClasses) {
|
|
11075
11081
|
var key = "item" + rowIndex;
|
|
@@ -11577,7 +11583,7 @@ var SurveyQuestionRanking = /** @class */ (function (_super) {
|
|
|
11577
11583
|
var index = i;
|
|
11578
11584
|
var indexText = this.question.getNumberByIndex(index);
|
|
11579
11585
|
var tabIndex = this.question.getItemTabIndex(item);
|
|
11580
|
-
var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionRankingItem, { key: item.
|
|
11586
|
+
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 }));
|
|
11581
11587
|
var survey = this.question.survey;
|
|
11582
11588
|
var wrappedItem = null;
|
|
11583
11589
|
if (!!survey) {
|
|
@@ -11938,7 +11944,7 @@ var SurveyQuestionSelectbase = /** @class */ (function (_super) {
|
|
|
11938
11944
|
});
|
|
11939
11945
|
SurveyQuestionSelectbase.prototype.renderItem = function (item, isFirst, cssClasses, index, isChecked) {
|
|
11940
11946
|
var renderedItem = _element_factory__WEBPACK_IMPORTED_MODULE_4__.ReactElementFactory.Instance.createElement(this.question.itemComponent, {
|
|
11941
|
-
key: item.
|
|
11947
|
+
key: item.uniqueId,
|
|
11942
11948
|
question: this.question,
|
|
11943
11949
|
cssClasses: cssClasses,
|
|
11944
11950
|
isDisplayMode: this.isDisplayMode,
|
|
@@ -13789,7 +13795,7 @@ var preact = react__WEBPACK_IMPORTED_MODULE_0__;
|
|
|
13789
13795
|
|
|
13790
13796
|
|
|
13791
13797
|
|
|
13792
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.3.
|
|
13798
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.3.11"), "survey-js-ui");
|
|
13793
13799
|
|
|
13794
13800
|
})();
|
|
13795
13801
|
|