survey-react-ui 1.9.101 → 1.9.103
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": "1.9.
|
|
3
|
+
"version": "1.9.103",
|
|
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",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"typings": "survey-react-ui.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"survey-core": "1.9.
|
|
24
|
+
"survey-core": "1.9.103",
|
|
25
25
|
"react": "^16.5.0 || ^17.0.1 || ^18.1.0",
|
|
26
26
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0"
|
|
27
27
|
}
|
package/survey-react-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.103
|
|
3
3
|
* Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -690,7 +690,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
690
690
|
|
|
691
691
|
|
|
692
692
|
|
|
693
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.
|
|
693
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.103", "survey-react-ui");
|
|
694
694
|
|
|
695
695
|
|
|
696
696
|
/***/ }),
|
|
@@ -1992,6 +1992,8 @@ var MatrixRow = /** @class */ (function (_super) {
|
|
|
1992
1992
|
MatrixRow.prototype.render = function () {
|
|
1993
1993
|
var _this = this;
|
|
1994
1994
|
var model = this.model;
|
|
1995
|
+
if (!model.visible)
|
|
1996
|
+
return null;
|
|
1995
1997
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", { className: model.className, "data-sv-drop-target-matrix-row": model.row && model.row.id, onPointerDown: function (event) { return _this.onPointerDownHandler(event); } }, this.props.children));
|
|
1996
1998
|
};
|
|
1997
1999
|
return MatrixRow;
|
|
@@ -3633,7 +3635,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
3633
3635
|
if (!!this.inputElement) {
|
|
3634
3636
|
var control = this.inputElement;
|
|
3635
3637
|
var newValue = this.question.dropdownListModel.inputStringRendered;
|
|
3636
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true)) {
|
|
3638
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true, false)) {
|
|
3637
3639
|
control.value = this.question.dropdownListModel.inputStringRendered;
|
|
3638
3640
|
}
|
|
3639
3641
|
}
|
|
@@ -5809,7 +5811,7 @@ var SurveyElementErrors = /** @class */ (function (_super) {
|
|
|
5809
5811
|
}
|
|
5810
5812
|
Object.defineProperty(SurveyElementErrors.prototype, "id", {
|
|
5811
5813
|
get: function () {
|
|
5812
|
-
return this.props.id;
|
|
5814
|
+
return this.props.element.id + "_errors";
|
|
5813
5815
|
},
|
|
5814
5816
|
enumerable: false,
|
|
5815
5817
|
configurable: true
|
|
@@ -5963,12 +5965,7 @@ var SurveyQuestionAndErrorsCell = /** @class */ (function (_super) {
|
|
|
5963
5965
|
};
|
|
5964
5966
|
SurveyQuestionAndErrorsCell.prototype.renderElement = function () {
|
|
5965
5967
|
var style = this.getCellStyle();
|
|
5966
|
-
|
|
5967
|
-
? this.renderErrors("tooltip")
|
|
5968
|
-
: null;
|
|
5969
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { ref: this.cellRef, className: this.itemCss, colSpan: this.props.cell.colSpans, "data-responsive-title": this.getHeaderText(), title: this.props.cell.getTitle(), style: style }, this.wrapCell(this.props.cell, (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.cellQuestionWrapper },
|
|
5970
|
-
this.renderContent(),
|
|
5971
|
-
errorsTooltip)))));
|
|
5968
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { ref: this.cellRef, className: this.itemCss, colSpan: this.props.cell.colSpans, "data-responsive-title": this.getHeaderText(), title: this.props.cell.getTitle(), style: style }, this.wrapCell(this.props.cell, (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.cellQuestionWrapper }, this.renderQuestion())))));
|
|
5972
5969
|
};
|
|
5973
5970
|
SurveyQuestionAndErrorsCell.prototype.getCellStyle = function () {
|
|
5974
5971
|
return null;
|
|
@@ -6992,7 +6989,7 @@ var SurveyQuestionUncontrolledElement = /** @class */ (function (_super) {
|
|
|
6992
6989
|
function SurveyQuestionUncontrolledElement(props) {
|
|
6993
6990
|
var _this = _super.call(this, props) || this;
|
|
6994
6991
|
_this.updateValueOnEvent = function (event) {
|
|
6995
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(_this.questionBase.value, event.target.value, false, true)) {
|
|
6992
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(_this.questionBase.value, event.target.value, false, true, false)) {
|
|
6996
6993
|
_this.setValueCore(event.target.value);
|
|
6997
6994
|
}
|
|
6998
6995
|
};
|
|
@@ -7016,7 +7013,7 @@ var SurveyQuestionUncontrolledElement = /** @class */ (function (_super) {
|
|
|
7016
7013
|
if (!!this.control) {
|
|
7017
7014
|
var control = this.control;
|
|
7018
7015
|
var newValue = this.getValueCore();
|
|
7019
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true)) {
|
|
7016
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true, false)) {
|
|
7020
7017
|
control.value = this.getValue(newValue);
|
|
7021
7018
|
}
|
|
7022
7019
|
}
|
|
@@ -7265,9 +7262,9 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
|
|
|
7265
7262
|
var questionCss = this.question.cssClasses;
|
|
7266
7263
|
var noFileChosen = null;
|
|
7267
7264
|
var chooseFile = null;
|
|
7268
|
-
chooseFile = this.question.isReadOnly ? null : Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_5__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { role: "button", tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.
|
|
7269
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.question.
|
|
7270
|
-
(!!this.question.cssClasses.chooseFileIconId) ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { title: this.question.
|
|
7265
|
+
chooseFile = this.question.isReadOnly ? null : Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_5__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { role: "button", tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonText },
|
|
7266
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.question.chooseButtonText),
|
|
7267
|
+
(!!this.question.cssClasses.chooseFileIconId) ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { title: this.question.chooseButtonText, iconName: this.question.cssClasses.chooseFileIconId, size: "auto" }) : null));
|
|
7271
7268
|
if (this.question.isEmpty()) {
|
|
7272
7269
|
noFileChosen = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.noFileChosen }, this.question.noFileChosenCaption));
|
|
7273
7270
|
}
|
|
@@ -7652,13 +7649,14 @@ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__["ReactQuestionFactory"].Inst
|
|
|
7652
7649
|
/*!********************************************************!*\
|
|
7653
7650
|
!*** ./src/react/reactquestion_matrixdropdownbase.tsx ***!
|
|
7654
7651
|
\********************************************************/
|
|
7655
|
-
/*! exports provided: SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell */
|
|
7652
|
+
/*! exports provided: SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownErrorCell */
|
|
7656
7653
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
7657
7654
|
|
|
7658
7655
|
"use strict";
|
|
7659
7656
|
__webpack_require__.r(__webpack_exports__);
|
|
7660
7657
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDropdownBase", function() { return SurveyQuestionMatrixDropdownBase; });
|
|
7661
7658
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDropdownCell", function() { return SurveyQuestionMatrixDropdownCell; });
|
|
7659
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDropdownErrorCell", function() { return SurveyQuestionMatrixDropdownErrorCell; });
|
|
7662
7660
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
7663
7661
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7664
7662
|
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
|
|
@@ -7867,6 +7865,11 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
|
|
|
7867
7865
|
if (cell.hasPanel) {
|
|
7868
7866
|
cellContent = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_panel__WEBPACK_IMPORTED_MODULE_5__["SurveyPanel"], { key: cell.panel.id, element: cell.panel, survey: this.question.survey, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode, creator: this.creator }));
|
|
7869
7867
|
}
|
|
7868
|
+
if (cell.isErrorsCell) {
|
|
7869
|
+
if (cell.isErrorsCell) {
|
|
7870
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixDropdownErrorCell, { cell: cell, creator: this.creator }));
|
|
7871
|
+
}
|
|
7872
|
+
}
|
|
7870
7873
|
if (!cellContent)
|
|
7871
7874
|
return null;
|
|
7872
7875
|
var readyCell = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, cellContent));
|
|
@@ -7921,6 +7924,7 @@ var SurveyQuestionMatrixHeaderRequired = /** @class */ (function (_super) {
|
|
|
7921
7924
|
if (!this.column.isRenderedRequired)
|
|
7922
7925
|
return null;
|
|
7923
7926
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
|
|
7927
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, "\u00A0"),
|
|
7924
7928
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.cellRequiredText }, this.column.requiredText)));
|
|
7925
7929
|
};
|
|
7926
7930
|
return SurveyQuestionMatrixHeaderRequired;
|
|
@@ -8012,6 +8016,56 @@ var SurveyQuestionMatrixDropdownCell = /** @class */ (function (_super) {
|
|
|
8012
8016
|
return SurveyQuestionMatrixDropdownCell;
|
|
8013
8017
|
}(_reactquestion__WEBPACK_IMPORTED_MODULE_2__["SurveyQuestionAndErrorsCell"]));
|
|
8014
8018
|
|
|
8019
|
+
var SurveyQuestionMatrixDropdownErrorCell = /** @class */ (function (_super) {
|
|
8020
|
+
__extends(SurveyQuestionMatrixDropdownErrorCell, _super);
|
|
8021
|
+
function SurveyQuestionMatrixDropdownErrorCell(props) {
|
|
8022
|
+
var _this = _super.call(this, props) || this;
|
|
8023
|
+
_this.state = {
|
|
8024
|
+
changed: 0
|
|
8025
|
+
};
|
|
8026
|
+
if (_this.cell) {
|
|
8027
|
+
_this.registerCallback(_this.cell);
|
|
8028
|
+
}
|
|
8029
|
+
return _this;
|
|
8030
|
+
}
|
|
8031
|
+
Object.defineProperty(SurveyQuestionMatrixDropdownErrorCell.prototype, "cell", {
|
|
8032
|
+
get: function () {
|
|
8033
|
+
return this.props.cell;
|
|
8034
|
+
},
|
|
8035
|
+
enumerable: false,
|
|
8036
|
+
configurable: true
|
|
8037
|
+
});
|
|
8038
|
+
SurveyQuestionMatrixDropdownErrorCell.prototype.update = function () {
|
|
8039
|
+
this.setState({ changed: this.state.changed + 1 });
|
|
8040
|
+
};
|
|
8041
|
+
SurveyQuestionMatrixDropdownErrorCell.prototype.registerCallback = function (cell) {
|
|
8042
|
+
var _this = this;
|
|
8043
|
+
cell.question.registerFunctionOnPropertyValueChanged("errors", function () {
|
|
8044
|
+
_this.update();
|
|
8045
|
+
}, "__reactSubscription");
|
|
8046
|
+
};
|
|
8047
|
+
SurveyQuestionMatrixDropdownErrorCell.prototype.unRegisterCallback = function (cell) {
|
|
8048
|
+
cell.question.unRegisterFunctionOnPropertyValueChanged("errors", "__reactSubscription");
|
|
8049
|
+
};
|
|
8050
|
+
SurveyQuestionMatrixDropdownErrorCell.prototype.componentDidUpdate = function (prevProps) {
|
|
8051
|
+
if (prevProps.cell && prevProps.cell !== this.cell) {
|
|
8052
|
+
this.unRegisterCallback(prevProps.cell);
|
|
8053
|
+
}
|
|
8054
|
+
if (this.cell) {
|
|
8055
|
+
this.registerCallback(this.cell);
|
|
8056
|
+
}
|
|
8057
|
+
};
|
|
8058
|
+
SurveyQuestionMatrixDropdownErrorCell.prototype.componentWillUnmount = function () {
|
|
8059
|
+
if (this.cell) {
|
|
8060
|
+
this.unRegisterCallback(this.cell);
|
|
8061
|
+
}
|
|
8062
|
+
};
|
|
8063
|
+
SurveyQuestionMatrixDropdownErrorCell.prototype.render = function () {
|
|
8064
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_reactquestion__WEBPACK_IMPORTED_MODULE_2__["SurveyElementErrors"], { element: this.cell.question, creator: this.props.creator, cssClasses: this.cell.question.cssClasses });
|
|
8065
|
+
};
|
|
8066
|
+
return SurveyQuestionMatrixDropdownErrorCell;
|
|
8067
|
+
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]));
|
|
8068
|
+
|
|
8015
8069
|
|
|
8016
8070
|
|
|
8017
8071
|
/***/ }),
|
|
@@ -8259,7 +8313,7 @@ var SurveyMultipleTextItem = /** @class */ (function (_super) {
|
|
|
8259
8313
|
this.renderItemTooltipError(item, cssClasses)));
|
|
8260
8314
|
};
|
|
8261
8315
|
SurveyMultipleTextItem.prototype.renderItemTooltipError = function (item, cssClasses) {
|
|
8262
|
-
return this.item.editor.isErrorsModeTooltip ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_reactquestion__WEBPACK_IMPORTED_MODULE_2__["SurveyElementErrors"], { element: item.editor, cssClasses: cssClasses, creator: this.creator, location: "tooltip"
|
|
8316
|
+
return this.item.editor.isErrorsModeTooltip ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_reactquestion__WEBPACK_IMPORTED_MODULE_2__["SurveyElementErrors"], { element: item.editor, cssClasses: cssClasses, creator: this.creator, location: "tooltip" })) : null;
|
|
8263
8317
|
};
|
|
8264
8318
|
return SurveyMultipleTextItem;
|
|
8265
8319
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
|
@@ -9867,7 +9921,7 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
|
9867
9921
|
if (!!this.inputElement) {
|
|
9868
9922
|
var control = this.inputElement;
|
|
9869
9923
|
var newValue = this.model.inputStringRendered;
|
|
9870
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true)) {
|
|
9924
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true, false)) {
|
|
9871
9925
|
control.value = this.model.inputStringRendered;
|
|
9872
9926
|
}
|
|
9873
9927
|
}
|
|
@@ -10431,12 +10485,6 @@ var settings = {
|
|
|
10431
10485
|
*
|
|
10432
10486
|
* - `caseSensitive`: `Boolean`\
|
|
10433
10487
|
* Specifies whether to differentiate between capital and lower-case letters. Default value: `false`.
|
|
10434
|
-
*
|
|
10435
|
-
* - `normalizedTextCallback`: `(str: string, reason: string) => string`
|
|
10436
|
-
* Use the following function { str.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); }
|
|
10437
|
-
* If you want to 'Brouillé' to be equal to 'Brouille'.
|
|
10438
|
-
* Use the following function { return reason === "filter" ? str.normalize("NFD").replace(/[\u0300-\u036f]/g, ""): ""; }
|
|
10439
|
-
* If you want to use this functionality during filtering only, for example in list.
|
|
10440
10488
|
*/
|
|
10441
10489
|
comparator: {
|
|
10442
10490
|
trimStrings: true,
|
|
@@ -10570,11 +10618,22 @@ var settings = {
|
|
|
10570
10618
|
* - `"icon"` - Users can only use the choice item icon as a drag handle.
|
|
10571
10619
|
*/
|
|
10572
10620
|
rankingDragHandleArea: "entireItem",
|
|
10621
|
+
environment: defaultEnvironment,
|
|
10573
10622
|
/**
|
|
10574
|
-
*
|
|
10623
|
+
* Allows you to hide the maximum length indicator in text input questions.
|
|
10624
|
+
*
|
|
10625
|
+
* If you specify a question's [`maxLength`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#maxLength) property or a survey's [`maxTextLength`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#maxTextLength) property, text input questions indicate the number of entered characters and the character limit. Assign `false` to the `settings.showMaxLengthIndicator` property if you want to hide this indicator.
|
|
10626
|
+
*
|
|
10627
|
+
* Default value: `true`
|
|
10575
10628
|
*/
|
|
10576
|
-
environment: defaultEnvironment,
|
|
10577
10629
|
showMaxLengthIndicator: true,
|
|
10630
|
+
/**
|
|
10631
|
+
* An object that specifies heading levels (`<h1>`, `<h2>`, etc.) to use when rendering survey, page, panel, and question titles.
|
|
10632
|
+
*
|
|
10633
|
+
* Default value: `{ survey: "h3", page: "h4", panel: "h4", question: "h5" }`
|
|
10634
|
+
*
|
|
10635
|
+
* If you want to modify heading levels for individual titles, handle `SurveyModel`'s [`onGetTitleTagName`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetTitleTagName) event.
|
|
10636
|
+
*/
|
|
10578
10637
|
titleTags: {
|
|
10579
10638
|
survey: "h3",
|
|
10580
10639
|
page: "h4",
|