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/fesm/survey-js-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
|
*/
|
|
@@ -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 {
|
|
@@ -4443,30 +4443,6 @@ ReactElementFactory.Instance.registerElement("sv-matrix-row", (props) => {
|
|
|
4443
4443
|
return _$1(MatrixRow, props);
|
|
4444
4444
|
});
|
|
4445
4445
|
|
|
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
4446
|
class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
4471
4447
|
get question() {
|
|
4472
4448
|
return this.props.question;
|
|
@@ -4525,7 +4501,7 @@ class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
|
4525
4501
|
for (var i = 0; i < renderedRows.length; i++) {
|
|
4526
4502
|
rows.push(this.renderRow(renderedRows[i].id, renderedRows[i], cssClasses));
|
|
4527
4503
|
}
|
|
4528
|
-
return _$1("tbody",
|
|
4504
|
+
return _$1("tbody", { className: this.question.getTableBodyCss() }, rows);
|
|
4529
4505
|
}
|
|
4530
4506
|
renderRow(keyValue, row, cssClasses, reason) {
|
|
4531
4507
|
const matrixrow = [];
|
|
@@ -4534,7 +4510,7 @@ class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
|
4534
4510
|
matrixrow.push(this.renderCell(cells[i], cssClasses, reason));
|
|
4535
4511
|
}
|
|
4536
4512
|
const key = "row" + keyValue;
|
|
4537
|
-
return (_$1(k$3, { key: key }, (reason == "row-footer") ? _$1("tr",
|
|
4513
|
+
return (_$1(k$3, { key: key }, (reason == "row-footer") ? _$1("tr", { className: row.className }, matrixrow) : _$1(MatrixRow, { model: row, parentMatrix: this.question }, matrixrow)));
|
|
4538
4514
|
}
|
|
4539
4515
|
renderCell(cell, cssClasses, reason) {
|
|
4540
4516
|
const key = "cell" + cell.id;
|
|
@@ -4579,10 +4555,6 @@ class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
|
4579
4555
|
str,
|
|
4580
4556
|
require));
|
|
4581
4557
|
}
|
|
4582
|
-
if (cell.isDragHandlerCell) {
|
|
4583
|
-
cellContent = (_$1(k$3, null,
|
|
4584
|
-
_$1(SurveyQuestionMatrixDynamicDragDropIcon, { item: { data: { row: cell.row, question: this.question } } })));
|
|
4585
|
-
}
|
|
4586
4558
|
if (cell.isActionsCell) {
|
|
4587
4559
|
cellContent = (ReactElementFactory.Instance.createElement("sv-matrixdynamic-actions-cell", {
|
|
4588
4560
|
question: this.question, cssClasses, cell, model: cell.item.getData()
|
|
@@ -4761,9 +4733,12 @@ class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {
|
|
|
4761
4733
|
const responsiveTitle = this.cell.showResponsiveTitle ? (_$1("span", { className: this.cell.responsiveTitleCss },
|
|
4762
4734
|
this.renderLocString(this.cell.responsiveLocTitle),
|
|
4763
4735
|
_$1(SurveyQuestionMatrixHeaderRequired, { column: this.cell.column, question: this.cell.matrix }))) : null;
|
|
4736
|
+
const errors = this.cell.matrix.isMobile ? _$1(SurveyElementErrors, { element: this.cell.question, creator: this.props.creator, cssClasses: this.question.cssClasses }) : null;
|
|
4764
4737
|
return _$1(k$3, null,
|
|
4738
|
+
this.cell.matrix.getErrorLocation() === "top" ? errors : null,
|
|
4765
4739
|
responsiveTitle,
|
|
4766
|
-
content
|
|
4740
|
+
content,
|
|
4741
|
+
this.cell.matrix.getErrorLocation() === "bottom" ? errors : null);
|
|
4767
4742
|
}
|
|
4768
4743
|
renderQuestion() {
|
|
4769
4744
|
if (!this.question.isVisible)
|
|
@@ -4825,18 +4800,16 @@ class SurveyQuestionMatrixDynamic extends SurveyQuestionMatrixDropdownBase {
|
|
|
4825
4800
|
mainDiv,
|
|
4826
4801
|
this.renderBottomToolbar()));
|
|
4827
4802
|
}
|
|
4828
|
-
renderToolbar() {
|
|
4829
|
-
|
|
4803
|
+
renderToolbar(location) {
|
|
4804
|
+
if (!this.matrix.getShowToolbar(location))
|
|
4805
|
+
return null;
|
|
4806
|
+
return _$1("div", { className: this.matrix.getToolbarCssClass(location) }, ReactElementFactory.Instance.createElement("sv-action-bar", { model: this.matrix.toolbar }));
|
|
4830
4807
|
}
|
|
4831
4808
|
renderTopToolbar() {
|
|
4832
|
-
|
|
4833
|
-
return null;
|
|
4834
|
-
return this.renderToolbar();
|
|
4809
|
+
return this.renderToolbar("top");
|
|
4835
4810
|
}
|
|
4836
4811
|
renderBottomToolbar() {
|
|
4837
|
-
|
|
4838
|
-
return null;
|
|
4839
|
-
return this.renderToolbar();
|
|
4812
|
+
return this.renderToolbar("bottom");
|
|
4840
4813
|
}
|
|
4841
4814
|
renderNoRowsContent(cssClasses) {
|
|
4842
4815
|
return ReactElementFactory.Instance.createElement("sv-placeholder-matrixdynamic", { cssClasses: cssClasses, question: this.matrix });
|
|
@@ -5982,6 +5955,32 @@ ReactElementFactory.Instance.registerElement("sv-logo-image", (props) => {
|
|
|
5982
5955
|
return _$1(LogoImage, props);
|
|
5983
5956
|
});
|
|
5984
5957
|
|
|
5958
|
+
class SurveyQuestionMatrixDynamicDragDropIcon extends ReactSurveyElement {
|
|
5959
|
+
get question() {
|
|
5960
|
+
return this.props.item.data.question;
|
|
5961
|
+
}
|
|
5962
|
+
get row() {
|
|
5963
|
+
return this.props.item.data.row;
|
|
5964
|
+
}
|
|
5965
|
+
getStateElement() {
|
|
5966
|
+
return this.props.item;
|
|
5967
|
+
}
|
|
5968
|
+
renderElement() {
|
|
5969
|
+
return _$1("div", { onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); } }, this.renderIcon());
|
|
5970
|
+
}
|
|
5971
|
+
renderIcon() {
|
|
5972
|
+
if (this.question.iconDragElement) {
|
|
5973
|
+
return _$1(SvgIcon, { className: this.question.cssClasses.dragElementDecorator, size: this.props.item.iconSize, iconName: this.props.item.iconName });
|
|
5974
|
+
}
|
|
5975
|
+
else {
|
|
5976
|
+
return (_$1("span", { className: this.question.cssClasses.iconDrag }));
|
|
5977
|
+
}
|
|
5978
|
+
}
|
|
5979
|
+
}
|
|
5980
|
+
ReactElementFactory.Instance.registerElement("sv-matrix-drag-drop-icon", (props) => {
|
|
5981
|
+
return _$1(SurveyQuestionMatrixDynamicDragDropIcon, props);
|
|
5982
|
+
});
|
|
5983
|
+
|
|
5985
5984
|
class SurveyQuestionPanelDynamicProgressText extends ReactSurveyElement {
|
|
5986
5985
|
get data() {
|
|
5987
5986
|
return (this.props.item && this.props.item.data) || this.props.data;
|
|
@@ -6259,7 +6258,7 @@ SurveyModel.prototype["render"] = function (element = null) {
|
|
|
6259
6258
|
}
|
|
6260
6259
|
};
|
|
6261
6260
|
const preact = React;
|
|
6262
|
-
checkLibraryVersion(`${"3.0
|
|
6261
|
+
checkLibraryVersion(`${"3.1.0"}`, "survey-js-ui");
|
|
6263
6262
|
|
|
6264
6263
|
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
6264
|
//# sourceMappingURL=survey-js-ui.mjs.map
|