survey-react-ui 2.3.12 → 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/fesm/survey-react-ui.mjs
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
|
*/
|
|
@@ -103,20 +103,16 @@ class SurveyElementBase extends React.Component {
|
|
|
103
103
|
super(props);
|
|
104
104
|
this._allowComponentUpdate = true;
|
|
105
105
|
this.prevStateElements = [];
|
|
106
|
-
this.propertyValueChangedHandler = (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
newState[key] = val;
|
|
117
|
-
return newState;
|
|
118
|
-
});
|
|
119
|
-
}
|
|
106
|
+
this.propertyValueChangedHandler = (stateElement, options) => {
|
|
107
|
+
const key = options.name;
|
|
108
|
+
if (!this.canUsePropInState(key) || this.isRendering)
|
|
109
|
+
return;
|
|
110
|
+
this.changedStatePropNameValue = key;
|
|
111
|
+
this.setState((state) => {
|
|
112
|
+
var newState = {};
|
|
113
|
+
newState[key] = options.newValue;
|
|
114
|
+
return newState;
|
|
115
|
+
});
|
|
120
116
|
};
|
|
121
117
|
this.onArrayChangedCallback = (stateElement, options) => {
|
|
122
118
|
if (this.isRendering)
|
|
@@ -242,22 +238,11 @@ class SurveyElementBase extends React.Component {
|
|
|
242
238
|
canMakeReact(stateElement) {
|
|
243
239
|
return !!stateElement && !!stateElement.iteratePropertiesHash;
|
|
244
240
|
}
|
|
245
|
-
isCurrentStateElement(stateElement) {
|
|
246
|
-
return !!stateElement && !!stateElement.setPropertyValueCoreHandler && stateElement.setPropertyValueCoreHandler === this.propertyValueChangedHandler;
|
|
247
|
-
}
|
|
248
241
|
makeBaseElementReact(stateElement) {
|
|
249
242
|
if (!this.canMakeReact(stateElement))
|
|
250
243
|
return;
|
|
251
|
-
stateElement.
|
|
252
|
-
|
|
253
|
-
return;
|
|
254
|
-
var val = hash[key];
|
|
255
|
-
if (Array.isArray(val)) {
|
|
256
|
-
var val = val;
|
|
257
|
-
stateElement.addOnArrayChangedCallback(val, this.onArrayChangedCallback);
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
stateElement.setPropertyValueCoreHandler = this.propertyValueChangedHandler;
|
|
244
|
+
stateElement.addOnArrayChangedCallback(this.onArrayChangedCallback);
|
|
245
|
+
stateElement.addOnPropertyValueChangedCallback(this.propertyValueChangedHandler);
|
|
261
246
|
}
|
|
262
247
|
canUsePropInState(key) {
|
|
263
248
|
return true;
|
|
@@ -265,15 +250,8 @@ class SurveyElementBase extends React.Component {
|
|
|
265
250
|
unMakeBaseElementReact(stateElement) {
|
|
266
251
|
if (!this.canMakeReact(stateElement))
|
|
267
252
|
return;
|
|
268
|
-
|
|
269
|
-
stateElement.
|
|
270
|
-
stateElement.iteratePropertiesHash((hash, key) => {
|
|
271
|
-
var val = hash[key];
|
|
272
|
-
if (Array.isArray(val)) {
|
|
273
|
-
var val = val;
|
|
274
|
-
stateElement.removeOnArrayChangedCallback(val, this.onArrayChangedCallback);
|
|
275
|
-
}
|
|
276
|
-
});
|
|
253
|
+
stateElement.removeOnPropertyValueChangedCallback(this.propertyValueChangedHandler);
|
|
254
|
+
stateElement.removeOnArrayChangedCallback(this.onArrayChangedCallback);
|
|
277
255
|
}
|
|
278
256
|
}
|
|
279
257
|
class ReactSurveyElement extends SurveyElementBase {
|
|
@@ -1078,7 +1056,7 @@ class PopupModal extends SurveyElementBase {
|
|
|
1078
1056
|
PopupModal.modalDescriptors = [];
|
|
1079
1057
|
|
|
1080
1058
|
/*!
|
|
1081
|
-
* surveyjs - Survey JavaScript library v2.3.
|
|
1059
|
+
* surveyjs - Survey JavaScript library v2.3.13
|
|
1082
1060
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1083
1061
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1084
1062
|
*/
|
|
@@ -1148,7 +1126,7 @@ var iconsV1 = {
|
|
|
1148
1126
|
};
|
|
1149
1127
|
|
|
1150
1128
|
/*!
|
|
1151
|
-
* surveyjs - Survey JavaScript library v2.3.
|
|
1129
|
+
* surveyjs - Survey JavaScript library v2.3.13
|
|
1152
1130
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1153
1131
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1154
1132
|
*/
|
|
@@ -1739,9 +1717,8 @@ class SurveyRow extends SurveyElementBase {
|
|
|
1739
1717
|
this.row.isNeedRender = !this.row.isLazyRendering();
|
|
1740
1718
|
}
|
|
1741
1719
|
componentWillUnmount() {
|
|
1742
|
-
const isCurrentStateElement = this.isCurrentStateElement(this.getStateElement());
|
|
1743
1720
|
super.componentWillUnmount();
|
|
1744
|
-
if (
|
|
1721
|
+
if (!!this.row) {
|
|
1745
1722
|
this.row.setRootElement(undefined);
|
|
1746
1723
|
this.stopLazyRendering();
|
|
1747
1724
|
}
|
|
@@ -6178,7 +6155,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
|
|
|
6178
6155
|
return React.createElement(SurveyLocStringEditor, props);
|
|
6179
6156
|
});
|
|
6180
6157
|
|
|
6181
|
-
checkLibraryVersion(`${"2.3.
|
|
6158
|
+
checkLibraryVersion(`${"2.3.13"}`, "survey-react-ui");
|
|
6182
6159
|
|
|
6183
6160
|
export { CharacterCounterComponent, ComponentsContainer, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, SliderLabelItem, Survey, SurveyActionBar, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFileItem, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyNavigationButton, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionButtonGroup, SurveyQuestionButtonGroupDropdown, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImagePicker, SurveyQuestionMatrix, SurveyQuestionMatrixCell, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixRow, SurveyQuestionMultipleText, SurveyQuestionOptionItem, SurveyQuestionPanelDynamic, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicProgressText, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionRadioItem, SurveyQuestionRadiogroup, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionSignaturePad, SurveyQuestionSlider, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyRow, SurveyTimerPanel, SurveyWindow, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click };
|
|
6184
6161
|
//# sourceMappingURL=survey-react-ui.mjs.map
|