survey-js-ui 3.0.4 → 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-js-ui.mjs +42 -43
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +42 -43
- 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-js-ui",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://surveyjs.io/",
|
|
6
6
|
"author": "DevSoft Baltic OU <info@devsoftbaltic.com>",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"survey-core": "3.0
|
|
63
|
+
"survey-core": "3.1.0",
|
|
64
64
|
"@types/react-dom": "*",
|
|
65
65
|
"@types/react": "*"
|
|
66
66
|
}
|
package/survey-js-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
|
*/
|
|
@@ -3661,7 +3661,7 @@
|
|
|
3661
3661
|
}
|
|
3662
3662
|
renderElement() {
|
|
3663
3663
|
var cssClasses = this.question.cssClasses;
|
|
3664
|
-
var rowsTH = this.question.hasRows ? _$1("td",
|
|
3664
|
+
var rowsTH = this.question.hasRows ? _$1("td", { className: this.question.emptyCellCss }) : null;
|
|
3665
3665
|
var headers = [];
|
|
3666
3666
|
for (var i = 0; i < this.question.visibleColumns.length; i++) {
|
|
3667
3667
|
var column = this.question.visibleColumns[i];
|
|
@@ -3688,7 +3688,7 @@
|
|
|
3688
3688
|
_$1("legend", { className: "sv-visuallyhidden" }, this.question.locTitle.renderedHtml),
|
|
3689
3689
|
_$1("table", { className: this.question.getTableCss(), role: "presentation" },
|
|
3690
3690
|
header,
|
|
3691
|
-
_$1("tbody",
|
|
3691
|
+
_$1("tbody", { className: this.question.getTableBodyCss() }, rows)))));
|
|
3692
3692
|
}
|
|
3693
3693
|
}
|
|
3694
3694
|
class SurveyQuestionMatrixRow extends ReactSurveyElement {
|
|
@@ -4444,30 +4444,6 @@
|
|
|
4444
4444
|
return _$1(MatrixRow, props);
|
|
4445
4445
|
});
|
|
4446
4446
|
|
|
4447
|
-
class SurveyQuestionMatrixDynamicDragDropIcon extends ReactSurveyElement {
|
|
4448
|
-
get question() {
|
|
4449
|
-
return this.props.item.data.question;
|
|
4450
|
-
}
|
|
4451
|
-
get row() {
|
|
4452
|
-
return this.props.item.data.row;
|
|
4453
|
-
}
|
|
4454
|
-
renderElement() {
|
|
4455
|
-
return _$1("div", { onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); } }, this.renderIcon());
|
|
4456
|
-
}
|
|
4457
|
-
renderIcon() {
|
|
4458
|
-
if (this.question.iconDragElement) {
|
|
4459
|
-
return (_$1("svg", { className: this.question.cssClasses.dragElementDecorator },
|
|
4460
|
-
_$1("use", { xlinkHref: this.question.iconDragElement })));
|
|
4461
|
-
}
|
|
4462
|
-
else {
|
|
4463
|
-
return (_$1("span", { className: this.question.cssClasses.iconDrag }));
|
|
4464
|
-
}
|
|
4465
|
-
}
|
|
4466
|
-
}
|
|
4467
|
-
ReactElementFactory.Instance.registerElement("sv-matrix-drag-drop-icon", (props) => {
|
|
4468
|
-
return _$1(SurveyQuestionMatrixDynamicDragDropIcon, props);
|
|
4469
|
-
});
|
|
4470
|
-
|
|
4471
4447
|
class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
4472
4448
|
get question() {
|
|
4473
4449
|
return this.props.question;
|
|
@@ -4526,7 +4502,7 @@
|
|
|
4526
4502
|
for (var i = 0; i < renderedRows.length; i++) {
|
|
4527
4503
|
rows.push(this.renderRow(renderedRows[i].id, renderedRows[i], cssClasses));
|
|
4528
4504
|
}
|
|
4529
|
-
return _$1("tbody",
|
|
4505
|
+
return _$1("tbody", { className: this.question.getTableBodyCss() }, rows);
|
|
4530
4506
|
}
|
|
4531
4507
|
renderRow(keyValue, row, cssClasses, reason) {
|
|
4532
4508
|
const matrixrow = [];
|
|
@@ -4535,7 +4511,7 @@
|
|
|
4535
4511
|
matrixrow.push(this.renderCell(cells[i], cssClasses, reason));
|
|
4536
4512
|
}
|
|
4537
4513
|
const key = "row" + keyValue;
|
|
4538
|
-
return (_$1(k$2, { key: key }, (reason == "row-footer") ? _$1("tr",
|
|
4514
|
+
return (_$1(k$2, { key: key }, (reason == "row-footer") ? _$1("tr", { className: row.className }, matrixrow) : _$1(MatrixRow, { model: row, parentMatrix: this.question }, matrixrow)));
|
|
4539
4515
|
}
|
|
4540
4516
|
renderCell(cell, cssClasses, reason) {
|
|
4541
4517
|
const key = "cell" + cell.id;
|
|
@@ -4580,10 +4556,6 @@
|
|
|
4580
4556
|
str,
|
|
4581
4557
|
require));
|
|
4582
4558
|
}
|
|
4583
|
-
if (cell.isDragHandlerCell) {
|
|
4584
|
-
cellContent = (_$1(k$2, null,
|
|
4585
|
-
_$1(SurveyQuestionMatrixDynamicDragDropIcon, { item: { data: { row: cell.row, question: this.question } } })));
|
|
4586
|
-
}
|
|
4587
4559
|
if (cell.isActionsCell) {
|
|
4588
4560
|
cellContent = (ReactElementFactory.Instance.createElement("sv-matrixdynamic-actions-cell", {
|
|
4589
4561
|
question: this.question, cssClasses, cell, model: cell.item.getData()
|
|
@@ -4762,9 +4734,12 @@
|
|
|
4762
4734
|
const responsiveTitle = this.cell.showResponsiveTitle ? (_$1("span", { className: this.cell.responsiveTitleCss },
|
|
4763
4735
|
this.renderLocString(this.cell.responsiveLocTitle),
|
|
4764
4736
|
_$1(SurveyQuestionMatrixHeaderRequired, { column: this.cell.column, question: this.cell.matrix }))) : null;
|
|
4737
|
+
const errors = this.cell.matrix.isMobile ? _$1(SurveyElementErrors, { element: this.cell.question, creator: this.props.creator, cssClasses: this.question.cssClasses }) : null;
|
|
4765
4738
|
return _$1(k$2, null,
|
|
4739
|
+
this.cell.matrix.getErrorLocation() === "top" ? errors : null,
|
|
4766
4740
|
responsiveTitle,
|
|
4767
|
-
content
|
|
4741
|
+
content,
|
|
4742
|
+
this.cell.matrix.getErrorLocation() === "bottom" ? errors : null);
|
|
4768
4743
|
}
|
|
4769
4744
|
renderQuestion() {
|
|
4770
4745
|
if (!this.question.isVisible)
|
|
@@ -4826,18 +4801,16 @@
|
|
|
4826
4801
|
mainDiv,
|
|
4827
4802
|
this.renderBottomToolbar()));
|
|
4828
4803
|
}
|
|
4829
|
-
renderToolbar() {
|
|
4830
|
-
|
|
4804
|
+
renderToolbar(location) {
|
|
4805
|
+
if (!this.matrix.getShowToolbar(location))
|
|
4806
|
+
return null;
|
|
4807
|
+
return _$1("div", { className: this.matrix.getToolbarCssClass(location) }, ReactElementFactory.Instance.createElement("sv-action-bar", { model: this.matrix.toolbar }));
|
|
4831
4808
|
}
|
|
4832
4809
|
renderTopToolbar() {
|
|
4833
|
-
|
|
4834
|
-
return null;
|
|
4835
|
-
return this.renderToolbar();
|
|
4810
|
+
return this.renderToolbar("top");
|
|
4836
4811
|
}
|
|
4837
4812
|
renderBottomToolbar() {
|
|
4838
|
-
|
|
4839
|
-
return null;
|
|
4840
|
-
return this.renderToolbar();
|
|
4813
|
+
return this.renderToolbar("bottom");
|
|
4841
4814
|
}
|
|
4842
4815
|
renderNoRowsContent(cssClasses) {
|
|
4843
4816
|
return ReactElementFactory.Instance.createElement("sv-placeholder-matrixdynamic", { cssClasses: cssClasses, question: this.matrix });
|
|
@@ -5983,6 +5956,32 @@
|
|
|
5983
5956
|
return _$1(LogoImage, props);
|
|
5984
5957
|
});
|
|
5985
5958
|
|
|
5959
|
+
class SurveyQuestionMatrixDynamicDragDropIcon extends ReactSurveyElement {
|
|
5960
|
+
get question() {
|
|
5961
|
+
return this.props.item.data.question;
|
|
5962
|
+
}
|
|
5963
|
+
get row() {
|
|
5964
|
+
return this.props.item.data.row;
|
|
5965
|
+
}
|
|
5966
|
+
getStateElement() {
|
|
5967
|
+
return this.props.item;
|
|
5968
|
+
}
|
|
5969
|
+
renderElement() {
|
|
5970
|
+
return _$1("div", { onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); } }, this.renderIcon());
|
|
5971
|
+
}
|
|
5972
|
+
renderIcon() {
|
|
5973
|
+
if (this.question.iconDragElement) {
|
|
5974
|
+
return _$1(SvgIcon, { className: this.question.cssClasses.dragElementDecorator, size: this.props.item.iconSize, iconName: this.props.item.iconName });
|
|
5975
|
+
}
|
|
5976
|
+
else {
|
|
5977
|
+
return (_$1("span", { className: this.question.cssClasses.iconDrag }));
|
|
5978
|
+
}
|
|
5979
|
+
}
|
|
5980
|
+
}
|
|
5981
|
+
ReactElementFactory.Instance.registerElement("sv-matrix-drag-drop-icon", (props) => {
|
|
5982
|
+
return _$1(SurveyQuestionMatrixDynamicDragDropIcon, props);
|
|
5983
|
+
});
|
|
5984
|
+
|
|
5986
5985
|
class SurveyQuestionPanelDynamicProgressText extends ReactSurveyElement {
|
|
5987
5986
|
get data() {
|
|
5988
5987
|
return (this.props.item && this.props.item.data) || this.props.data;
|
|
@@ -6260,7 +6259,7 @@
|
|
|
6260
6259
|
}
|
|
6261
6260
|
};
|
|
6262
6261
|
const preact = React;
|
|
6263
|
-
surveyCore.checkLibraryVersion(`${"3.0
|
|
6262
|
+
surveyCore.checkLibraryVersion(`${"3.1.0"}`, "survey-js-ui");
|
|
6264
6263
|
|
|
6265
6264
|
Object.defineProperty(exports, 'Model', {
|
|
6266
6265
|
enumerable: true,
|