survey-react-ui 3.0.3 → 3.1.0
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 +42 -43
- package/fesm/survey-react-ui.mjs.map +1 -1
- package/index.html +3 -0
- package/package.json +2 -2
- package/survey-react-ui.js +42 -43
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -2
- package/typings/src/components/matrix-actions/drag-drop-icon/drag-drop-icon.d.ts +2 -0
- package/typings/src/reactquestion_matrixdynamic.d.ts +1 -1
package/fesm/survey-react-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v3.0
|
|
2
|
+
* surveyjs - Survey JavaScript library v3.1.0
|
|
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
|
*/
|
|
@@ -3583,7 +3583,7 @@ class SurveyQuestionMatrix extends SurveyQuestionElementBase {
|
|
|
3583
3583
|
}
|
|
3584
3584
|
renderElement() {
|
|
3585
3585
|
var cssClasses = this.question.cssClasses;
|
|
3586
|
-
var rowsTH = this.question.hasRows ? React.createElement("td",
|
|
3586
|
+
var rowsTH = this.question.hasRows ? React.createElement("td", { className: this.question.emptyCellCss }) : null;
|
|
3587
3587
|
var headers = [];
|
|
3588
3588
|
for (var i = 0; i < this.question.visibleColumns.length; i++) {
|
|
3589
3589
|
var column = this.question.visibleColumns[i];
|
|
@@ -3610,7 +3610,7 @@ class SurveyQuestionMatrix extends SurveyQuestionElementBase {
|
|
|
3610
3610
|
React.createElement("legend", { className: "sv-visuallyhidden" }, this.question.locTitle.renderedHtml),
|
|
3611
3611
|
React.createElement("table", { className: this.question.getTableCss(), role: "presentation" },
|
|
3612
3612
|
header,
|
|
3613
|
-
React.createElement("tbody",
|
|
3613
|
+
React.createElement("tbody", { className: this.question.getTableBodyCss() }, rows)))));
|
|
3614
3614
|
}
|
|
3615
3615
|
}
|
|
3616
3616
|
class SurveyQuestionMatrixRow extends ReactSurveyElement {
|
|
@@ -4366,30 +4366,6 @@ ReactElementFactory.Instance.registerElement("sv-matrix-row", (props) => {
|
|
|
4366
4366
|
return React.createElement(MatrixRow, props);
|
|
4367
4367
|
});
|
|
4368
4368
|
|
|
4369
|
-
class SurveyQuestionMatrixDynamicDragDropIcon extends ReactSurveyElement {
|
|
4370
|
-
get question() {
|
|
4371
|
-
return this.props.item.data.question;
|
|
4372
|
-
}
|
|
4373
|
-
get row() {
|
|
4374
|
-
return this.props.item.data.row;
|
|
4375
|
-
}
|
|
4376
|
-
renderElement() {
|
|
4377
|
-
return React.createElement("div", { onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); } }, this.renderIcon());
|
|
4378
|
-
}
|
|
4379
|
-
renderIcon() {
|
|
4380
|
-
if (this.question.iconDragElement) {
|
|
4381
|
-
return (React.createElement("svg", { className: this.question.cssClasses.dragElementDecorator },
|
|
4382
|
-
React.createElement("use", { xlinkHref: this.question.iconDragElement })));
|
|
4383
|
-
}
|
|
4384
|
-
else {
|
|
4385
|
-
return (React.createElement("span", { className: this.question.cssClasses.iconDrag }));
|
|
4386
|
-
}
|
|
4387
|
-
}
|
|
4388
|
-
}
|
|
4389
|
-
ReactElementFactory.Instance.registerElement("sv-matrix-drag-drop-icon", (props) => {
|
|
4390
|
-
return React.createElement(SurveyQuestionMatrixDynamicDragDropIcon, props);
|
|
4391
|
-
});
|
|
4392
|
-
|
|
4393
4369
|
class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
4394
4370
|
get question() {
|
|
4395
4371
|
return this.props.question;
|
|
@@ -4448,7 +4424,7 @@ class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
|
4448
4424
|
for (var i = 0; i < renderedRows.length; i++) {
|
|
4449
4425
|
rows.push(this.renderRow(renderedRows[i].id, renderedRows[i], cssClasses));
|
|
4450
4426
|
}
|
|
4451
|
-
return React.createElement("tbody",
|
|
4427
|
+
return React.createElement("tbody", { className: this.question.getTableBodyCss() }, rows);
|
|
4452
4428
|
}
|
|
4453
4429
|
renderRow(keyValue, row, cssClasses, reason) {
|
|
4454
4430
|
const matrixrow = [];
|
|
@@ -4457,7 +4433,7 @@ class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
|
4457
4433
|
matrixrow.push(this.renderCell(cells[i], cssClasses, reason));
|
|
4458
4434
|
}
|
|
4459
4435
|
const key = "row" + keyValue;
|
|
4460
|
-
return (React.createElement(React.Fragment, { key: key }, (reason == "row-footer") ? React.createElement("tr",
|
|
4436
|
+
return (React.createElement(React.Fragment, { key: key }, (reason == "row-footer") ? React.createElement("tr", { className: row.className }, matrixrow) : React.createElement(MatrixRow, { model: row, parentMatrix: this.question }, matrixrow)));
|
|
4461
4437
|
}
|
|
4462
4438
|
renderCell(cell, cssClasses, reason) {
|
|
4463
4439
|
const key = "cell" + cell.id;
|
|
@@ -4502,10 +4478,6 @@ class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
|
4502
4478
|
str,
|
|
4503
4479
|
require));
|
|
4504
4480
|
}
|
|
4505
|
-
if (cell.isDragHandlerCell) {
|
|
4506
|
-
cellContent = (React.createElement(React.Fragment, null,
|
|
4507
|
-
React.createElement(SurveyQuestionMatrixDynamicDragDropIcon, { item: { data: { row: cell.row, question: this.question } } })));
|
|
4508
|
-
}
|
|
4509
4481
|
if (cell.isActionsCell) {
|
|
4510
4482
|
cellContent = (ReactElementFactory.Instance.createElement("sv-matrixdynamic-actions-cell", {
|
|
4511
4483
|
question: this.question, cssClasses, cell, model: cell.item.getData()
|
|
@@ -4684,9 +4656,12 @@ class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {
|
|
|
4684
4656
|
const responsiveTitle = this.cell.showResponsiveTitle ? (React.createElement("span", { className: this.cell.responsiveTitleCss },
|
|
4685
4657
|
this.renderLocString(this.cell.responsiveLocTitle),
|
|
4686
4658
|
React.createElement(SurveyQuestionMatrixHeaderRequired, { column: this.cell.column, question: this.cell.matrix }))) : null;
|
|
4659
|
+
const errors = this.cell.matrix.isMobile ? React.createElement(SurveyElementErrors, { element: this.cell.question, creator: this.props.creator, cssClasses: this.question.cssClasses }) : null;
|
|
4687
4660
|
return React.createElement(React.Fragment, null,
|
|
4661
|
+
this.cell.matrix.getErrorLocation() === "top" ? errors : null,
|
|
4688
4662
|
responsiveTitle,
|
|
4689
|
-
content
|
|
4663
|
+
content,
|
|
4664
|
+
this.cell.matrix.getErrorLocation() === "bottom" ? errors : null);
|
|
4690
4665
|
}
|
|
4691
4666
|
renderQuestion() {
|
|
4692
4667
|
if (!this.question.isVisible)
|
|
@@ -4748,18 +4723,16 @@ class SurveyQuestionMatrixDynamic extends SurveyQuestionMatrixDropdownBase {
|
|
|
4748
4723
|
mainDiv,
|
|
4749
4724
|
this.renderBottomToolbar()));
|
|
4750
4725
|
}
|
|
4751
|
-
renderToolbar() {
|
|
4752
|
-
|
|
4726
|
+
renderToolbar(location) {
|
|
4727
|
+
if (!this.matrix.getShowToolbar(location))
|
|
4728
|
+
return null;
|
|
4729
|
+
return React.createElement("div", { className: this.matrix.getToolbarCssClass(location) }, ReactElementFactory.Instance.createElement("sv-action-bar", { model: this.matrix.toolbar }));
|
|
4753
4730
|
}
|
|
4754
4731
|
renderTopToolbar() {
|
|
4755
|
-
|
|
4756
|
-
return null;
|
|
4757
|
-
return this.renderToolbar();
|
|
4732
|
+
return this.renderToolbar("top");
|
|
4758
4733
|
}
|
|
4759
4734
|
renderBottomToolbar() {
|
|
4760
|
-
|
|
4761
|
-
return null;
|
|
4762
|
-
return this.renderToolbar();
|
|
4735
|
+
return this.renderToolbar("bottom");
|
|
4763
4736
|
}
|
|
4764
4737
|
renderNoRowsContent(cssClasses) {
|
|
4765
4738
|
return ReactElementFactory.Instance.createElement("sv-placeholder-matrixdynamic", { cssClasses: cssClasses, question: this.matrix });
|
|
@@ -5905,6 +5878,32 @@ ReactElementFactory.Instance.registerElement("sv-logo-image", (props) => {
|
|
|
5905
5878
|
return React.createElement(LogoImage, props);
|
|
5906
5879
|
});
|
|
5907
5880
|
|
|
5881
|
+
class SurveyQuestionMatrixDynamicDragDropIcon extends ReactSurveyElement {
|
|
5882
|
+
get question() {
|
|
5883
|
+
return this.props.item.data.question;
|
|
5884
|
+
}
|
|
5885
|
+
get row() {
|
|
5886
|
+
return this.props.item.data.row;
|
|
5887
|
+
}
|
|
5888
|
+
getStateElement() {
|
|
5889
|
+
return this.props.item;
|
|
5890
|
+
}
|
|
5891
|
+
renderElement() {
|
|
5892
|
+
return React.createElement("div", { onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); } }, this.renderIcon());
|
|
5893
|
+
}
|
|
5894
|
+
renderIcon() {
|
|
5895
|
+
if (this.question.iconDragElement) {
|
|
5896
|
+
return React.createElement(SvgIcon, { className: this.question.cssClasses.dragElementDecorator, size: this.props.item.iconSize, iconName: this.props.item.iconName });
|
|
5897
|
+
}
|
|
5898
|
+
else {
|
|
5899
|
+
return (React.createElement("span", { className: this.question.cssClasses.iconDrag }));
|
|
5900
|
+
}
|
|
5901
|
+
}
|
|
5902
|
+
}
|
|
5903
|
+
ReactElementFactory.Instance.registerElement("sv-matrix-drag-drop-icon", (props) => {
|
|
5904
|
+
return React.createElement(SurveyQuestionMatrixDynamicDragDropIcon, props);
|
|
5905
|
+
});
|
|
5906
|
+
|
|
5908
5907
|
class SurveyQuestionPanelDynamicProgressText extends ReactSurveyElement {
|
|
5909
5908
|
get data() {
|
|
5910
5909
|
return (this.props.item && this.props.item.data) || this.props.data;
|
|
@@ -6133,7 +6132,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
|
|
|
6133
6132
|
return React.createElement(SurveyLocStringEditor, props);
|
|
6134
6133
|
});
|
|
6135
6134
|
|
|
6136
|
-
checkLibraryVersion(`${"3.0
|
|
6135
|
+
checkLibraryVersion(`${"3.1.0"}`, "survey-react-ui");
|
|
6137
6136
|
|
|
6138
6137
|
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, 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, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click };
|
|
6139
6138
|
//# sourceMappingURL=survey-react-ui.mjs.map
|