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/index.html
CHANGED
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
<script src="./node_modules/survey-core/themes/index.js"></script>
|
|
14
14
|
<link rel="stylesheet" href="./node_modules/survey-core/survey-core.css" />
|
|
15
15
|
<script src="./build/survey-react-ui.js"></script>
|
|
16
|
+
<!-- survey-core embeds no @font-face rule; the page supplies Open Sans itself.
|
|
17
|
+
Pinned to the files the reference screenshots were taken with - see fonts.css. -->
|
|
18
|
+
<link rel="stylesheet" href="./fonts.css" />
|
|
16
19
|
</head>
|
|
17
20
|
|
|
18
21
|
<body spellcheck="false">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-react-ui",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "DevSoft Baltic OU <info@devsoftbaltic.com>",
|
|
6
6
|
"homepage": "https://surveyjs.io/",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"survey-core": "3.0
|
|
63
|
+
"survey-core": "3.1.0",
|
|
64
64
|
"react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
|
|
65
65
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0"
|
|
66
66
|
}
|
package/survey-react-ui.js
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
|
*/
|
|
@@ -3603,7 +3603,7 @@
|
|
|
3603
3603
|
}
|
|
3604
3604
|
renderElement() {
|
|
3605
3605
|
var cssClasses = this.question.cssClasses;
|
|
3606
|
-
var rowsTH = this.question.hasRows ? React__namespace.createElement("td",
|
|
3606
|
+
var rowsTH = this.question.hasRows ? React__namespace.createElement("td", { className: this.question.emptyCellCss }) : null;
|
|
3607
3607
|
var headers = [];
|
|
3608
3608
|
for (var i = 0; i < this.question.visibleColumns.length; i++) {
|
|
3609
3609
|
var column = this.question.visibleColumns[i];
|
|
@@ -3630,7 +3630,7 @@
|
|
|
3630
3630
|
React__namespace.createElement("legend", { className: "sv-visuallyhidden" }, this.question.locTitle.renderedHtml),
|
|
3631
3631
|
React__namespace.createElement("table", { className: this.question.getTableCss(), role: "presentation" },
|
|
3632
3632
|
header,
|
|
3633
|
-
React__namespace.createElement("tbody",
|
|
3633
|
+
React__namespace.createElement("tbody", { className: this.question.getTableBodyCss() }, rows)))));
|
|
3634
3634
|
}
|
|
3635
3635
|
}
|
|
3636
3636
|
class SurveyQuestionMatrixRow extends ReactSurveyElement {
|
|
@@ -4386,30 +4386,6 @@
|
|
|
4386
4386
|
return React__namespace.createElement(MatrixRow, props);
|
|
4387
4387
|
});
|
|
4388
4388
|
|
|
4389
|
-
class SurveyQuestionMatrixDynamicDragDropIcon extends ReactSurveyElement {
|
|
4390
|
-
get question() {
|
|
4391
|
-
return this.props.item.data.question;
|
|
4392
|
-
}
|
|
4393
|
-
get row() {
|
|
4394
|
-
return this.props.item.data.row;
|
|
4395
|
-
}
|
|
4396
|
-
renderElement() {
|
|
4397
|
-
return React__namespace.createElement("div", { onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); } }, this.renderIcon());
|
|
4398
|
-
}
|
|
4399
|
-
renderIcon() {
|
|
4400
|
-
if (this.question.iconDragElement) {
|
|
4401
|
-
return (React__namespace.createElement("svg", { className: this.question.cssClasses.dragElementDecorator },
|
|
4402
|
-
React__namespace.createElement("use", { xlinkHref: this.question.iconDragElement })));
|
|
4403
|
-
}
|
|
4404
|
-
else {
|
|
4405
|
-
return (React__namespace.createElement("span", { className: this.question.cssClasses.iconDrag }));
|
|
4406
|
-
}
|
|
4407
|
-
}
|
|
4408
|
-
}
|
|
4409
|
-
ReactElementFactory.Instance.registerElement("sv-matrix-drag-drop-icon", (props) => {
|
|
4410
|
-
return React__namespace.createElement(SurveyQuestionMatrixDynamicDragDropIcon, props);
|
|
4411
|
-
});
|
|
4412
|
-
|
|
4413
4389
|
class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
4414
4390
|
get question() {
|
|
4415
4391
|
return this.props.question;
|
|
@@ -4468,7 +4444,7 @@
|
|
|
4468
4444
|
for (var i = 0; i < renderedRows.length; i++) {
|
|
4469
4445
|
rows.push(this.renderRow(renderedRows[i].id, renderedRows[i], cssClasses));
|
|
4470
4446
|
}
|
|
4471
|
-
return React__namespace.createElement("tbody",
|
|
4447
|
+
return React__namespace.createElement("tbody", { className: this.question.getTableBodyCss() }, rows);
|
|
4472
4448
|
}
|
|
4473
4449
|
renderRow(keyValue, row, cssClasses, reason) {
|
|
4474
4450
|
const matrixrow = [];
|
|
@@ -4477,7 +4453,7 @@
|
|
|
4477
4453
|
matrixrow.push(this.renderCell(cells[i], cssClasses, reason));
|
|
4478
4454
|
}
|
|
4479
4455
|
const key = "row" + keyValue;
|
|
4480
|
-
return (React__namespace.createElement(React__namespace.Fragment, { key: key }, (reason == "row-footer") ? React__namespace.createElement("tr",
|
|
4456
|
+
return (React__namespace.createElement(React__namespace.Fragment, { key: key }, (reason == "row-footer") ? React__namespace.createElement("tr", { className: row.className }, matrixrow) : React__namespace.createElement(MatrixRow, { model: row, parentMatrix: this.question }, matrixrow)));
|
|
4481
4457
|
}
|
|
4482
4458
|
renderCell(cell, cssClasses, reason) {
|
|
4483
4459
|
const key = "cell" + cell.id;
|
|
@@ -4522,10 +4498,6 @@
|
|
|
4522
4498
|
str,
|
|
4523
4499
|
require));
|
|
4524
4500
|
}
|
|
4525
|
-
if (cell.isDragHandlerCell) {
|
|
4526
|
-
cellContent = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4527
|
-
React__namespace.createElement(SurveyQuestionMatrixDynamicDragDropIcon, { item: { data: { row: cell.row, question: this.question } } })));
|
|
4528
|
-
}
|
|
4529
4501
|
if (cell.isActionsCell) {
|
|
4530
4502
|
cellContent = (ReactElementFactory.Instance.createElement("sv-matrixdynamic-actions-cell", {
|
|
4531
4503
|
question: this.question, cssClasses, cell, model: cell.item.getData()
|
|
@@ -4704,9 +4676,12 @@
|
|
|
4704
4676
|
const responsiveTitle = this.cell.showResponsiveTitle ? (React__namespace.createElement("span", { className: this.cell.responsiveTitleCss },
|
|
4705
4677
|
this.renderLocString(this.cell.responsiveLocTitle),
|
|
4706
4678
|
React__namespace.createElement(SurveyQuestionMatrixHeaderRequired, { column: this.cell.column, question: this.cell.matrix }))) : null;
|
|
4679
|
+
const errors = this.cell.matrix.isMobile ? React__namespace.createElement(SurveyElementErrors, { element: this.cell.question, creator: this.props.creator, cssClasses: this.question.cssClasses }) : null;
|
|
4707
4680
|
return React__namespace.createElement(React__namespace.Fragment, null,
|
|
4681
|
+
this.cell.matrix.getErrorLocation() === "top" ? errors : null,
|
|
4708
4682
|
responsiveTitle,
|
|
4709
|
-
content
|
|
4683
|
+
content,
|
|
4684
|
+
this.cell.matrix.getErrorLocation() === "bottom" ? errors : null);
|
|
4710
4685
|
}
|
|
4711
4686
|
renderQuestion() {
|
|
4712
4687
|
if (!this.question.isVisible)
|
|
@@ -4768,18 +4743,16 @@
|
|
|
4768
4743
|
mainDiv,
|
|
4769
4744
|
this.renderBottomToolbar()));
|
|
4770
4745
|
}
|
|
4771
|
-
renderToolbar() {
|
|
4772
|
-
|
|
4746
|
+
renderToolbar(location) {
|
|
4747
|
+
if (!this.matrix.getShowToolbar(location))
|
|
4748
|
+
return null;
|
|
4749
|
+
return React__namespace.createElement("div", { className: this.matrix.getToolbarCssClass(location) }, ReactElementFactory.Instance.createElement("sv-action-bar", { model: this.matrix.toolbar }));
|
|
4773
4750
|
}
|
|
4774
4751
|
renderTopToolbar() {
|
|
4775
|
-
|
|
4776
|
-
return null;
|
|
4777
|
-
return this.renderToolbar();
|
|
4752
|
+
return this.renderToolbar("top");
|
|
4778
4753
|
}
|
|
4779
4754
|
renderBottomToolbar() {
|
|
4780
|
-
|
|
4781
|
-
return null;
|
|
4782
|
-
return this.renderToolbar();
|
|
4755
|
+
return this.renderToolbar("bottom");
|
|
4783
4756
|
}
|
|
4784
4757
|
renderNoRowsContent(cssClasses) {
|
|
4785
4758
|
return ReactElementFactory.Instance.createElement("sv-placeholder-matrixdynamic", { cssClasses: cssClasses, question: this.matrix });
|
|
@@ -5925,6 +5898,32 @@
|
|
|
5925
5898
|
return React__namespace.createElement(LogoImage, props);
|
|
5926
5899
|
});
|
|
5927
5900
|
|
|
5901
|
+
class SurveyQuestionMatrixDynamicDragDropIcon extends ReactSurveyElement {
|
|
5902
|
+
get question() {
|
|
5903
|
+
return this.props.item.data.question;
|
|
5904
|
+
}
|
|
5905
|
+
get row() {
|
|
5906
|
+
return this.props.item.data.row;
|
|
5907
|
+
}
|
|
5908
|
+
getStateElement() {
|
|
5909
|
+
return this.props.item;
|
|
5910
|
+
}
|
|
5911
|
+
renderElement() {
|
|
5912
|
+
return React__namespace.createElement("div", { onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); } }, this.renderIcon());
|
|
5913
|
+
}
|
|
5914
|
+
renderIcon() {
|
|
5915
|
+
if (this.question.iconDragElement) {
|
|
5916
|
+
return React__namespace.createElement(SvgIcon, { className: this.question.cssClasses.dragElementDecorator, size: this.props.item.iconSize, iconName: this.props.item.iconName });
|
|
5917
|
+
}
|
|
5918
|
+
else {
|
|
5919
|
+
return (React__namespace.createElement("span", { className: this.question.cssClasses.iconDrag }));
|
|
5920
|
+
}
|
|
5921
|
+
}
|
|
5922
|
+
}
|
|
5923
|
+
ReactElementFactory.Instance.registerElement("sv-matrix-drag-drop-icon", (props) => {
|
|
5924
|
+
return React__namespace.createElement(SurveyQuestionMatrixDynamicDragDropIcon, props);
|
|
5925
|
+
});
|
|
5926
|
+
|
|
5928
5927
|
class SurveyQuestionPanelDynamicProgressText extends ReactSurveyElement {
|
|
5929
5928
|
get data() {
|
|
5930
5929
|
return (this.props.item && this.props.item.data) || this.props.data;
|
|
@@ -6153,7 +6152,7 @@
|
|
|
6153
6152
|
return React__namespace.createElement(SurveyLocStringEditor, props);
|
|
6154
6153
|
});
|
|
6155
6154
|
|
|
6156
|
-
surveyCore.checkLibraryVersion(`${"3.0
|
|
6155
|
+
surveyCore.checkLibraryVersion(`${"3.1.0"}`, "survey-react-ui");
|
|
6157
6156
|
|
|
6158
6157
|
Object.defineProperty(exports, "Model", {
|
|
6159
6158
|
enumerable: true,
|