survey-js-ui 2.3.10 → 2.3.11
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 +35 -34
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +40 -34
- 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/components/title/title-actions.d.ts +1 -0
- package/typings/survey-react-ui/src/imagepicker.d.ts +1 -1
- package/typings/survey-react-ui/src/reactquestion_comment.d.ts +2 -2
- package/typings/survey-react-ui/src/reactquestion_element.d.ts +1 -0
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.11
|
|
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
|
*/
|
|
@@ -171,6 +171,16 @@ class SurveyElementBase extends x$2 {
|
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
|
+
this.onArrayChangedCallback = (stateElement, options) => {
|
|
175
|
+
if (this.isRendering)
|
|
176
|
+
return;
|
|
177
|
+
this.changedStatePropNameValue = options.name;
|
|
178
|
+
this.setState((state) => {
|
|
179
|
+
var newState = {};
|
|
180
|
+
newState[options.name] = options.newValue;
|
|
181
|
+
return newState;
|
|
182
|
+
});
|
|
183
|
+
};
|
|
174
184
|
}
|
|
175
185
|
componentDidMount() {
|
|
176
186
|
this.makeBaseElementsReact();
|
|
@@ -297,16 +307,7 @@ class SurveyElementBase extends x$2 {
|
|
|
297
307
|
var val = hash[key];
|
|
298
308
|
if (Array.isArray(val)) {
|
|
299
309
|
var val = val;
|
|
300
|
-
val
|
|
301
|
-
if (this.isRendering)
|
|
302
|
-
return;
|
|
303
|
-
this.changedStatePropNameValue = key;
|
|
304
|
-
this.setState((state) => {
|
|
305
|
-
var newState = {};
|
|
306
|
-
newState[key] = val;
|
|
307
|
-
return newState;
|
|
308
|
-
});
|
|
309
|
-
};
|
|
310
|
+
stateElement.addOnArrayChangedCallback(val, this.onArrayChangedCallback);
|
|
310
311
|
}
|
|
311
312
|
});
|
|
312
313
|
stateElement.setPropertyValueCoreHandler = this.propertyValueChangedHandler;
|
|
@@ -323,7 +324,7 @@ class SurveyElementBase extends x$2 {
|
|
|
323
324
|
var val = hash[key];
|
|
324
325
|
if (Array.isArray(val)) {
|
|
325
326
|
var val = val;
|
|
326
|
-
val
|
|
327
|
+
stateElement.removeOnArrayChangedCallback(val, this.onArrayChangedCallback);
|
|
327
328
|
}
|
|
328
329
|
});
|
|
329
330
|
}
|
|
@@ -854,13 +855,16 @@ class TitleActions extends x$2 {
|
|
|
854
855
|
get element() {
|
|
855
856
|
return this.props.element;
|
|
856
857
|
}
|
|
858
|
+
get renderActions() {
|
|
859
|
+
return this.props.renderActions === undefined ? true : this.props.renderActions;
|
|
860
|
+
}
|
|
857
861
|
render() {
|
|
858
862
|
const titleContent = _$1(TitleContent, { element: this.element, cssClasses: this.cssClasses });
|
|
859
863
|
if (!this.element.hasTitleActions)
|
|
860
864
|
return titleContent;
|
|
861
865
|
return (_$1("div", { className: "sv-title-actions" },
|
|
862
866
|
_$1("span", { className: "sv-title-actions__title" }, titleContent),
|
|
863
|
-
_$1(SurveyActionBar, { model: this.element.getTitleToolbar() })));
|
|
867
|
+
(this.renderActions ? _$1(SurveyActionBar, { model: this.element.getTitleToolbar() }) : null)));
|
|
864
868
|
}
|
|
865
869
|
}
|
|
866
870
|
RendererFactory.Instance.registerRenderer("element", "title-actions", "sv-title-actions");
|
|
@@ -887,7 +891,7 @@ class TitleElement extends x$2 {
|
|
|
887
891
|
return null;
|
|
888
892
|
const ariaLabel = element.titleAriaLabel || undefined;
|
|
889
893
|
const titleExpandableSvg = this.renderTitleExpandableSvg();
|
|
890
|
-
const titleContent = (_$1(TitleActions, { element: element, cssClasses: element.cssClasses }));
|
|
894
|
+
const titleContent = (_$1(TitleActions, { element: element, cssClasses: element.cssClasses, renderActions: this.props.renderActions }));
|
|
891
895
|
let onClick = undefined;
|
|
892
896
|
let onKeyUp = undefined;
|
|
893
897
|
if (element.hasTitleEvents) {
|
|
@@ -1127,7 +1131,7 @@ class PopupModal extends SurveyElementBase {
|
|
|
1127
1131
|
PopupModal.modalDescriptors = [];
|
|
1128
1132
|
|
|
1129
1133
|
/*!
|
|
1130
|
-
* surveyjs - Survey JavaScript library v2.3.
|
|
1134
|
+
* surveyjs - Survey JavaScript library v2.3.11
|
|
1131
1135
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1132
1136
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1133
1137
|
*/
|
|
@@ -1197,7 +1201,7 @@ var iconsV1 = {
|
|
|
1197
1201
|
};
|
|
1198
1202
|
|
|
1199
1203
|
/*!
|
|
1200
|
-
* surveyjs - Survey JavaScript library v2.3.
|
|
1204
|
+
* surveyjs - Survey JavaScript library v2.3.11
|
|
1201
1205
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1202
1206
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1203
1207
|
*/
|
|
@@ -1981,7 +1985,7 @@ class SurveyQuestionCommentValueItem extends SurveyQuestionCommentItem {
|
|
|
1981
1985
|
getTextAreaModel() {
|
|
1982
1986
|
return this.props.question.getCommentTextAreaModel(this.props.item);
|
|
1983
1987
|
}
|
|
1984
|
-
getKey() { return this.props.item.
|
|
1988
|
+
getKey() { return this.props.item.uniqueId; }
|
|
1985
1989
|
}
|
|
1986
1990
|
ReactQuestionFactory.Instance.registerQuestion("comment", (props) => {
|
|
1987
1991
|
return _$1(SurveyQuestionComment, props);
|
|
@@ -2760,7 +2764,7 @@ class SurveyQuestionSelectbase extends SurveyQuestionElementBase {
|
|
|
2760
2764
|
}
|
|
2761
2765
|
renderItem(item, isFirst, cssClasses, index, isChecked) {
|
|
2762
2766
|
const renderedItem = ReactElementFactory.Instance.createElement(this.question.itemComponent, {
|
|
2763
|
-
key: item.
|
|
2767
|
+
key: item.uniqueId,
|
|
2764
2768
|
question: this.question,
|
|
2765
2769
|
cssClasses: cssClasses,
|
|
2766
2770
|
isDisplayMode: this.isDisplayMode,
|
|
@@ -2980,7 +2984,7 @@ class SurveyQuestionRanking extends SurveyQuestionElementBase {
|
|
|
2980
2984
|
const index = i;
|
|
2981
2985
|
const indexText = this.question.getNumberByIndex(index);
|
|
2982
2986
|
const tabIndex = this.question.getItemTabIndex(item);
|
|
2983
|
-
const renderedItem = (_$1(SurveyQuestionRankingItem, { key: item.
|
|
2987
|
+
const renderedItem = (_$1(SurveyQuestionRankingItem, { key: item.uniqueId, text: text, index: index, indexText: indexText, itemTabIndex: tabIndex, handleKeydown: handleKeydown, handlePointerDown: handlePointerDown, handlePointerUp: handlePointerUp, cssClasses: cssClasses, itemClass: itemClass, question: question, unrankedItem: unrankedItem, item: item }));
|
|
2984
2988
|
const survey = this.question.survey;
|
|
2985
2989
|
let wrappedItem = null;
|
|
2986
2990
|
if (!!survey) {
|
|
@@ -3360,7 +3364,7 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
|
|
|
3360
3364
|
renderOther(item, cssClasses) {
|
|
3361
3365
|
if (!item || !item.isCommentShowing)
|
|
3362
3366
|
return null;
|
|
3363
|
-
return (_$1("div", { key: item.
|
|
3367
|
+
return (_$1("div", { key: item.uniqueId, className: this.question.getCommentAreaCss(true) },
|
|
3364
3368
|
_$1(SurveyQuestionCommentValueItem, { question: this.question, item: item, cssClasses: this.question.cssClasses })));
|
|
3365
3369
|
}
|
|
3366
3370
|
renderEditorButtons() {
|
|
@@ -3483,7 +3487,7 @@ class SurveyQuestionDropdownSelect extends SurveyQuestionDropdown {
|
|
|
3483
3487
|
_$1("div", { id: this.question.inputId, className: this.question.getControlClass(), disabled: true }, this.question.readOnlyText)) :
|
|
3484
3488
|
(_$1("select", { id: this.question.inputId, className: this.question.getControlClass(), ref: (select) => (this.setControl(select)), autoComplete: this.question.autocomplete, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onClick: click, onKeyUp: keyup, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage, required: this.question.isRequired },
|
|
3485
3489
|
this.question.allowClear ? (_$1("option", { value: "" }, this.question.placeholder)) : null,
|
|
3486
|
-
this.question.visibleChoices.map((item
|
|
3490
|
+
this.question.visibleChoices.map((item) => _$1(SurveyQuestionOptionItem, { key: item.uniqueId, item: item }))));
|
|
3487
3491
|
return (_$1("div", { className: cssClasses.selectWrapper },
|
|
3488
3492
|
selectElement,
|
|
3489
3493
|
this.createChevronButton()));
|
|
@@ -3529,21 +3533,19 @@ class SurveyQuestionMatrix extends SurveyQuestionElementBase {
|
|
|
3529
3533
|
var headers = [];
|
|
3530
3534
|
for (var i = 0; i < this.question.visibleColumns.length; i++) {
|
|
3531
3535
|
var column = this.question.visibleColumns[i];
|
|
3532
|
-
var key = "column" + i;
|
|
3533
3536
|
var columText = this.renderLocString(column.locText);
|
|
3534
3537
|
const style = {};
|
|
3535
3538
|
if (!!this.question.columnMinWidth) {
|
|
3536
3539
|
style.minWidth = this.question.columnMinWidth;
|
|
3537
3540
|
style.width = this.question.columnMinWidth;
|
|
3538
3541
|
}
|
|
3539
|
-
headers.push(_$1("th", { className: this.question.cssClasses.headerCell, style: style, key:
|
|
3542
|
+
headers.push(_$1("th", { className: this.question.cssClasses.headerCell, style: style, key: column.uniqueId }, this.wrapCell({ column: column }, columText, "column-header")));
|
|
3540
3543
|
}
|
|
3541
3544
|
var rows = [];
|
|
3542
3545
|
var visibleRows = this.question.visibleRows;
|
|
3543
3546
|
for (var i = 0; i < visibleRows.length; i++) {
|
|
3544
3547
|
var row = visibleRows[i];
|
|
3545
|
-
|
|
3546
|
-
rows.push(_$1(SurveyQuestionMatrixRow, { key: key, question: this.question, cssClasses: cssClasses, row: row, isFirst: i == 0 }));
|
|
3548
|
+
rows.push(_$1(SurveyQuestionMatrixRow, { key: row.uniqueId, question: this.question, cssClasses: cssClasses, row: row, isFirst: i == 0 }));
|
|
3547
3549
|
}
|
|
3548
3550
|
var header = !this.question.showHeader ? null : (_$1("thead", { role: "presentation" },
|
|
3549
3551
|
_$1("tr", null,
|
|
@@ -3609,7 +3611,7 @@ class SurveyQuestionMatrixRow extends ReactSurveyElement {
|
|
|
3609
3611
|
for (var i = 0; i < this.question.visibleColumns.length; i++) {
|
|
3610
3612
|
let td = null;
|
|
3611
3613
|
const column = this.question.visibleColumns[i];
|
|
3612
|
-
const key =
|
|
3614
|
+
const key = column.uniqueId;
|
|
3613
3615
|
let itemClass = this.question.getItemClass(row, column);
|
|
3614
3616
|
if (this.question.hasCellText) {
|
|
3615
3617
|
const getHandler = (column) => () => this.cellClick(row, column);
|
|
@@ -3908,7 +3910,7 @@ class SurveyQuestionMultipleText extends SurveyQuestionElementBase {
|
|
|
3908
3910
|
else {
|
|
3909
3911
|
cellContent = _$1(SurveyMultipleTextItem, { question: this.question, item: cell.item, creator: this.creator, cssClasses: cssClasses });
|
|
3910
3912
|
}
|
|
3911
|
-
return (_$1("td", { key:
|
|
3913
|
+
return (_$1("td", { key: cell.item.id, className: cell.className, onFocus: focusIn }, cellContent));
|
|
3912
3914
|
}
|
|
3913
3915
|
renderRow(rowIndex, cells, cssClasses) {
|
|
3914
3916
|
const key = "item" + rowIndex;
|
|
@@ -5427,7 +5429,7 @@ class SurveyQuestionImagePicker extends SurveyQuestionElementBase {
|
|
|
5427
5429
|
}
|
|
5428
5430
|
getColumns(cssClasses) {
|
|
5429
5431
|
return this.question.columns.map((column, ci) => {
|
|
5430
|
-
var items = column.map((item, ii) => this.renderItem(
|
|
5432
|
+
var items = column.map((item, ii) => this.renderItem(item, cssClasses));
|
|
5431
5433
|
return (_$1("div", { key: "column" + ci + this.question.getItemsColumnKey(column), className: this.question.getColumnClass(), role: "presentation" }, items));
|
|
5432
5434
|
});
|
|
5433
5435
|
}
|
|
@@ -5435,16 +5437,15 @@ class SurveyQuestionImagePicker extends SurveyQuestionElementBase {
|
|
|
5435
5437
|
var items = [];
|
|
5436
5438
|
for (var i = 0; i < this.question.visibleChoices.length; i++) {
|
|
5437
5439
|
var item = this.question.visibleChoices[i];
|
|
5438
|
-
|
|
5439
|
-
items.push(this.renderItem(key, item, cssClasses));
|
|
5440
|
+
items.push(this.renderItem(item, cssClasses));
|
|
5440
5441
|
}
|
|
5441
5442
|
return items;
|
|
5442
5443
|
}
|
|
5443
5444
|
get textStyle() {
|
|
5444
5445
|
return { marginLeft: "3px", display: "inline", position: "static" };
|
|
5445
5446
|
}
|
|
5446
|
-
renderItem(
|
|
5447
|
-
const renderedItem = _$1(SurveyQuestionImagePickerItem, { key:
|
|
5447
|
+
renderItem(item, cssClasses) {
|
|
5448
|
+
const renderedItem = _$1(SurveyQuestionImagePickerItem, { key: item.uniqueId, question: this.question, item: item, cssClasses: cssClasses });
|
|
5448
5449
|
const survey = this.question.survey;
|
|
5449
5450
|
let wrappedItem = null;
|
|
5450
5451
|
if (!!survey) {
|
|
@@ -6086,7 +6087,7 @@ class SliderLabelItem extends SurveyElementBase {
|
|
|
6086
6087
|
else {
|
|
6087
6088
|
labelText = _$1("div", { className: cssClasses.labelText }, this.renderLocString(locText));
|
|
6088
6089
|
}
|
|
6089
|
-
return _$1("div", { key: this.item.
|
|
6090
|
+
return _$1("div", { key: this.item.uniqueId, className: getLabelCss(locText), style: { left: getPercent(value) + "%" }, onPointerUp: (e) => { handleLabelPointerUp(e.nativeEvent, value); } },
|
|
6090
6091
|
_$1("div", { className: cssClasses.labelTick }),
|
|
6091
6092
|
_$1("div", { className: cssClasses.labelTextContainer },
|
|
6092
6093
|
labelText,
|
|
@@ -6279,7 +6280,7 @@ SurveyModel.prototype["render"] = function (element = null) {
|
|
|
6279
6280
|
}
|
|
6280
6281
|
};
|
|
6281
6282
|
const preact = React;
|
|
6282
|
-
checkLibraryVersion(`${"2.3.
|
|
6283
|
+
checkLibraryVersion(`${"2.3.11"}`, "survey-js-ui");
|
|
6283
6284
|
|
|
6284
6285
|
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 };
|
|
6285
6286
|
//# sourceMappingURL=survey-js-ui.mjs.map
|