survey-react-ui 2.3.11 → 2.3.13
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 +19 -42
- package/fesm/survey-react-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-react-ui.js +19 -48
- 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/reactquestion_element.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-react-ui",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.13",
|
|
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.13",
|
|
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.13
|
|
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.13
|
|
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.13
|
|
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
|
*/
|
|
@@ -7933,20 +7933,16 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
7933
7933
|
var _this = _super.call(this, props) || this;
|
|
7934
7934
|
_this._allowComponentUpdate = true;
|
|
7935
7935
|
_this.prevStateElements = [];
|
|
7936
|
-
_this.propertyValueChangedHandler = function (
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
newState[key] = val;
|
|
7947
|
-
return newState;
|
|
7948
|
-
});
|
|
7949
|
-
}
|
|
7936
|
+
_this.propertyValueChangedHandler = function (stateElement, options) {
|
|
7937
|
+
var key = options.name;
|
|
7938
|
+
if (!_this.canUsePropInState(key) || _this.isRendering)
|
|
7939
|
+
return;
|
|
7940
|
+
_this.changedStatePropNameValue = key;
|
|
7941
|
+
_this.setState(function (state) {
|
|
7942
|
+
var newState = {};
|
|
7943
|
+
newState[key] = options.newValue;
|
|
7944
|
+
return newState;
|
|
7945
|
+
});
|
|
7950
7946
|
};
|
|
7951
7947
|
_this.onArrayChangedCallback = function (stateElement, options) {
|
|
7952
7948
|
if (_this.isRendering)
|
|
@@ -8100,44 +8096,20 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
|
8100
8096
|
SurveyElementBase.prototype.canMakeReact = function (stateElement) {
|
|
8101
8097
|
return !!stateElement && !!stateElement.iteratePropertiesHash;
|
|
8102
8098
|
};
|
|
8103
|
-
SurveyElementBase.prototype.isCurrentStateElement = function (stateElement) {
|
|
8104
|
-
return !!stateElement && !!stateElement.setPropertyValueCoreHandler && stateElement.setPropertyValueCoreHandler === this.propertyValueChangedHandler;
|
|
8105
|
-
};
|
|
8106
8099
|
SurveyElementBase.prototype.makeBaseElementReact = function (stateElement) {
|
|
8107
|
-
var _this = this;
|
|
8108
8100
|
if (!this.canMakeReact(stateElement))
|
|
8109
8101
|
return;
|
|
8110
|
-
stateElement.
|
|
8111
|
-
|
|
8112
|
-
return;
|
|
8113
|
-
var val = hash[key];
|
|
8114
|
-
if (Array.isArray(val)) {
|
|
8115
|
-
var val = val;
|
|
8116
|
-
stateElement.addOnArrayChangedCallback(val, _this.onArrayChangedCallback);
|
|
8117
|
-
}
|
|
8118
|
-
});
|
|
8119
|
-
stateElement.setPropertyValueCoreHandler = this.propertyValueChangedHandler;
|
|
8102
|
+
stateElement.addOnArrayChangedCallback(this.onArrayChangedCallback);
|
|
8103
|
+
stateElement.addOnPropertyValueChangedCallback(this.propertyValueChangedHandler);
|
|
8120
8104
|
};
|
|
8121
8105
|
SurveyElementBase.prototype.canUsePropInState = function (key) {
|
|
8122
8106
|
return true;
|
|
8123
8107
|
};
|
|
8124
8108
|
SurveyElementBase.prototype.unMakeBaseElementReact = function (stateElement) {
|
|
8125
|
-
var _this = this;
|
|
8126
8109
|
if (!this.canMakeReact(stateElement))
|
|
8127
8110
|
return;
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
// console.warn("Looks like the component is bound to another survey element. It is not supported and can lead to issues.");
|
|
8131
|
-
// return;
|
|
8132
|
-
}
|
|
8133
|
-
stateElement.setPropertyValueCoreHandler = undefined;
|
|
8134
|
-
stateElement.iteratePropertiesHash(function (hash, key) {
|
|
8135
|
-
var val = hash[key];
|
|
8136
|
-
if (Array.isArray(val)) {
|
|
8137
|
-
var val = val;
|
|
8138
|
-
stateElement.removeOnArrayChangedCallback(val, _this.onArrayChangedCallback);
|
|
8139
|
-
}
|
|
8140
|
-
});
|
|
8111
|
+
stateElement.removeOnPropertyValueChangedCallback(this.propertyValueChangedHandler);
|
|
8112
|
+
stateElement.removeOnArrayChangedCallback(this.onArrayChangedCallback);
|
|
8141
8113
|
};
|
|
8142
8114
|
return SurveyElementBase;
|
|
8143
8115
|
}(react__WEBPACK_IMPORTED_MODULE_0__.Component));
|
|
@@ -11327,9 +11299,8 @@ var SurveyRow = /** @class */ (function (_super) {
|
|
|
11327
11299
|
this.row.isNeedRender = !this.row.isLazyRendering();
|
|
11328
11300
|
};
|
|
11329
11301
|
SurveyRow.prototype.componentWillUnmount = function () {
|
|
11330
|
-
var isCurrentStateElement = this.isCurrentStateElement(this.getStateElement());
|
|
11331
11302
|
_super.prototype.componentWillUnmount.call(this);
|
|
11332
|
-
if (
|
|
11303
|
+
if (!!this.row) {
|
|
11333
11304
|
this.row.setRootElement(undefined);
|
|
11334
11305
|
this.stopLazyRendering();
|
|
11335
11306
|
}
|
|
@@ -12121,7 +12092,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12121
12092
|
|
|
12122
12093
|
|
|
12123
12094
|
|
|
12124
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.3.
|
|
12095
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.3.13"), "survey-react-ui");
|
|
12125
12096
|
|
|
12126
12097
|
})();
|
|
12127
12098
|
|