survey-react-ui 1.11.8 → 1.11.9
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.11.
|
|
3
|
+
"version": "1.11.9",
|
|
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
|
"peerDependencies": {
|
|
24
|
-
"survey-core": "1.11.
|
|
24
|
+
"survey-core": "1.11.9",
|
|
25
25
|
"react": "^16.5.0 || ^17.0.1 || ^18.2.0",
|
|
26
26
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.2.0"
|
|
27
27
|
}
|
package/survey-react-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.11.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.11.9
|
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -750,7 +750,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
750
750
|
|
|
751
751
|
|
|
752
752
|
|
|
753
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.11.
|
|
753
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.11.9", "survey-react-ui");
|
|
754
754
|
|
|
755
755
|
|
|
756
756
|
/***/ }),
|
|
@@ -2151,6 +2151,18 @@ var List = /** @class */ (function (_super) {
|
|
|
2151
2151
|
this.model.initListContainerHtmlElement(this.listContainerRef.current);
|
|
2152
2152
|
}
|
|
2153
2153
|
};
|
|
2154
|
+
List.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
2155
|
+
var _a;
|
|
2156
|
+
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
|
2157
|
+
if (this.model !== prevProps.model) {
|
|
2158
|
+
if (this.model && !!((_a = this.listContainerRef) === null || _a === void 0 ? void 0 : _a.current)) {
|
|
2159
|
+
this.model.initListContainerHtmlElement(this.listContainerRef.current);
|
|
2160
|
+
}
|
|
2161
|
+
if (prevProps.model) {
|
|
2162
|
+
prevProps.model.initListContainerHtmlElement(undefined);
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
};
|
|
2154
2166
|
List.prototype.componentWillUnmount = function () {
|
|
2155
2167
|
_super.prototype.componentWillUnmount.call(this);
|
|
2156
2168
|
if (!!this.model) {
|
|
@@ -7872,19 +7884,19 @@ var SurveyQuestionElementBase = /** @class */ (function (_super) {
|
|
|
7872
7884
|
SurveyQuestionElementBase.prototype.componentWillUnmount = function () {
|
|
7873
7885
|
_super.prototype.componentWillUnmount.call(this);
|
|
7874
7886
|
if (!!this.questionBase) {
|
|
7875
|
-
var
|
|
7876
|
-
this.questionBase.beforeDestroyQuestionElement(
|
|
7877
|
-
if (!!
|
|
7878
|
-
|
|
7887
|
+
var contentElement = this.content || this.control;
|
|
7888
|
+
this.questionBase.beforeDestroyQuestionElement(contentElement);
|
|
7889
|
+
if (!!contentElement) {
|
|
7890
|
+
contentElement.removeAttribute("data-rendered");
|
|
7879
7891
|
}
|
|
7880
7892
|
}
|
|
7881
7893
|
};
|
|
7882
7894
|
SurveyQuestionElementBase.prototype.updateDomElement = function () {
|
|
7883
|
-
var
|
|
7884
|
-
if (!!
|
|
7885
|
-
if (
|
|
7886
|
-
|
|
7887
|
-
this.questionBase.afterRenderQuestionElement(
|
|
7895
|
+
var contentElement = this.content || this.control;
|
|
7896
|
+
if (!!contentElement) {
|
|
7897
|
+
if (contentElement.getAttribute("data-rendered") !== "r") {
|
|
7898
|
+
contentElement.setAttribute("data-rendered", "r");
|
|
7899
|
+
this.questionBase.afterRenderQuestionElement(contentElement);
|
|
7888
7900
|
}
|
|
7889
7901
|
}
|
|
7890
7902
|
};
|
|
@@ -7942,6 +7954,11 @@ var SurveyQuestionElementBase = /** @class */ (function (_super) {
|
|
|
7942
7954
|
this.control = element;
|
|
7943
7955
|
}
|
|
7944
7956
|
};
|
|
7957
|
+
SurveyQuestionElementBase.prototype.setContent = function (element) {
|
|
7958
|
+
if (!!element) {
|
|
7959
|
+
this.content = element;
|
|
7960
|
+
}
|
|
7961
|
+
};
|
|
7945
7962
|
return SurveyQuestionElementBase;
|
|
7946
7963
|
}(SurveyElementBase));
|
|
7947
7964
|
|
|
@@ -8227,7 +8244,7 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
|
|
|
8227
8244
|
else {
|
|
8228
8245
|
fileInput = null;
|
|
8229
8246
|
}
|
|
8230
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.fileRootCss },
|
|
8247
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.fileRootCss, ref: function (el) { return (_this.setContent(el)); } },
|
|
8231
8248
|
fileInput,
|
|
8232
8249
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.dragArea, onDrop: this.question.onDrop, onDragOver: this.question.onDragOver, onDragLeave: this.question.onDragLeave, onDragEnter: this.question.onDragEnter },
|
|
8233
8250
|
fileDecorator,
|