survey-js-ui 2.3.12 → 2.3.14
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-js-ui.mjs +20 -45
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +20 -51
- package/survey-js-ui.js.map +1 -1
- package/survey-js-ui.min.js +1 -1
- package/survey-js-ui.min.js.LICENSE.txt +1 -1
- package/typings/survey-react-ui/src/reactquestion_element.d.ts +0 -1
package/fesm/survey-js-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.3.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.3.14
|
|
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 = (
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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.
|
|
305
|
-
|
|
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
|
-
|
|
322
|
-
stateElement.
|
|
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.
|
|
1112
|
+
* surveyjs - Survey JavaScript library v2.3.14
|
|
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.
|
|
1182
|
+
* surveyjs - Survey JavaScript library v2.3.14
|
|
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 (
|
|
1774
|
+
if (!!this.row) {
|
|
1798
1775
|
this.row.setRootElement(undefined);
|
|
1799
1776
|
this.stopLazyRendering();
|
|
1800
1777
|
}
|
|
@@ -2298,8 +2275,6 @@ class SurveyQuestion extends SurveyElementBase {
|
|
|
2298
2275
|
_$1(SurveyQuestionCommentItem, { question: this.question, cssClasses: cssClasses, isDisplayMode: this.question.isInputReadOnly })));
|
|
2299
2276
|
}
|
|
2300
2277
|
renderHeader(question) {
|
|
2301
|
-
if (question.singleInputHideHeader)
|
|
2302
|
-
return null;
|
|
2303
2278
|
return _$1(SurveyElementHeader, { element: question });
|
|
2304
2279
|
}
|
|
2305
2280
|
renderErrors(cssClasses, location) {
|
|
@@ -3860,7 +3835,7 @@ class SurveyFileItem extends SurveyElementBase {
|
|
|
3860
3835
|
return (_$1("div", { className: className },
|
|
3861
3836
|
_$1("a", { href: val.content, onClick: event => {
|
|
3862
3837
|
this.question.doDownloadFile(event, val);
|
|
3863
|
-
}, title: val.name, download: val.name, style: { width: this.question.imageWidth } }, val.name)));
|
|
3838
|
+
}, title: val.name, download: val.name, target: "_blank", rel: "noreferrer", style: { width: this.question.imageWidth } }, val.name)));
|
|
3864
3839
|
}
|
|
3865
3840
|
renderElement() {
|
|
3866
3841
|
const val = this.item;
|
|
@@ -6280,7 +6255,7 @@ SurveyModel.prototype["render"] = function (element = null) {
|
|
|
6280
6255
|
}
|
|
6281
6256
|
};
|
|
6282
6257
|
const preact = React;
|
|
6283
|
-
checkLibraryVersion(`${"2.3.
|
|
6258
|
+
checkLibraryVersion(`${"2.3.14"}`, "survey-js-ui");
|
|
6284
6259
|
|
|
6285
6260
|
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
6261
|
//# sourceMappingURL=survey-js-ui.mjs.map
|