survey-js-ui 3.0.4 → 3.1.1
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 +48 -45
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +48 -45
- package/survey-js-ui.js.map +1 -1
- package/survey-js-ui.min.js +2 -2
- package/typings/survey-react-ui/src/components/matrix-actions/drag-drop-icon/drag-drop-icon.d.ts +2 -0
- package/typings/survey-react-ui/src/reactquestion_matrixdynamic.d.ts +1 -1
- package/typings/survey-react-ui/src/reactquestion_radiogroup.d.ts +1 -0
package/fesm/survey-js-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v3.
|
|
2
|
+
* surveyjs - Survey JavaScript library v3.1.1
|
|
3
3
|
* Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -3660,7 +3660,7 @@ class SurveyQuestionMatrix extends SurveyQuestionElementBase {
|
|
|
3660
3660
|
}
|
|
3661
3661
|
renderElement() {
|
|
3662
3662
|
var cssClasses = this.question.cssClasses;
|
|
3663
|
-
var rowsTH = this.question.hasRows ? _$1("td",
|
|
3663
|
+
var rowsTH = this.question.hasRows ? _$1("td", { className: this.question.emptyCellCss }) : null;
|
|
3664
3664
|
var headers = [];
|
|
3665
3665
|
for (var i = 0; i < this.question.visibleColumns.length; i++) {
|
|
3666
3666
|
var column = this.question.visibleColumns[i];
|
|
@@ -3687,7 +3687,7 @@ class SurveyQuestionMatrix extends SurveyQuestionElementBase {
|
|
|
3687
3687
|
_$1("legend", { className: "sv-visuallyhidden" }, this.question.locTitle.renderedHtml),
|
|
3688
3688
|
_$1("table", { className: this.question.getTableCss(), role: "presentation" },
|
|
3689
3689
|
header,
|
|
3690
|
-
_$1("tbody",
|
|
3690
|
+
_$1("tbody", { className: this.question.getTableBodyCss() }, rows)))));
|
|
3691
3691
|
}
|
|
3692
3692
|
}
|
|
3693
3693
|
class SurveyQuestionMatrixRow extends ReactSurveyElement {
|
|
@@ -4115,6 +4115,10 @@ class SurveyQuestionRadiogroup extends SurveyQuestionSelectbase {
|
|
|
4115
4115
|
class SurveyQuestionRadioItem extends SurveyQuestionSelectBaseItem {
|
|
4116
4116
|
constructor(props) {
|
|
4117
4117
|
super(props);
|
|
4118
|
+
this.handleOnKeyDown = (event) => {
|
|
4119
|
+
var _a, _b;
|
|
4120
|
+
(_b = (_a = this.question).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
4121
|
+
};
|
|
4118
4122
|
this.handleOnMouseDown = this.handleOnMouseDown.bind(this);
|
|
4119
4123
|
}
|
|
4120
4124
|
getStateElement() {
|
|
@@ -4142,7 +4146,7 @@ class SurveyQuestionRadioItem extends SurveyQuestionSelectBaseItem {
|
|
|
4142
4146
|
const itemLabel = !this.hideCaption ? _$1("span", { className: controlLabelClass }, this.renderLocString(this.item.locText, this.textStyle)) : null;
|
|
4143
4147
|
return (_$1("div", { className: itemClass, role: "presentation", ref: this.rootRef },
|
|
4144
4148
|
_$1("label", { onMouseDown: this.handleOnMouseDown, className: labelClass },
|
|
4145
|
-
_$1("input", { "aria-errormessage": this.question.ariaErrormessage, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange, "aria-label": this.ariaLabel }),
|
|
4149
|
+
_$1("input", { "aria-errormessage": this.question.ariaErrormessage, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange, onKeyDown: this.handleOnKeyDown, "aria-label": this.ariaLabel }),
|
|
4146
4150
|
this.cssClasses.materialDecorator ?
|
|
4147
4151
|
_$1("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
|
|
4148
4152
|
_$1("svg", { className: this.cssClasses.itemDecorator },
|
|
@@ -4443,30 +4447,6 @@ ReactElementFactory.Instance.registerElement("sv-matrix-row", (props) => {
|
|
|
4443
4447
|
return _$1(MatrixRow, props);
|
|
4444
4448
|
});
|
|
4445
4449
|
|
|
4446
|
-
class SurveyQuestionMatrixDynamicDragDropIcon extends ReactSurveyElement {
|
|
4447
|
-
get question() {
|
|
4448
|
-
return this.props.item.data.question;
|
|
4449
|
-
}
|
|
4450
|
-
get row() {
|
|
4451
|
-
return this.props.item.data.row;
|
|
4452
|
-
}
|
|
4453
|
-
renderElement() {
|
|
4454
|
-
return _$1("div", { onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); } }, this.renderIcon());
|
|
4455
|
-
}
|
|
4456
|
-
renderIcon() {
|
|
4457
|
-
if (this.question.iconDragElement) {
|
|
4458
|
-
return (_$1("svg", { className: this.question.cssClasses.dragElementDecorator },
|
|
4459
|
-
_$1("use", { xlinkHref: this.question.iconDragElement })));
|
|
4460
|
-
}
|
|
4461
|
-
else {
|
|
4462
|
-
return (_$1("span", { className: this.question.cssClasses.iconDrag }));
|
|
4463
|
-
}
|
|
4464
|
-
}
|
|
4465
|
-
}
|
|
4466
|
-
ReactElementFactory.Instance.registerElement("sv-matrix-drag-drop-icon", (props) => {
|
|
4467
|
-
return _$1(SurveyQuestionMatrixDynamicDragDropIcon, props);
|
|
4468
|
-
});
|
|
4469
|
-
|
|
4470
4450
|
class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
4471
4451
|
get question() {
|
|
4472
4452
|
return this.props.question;
|
|
@@ -4525,7 +4505,7 @@ class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
|
4525
4505
|
for (var i = 0; i < renderedRows.length; i++) {
|
|
4526
4506
|
rows.push(this.renderRow(renderedRows[i].id, renderedRows[i], cssClasses));
|
|
4527
4507
|
}
|
|
4528
|
-
return _$1("tbody",
|
|
4508
|
+
return _$1("tbody", { className: this.question.getTableBodyCss() }, rows);
|
|
4529
4509
|
}
|
|
4530
4510
|
renderRow(keyValue, row, cssClasses, reason) {
|
|
4531
4511
|
const matrixrow = [];
|
|
@@ -4534,7 +4514,7 @@ class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
|
4534
4514
|
matrixrow.push(this.renderCell(cells[i], cssClasses, reason));
|
|
4535
4515
|
}
|
|
4536
4516
|
const key = "row" + keyValue;
|
|
4537
|
-
return (_$1(k$3, { key: key }, (reason == "row-footer") ? _$1("tr",
|
|
4517
|
+
return (_$1(k$3, { key: key }, (reason == "row-footer") ? _$1("tr", { className: row.className }, matrixrow) : _$1(MatrixRow, { model: row, parentMatrix: this.question }, matrixrow)));
|
|
4538
4518
|
}
|
|
4539
4519
|
renderCell(cell, cssClasses, reason) {
|
|
4540
4520
|
const key = "cell" + cell.id;
|
|
@@ -4579,10 +4559,6 @@ class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
|
4579
4559
|
str,
|
|
4580
4560
|
require));
|
|
4581
4561
|
}
|
|
4582
|
-
if (cell.isDragHandlerCell) {
|
|
4583
|
-
cellContent = (_$1(k$3, null,
|
|
4584
|
-
_$1(SurveyQuestionMatrixDynamicDragDropIcon, { item: { data: { row: cell.row, question: this.question } } })));
|
|
4585
|
-
}
|
|
4586
4562
|
if (cell.isActionsCell) {
|
|
4587
4563
|
cellContent = (ReactElementFactory.Instance.createElement("sv-matrixdynamic-actions-cell", {
|
|
4588
4564
|
question: this.question, cssClasses, cell, model: cell.item.getData()
|
|
@@ -4761,9 +4737,12 @@ class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {
|
|
|
4761
4737
|
const responsiveTitle = this.cell.showResponsiveTitle ? (_$1("span", { className: this.cell.responsiveTitleCss },
|
|
4762
4738
|
this.renderLocString(this.cell.responsiveLocTitle),
|
|
4763
4739
|
_$1(SurveyQuestionMatrixHeaderRequired, { column: this.cell.column, question: this.cell.matrix }))) : null;
|
|
4740
|
+
const errors = this.cell.matrix.isMobile ? _$1(SurveyElementErrors, { element: this.cell.question, creator: this.props.creator, cssClasses: this.question.cssClasses }) : null;
|
|
4764
4741
|
return _$1(k$3, null,
|
|
4742
|
+
this.cell.matrix.getErrorLocation() === "top" ? errors : null,
|
|
4765
4743
|
responsiveTitle,
|
|
4766
|
-
content
|
|
4744
|
+
content,
|
|
4745
|
+
this.cell.matrix.getErrorLocation() === "bottom" ? errors : null);
|
|
4767
4746
|
}
|
|
4768
4747
|
renderQuestion() {
|
|
4769
4748
|
if (!this.question.isVisible)
|
|
@@ -4825,18 +4804,16 @@ class SurveyQuestionMatrixDynamic extends SurveyQuestionMatrixDropdownBase {
|
|
|
4825
4804
|
mainDiv,
|
|
4826
4805
|
this.renderBottomToolbar()));
|
|
4827
4806
|
}
|
|
4828
|
-
renderToolbar() {
|
|
4829
|
-
|
|
4807
|
+
renderToolbar(location) {
|
|
4808
|
+
if (!this.matrix.getShowToolbar(location))
|
|
4809
|
+
return null;
|
|
4810
|
+
return _$1("div", { className: this.matrix.getToolbarCssClass(location) }, ReactElementFactory.Instance.createElement("sv-action-bar", { model: this.matrix.toolbar }));
|
|
4830
4811
|
}
|
|
4831
4812
|
renderTopToolbar() {
|
|
4832
|
-
|
|
4833
|
-
return null;
|
|
4834
|
-
return this.renderToolbar();
|
|
4813
|
+
return this.renderToolbar("top");
|
|
4835
4814
|
}
|
|
4836
4815
|
renderBottomToolbar() {
|
|
4837
|
-
|
|
4838
|
-
return null;
|
|
4839
|
-
return this.renderToolbar();
|
|
4816
|
+
return this.renderToolbar("bottom");
|
|
4840
4817
|
}
|
|
4841
4818
|
renderNoRowsContent(cssClasses) {
|
|
4842
4819
|
return ReactElementFactory.Instance.createElement("sv-placeholder-matrixdynamic", { cssClasses: cssClasses, question: this.matrix });
|
|
@@ -5292,7 +5269,7 @@ class SurveyQuestionRating extends SurveyQuestionElementBase {
|
|
|
5292
5269
|
? this.renderLocString(this.question.locMaxRateDescription)
|
|
5293
5270
|
: null;
|
|
5294
5271
|
return (_$1("div", { className: this.question.ratingRootCss, ref: (div) => (this.setControl(div)) },
|
|
5295
|
-
_$1("fieldset", { role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage },
|
|
5272
|
+
_$1("fieldset", { onKeyDown: (event) => this.question.onKeyDown(event), role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage },
|
|
5296
5273
|
_$1("legend", { role: "presentation", className: "sv-hidden" }),
|
|
5297
5274
|
!!this.question.hasMinLabel ? _$1("span", { className: cssClasses.minText }, minText) : null,
|
|
5298
5275
|
this.question.renderedRateItems.map((item, index) => this.renderItem(item, index)),
|
|
@@ -5982,6 +5959,32 @@ ReactElementFactory.Instance.registerElement("sv-logo-image", (props) => {
|
|
|
5982
5959
|
return _$1(LogoImage, props);
|
|
5983
5960
|
});
|
|
5984
5961
|
|
|
5962
|
+
class SurveyQuestionMatrixDynamicDragDropIcon extends ReactSurveyElement {
|
|
5963
|
+
get question() {
|
|
5964
|
+
return this.props.item.data.question;
|
|
5965
|
+
}
|
|
5966
|
+
get row() {
|
|
5967
|
+
return this.props.item.data.row;
|
|
5968
|
+
}
|
|
5969
|
+
getStateElement() {
|
|
5970
|
+
return this.props.item;
|
|
5971
|
+
}
|
|
5972
|
+
renderElement() {
|
|
5973
|
+
return _$1("div", { onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); } }, this.renderIcon());
|
|
5974
|
+
}
|
|
5975
|
+
renderIcon() {
|
|
5976
|
+
if (this.question.iconDragElement) {
|
|
5977
|
+
return _$1(SvgIcon, { className: this.question.cssClasses.dragElementDecorator, size: this.props.item.iconSize, iconName: this.props.item.iconName });
|
|
5978
|
+
}
|
|
5979
|
+
else {
|
|
5980
|
+
return (_$1("span", { className: this.question.cssClasses.iconDrag }));
|
|
5981
|
+
}
|
|
5982
|
+
}
|
|
5983
|
+
}
|
|
5984
|
+
ReactElementFactory.Instance.registerElement("sv-matrix-drag-drop-icon", (props) => {
|
|
5985
|
+
return _$1(SurveyQuestionMatrixDynamicDragDropIcon, props);
|
|
5986
|
+
});
|
|
5987
|
+
|
|
5985
5988
|
class SurveyQuestionPanelDynamicProgressText extends ReactSurveyElement {
|
|
5986
5989
|
get data() {
|
|
5987
5990
|
return (this.props.item && this.props.item.data) || this.props.data;
|
|
@@ -6259,7 +6262,7 @@ SurveyModel.prototype["render"] = function (element = null) {
|
|
|
6259
6262
|
}
|
|
6260
6263
|
};
|
|
6261
6264
|
const preact = React;
|
|
6262
|
-
checkLibraryVersion(`${"3.
|
|
6265
|
+
checkLibraryVersion(`${"3.1.1"}`, "survey-js-ui");
|
|
6263
6266
|
|
|
6264
6267
|
export { CharacterCounterComponent, O as Children, x$3 as Component, ComponentsContainer, k$3 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, SurveyActionBarItemDropdown, SurveyActionBarSeparator, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFileItem, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionBooleanSwitch, SurveyQuestionButtonGroup, SurveyQuestionButtonGroupDropdown, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImageMap, SurveyQuestionImagePicker, SurveyQuestionMatrix, SurveyQuestionMatrixCell, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionMatrixRow, SurveyQuestionMultipleText, SurveyQuestionOptionItem, SurveyQuestionPanelDynamic, SurveyQuestionPanelDynamicProgressText, 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$2 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$2 as useCallback, x$2 as useContext, P$2 as useDebugValue, w as useDeferredValue, y as useEffect, g$2 as useId, F$2 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$2 as useMemo, h as useReducer, A$2 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
|
|
6265
6268
|
//# sourceMappingURL=survey-js-ui.mjs.map
|