survey-js-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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v2.3.12
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
  */
@@ -156,20 +156,16 @@ class SurveyElementBase extends x$2 {
156
156
  super(props);
157
157
  this._allowComponentUpdate = true;
158
158
  this.prevStateElements = [];
159
- this.propertyValueChangedHandler = (hash, key, val) => {
160
- if (hash[key] !== val) {
161
- hash[key] = val;
162
- if (!this.canUsePropInState(key))
163
- return;
164
- if (this.isRendering)
165
- return;
166
- this.changedStatePropNameValue = key;
167
- this.setState((state) => {
168
- var newState = {};
169
- newState[key] = val;
170
- return newState;
171
- });
172
- }
159
+ this.propertyValueChangedHandler = (stateElement, options) => {
160
+ const key = options.name;
161
+ if (!this.canUsePropInState(key) || this.isRendering)
162
+ return;
163
+ this.changedStatePropNameValue = key;
164
+ this.setState((state) => {
165
+ var newState = {};
166
+ newState[key] = options.newValue;
167
+ return newState;
168
+ });
173
169
  };
174
170
  this.onArrayChangedCallback = (stateElement, options) => {
175
171
  if (this.isRendering)
@@ -295,22 +291,11 @@ class SurveyElementBase extends x$2 {
295
291
  canMakeReact(stateElement) {
296
292
  return !!stateElement && !!stateElement.iteratePropertiesHash;
297
293
  }
298
- isCurrentStateElement(stateElement) {
299
- return !!stateElement && !!stateElement.setPropertyValueCoreHandler && stateElement.setPropertyValueCoreHandler === this.propertyValueChangedHandler;
300
- }
301
294
  makeBaseElementReact(stateElement) {
302
295
  if (!this.canMakeReact(stateElement))
303
296
  return;
304
- stateElement.iteratePropertiesHash((hash, key) => {
305
- if (!this.canUsePropInState(key))
306
- return;
307
- var val = hash[key];
308
- if (Array.isArray(val)) {
309
- var val = val;
310
- stateElement.addOnArrayChangedCallback(val, this.onArrayChangedCallback);
311
- }
312
- });
313
- stateElement.setPropertyValueCoreHandler = this.propertyValueChangedHandler;
297
+ stateElement.addOnArrayChangedCallback(this.onArrayChangedCallback);
298
+ stateElement.addOnPropertyValueChangedCallback(this.propertyValueChangedHandler);
314
299
  }
315
300
  canUsePropInState(key) {
316
301
  return true;
@@ -318,15 +303,8 @@ class SurveyElementBase extends x$2 {
318
303
  unMakeBaseElementReact(stateElement) {
319
304
  if (!this.canMakeReact(stateElement))
320
305
  return;
321
- if (!this.isCurrentStateElement(stateElement)) ;
322
- stateElement.setPropertyValueCoreHandler = undefined;
323
- stateElement.iteratePropertiesHash((hash, key) => {
324
- var val = hash[key];
325
- if (Array.isArray(val)) {
326
- var val = val;
327
- stateElement.removeOnArrayChangedCallback(val, this.onArrayChangedCallback);
328
- }
329
- });
306
+ stateElement.removeOnPropertyValueChangedCallback(this.propertyValueChangedHandler);
307
+ stateElement.removeOnArrayChangedCallback(this.onArrayChangedCallback);
330
308
  }
331
309
  }
332
310
  class ReactSurveyElement extends SurveyElementBase {
@@ -1131,7 +1109,7 @@ class PopupModal extends SurveyElementBase {
1131
1109
  PopupModal.modalDescriptors = [];
1132
1110
 
1133
1111
  /*!
1134
- * surveyjs - Survey JavaScript library v2.3.12
1112
+ * surveyjs - Survey JavaScript library v2.3.13
1135
1113
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1136
1114
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
1137
1115
  */
@@ -1201,7 +1179,7 @@ var iconsV1 = {
1201
1179
  };
1202
1180
 
1203
1181
  /*!
1204
- * surveyjs - Survey JavaScript library v2.3.12
1182
+ * surveyjs - Survey JavaScript library v2.3.13
1205
1183
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
1206
1184
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
1207
1185
  */
@@ -1792,9 +1770,8 @@ class SurveyRow extends SurveyElementBase {
1792
1770
  this.row.isNeedRender = !this.row.isLazyRendering();
1793
1771
  }
1794
1772
  componentWillUnmount() {
1795
- const isCurrentStateElement = this.isCurrentStateElement(this.getStateElement());
1796
1773
  super.componentWillUnmount();
1797
- if (isCurrentStateElement) {
1774
+ if (!!this.row) {
1798
1775
  this.row.setRootElement(undefined);
1799
1776
  this.stopLazyRendering();
1800
1777
  }
@@ -6280,7 +6257,7 @@ SurveyModel.prototype["render"] = function (element = null) {
6280
6257
  }
6281
6258
  };
6282
6259
  const preact = React;
6283
- checkLibraryVersion(`${"2.3.12"}`, "survey-js-ui");
6260
+ checkLibraryVersion(`${"2.3.13"}`, "survey-js-ui");
6284
6261
 
6285
6262
  export { CharacterCounterComponent, O as Children, x$2 as Component, ComponentsContainer, k$2 as Fragment, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, N as PureComponent, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, SliderLabelItem, Cn as StrictMode, 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, P as Suspense, B as SuspenseList, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click, _n as cloneElement, Q$1 as createContext, _$1 as createElement, dn as createFactory, $ as createPortal, b$1 as createRef, Sn as findDOMNode, En as flushSync, D as forwardRef, tn as hydrate, pn as isFragment, yn as isMemo, mn as isValidElement, z as lazy, M as memo, preact, nn as render, renderPopupSurvey, renderSurvey, R as startTransition, bn as unmountComponentAtNode, gn as unstable_batchedUpdates, q$1 as useCallback, x$1 as useContext, P$1 as useDebugValue, w as useDeferredValue, y as useEffect, g$1 as useId, F$1 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$1 as useMemo, h as useReducer, A$1 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
6286
6263
  //# sourceMappingURL=survey-js-ui.mjs.map