survey-js-ui 1.12.32 → 1.12.34
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 +285 -211
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +14 -12
- package/survey-js-ui.js.map +1 -1
- package/survey-js-ui.min.js +4 -4
- package/survey-js-ui.min.js.LICENSE.txt +17 -1
- package/typings/survey-react-ui/entries/react-ui-model.d.ts +1 -0
- package/typings/survey-react-ui/src/buttongroup-dropdown.d.ts +7 -0
- package/typings/survey-react-ui/src/components/breadcrumbs/breadcrumbs.d.ts +15 -0
- package/typings/survey-react-ui/src/reactquestion.d.ts +3 -1
- package/typings/survey-react-ui/src/reactquestion_file.d.ts +0 -2
- package/typings/survey-react-ui/src/reactquestion_matrixdynamic.d.ts +6 -1
- package/typings/survey-react-ui/src/reactquestion_paneldynamic.d.ts +8 -6
- package/typings/survey-react-ui/src/reactquestion_rating.d.ts +1 -1
- package/typings/survey-react-ui/src/reactquestion_singleinputsummary.d.ts +12 -0
package/fesm/survey-js-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.0.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.0.7
|
|
3
3
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -1059,7 +1059,7 @@ class TitleContent extends x$2 {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
render() {
|
|
1061
1061
|
if (this.element.isTitleRenderedAsString)
|
|
1062
|
-
return SurveyElementBase.renderLocString(this.element.
|
|
1062
|
+
return SurveyElementBase.renderLocString(this.element.locRenderedTitle);
|
|
1063
1063
|
var spans = this.renderTitleSpans(this.element.getTitleOwner(), this.cssClasses);
|
|
1064
1064
|
return _$1(k$2, null, spans);
|
|
1065
1065
|
}
|
|
@@ -1081,7 +1081,7 @@ class TitleContent extends x$2 {
|
|
|
1081
1081
|
spans.push(this.renderRequireText(element));
|
|
1082
1082
|
spans.push(getSpaceSpan("req-sp"));
|
|
1083
1083
|
}
|
|
1084
|
-
spans.push(SurveyElementBase.renderLocString(element.
|
|
1084
|
+
spans.push(SurveyElementBase.renderLocString(element.locRenderedTitle, null, "q_title"));
|
|
1085
1085
|
if (element.isRequireTextAfterTitle) {
|
|
1086
1086
|
spans.push(getSpaceSpan("req-sp"));
|
|
1087
1087
|
spans.push(this.renderRequireText(element));
|
|
@@ -1349,6 +1349,81 @@ class SurveyElementHeader extends SurveyElementBase {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
1351
|
|
|
1352
|
+
class SurveyQuestionSigleInputSummary extends ReactSurveyElement {
|
|
1353
|
+
constructor(props) {
|
|
1354
|
+
super(props);
|
|
1355
|
+
}
|
|
1356
|
+
get css() {
|
|
1357
|
+
return this.props.css;
|
|
1358
|
+
}
|
|
1359
|
+
get summary() {
|
|
1360
|
+
return this.props.summary;
|
|
1361
|
+
}
|
|
1362
|
+
renderElement() {
|
|
1363
|
+
if (!this.summary)
|
|
1364
|
+
return null;
|
|
1365
|
+
return this.summary.isEmpty() ? this.renderNoItems() : this.renderItems();
|
|
1366
|
+
}
|
|
1367
|
+
renderItems() {
|
|
1368
|
+
return (_$1("div", { className: this.css.summary }, this.summary.items.map((item, index) => this.renderItem(item, index))));
|
|
1369
|
+
}
|
|
1370
|
+
renderNoItems() {
|
|
1371
|
+
const q = this.summary.question;
|
|
1372
|
+
const placeholder = ReactElementFactory.Instance.createElement("sv-placeholder-" + q.getTemplate(), { cssClasses: this.css, question: q });
|
|
1373
|
+
return placeholder || _$1("div", null, this.renderLocString(this.summary.noEntry));
|
|
1374
|
+
}
|
|
1375
|
+
renderItem(item, index) {
|
|
1376
|
+
const btnEdit = item.btnEdit ?
|
|
1377
|
+
_$1("button", { className: this.css.summaryRowActionEdit, onClick: () => item.btnEdit.action(), title: item.btnEdit.title },
|
|
1378
|
+
_$1(SvgIcon, { iconName: "icon-editsmall-16x16", iconSize: "auto" })) : null;
|
|
1379
|
+
const btnDelete = item.showRemove && item.btnRemove ?
|
|
1380
|
+
_$1("button", { className: this.css.summaryRowActionDelete, onClick: () => item.btnRemove.action(), title: item.btnRemove.title },
|
|
1381
|
+
_$1(SvgIcon, { iconName: "icon-delete-16x16", iconSize: "auto" })) : null;
|
|
1382
|
+
return _$1("div", { className: this.css.summaryRow, key: index },
|
|
1383
|
+
_$1("div", { className: this.css.summaryRowContent }, this.renderLocString(item.locText)),
|
|
1384
|
+
_$1("div", { className: this.css.summaryRowActions },
|
|
1385
|
+
btnEdit,
|
|
1386
|
+
btnDelete));
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
ReactElementFactory.Instance.registerElement("sv-singleinput-summary", (props) => {
|
|
1390
|
+
return _$1(SurveyQuestionSigleInputSummary, props);
|
|
1391
|
+
});
|
|
1392
|
+
|
|
1393
|
+
class SurveyBreadcrumbs extends SurveyElementBase {
|
|
1394
|
+
constructor(props) {
|
|
1395
|
+
super(props);
|
|
1396
|
+
}
|
|
1397
|
+
getStateElement() {
|
|
1398
|
+
return this.props.model;
|
|
1399
|
+
}
|
|
1400
|
+
get items() {
|
|
1401
|
+
return this.props.model.actions;
|
|
1402
|
+
}
|
|
1403
|
+
get css() {
|
|
1404
|
+
return this.props.css;
|
|
1405
|
+
}
|
|
1406
|
+
renderElement() {
|
|
1407
|
+
if (!this.items || !this.items.length)
|
|
1408
|
+
return null;
|
|
1409
|
+
const items = this.renderItems();
|
|
1410
|
+
return (_$1("div", { className: this.css.breadcrumbsRoot }, items));
|
|
1411
|
+
}
|
|
1412
|
+
renderItems() {
|
|
1413
|
+
const result = [];
|
|
1414
|
+
this.items.concat([]).forEach((item, itemIndex) => {
|
|
1415
|
+
if (itemIndex) {
|
|
1416
|
+
result.push(_$1(SvgIcon, { key: item.renderedId + "_separator", className: this.css.breadcrumbsSeparator, iconName: "arrowright-16x16", size: "auto" }));
|
|
1417
|
+
}
|
|
1418
|
+
result.push(_$1(SurveyAction, { key: item.renderedId, item: item }));
|
|
1419
|
+
});
|
|
1420
|
+
return result;
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
ReactElementFactory.Instance.registerElement("sv-breadcrumbs", (props) => {
|
|
1424
|
+
return _$1(SurveyBreadcrumbs, props);
|
|
1425
|
+
});
|
|
1426
|
+
|
|
1352
1427
|
class SurveyQuestion extends SurveyElementBase {
|
|
1353
1428
|
static renderQuestionBody(creator, question) {
|
|
1354
1429
|
// if (!question.isVisible) return null;
|
|
@@ -1422,21 +1497,13 @@ class SurveyQuestion extends SurveyElementBase {
|
|
|
1422
1497
|
};
|
|
1423
1498
|
var cssClasses = question.cssClasses;
|
|
1424
1499
|
var questionRender = this.renderQuestion();
|
|
1425
|
-
var errorsTop = this.question.showErrorOnTop
|
|
1426
|
-
? this.renderErrors(cssClasses, "top")
|
|
1427
|
-
: null;
|
|
1428
|
-
var errorsBottom = this.question.showErrorOnBottom
|
|
1429
|
-
? this.renderErrors(cssClasses, "bottom")
|
|
1430
|
-
: null;
|
|
1431
1500
|
var comment = question && question.hasComment ? this.renderComment(cssClasses) : null;
|
|
1432
1501
|
var descriptionUnderInput = question.hasDescriptionUnderInput
|
|
1433
1502
|
? this.renderDescription()
|
|
1434
1503
|
: null;
|
|
1435
1504
|
return (_$1("div", { className: question.cssContent || undefined, style: contentStyle, role: "presentation" },
|
|
1436
|
-
errorsTop,
|
|
1437
1505
|
questionRender,
|
|
1438
1506
|
comment,
|
|
1439
|
-
errorsBottom,
|
|
1440
1507
|
descriptionUnderInput));
|
|
1441
1508
|
}
|
|
1442
1509
|
renderElement() {
|
|
@@ -1451,16 +1518,31 @@ class SurveyQuestion extends SurveyElementBase {
|
|
|
1451
1518
|
const errorsBelowQuestion = this.question.showErrorsBelowQuestion
|
|
1452
1519
|
? this.renderErrors(cssClasses, "")
|
|
1453
1520
|
: null;
|
|
1454
|
-
|
|
1455
|
-
|
|
1521
|
+
const rootStyle = question.getRootStyle();
|
|
1522
|
+
const singleBreadcrumbs = question.singleInputHasActions ? this.renderSingleInputBreadcrumbs(question, cssClasses) : undefined;
|
|
1523
|
+
const singleSummary = question.singleInputSummary ? this.renderSingleInputSummary(question, cssClasses) : undefined;
|
|
1524
|
+
const singleInput = singleSummary || (question.singleInputQuestion ? this.renderSingleInputQuestion(question, cssClasses) : undefined);
|
|
1525
|
+
const questionContent = singleInput || this.wrapQuestionContent(this.renderQuestionContent());
|
|
1456
1526
|
return (_$1(k$2, null,
|
|
1457
1527
|
_$1("div", { ref: this.rootRef, id: question.id, className: question.getRootCss(), style: rootStyle, role: question.ariaRole, "aria-required": this.question.ariaRequired, "aria-invalid": this.question.ariaInvalid, "aria-label": this.question.ariaLabel, "aria-labelledby": question.ariaLabelledBy, "aria-describedby": question.ariaDescribedBy, "aria-expanded": question.ariaExpanded, "data-name": question.name },
|
|
1528
|
+
singleBreadcrumbs,
|
|
1458
1529
|
errorsAboveQuestion,
|
|
1459
1530
|
headerTop,
|
|
1460
1531
|
questionContent,
|
|
1461
1532
|
headerBottom,
|
|
1462
1533
|
errorsBelowQuestion)));
|
|
1463
1534
|
}
|
|
1535
|
+
renderSingleInputQuestion(question, cssClasses) {
|
|
1536
|
+
const singleQuestion = question.singleInputQuestion;
|
|
1537
|
+
const key = singleQuestion.id;
|
|
1538
|
+
return _$1(SurveyQuestion, { key: key, element: singleQuestion, creator: this.creator, css: cssClasses });
|
|
1539
|
+
}
|
|
1540
|
+
renderSingleInputBreadcrumbs(question, cssClasses) {
|
|
1541
|
+
return _$1(SurveyBreadcrumbs, { model: question.singleInputActions, css: cssClasses });
|
|
1542
|
+
}
|
|
1543
|
+
renderSingleInputSummary(question, cssClasses) {
|
|
1544
|
+
return _$1(SurveyQuestionSigleInputSummary, { summary: question.singleInputSummary, creator: this.creator, css: cssClasses });
|
|
1545
|
+
}
|
|
1464
1546
|
wrapElement(element) {
|
|
1465
1547
|
const survey = this.question.survey;
|
|
1466
1548
|
let wrapper = null;
|
|
@@ -1490,6 +1572,8 @@ class SurveyQuestion extends SurveyElementBase {
|
|
|
1490
1572
|
_$1(SurveyQuestionCommentItem, { question: this.question, cssClasses: cssClasses, otherCss: cssClasses.other, isDisplayMode: this.question.isInputReadOnly })));
|
|
1491
1573
|
}
|
|
1492
1574
|
renderHeader(question) {
|
|
1575
|
+
if (question.singleInputHideHeader)
|
|
1576
|
+
return null;
|
|
1493
1577
|
return _$1(SurveyElementHeader, { element: question });
|
|
1494
1578
|
}
|
|
1495
1579
|
renderErrors(cssClasses, location) {
|
|
@@ -1513,9 +1597,6 @@ class SurveyElementErrors extends ReactSurveyElement {
|
|
|
1513
1597
|
get creator() {
|
|
1514
1598
|
return this.props.creator;
|
|
1515
1599
|
}
|
|
1516
|
-
get location() {
|
|
1517
|
-
return this.props.location;
|
|
1518
|
-
}
|
|
1519
1600
|
getState(prevState = null) {
|
|
1520
1601
|
return !prevState ? { error: 0 } : { error: prevState.error + 1 };
|
|
1521
1602
|
}
|
|
@@ -1895,7 +1976,7 @@ class PopupModal extends SurveyElementBase {
|
|
|
1895
1976
|
PopupModal.modalDescriptors = [];
|
|
1896
1977
|
|
|
1897
1978
|
/*!
|
|
1898
|
-
* surveyjs - Survey JavaScript library v2.0.
|
|
1979
|
+
* surveyjs - Survey JavaScript library v2.0.7
|
|
1899
1980
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1900
1981
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1901
1982
|
*/
|
|
@@ -1925,9 +2006,11 @@ var iconsV1 = {
|
|
|
1925
2006
|
"close-24x24": "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13.4101 12L20.7001 4.71C21.0901 4.32 21.0901 3.69 20.7001 3.3C20.3101 2.91 19.6801 2.91 19.2901 3.3L12.0001 10.59L4.71006 3.29C4.32006 2.9 3.68006 2.9 3.29006 3.29C2.90006 3.68 2.90006 4.32 3.29006 4.71L10.5801 12L3.29006 19.29C2.90006 19.68 2.90006 20.31 3.29006 20.7C3.49006 20.9 3.74006 20.99 4.00006 20.99C4.26006 20.99 4.51006 20.89 4.71006 20.7L12.0001 13.41L19.2901 20.7C19.4901 20.9 19.7401 20.99 20.0001 20.99C20.2601 20.99 20.5101 20.89 20.7101 20.7C21.1001 20.31 21.1001 19.68 20.7101 19.29L13.4201 12H13.4101Z\"></path></svg>",
|
|
1926
2007
|
"collapse-16x16": "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 6L3 5L8 10L13 5L14 6L8 12L2 6Z\"></path></svg>",
|
|
1927
2008
|
"collapsedetails-16x16": "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13 7H3V9H13V7Z\"></path></svg>",
|
|
2009
|
+
"delete-16x16": "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15 2H14H11V1C11 0.4 10.6 0 10 0H7C6.4 0 6 0.4 6 1V2H3H2V4H3V14C3 15.1 3.9 16 5 16H12C13.1 16 14 15.1 14 14V4H15V2ZM7 1H10V2H7V1ZM12 14H5V4H12V14ZM7 13H6V5H7V13ZM9 13H8V5H9V13ZM11 13H10V5H11V13Z\"></path></svg>",
|
|
1928
2010
|
"delete-24x24": "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M22 4H20H16V2C16 0.9 15.1 0 14 0H10C8.9 0 8 0.9 8 2V4H4H2V6H4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V6H22V4ZM10 2H14V4H10V2ZM18 20H6V6H8H16H18V20ZM14 8H16V18H14V8ZM11 8H13V18H11V8ZM8 8H10V18H8V8Z\"></path></svg>",
|
|
1929
2011
|
"drag-24x24": "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13 6C13 4.9 13.9 4 15 4C16.1 4 17 4.9 17 6C17 7.1 16.1 8 15 8C13.9 8 13 7.1 13 6ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16ZM9 16C7.9 16 7 16.9 7 18C7 19.1 7.9 20 9 20C10.1 20 11 19.1 11 18C11 16.9 10.1 16 9 16Z\"></path></svg>",
|
|
1930
2012
|
"draghorizontal-24x16": "<svg viewBox=\"0 0 24 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M18 9C19.1 9 20 9.9 20 11C20 12.1 19.1 13 18 13C16.9 13 16 12.1 16 11C16 9.9 16.9 9 18 9ZM20 5C20 3.9 19.1 3 18 3C16.9 3 16 3.9 16 5C16 6.1 16.9 7 18 7C19.1 7 20 6.1 20 5ZM14 11C14 9.9 13.1 9 12 9C10.9 9 10 9.9 10 11C10 12.1 10.9 13 12 13C13.1 13 14 12.1 14 11ZM14 5C14 3.9 13.1 3 12 3C10.9 3 10 3.9 10 5C10 6.1 10.9 7 12 7C13.1 7 14 6.1 14 5ZM8 11C8 9.9 7.1 9 6 9C4.9 9 4 9.9 4 11C4 12.1 4.9 13 6 13C7.1 13 8 12.1 8 11ZM8 5C8 3.9 7.1 3 6 3C4.9 3 4 3.9 4 5C4 6.1 4.9 7 6 7C7.1 7 8 6.1 8 5Z\"></path></svg>",
|
|
2013
|
+
"editsmall-16x16": "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13.59 4.5884L11.42 2.4184C11.03 2.0284 10.52 1.8284 10.01 1.8284C9.5 1.8284 8.99 2.0284 8.6 2.4184L3.76 7.2384C2.63 8.3684 2 9.8884 2 11.4784V12.9884C2 13.5384 2.45 13.9884 3 13.9884H4.51C6.1 13.9884 7.63 13.3584 8.75 12.2284L13.58 7.3984C14.36 6.6184 14.36 5.3484 13.58 4.5684L13.59 4.5884ZM7.35 10.8284C6.59 11.5884 5.59 11.9984 4.52 11.9984H4.01V11.4884C4.01 10.4184 4.43 9.4184 5.18 8.6584L7.72 6.1184L9.89 8.2884L7.35 10.8284ZM11.3 6.8784L9.13 4.7084L10.01 3.8284L12.18 5.9984L11.3 6.8784Z\"></path></svg>",
|
|
1931
2014
|
"expand-16x16": "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 14L5 13L10 8L5 3L6 2L12 8L6 14Z\"></path></svg>",
|
|
1932
2015
|
"expanddetails-16x16": "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13 7H9V3H7V7H3V9H7V13H9V9H13V7Z\"></path></svg>",
|
|
1933
2016
|
"file-72x72": "<svg viewBox=\"0 0 72 72\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M62.83 12.83L53.17 3.17C52.7982 2.79866 52.357 2.50421 51.8714 2.30346C51.3858 2.1027 50.8654 1.99959 50.34 2H14C12.4087 2 10.8826 2.63214 9.75735 3.75736C8.63214 4.88258 8 6.4087 8 8V64C8 65.5913 8.63214 67.1174 9.75735 68.2426C10.8826 69.3679 12.4087 70 14 70H58C59.5913 70 61.1174 69.3679 62.2426 68.2426C63.3679 67.1174 64 65.5913 64 64V15.66C64.0004 15.1346 63.8973 14.6142 63.6965 14.1286C63.4958 13.643 63.2013 13.2018 62.83 12.83ZM52 4.83L61.17 14H56C54.9391 14 53.9217 13.5786 53.1716 12.8284C52.4214 12.0783 52 11.0609 52 10V4.83ZM62 64C62 65.0609 61.5786 66.0783 60.8284 66.8284C60.0783 67.5786 59.0609 68 58 68H14C12.9391 68 11.9217 67.5786 11.1716 66.8284C10.4214 66.0783 10 65.0609 10 64V8C10 6.93914 10.4214 5.92172 11.1716 5.17157C11.9217 4.42143 12.9391 4 14 4H50V10C50 11.5913 50.6321 13.1174 51.7574 14.2426C52.8826 15.3679 54.4087 16 56 16H62V64ZM22 26H50V28H22V26ZM22 32H50V34H22V32ZM22 38H50V40H22V38ZM22 44H50V46H22V44Z\"></path></svg>",
|
|
@@ -1963,7 +2046,7 @@ var iconsV1 = {
|
|
|
1963
2046
|
};
|
|
1964
2047
|
|
|
1965
2048
|
/*!
|
|
1966
|
-
* surveyjs - Survey JavaScript library v2.0.
|
|
2049
|
+
* surveyjs - Survey JavaScript library v2.0.7
|
|
1967
2050
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1968
2051
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1969
2052
|
*/
|
|
@@ -1993,9 +2076,11 @@ var iconsV2 = {
|
|
|
1993
2076
|
"close-24x24": "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M19.5275 18.4675C19.8175 18.7575 19.8175 19.2375 19.5275 19.5275C19.3775 19.6775 19.1875 19.7475 18.9975 19.7475C18.8075 19.7475 18.6175 19.6775 18.4675 19.5275L11.9975 13.0575L5.5275 19.5275C5.3775 19.6775 5.1875 19.7475 4.9975 19.7475C4.8075 19.7475 4.6175 19.6775 4.4675 19.5275C4.1775 19.2375 4.1775 18.7575 4.4675 18.4675L10.9375 11.9975L4.4675 5.5275C4.1775 5.2375 4.1775 4.7575 4.4675 4.4675C4.7575 4.1775 5.2375 4.1775 5.5275 4.4675L11.9975 10.9375L18.4675 4.4675C18.7575 4.1775 19.2375 4.1775 19.5275 4.4675C19.8175 4.7575 19.8175 5.2375 19.5275 5.5275L13.0575 11.9975L19.5275 18.4675Z\"></path></svg>",
|
|
1994
2077
|
"collapse-16x16": "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.75 8C11.75 8.41 11.41 8.75 11 8.75H5C4.59 8.75 4.25 8.41 4.25 8C4.25 7.59 4.59 7.25 5 7.25H11C11.41 7.25 11.75 7.59 11.75 8Z\"></path></svg>",
|
|
1995
2078
|
"collapsedetails-16x16": "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.75 8C11.75 8.41 11.41 8.75 11 8.75H5C4.59 8.75 4.25 8.41 4.25 8C4.25 7.59 4.59 7.25 5 7.25H11C11.41 7.25 11.75 7.59 11.75 8Z\"></path></svg>",
|
|
2079
|
+
"delete-16x16": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M13 3.25H10.75V3C10.75 2.04 9.96 1.25 9 1.25H7C6.04 1.25 5.25 2.04 5.25 3V3.25H3C2.59 3.25 2.25 3.59 2.25 4C2.25 4.41 2.59 4.75 3 4.75H3.25V13C3.25 13.96 4.04 14.75 5 14.75H11C11.96 14.75 12.75 13.96 12.75 13V4.75H13C13.41 4.75 13.75 4.41 13.75 4C13.75 3.59 13.41 3.25 13 3.25ZM6.75 3C6.75 2.86 6.86 2.75 7 2.75H9C9.14 2.75 9.25 2.86 9.25 3V3.25H6.75V3ZM11.25 13C11.25 13.14 11.14 13.25 11 13.25H5C4.86 13.25 4.75 13.14 4.75 13V4.75H11.25V13ZM9.25 6.25C9.66 6.25 10 6.59 10 7V11C10 11.41 9.66 11.75 9.25 11.75C8.84 11.75 8.5 11.41 8.5 11V7C8.5 6.59 8.84 6.25 9.25 6.25ZM7.5 7V11C7.5 11.41 7.16 11.75 6.75 11.75C6.34 11.75 6 11.41 6 11V7C6 6.59 6.34 6.25 6.75 6.25C7.16 6.25 7.5 6.59 7.5 7Z\"></path></svg>",
|
|
1996
2080
|
"delete-24x24": "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.75 9V17C12.75 17.41 12.41 17.75 12 17.75C11.59 17.75 11.25 17.41 11.25 17V9C11.25 8.59 11.59 8.25 12 8.25C12.41 8.25 12.75 8.59 12.75 9ZM14.25 9V17C14.25 17.41 14.59 17.75 15 17.75C15.41 17.75 15.75 17.41 15.75 17V9C15.75 8.59 15.41 8.25 15 8.25C14.59 8.25 14.25 8.59 14.25 9ZM9 8.25C8.59 8.25 8.25 8.59 8.25 9V17C8.25 17.41 8.59 17.75 9 17.75C9.41 17.75 9.75 17.41 9.75 17V9C9.75 8.59 9.41 8.25 9 8.25ZM20.75 6C20.75 6.41 20.41 6.75 20 6.75H18.75V18C18.75 19.52 17.52 20.75 16 20.75H8C6.48 20.75 5.25 19.52 5.25 18V6.75H4C3.59 6.75 3.25 6.41 3.25 6C3.25 5.59 3.59 5.25 4 5.25H8.25V4C8.25 3.04 9.04 2.25 10 2.25H14C14.96 2.25 15.75 3.04 15.75 4V5.25H20C20.41 5.25 20.75 5.59 20.75 6ZM9.75 5.25H14.25V4C14.25 3.86 14.14 3.75 14 3.75H10C9.86 3.75 9.75 3.86 9.75 4V5.25ZM17.25 6.75H6.75V18C6.75 18.69 7.31 19.25 8 19.25H16C16.69 19.25 17.25 18.69 17.25 18V6.75Z\"></path></svg>",
|
|
1997
2081
|
"drag-24x24": "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M14.5 8.75C15.19 8.75 15.75 8.19 15.75 7.5C15.75 6.81 15.19 6.25 14.5 6.25C13.81 6.25 13.25 6.81 13.25 7.5C13.25 8.19 13.81 8.75 14.5 8.75ZM14.5 7.25C14.64 7.25 14.75 7.36 14.75 7.5C14.75 7.78 14.25 7.78 14.25 7.5C14.25 7.36 14.36 7.25 14.5 7.25ZM9.5 6.25C8.81 6.25 8.25 6.81 8.25 7.5C8.25 8.19 8.81 8.75 9.5 8.75C10.19 8.75 10.75 8.19 10.75 7.5C10.75 6.81 10.19 6.25 9.5 6.25ZM9.25 7.5C9.25 7.36 9.36 7.25 9.5 7.25C9.64 7.25 9.75 7.36 9.75 7.5C9.75 7.78 9.25 7.78 9.25 7.5ZM14.5 11.25C13.81 11.25 13.25 11.81 13.25 12.5C13.25 13.19 13.81 13.75 14.5 13.75C15.19 13.75 15.75 13.19 15.75 12.5C15.75 11.81 15.19 11.25 14.5 11.25ZM14.25 12.5C14.25 12.36 14.36 12.25 14.5 12.25C14.64 12.25 14.75 12.36 14.75 12.5C14.75 12.78 14.25 12.78 14.25 12.5ZM9.5 11.25C8.81 11.25 8.25 11.81 8.25 12.5C8.25 13.19 8.81 13.75 9.5 13.75C10.19 13.75 10.75 13.19 10.75 12.5C10.75 11.81 10.19 11.25 9.5 11.25ZM9.25 12.5C9.25 12.36 9.36 12.25 9.5 12.25C9.64 12.25 9.75 12.36 9.75 12.5C9.75 12.78 9.25 12.78 9.25 12.5ZM14.5 16.25C13.81 16.25 13.25 16.81 13.25 17.5C13.25 18.19 13.81 18.75 14.5 18.75C15.19 18.75 15.75 18.19 15.75 17.5C15.75 16.81 15.19 16.25 14.5 16.25ZM14.25 17.5C14.25 17.36 14.36 17.25 14.5 17.25C14.64 17.25 14.75 17.36 14.75 17.5C14.75 17.78 14.25 17.78 14.25 17.5ZM9.5 16.25C8.81 16.25 8.25 16.81 8.25 17.5C8.25 18.19 8.81 18.75 9.5 18.75C10.19 18.75 10.75 18.19 10.75 17.5C10.75 16.81 10.19 16.25 9.5 16.25ZM9.25 17.5C9.25 17.36 9.36 17.25 9.5 17.25C9.64 17.25 9.75 17.36 9.75 17.5C9.75 17.78 9.25 17.78 9.25 17.5Z\"></path></svg>",
|
|
1998
2082
|
"draghorizontal-24x16": "<svg viewBox=\"0 0 24 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.5 9.25C16.81 9.25 16.25 9.81 16.25 10.5C16.25 11.19 16.81 11.75 17.5 11.75C18.19 11.75 18.75 11.19 18.75 10.5C18.75 9.81 18.19 9.25 17.5 9.25ZM17.25 10.5C17.25 10.36 17.36 10.25 17.5 10.25C17.64 10.25 17.75 10.36 17.75 10.5C17.75 10.78 17.25 10.78 17.25 10.5ZM17.5 6.75C18.19 6.75 18.75 6.19 18.75 5.5C18.75 4.81 18.19 4.25 17.5 4.25C16.81 4.25 16.25 4.81 16.25 5.5C16.25 6.19 16.81 6.75 17.5 6.75ZM17.5 5.25C17.64 5.25 17.75 5.36 17.75 5.5C17.75 5.78 17.25 5.78 17.25 5.5C17.25 5.36 17.36 5.25 17.5 5.25ZM12.5 9.25C11.81 9.25 11.25 9.81 11.25 10.5C11.25 11.19 11.81 11.75 12.5 11.75C13.19 11.75 13.75 11.19 13.75 10.5C13.75 9.81 13.19 9.25 12.5 9.25ZM12.25 10.5C12.25 10.36 12.36 10.25 12.5 10.25C12.64 10.25 12.75 10.36 12.75 10.5C12.75 10.78 12.25 10.78 12.25 10.5ZM12.5 4.25C11.81 4.25 11.25 4.81 11.25 5.5C11.25 6.19 11.81 6.75 12.5 6.75C13.19 6.75 13.75 6.19 13.75 5.5C13.75 4.81 13.19 4.25 12.5 4.25ZM12.25 5.5C12.25 5.36 12.36 5.25 12.5 5.25C12.64 5.25 12.75 5.36 12.75 5.5C12.75 5.78 12.25 5.78 12.25 5.5ZM7.5 9.25C6.81 9.25 6.25 9.81 6.25 10.5C6.25 11.19 6.81 11.75 7.5 11.75C8.19 11.75 8.75 11.19 8.75 10.5C8.75 9.81 8.19 9.25 7.5 9.25ZM7.25 10.5C7.25 10.36 7.36 10.25 7.5 10.25C7.64 10.25 7.75 10.36 7.75 10.5C7.75 10.78 7.25 10.78 7.25 10.5ZM7.5 4.25C6.81 4.25 6.25 4.81 6.25 5.5C6.25 6.19 6.81 6.75 7.5 6.75C8.19 6.75 8.75 6.19 8.75 5.5C8.75 4.81 8.19 4.25 7.5 4.25ZM7.25 5.5C7.25 5.36 7.36 5.25 7.5 5.25C7.64 5.25 7.75 5.36 7.75 5.5C7.75 5.78 7.25 5.78 7.25 5.5Z\"></path></svg>",
|
|
2083
|
+
"editsmall-16x16": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M13.1209 3.05249L12.9509 2.88249C11.8809 1.81249 10.1309 1.81249 9.06089 2.88249L3.47089 8.46249C3.37089 8.56249 3.31089 8.68249 3.27089 8.81249L2.27089 12.8125C2.21089 13.0625 2.28089 13.3425 2.47089 13.5225C2.61089 13.6625 2.80089 13.7425 3.00089 13.7425C3.06089 13.7425 3.12089 13.7425 3.18089 13.7225L7.18089 12.7225C7.31089 12.6925 7.43089 12.6225 7.53089 12.5225L13.1209 6.93249C14.1909 5.86249 14.1909 4.11249 13.1209 3.04249V3.05249ZM6.62089 11.3125L4.04089 11.9625L4.69089 9.38249L8.01089 6.06249L9.95089 8.00249L6.63089 11.3225L6.62089 11.3125ZM12.0609 5.87249L11.0009 6.93249L9.06089 4.99249L10.1209 3.93249C10.6109 3.44249 11.4009 3.44249 11.8909 3.93249L12.0609 4.10249C12.5509 4.59249 12.5509 5.38249 12.0609 5.87249Z\"></path></svg>",
|
|
1999
2084
|
"expand-16x16": "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.75 8C11.75 8.41 11.41 8.75 11 8.75H8.75V11C8.75 11.41 8.41 11.75 8 11.75C7.59 11.75 7.25 11.41 7.25 11V8.75H5C4.59 8.75 4.25 8.41 4.25 8C4.25 7.59 4.59 7.25 5 7.25H7.25V5C7.25 4.59 7.59 4.25 8 4.25C8.41 4.25 8.75 4.59 8.75 5V7.25H11C11.41 7.25 11.75 7.59 11.75 8Z\"></path></svg>",
|
|
2000
2085
|
"expanddetails-16x16": "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.75 8C11.75 8.41 11.41 8.75 11 8.75H8.75V11C8.75 11.41 8.41 11.75 8 11.75C7.59 11.75 7.25 11.41 7.25 11V8.75H5C4.59 8.75 4.25 8.41 4.25 8C4.25 7.59 4.59 7.25 5 7.25H7.25V5C7.25 4.59 7.59 4.25 8 4.25C8.41 4.25 8.75 4.59 8.75 5V7.25H11C11.41 7.25 11.75 7.59 11.75 8Z\"></path></svg>",
|
|
2001
2086
|
"file-72x72": "<svg viewBox=\"0 0 72 72\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M62.83 12.83L53.17 3.17C52.7982 2.79866 52.357 2.50421 51.8714 2.30346C51.3858 2.1027 50.8654 1.99959 50.34 2H14C12.4087 2 10.8826 2.63214 9.75735 3.75736C8.63214 4.88258 8 6.4087 8 8V64C8 65.5913 8.63214 67.1174 9.75735 68.2426C10.8826 69.3679 12.4087 70 14 70H58C59.5913 70 61.1174 69.3679 62.2426 68.2426C63.3679 67.1174 64 65.5913 64 64V15.66C64.0004 15.1346 63.8973 14.6142 63.6965 14.1286C63.4958 13.643 63.2013 13.2018 62.83 12.83ZM52 4.83L61.17 14H56C54.9391 14 53.9217 13.5786 53.1716 12.8284C52.4214 12.0783 52 11.0609 52 10V4.83ZM62 64C62 65.0609 61.5786 66.0783 60.8284 66.8284C60.0783 67.5786 59.0609 68 58 68H14C12.9391 68 11.9217 67.5786 11.1716 66.8284C10.4214 66.0783 10 65.0609 10 64V8C10 6.93914 10.4214 5.92172 11.1716 5.17157C11.9217 4.42143 12.9391 4 14 4H50V10C50 11.5913 50.6321 13.1174 51.7574 14.2426C52.8826 15.3679 54.4087 16 56 16H62V64ZM22 26H50V28H22V26ZM22 32H50V34H22V32ZM22 38H50V40H22V38ZM22 44H50V46H22V44Z\"></path></svg>",
|
|
@@ -2633,8 +2718,9 @@ class SurveyQuestionCheckbox extends SurveyQuestionElementBase {
|
|
|
2633
2718
|
if (this.question.blockedRow) {
|
|
2634
2719
|
return _$1("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
|
|
2635
2720
|
}
|
|
2636
|
-
else
|
|
2721
|
+
else {
|
|
2637
2722
|
return _$1(k$2, null, this.getItems(cssClasses, this.question.bodyItems));
|
|
2723
|
+
}
|
|
2638
2724
|
}
|
|
2639
2725
|
getItems(cssClasses, choices) {
|
|
2640
2726
|
var renderedItems = [];
|
|
@@ -2872,7 +2958,7 @@ class SurveyQuestionRankingItem extends ReactSurveyElement {
|
|
|
2872
2958
|
}
|
|
2873
2959
|
renderElement() {
|
|
2874
2960
|
let itemContent = ReactElementFactory.Instance.createElement(this.question.itemComponent, { item: this.item, cssClasses: this.cssClasses });
|
|
2875
|
-
return (_$1("div", { tabIndex: this.itemTabIndex, className: this.itemClass, onKeyDown: this.handleKeydown, onPointerDown: this.handlePointerDown, onPointerUp: this.handlePointerUp, "data-sv-drop-target-ranking-item": this.index },
|
|
2961
|
+
return (_$1("div", { id: this.question.getItemId(this.item), tabIndex: this.itemTabIndex, className: this.itemClass, onKeyDown: this.handleKeydown, onPointerDown: this.handlePointerDown, onPointerUp: this.handlePointerUp, "data-sv-drop-target-ranking-item": this.index },
|
|
2876
2962
|
_$1("div", { tabIndex: -1, style: { outline: "none" } },
|
|
2877
2963
|
_$1("div", { className: this.cssClasses.itemGhostNode }),
|
|
2878
2964
|
_$1("div", { className: this.cssClasses.itemContent },
|
|
@@ -2941,10 +3027,10 @@ ReactElementFactory.Instance.registerElement("sv-rating-item", (props) => {
|
|
|
2941
3027
|
|
|
2942
3028
|
class RatingItemStar extends RatingItemBase {
|
|
2943
3029
|
render() {
|
|
2944
|
-
return (_$1("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClass(this.item.itemValue), onMouseOver: e => this.question.onItemMouseIn(this.item), onMouseOut: e => this.question.onItemMouseOut(this.item) },
|
|
3030
|
+
return (_$1("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClass(this.item.itemValue), onMouseOver: e => this.question.onItemMouseIn(this.item), onMouseOut: e => this.question.onItemMouseOut(this.item), title: this.item.text },
|
|
2945
3031
|
_$1("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: () => { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
|
2946
|
-
_$1(SvgIcon, { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon
|
|
2947
|
-
_$1(SvgIcon, { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt
|
|
3032
|
+
_$1(SvgIcon, { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon }),
|
|
3033
|
+
_$1(SvgIcon, { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt })));
|
|
2948
3034
|
}
|
|
2949
3035
|
}
|
|
2950
3036
|
ReactElementFactory.Instance.registerElement("sv-rating-item-star", (props) => {
|
|
@@ -2953,9 +3039,9 @@ ReactElementFactory.Instance.registerElement("sv-rating-item-star", (props) => {
|
|
|
2953
3039
|
|
|
2954
3040
|
class RatingItemSmiley extends RatingItemBase {
|
|
2955
3041
|
render() {
|
|
2956
|
-
return (_$1("label", { onMouseDown: this.handleOnMouseDown, style: this.question.getItemStyle(this.item.itemValue, this.item.highlight), className: this.question.getItemClass(this.item.itemValue), onMouseOver: e => this.question.onItemMouseIn(this.item), onMouseOut: e => this.question.onItemMouseOut(this.item) },
|
|
3042
|
+
return (_$1("label", { onMouseDown: this.handleOnMouseDown, style: this.question.getItemStyle(this.item.itemValue, this.item.highlight), className: this.question.getItemClass(this.item.itemValue), onMouseOver: e => this.question.onItemMouseIn(this.item), onMouseOut: e => this.question.onItemMouseOut(this.item), title: this.item.text },
|
|
2957
3043
|
_$1("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: () => { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
|
2958
|
-
_$1(SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item.itemValue)
|
|
3044
|
+
_$1(SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item.itemValue) })));
|
|
2959
3045
|
}
|
|
2960
3046
|
}
|
|
2961
3047
|
ReactElementFactory.Instance.registerElement("sv-rating-item-smiley", (props) => {
|
|
@@ -3129,18 +3215,20 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
|
|
|
3129
3215
|
return this.questionBase.renderedValue;
|
|
3130
3216
|
}
|
|
3131
3217
|
renderReadOnlyElement() {
|
|
3132
|
-
|
|
3218
|
+
if (this.question.locReadOnlyText) {
|
|
3219
|
+
return this.renderLocString(this.question.locReadOnlyText);
|
|
3220
|
+
}
|
|
3221
|
+
else {
|
|
3222
|
+
return null;
|
|
3223
|
+
}
|
|
3133
3224
|
}
|
|
3134
3225
|
renderSelect(cssClasses) {
|
|
3135
3226
|
var _a, _b;
|
|
3136
3227
|
let selectElement = null;
|
|
3137
3228
|
if (this.question.isReadOnly) {
|
|
3138
|
-
const text = (this.question.selectedItemLocText) ? this.renderLocString(this.question.selectedItemLocText) : "";
|
|
3139
3229
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3140
3230
|
// @ts-ignore
|
|
3141
|
-
selectElement = _$1("div", { id: this.question.inputId, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, tabIndex: this.question.isDisabledAttr ? undefined : 0, className: this.question.getControlClass(), ref: (div) => (this.setControl(div)) },
|
|
3142
|
-
text,
|
|
3143
|
-
this.renderReadOnlyElement());
|
|
3231
|
+
selectElement = _$1("div", { id: this.question.inputId, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, tabIndex: this.question.isDisabledAttr ? undefined : 0, className: this.question.getControlClass(), ref: (div) => (this.setControl(div)) }, this.renderReadOnlyElement());
|
|
3144
3232
|
}
|
|
3145
3233
|
else {
|
|
3146
3234
|
selectElement = _$1(k$2, null,
|
|
@@ -3382,14 +3470,14 @@ class SurveyQuestionMatrix extends SurveyQuestionElementBase {
|
|
|
3382
3470
|
var key = "row-" + row.name + "-" + i;
|
|
3383
3471
|
rows.push(_$1(SurveyQuestionMatrixRow, { key: key, question: this.question, cssClasses: cssClasses, row: row, isFirst: i == 0 }));
|
|
3384
3472
|
}
|
|
3385
|
-
var header = !this.question.showHeader ? null : (_$1("thead",
|
|
3473
|
+
var header = !this.question.showHeader ? null : (_$1("thead", { role: "presentation" },
|
|
3386
3474
|
_$1("tr", null,
|
|
3387
3475
|
rowsTH,
|
|
3388
3476
|
headers)));
|
|
3389
3477
|
return (_$1("div", { className: cssClasses.tableWrapper, ref: root => (this.setControl(root)) },
|
|
3390
|
-
_$1("fieldset",
|
|
3391
|
-
_$1("legend", { className: "sv-
|
|
3392
|
-
_$1("table", { className: this.question.getTableCss() },
|
|
3478
|
+
_$1("fieldset", { role: "radiogroup" },
|
|
3479
|
+
_$1("legend", { className: "sv-visuallyhidden" }, this.question.locTitle.renderedHtml),
|
|
3480
|
+
_$1("table", { className: this.question.getTableCss(), role: "presentation" },
|
|
3393
3481
|
header,
|
|
3394
3482
|
_$1("tbody", null, rows)))));
|
|
3395
3483
|
}
|
|
@@ -3567,24 +3655,6 @@ class LoadingIndicatorComponent extends x$2 {
|
|
|
3567
3655
|
}
|
|
3568
3656
|
}
|
|
3569
3657
|
|
|
3570
|
-
class SurveyFileChooseButton extends ReactSurveyElement {
|
|
3571
|
-
constructor(props) {
|
|
3572
|
-
super(props);
|
|
3573
|
-
}
|
|
3574
|
-
get question() {
|
|
3575
|
-
return (this.props.item && this.props.item.data.question) || this.props.data.question;
|
|
3576
|
-
}
|
|
3577
|
-
render() {
|
|
3578
|
-
return attachKey2click(_$1("label", { tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonText, onClick: (e) => this.question.chooseFile(e.nativeEvent) },
|
|
3579
|
-
(!!this.question.cssClasses.chooseFileIconId) ? _$1(SvgIcon, { title: this.question.chooseButtonText, iconName: this.question.cssClasses.chooseFileIconId, size: "auto" }) : null,
|
|
3580
|
-
_$1("span", null, this.question.chooseButtonText)));
|
|
3581
|
-
}
|
|
3582
|
-
}
|
|
3583
|
-
ReactElementFactory.Instance.registerElement("sv-file-choose-btn", (props) => {
|
|
3584
|
-
return _$1(SurveyFileChooseButton, props);
|
|
3585
|
-
});
|
|
3586
|
-
|
|
3587
|
-
// import { ReactElementFactory, SurveyFileChooseButton } from "../entries/react-ui-model";
|
|
3588
3658
|
class SurveyQuestionFile extends SurveyQuestionElementBase {
|
|
3589
3659
|
constructor(props) {
|
|
3590
3660
|
super(props);
|
|
@@ -3597,8 +3667,6 @@ class SurveyQuestionFile extends SurveyQuestionElementBase {
|
|
|
3597
3667
|
const loadingIndicator = this.question.showLoadingIndicator ? this.renderLoadingIndicator() : null;
|
|
3598
3668
|
const video = this.question.isPlayingVideo ? this.renderVideo() : null;
|
|
3599
3669
|
const fileDecorator = this.question.showFileDecorator ? this.renderFileDecorator() : null;
|
|
3600
|
-
const clearButton = this.question.showRemoveButton ? this.renderClearButton(this.question.cssClasses.removeButton) : null;
|
|
3601
|
-
const clearButtonBottom = this.question.showRemoveButtonBottom ? this.renderClearButton(this.question.cssClasses.removeButtonBottom) : null;
|
|
3602
3670
|
const fileNavigator = this.question.fileNavigatorVisible ? (_$1(SurveyActionBar, { model: this.question.fileNavigator })) : null;
|
|
3603
3671
|
let fileInput;
|
|
3604
3672
|
if (this.question.isReadOnlyAttr) {
|
|
@@ -3619,29 +3687,14 @@ class SurveyQuestionFile extends SurveyQuestionElementBase {
|
|
|
3619
3687
|
fileDecorator,
|
|
3620
3688
|
loadingIndicator,
|
|
3621
3689
|
video,
|
|
3622
|
-
clearButton,
|
|
3623
3690
|
preview,
|
|
3624
|
-
clearButtonBottom,
|
|
3625
3691
|
fileNavigator)));
|
|
3626
3692
|
}
|
|
3627
3693
|
renderFileDecorator() {
|
|
3628
|
-
const chooseButton = this.question.showChooseButton ? this.renderChooseButton() : null;
|
|
3629
3694
|
const actionsContainer = this.question.actionsContainerVisible ? _$1(SurveyActionBar, { model: this.question.actionsContainer }) : null;
|
|
3630
|
-
const noFileChosen = this.question.isEmpty() ? (_$1("span", { className: this.question.cssClasses.noFileChosen }, this.question.noFileChosenCaption)) : null;
|
|
3631
3695
|
return (_$1("div", { className: this.question.getFileDecoratorCss() },
|
|
3632
|
-
_$1("span", { className: this.question.cssClasses.dragAreaPlaceholder }, this.renderLocString(this.question.locRenderedPlaceholder)),
|
|
3633
|
-
_$1("div", { className: this.question.cssClasses.wrapper },
|
|
3634
|
-
chooseButton,
|
|
3635
|
-
actionsContainer,
|
|
3636
|
-
noFileChosen)));
|
|
3637
|
-
}
|
|
3638
|
-
renderChooseButton() {
|
|
3639
|
-
return _$1(SurveyFileChooseButton, { data: { question: this.question } });
|
|
3640
|
-
}
|
|
3641
|
-
renderClearButton(className) {
|
|
3642
|
-
return !this.question.isUploading ? (_$1("button", { type: "button", onClick: this.question.doClean, className: className },
|
|
3643
|
-
_$1("span", null, this.question.clearButtonCaption),
|
|
3644
|
-
(!!this.question.cssClasses.removeButtonIconId) ? _$1(SvgIcon, { iconName: this.question.cssClasses.removeButtonIconId, size: "auto", title: this.question.clearButtonCaption }) : null)) : null;
|
|
3696
|
+
this.question.showDragAreaPlaceholder ? _$1("span", { className: this.question.cssClasses.dragAreaPlaceholder }, this.renderLocString(this.question.locRenderedPlaceholder)) : false,
|
|
3697
|
+
_$1("div", { className: this.question.cssClasses.wrapper }, actionsContainer)));
|
|
3645
3698
|
}
|
|
3646
3699
|
renderPreview() {
|
|
3647
3700
|
return ReactElementFactory.Instance.createElement("sv-file-preview", { question: this.question });
|
|
@@ -3662,6 +3715,23 @@ ReactQuestionFactory.Instance.registerQuestion("file", props => {
|
|
|
3662
3715
|
return _$1(SurveyQuestionFile, props);
|
|
3663
3716
|
});
|
|
3664
3717
|
|
|
3718
|
+
class SurveyFileChooseButton extends ReactSurveyElement {
|
|
3719
|
+
constructor(props) {
|
|
3720
|
+
super(props);
|
|
3721
|
+
}
|
|
3722
|
+
get question() {
|
|
3723
|
+
return (this.props.item && this.props.item.data.question) || this.props.data.question;
|
|
3724
|
+
}
|
|
3725
|
+
render() {
|
|
3726
|
+
return attachKey2click(_$1("label", { tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonText, onClick: (e) => this.question.chooseFile(e.nativeEvent) },
|
|
3727
|
+
(!!this.question.cssClasses.chooseFileIconId) ? _$1(SvgIcon, { title: this.question.chooseButtonText, iconName: this.question.cssClasses.chooseFileIconId, size: "auto" }) : null,
|
|
3728
|
+
_$1("span", null, this.question.chooseButtonText)));
|
|
3729
|
+
}
|
|
3730
|
+
}
|
|
3731
|
+
ReactElementFactory.Instance.registerElement("sv-file-choose-btn", (props) => {
|
|
3732
|
+
return _$1(SurveyFileChooseButton, props);
|
|
3733
|
+
});
|
|
3734
|
+
|
|
3665
3735
|
class SurveyFileItem extends SurveyElementBase {
|
|
3666
3736
|
get question() {
|
|
3667
3737
|
return this.props.question;
|
|
@@ -3720,8 +3790,7 @@ class SurveyFilePreview extends SurveyElementBase {
|
|
|
3720
3790
|
}, title: val.name, download: val.name, style: { width: this.question.imageWidth } }, val.name)));
|
|
3721
3791
|
}
|
|
3722
3792
|
renderElement() {
|
|
3723
|
-
const content = this.question.
|
|
3724
|
-
: this.question.previewValue.map((item, index) => { return (_$1(SurveyFileItem, { item: item, question: this.question, key: index })); });
|
|
3793
|
+
const content = this.question.renderedPages.map((page, index) => { return (_$1(SurveyFilePage, { page: page, question: this.question, key: page.id })); });
|
|
3725
3794
|
return _$1("div", { className: this.question.cssClasses.fileList || undefined }, content);
|
|
3726
3795
|
}
|
|
3727
3796
|
canRender() {
|
|
@@ -3849,8 +3918,9 @@ class SurveyQuestionRadiogroup extends SurveyQuestionElementBase {
|
|
|
3849
3918
|
if (this.question.blockedRow) {
|
|
3850
3919
|
return _$1("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
|
|
3851
3920
|
}
|
|
3852
|
-
else
|
|
3921
|
+
else {
|
|
3853
3922
|
return _$1(k$2, null, this.getItems(cssClasses, this.question.bodyItems));
|
|
3923
|
+
}
|
|
3854
3924
|
}
|
|
3855
3925
|
getItems(cssClasses, choices) {
|
|
3856
3926
|
var items = [];
|
|
@@ -4003,7 +4073,7 @@ class SurveyQuestionText extends SurveyQuestionUncontrolledElement {
|
|
|
4003
4073
|
// disabled={this.isDisplayMode}
|
|
4004
4074
|
disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: inputClass, type: this.question.inputType,
|
|
4005
4075
|
//ref={this.controlRef}
|
|
4006
|
-
ref: (input) => (this.setControl(input)), style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: (event) => { this.question.onBlur(event); }, onFocus: (event) => { this.question.onFocus(event); }, onChange: this.question.onChange, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: (event) => this.question.onCompositionUpdate(event.nativeEvent), "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 }),
|
|
4076
|
+
ref: (input) => (this.setControl(input)), style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: (event) => { this.question.onBlur(event); }, onFocus: (event) => { this.question.onFocus(event); }, onChange: this.question.onChange, onClick: this.question.readOnlyBlocker, onPointerDown: this.question.readOnlyBlocker, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: (event) => this.question.onCompositionUpdate(event.nativeEvent), "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 }),
|
|
4007
4077
|
counter));
|
|
4008
4078
|
}
|
|
4009
4079
|
renderElement() {
|
|
@@ -4089,7 +4159,7 @@ class SurveyQuestionBoolean extends SurveyQuestionElementBase {
|
|
|
4089
4159
|
const cssClasses = this.question.cssClasses;
|
|
4090
4160
|
const itemClass = this.question.getItemCss();
|
|
4091
4161
|
return (_$1("div", { className: cssClasses.root, onKeyDown: this.handleOnKeyDown },
|
|
4092
|
-
_$1("label", { className: itemClass
|
|
4162
|
+
_$1("label", { className: itemClass },
|
|
4093
4163
|
_$1("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
|
|
4094
4164
|
? ""
|
|
4095
4165
|
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.control, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.booleanValue || false, onChange: this.handleOnChange, 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 }),
|
|
@@ -4432,10 +4502,7 @@ class SurveyQuestionMatrixDropdownBase extends SurveyQuestionElementBase {
|
|
|
4432
4502
|
return this.renderTableDiv();
|
|
4433
4503
|
}
|
|
4434
4504
|
renderTableDiv() {
|
|
4435
|
-
|
|
4436
|
-
? { overflowX: "scroll" }
|
|
4437
|
-
: {};
|
|
4438
|
-
return (_$1("div", { style: divStyle, className: this.question.cssClasses.tableWrapper, ref: (root) => (this.setControl(root)) },
|
|
4505
|
+
return (_$1("div", { className: this.question.cssClasses.tableWrapper, ref: (root) => (this.setControl(root)) },
|
|
4439
4506
|
_$1(SurveyQuestionMatrixTable, { question: this.question, creator: this.creator, wrapCell: (cell, element, reason) => this.wrapCell(cell, element, reason) })));
|
|
4440
4507
|
}
|
|
4441
4508
|
}
|
|
@@ -4524,7 +4591,7 @@ class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {
|
|
|
4524
4591
|
row: this.cell.row,
|
|
4525
4592
|
column: this.cell.cell.column,
|
|
4526
4593
|
};
|
|
4527
|
-
this.question.survey.matrixAfterCellRender(
|
|
4594
|
+
this.question.survey.matrixAfterCellRender(options);
|
|
4528
4595
|
this.question.afterRenderCore(el);
|
|
4529
4596
|
}
|
|
4530
4597
|
}
|
|
@@ -4630,12 +4697,7 @@ class SurveyQuestionMatrixDynamic extends SurveyQuestionMatrixDropdownBase {
|
|
|
4630
4697
|
return this.renderAddRowButton(cssClasses);
|
|
4631
4698
|
}
|
|
4632
4699
|
renderNoRowsContent(cssClasses) {
|
|
4633
|
-
|
|
4634
|
-
const textDiv = _$1("div", { className: cssClasses.noRowsText }, text);
|
|
4635
|
-
const btn = this.matrix.renderedTable.showAddRow ? this.renderAddRowButton(cssClasses, true) : undefined;
|
|
4636
|
-
return (_$1("div", { className: cssClasses.noRowsSection },
|
|
4637
|
-
textDiv,
|
|
4638
|
-
btn));
|
|
4700
|
+
return ReactElementFactory.Instance.createElement("sv-placeholder-matrixdynamic", { cssClasses: cssClasses, question: this.matrix });
|
|
4639
4701
|
}
|
|
4640
4702
|
renderAddRowButton(cssClasses, isEmptySection = false) {
|
|
4641
4703
|
return ReactElementFactory.Instance.createElement("sv-matrixdynamic-add-btn", {
|
|
@@ -4665,80 +4727,29 @@ class SurveyQuestionMatrixDynamicAddButton extends ReactSurveyElement {
|
|
|
4665
4727
|
return (this.props.isEmptySection ? addButton : _$1("div", { className: this.props.cssClasses.footer }, addButton));
|
|
4666
4728
|
}
|
|
4667
4729
|
}
|
|
4668
|
-
|
|
4669
|
-
return _$1(SurveyQuestionMatrixDynamicAddButton, props);
|
|
4670
|
-
});
|
|
4671
|
-
|
|
4672
|
-
class SurveyQuestionPanelDynamicAction extends ReactSurveyElement {
|
|
4730
|
+
class SurveyQuestionMatrixDynamicPlaceholder extends ReactSurveyElement {
|
|
4673
4731
|
constructor(props) {
|
|
4674
4732
|
super(props);
|
|
4675
4733
|
}
|
|
4676
|
-
get data() {
|
|
4677
|
-
return (this.props.item && this.props.item.data) || this.props.data;
|
|
4678
|
-
}
|
|
4679
|
-
get question() {
|
|
4680
|
-
return (this.props.item && this.props.item.data.question) || this.props.data.question;
|
|
4681
|
-
}
|
|
4682
|
-
}
|
|
4683
|
-
class SurveyQuestionPanelDynamicAddButton extends SurveyQuestionPanelDynamicAction {
|
|
4684
|
-
constructor() {
|
|
4685
|
-
super(...arguments);
|
|
4686
|
-
this.handleClick = (event) => {
|
|
4687
|
-
this.question.addPanelUI();
|
|
4688
|
-
};
|
|
4689
|
-
}
|
|
4690
|
-
renderElement() {
|
|
4691
|
-
if (!this.question.canAddPanel)
|
|
4692
|
-
return null;
|
|
4693
|
-
const btnText = this.renderLocString(this.question.locAddPanelText);
|
|
4694
|
-
return (_$1("button", { type: "button", id: this.question.addButtonId, className: this.question.getAddButtonCss(), onClick: this.handleClick },
|
|
4695
|
-
_$1("span", { className: this.question.cssClasses.buttonAddText }, btnText)));
|
|
4696
|
-
}
|
|
4697
|
-
}
|
|
4698
|
-
ReactElementFactory.Instance.registerElement("sv-paneldynamic-add-btn", (props) => {
|
|
4699
|
-
return _$1(SurveyQuestionPanelDynamicAddButton, props);
|
|
4700
|
-
});
|
|
4701
|
-
|
|
4702
|
-
class SurveyQuestionPanelDynamicNextButton extends SurveyQuestionPanelDynamicAction {
|
|
4703
|
-
constructor() {
|
|
4704
|
-
super(...arguments);
|
|
4705
|
-
this.handleClick = (event) => {
|
|
4706
|
-
this.question.goToNextPanel();
|
|
4707
|
-
};
|
|
4708
|
-
}
|
|
4709
|
-
renderElement() {
|
|
4710
|
-
return (_$1("div", { title: this.question.panelNextText, onClick: this.handleClick, className: this.question.getNextButtonCss() },
|
|
4711
|
-
_$1(SvgIcon, { iconName: this.question.cssClasses.progressBtnIcon, size: "auto" })));
|
|
4712
|
-
}
|
|
4713
|
-
}
|
|
4714
|
-
ReactElementFactory.Instance.registerElement("sv-paneldynamic-next-btn", (props) => {
|
|
4715
|
-
return _$1(SurveyQuestionPanelDynamicNextButton, props);
|
|
4716
|
-
});
|
|
4717
|
-
|
|
4718
|
-
class SurveyQuestionPanelDynamicPrevButton extends SurveyQuestionPanelDynamicAction {
|
|
4719
|
-
constructor() {
|
|
4720
|
-
super(...arguments);
|
|
4721
|
-
this.handleClick = (event) => {
|
|
4722
|
-
this.question.goToPrevPanel();
|
|
4723
|
-
};
|
|
4724
|
-
}
|
|
4725
4734
|
renderElement() {
|
|
4726
|
-
|
|
4727
|
-
|
|
4735
|
+
const cssClasses = this.props.cssClasses;
|
|
4736
|
+
const matrix = this.props.question;
|
|
4737
|
+
const showAddButton = matrix.renderedTable.showAddRow;
|
|
4738
|
+
const text = this.renderLocString(matrix.locNoRowsText);
|
|
4739
|
+
const textDiv = _$1("div", { className: cssClasses.noRowsText }, text);
|
|
4740
|
+
const btn = showAddButton ? this.renderAddRowButton(cssClasses, matrix) : undefined;
|
|
4741
|
+
return (_$1("div", { className: cssClasses.noRowsSection },
|
|
4742
|
+
textDiv,
|
|
4743
|
+
btn));
|
|
4728
4744
|
}
|
|
4729
|
-
|
|
4730
|
-
ReactElementFactory.Instance.
|
|
4731
|
-
|
|
4732
|
-
});
|
|
4733
|
-
|
|
4734
|
-
class SurveyQuestionPanelDynamicProgressText extends SurveyQuestionPanelDynamicAction {
|
|
4735
|
-
renderElement() {
|
|
4736
|
-
return (_$1("div", { className: this.question.cssClasses.progressText }, this.question.progressText));
|
|
4745
|
+
renderAddRowButton(cssClasses, question) {
|
|
4746
|
+
return ReactElementFactory.Instance.createElement("sv-matrixdynamic-add-btn", {
|
|
4747
|
+
question: question, cssClasses: cssClasses, isEmptySection: true
|
|
4748
|
+
});
|
|
4737
4749
|
}
|
|
4738
4750
|
}
|
|
4739
|
-
ReactElementFactory.Instance.registerElement("sv-
|
|
4740
|
-
|
|
4741
|
-
});
|
|
4751
|
+
ReactElementFactory.Instance.registerElement("sv-matrixdynamic-add-btn", (props) => { return _$1(SurveyQuestionMatrixDynamicAddButton, props); });
|
|
4752
|
+
ReactElementFactory.Instance.registerElement("sv-placeholder-matrixdynamic", (props) => { return _$1(SurveyQuestionMatrixDynamicPlaceholder, props); });
|
|
4742
4753
|
|
|
4743
4754
|
class SurveyQuestionPanelDynamic extends SurveyQuestionElementBase {
|
|
4744
4755
|
constructor(props) {
|
|
@@ -4774,64 +4785,23 @@ class SurveyQuestionPanelDynamic extends SurveyQuestionElementBase {
|
|
|
4774
4785
|
}
|
|
4775
4786
|
renderElement() {
|
|
4776
4787
|
const panels = [];
|
|
4788
|
+
const cssClasses = this.question.cssClasses;
|
|
4777
4789
|
this.question.renderedPanels.forEach((panel, index) => {
|
|
4778
|
-
panels.push(_$1(SurveyQuestionPanelDynamicItem, { key: panel.id, element: panel, question: this.question, index: index, cssClasses:
|
|
4790
|
+
panels.push(_$1(SurveyQuestionPanelDynamicItem, { key: panel.id, element: panel, question: this.question, index: index, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode, creator: this.creator }));
|
|
4779
4791
|
});
|
|
4780
|
-
const
|
|
4781
|
-
? this.
|
|
4782
|
-
: null;
|
|
4783
|
-
const navTop = this.question.isProgressTopShowing
|
|
4784
|
-
? this.renderNavigator()
|
|
4785
|
-
: null;
|
|
4786
|
-
const navBottom = this.question.isProgressBottomShowing
|
|
4787
|
-
? this.renderNavigator()
|
|
4792
|
+
const rangeTop = this.question.isRangeShowing && this.question.isProgressTopShowing
|
|
4793
|
+
? this.renderRange()
|
|
4788
4794
|
: null;
|
|
4789
4795
|
const navV2 = this.renderNavigatorV2();
|
|
4790
|
-
const noEntriesPlaceholder = this.renderPlaceholder();
|
|
4791
|
-
return (_$1("div", { className:
|
|
4796
|
+
const noEntriesPlaceholder = this.renderPlaceholder(cssClasses);
|
|
4797
|
+
return (_$1("div", { className: cssClasses.root },
|
|
4792
4798
|
this.question.hasTabbedMenu ? _$1("div", { className: this.question.getTabsContainerCss() },
|
|
4793
4799
|
_$1(SurveyActionBar, { model: this.question.tabbedMenu })) : null,
|
|
4794
4800
|
noEntriesPlaceholder,
|
|
4795
|
-
|
|
4801
|
+
rangeTop,
|
|
4796
4802
|
_$1("div", { className: this.question.cssClasses.panelsContainer }, panels),
|
|
4797
|
-
navBottom,
|
|
4798
|
-
btnAdd,
|
|
4799
4803
|
navV2));
|
|
4800
4804
|
}
|
|
4801
|
-
renderNavigator() {
|
|
4802
|
-
if (!this.question["showLegacyNavigation"]) {
|
|
4803
|
-
if (this.question.isRangeShowing && this.question.isProgressTopShowing) {
|
|
4804
|
-
return this.renderRange();
|
|
4805
|
-
}
|
|
4806
|
-
else {
|
|
4807
|
-
return null;
|
|
4808
|
-
}
|
|
4809
|
-
}
|
|
4810
|
-
const range = this.question.isRangeShowing ? this.renderRange() : null;
|
|
4811
|
-
const btnPrev = this.rendrerPrevButton();
|
|
4812
|
-
const btnNext = this.rendrerNextButton();
|
|
4813
|
-
const btnAdd = this.renderAddRowButton();
|
|
4814
|
-
const progressClass = this.question.isProgressTopShowing
|
|
4815
|
-
? this.question.cssClasses.progressTop
|
|
4816
|
-
: this.question.cssClasses.progressBottom;
|
|
4817
|
-
return (_$1("div", { className: progressClass },
|
|
4818
|
-
_$1("div", { style: { clear: "both" } },
|
|
4819
|
-
_$1("div", { className: this.question.cssClasses.progressContainer },
|
|
4820
|
-
btnPrev,
|
|
4821
|
-
range,
|
|
4822
|
-
btnNext),
|
|
4823
|
-
btnAdd,
|
|
4824
|
-
this.renderProgressText())));
|
|
4825
|
-
}
|
|
4826
|
-
renderProgressText() {
|
|
4827
|
-
return (_$1(SurveyQuestionPanelDynamicProgressText, { data: { question: this.question } }));
|
|
4828
|
-
}
|
|
4829
|
-
rendrerPrevButton() {
|
|
4830
|
-
return (_$1(SurveyQuestionPanelDynamicPrevButton, { data: { question: this.question } }));
|
|
4831
|
-
}
|
|
4832
|
-
rendrerNextButton() {
|
|
4833
|
-
return (_$1(SurveyQuestionPanelDynamicNextButton, { data: { question: this.question } }));
|
|
4834
|
-
}
|
|
4835
4805
|
renderRange() {
|
|
4836
4806
|
return (_$1("div", { className: this.question.cssClasses.progress },
|
|
4837
4807
|
_$1("div", { className: this.question.cssClasses.progressBar, style: { width: this.question.progress }, role: "progressbar" })));
|
|
@@ -4851,12 +4821,9 @@ class SurveyQuestionPanelDynamic extends SurveyQuestionElementBase {
|
|
|
4851
4821
|
this.question.footerToolbar.visibleActions.length ? (_$1("div", { className: this.question.cssClasses.footerButtonsContainer },
|
|
4852
4822
|
_$1(SurveyActionBar, { model: this.question.footerToolbar }))) : null));
|
|
4853
4823
|
}
|
|
4854
|
-
renderPlaceholder() {
|
|
4855
|
-
if (this.question.getShowNoEntriesPlaceholder())
|
|
4856
|
-
return (
|
|
4857
|
-
_$1("span", null, this.renderLocString(this.question.locNoEntriesText)),
|
|
4858
|
-
this.renderAddRowButton()));
|
|
4859
|
-
}
|
|
4824
|
+
renderPlaceholder(cssClasses) {
|
|
4825
|
+
if (this.question.getShowNoEntriesPlaceholder())
|
|
4826
|
+
return ReactElementFactory.Instance.createElement("sv-placeholder-paneldynamic", { cssClasses: cssClasses, question: this.question });
|
|
4860
4827
|
return null;
|
|
4861
4828
|
}
|
|
4862
4829
|
}
|
|
@@ -4896,6 +4863,24 @@ class SurveyQuestionPanelDynamicItem extends SurveyPanel {
|
|
|
4896
4863
|
ReactQuestionFactory.Instance.registerQuestion("paneldynamic", props => {
|
|
4897
4864
|
return _$1(SurveyQuestionPanelDynamic, props);
|
|
4898
4865
|
});
|
|
4866
|
+
class SurveyQuestionPanelDynamicPlaceholder extends ReactSurveyElement {
|
|
4867
|
+
constructor(props) {
|
|
4868
|
+
super(props);
|
|
4869
|
+
}
|
|
4870
|
+
renderElement() {
|
|
4871
|
+
const cssClasses = this.props.cssClasses;
|
|
4872
|
+
const question = this.props.question;
|
|
4873
|
+
return (_$1("div", { className: cssClasses.noEntriesPlaceholder },
|
|
4874
|
+
_$1("span", null, this.renderLocString(question.locNoEntriesText)),
|
|
4875
|
+
this.renderAddRowButton(question)));
|
|
4876
|
+
}
|
|
4877
|
+
renderAddRowButton(question) {
|
|
4878
|
+
return ReactElementFactory.Instance.createElement("sv-paneldynamic-add-btn", {
|
|
4879
|
+
data: { question: question }
|
|
4880
|
+
});
|
|
4881
|
+
}
|
|
4882
|
+
}
|
|
4883
|
+
ReactElementFactory.Instance.registerElement("sv-placeholder-paneldynamic", (props) => { return _$1(SurveyQuestionPanelDynamicPlaceholder, props); });
|
|
4899
4884
|
|
|
4900
4885
|
class SurveyProgress extends SurveyNavigationBase {
|
|
4901
4886
|
constructor(props) {
|
|
@@ -5574,7 +5559,7 @@ class SurveyQuestionSignaturePad extends SurveyQuestionElementBase {
|
|
|
5574
5559
|
renderBackgroundImage() {
|
|
5575
5560
|
if (!this.question.backgroundImage)
|
|
5576
5561
|
return null;
|
|
5577
|
-
return _$1("img", { className: this.question.cssClasses.backgroundImage, src: this.question.backgroundImage, style: { width: this.question.renderedCanvasWidth } });
|
|
5562
|
+
return _$1("img", { className: this.question.cssClasses.backgroundImage, src: this.question.backgroundImage, style: { width: this.question.renderedCanvasWidth }, role: "presentation" });
|
|
5578
5563
|
}
|
|
5579
5564
|
renderLoadingIndicator() {
|
|
5580
5565
|
return _$1("div", { className: this.question.cssClasses.loadingIndicator },
|
|
@@ -5612,6 +5597,9 @@ class SurveyQuestionButtonGroup extends SurveyQuestionElementBase {
|
|
|
5612
5597
|
});
|
|
5613
5598
|
}
|
|
5614
5599
|
}
|
|
5600
|
+
ReactQuestionFactory.Instance.registerQuestion("buttongroup", (props) => {
|
|
5601
|
+
return _$1(SurveyQuestionButtonGroup, props);
|
|
5602
|
+
});
|
|
5615
5603
|
class SurveyButtonGroupItem extends SurveyElementBase {
|
|
5616
5604
|
constructor(props) {
|
|
5617
5605
|
super(props);
|
|
@@ -5661,6 +5649,21 @@ class SurveyButtonGroupItem extends SurveyElementBase {
|
|
|
5661
5649
|
// return React.createElement(SurveyQuestionButtonGroup, props);
|
|
5662
5650
|
// });
|
|
5663
5651
|
|
|
5652
|
+
class SurveyQuestionButtonGroupDropdown extends SurveyQuestionDropdownBase {
|
|
5653
|
+
constructor(props) {
|
|
5654
|
+
super(props);
|
|
5655
|
+
}
|
|
5656
|
+
renderElement() {
|
|
5657
|
+
const cssClasses = this.question.cssClasses;
|
|
5658
|
+
const select = this.renderSelect(cssClasses);
|
|
5659
|
+
return (_$1("div", { className: this.question.cssClasses.rootDropdown }, select));
|
|
5660
|
+
}
|
|
5661
|
+
}
|
|
5662
|
+
ReactQuestionFactory.Instance.registerQuestion("sv-buttongroup-dropdown", (props) => {
|
|
5663
|
+
return _$1(SurveyQuestionButtonGroupDropdown, props);
|
|
5664
|
+
});
|
|
5665
|
+
RendererFactory.Instance.registerRenderer("buttongroup", "dropdown", "sv-buttongroup-dropdown");
|
|
5666
|
+
|
|
5664
5667
|
class SurveyQuestionCustom extends SurveyQuestionUncontrolledElement {
|
|
5665
5668
|
constructor(props) {
|
|
5666
5669
|
super(props);
|
|
@@ -5821,6 +5824,36 @@ ReactElementFactory.Instance.registerElement("sv-matrix-detail-button", props =>
|
|
|
5821
5824
|
return _$1(SurveyQuestionMatrixDetailButton, props);
|
|
5822
5825
|
});
|
|
5823
5826
|
|
|
5827
|
+
class SurveyQuestionPanelDynamicAction extends ReactSurveyElement {
|
|
5828
|
+
constructor(props) {
|
|
5829
|
+
super(props);
|
|
5830
|
+
}
|
|
5831
|
+
get data() {
|
|
5832
|
+
return (this.props.item && this.props.item.data) || this.props.data;
|
|
5833
|
+
}
|
|
5834
|
+
get question() {
|
|
5835
|
+
return (this.props.item && this.props.item.data.question) || this.props.data.question;
|
|
5836
|
+
}
|
|
5837
|
+
}
|
|
5838
|
+
class SurveyQuestionPanelDynamicAddButton extends SurveyQuestionPanelDynamicAction {
|
|
5839
|
+
constructor() {
|
|
5840
|
+
super(...arguments);
|
|
5841
|
+
this.handleClick = (event) => {
|
|
5842
|
+
this.question.addPanelUI();
|
|
5843
|
+
};
|
|
5844
|
+
}
|
|
5845
|
+
renderElement() {
|
|
5846
|
+
if (!this.question.canAddPanel)
|
|
5847
|
+
return null;
|
|
5848
|
+
const btnText = this.renderLocString(this.question.locAddPanelText);
|
|
5849
|
+
return (_$1("button", { type: "button", id: this.question.addButtonId, className: this.question.getAddButtonCss(), onClick: this.handleClick },
|
|
5850
|
+
_$1("span", { className: this.question.cssClasses.buttonAddText }, btnText)));
|
|
5851
|
+
}
|
|
5852
|
+
}
|
|
5853
|
+
ReactElementFactory.Instance.registerElement("sv-paneldynamic-add-btn", (props) => {
|
|
5854
|
+
return _$1(SurveyQuestionPanelDynamicAddButton, props);
|
|
5855
|
+
});
|
|
5856
|
+
|
|
5824
5857
|
class SurveyQuestionPanelDynamicRemoveButton extends SurveyQuestionPanelDynamicAction {
|
|
5825
5858
|
constructor() {
|
|
5826
5859
|
super(...arguments);
|
|
@@ -5840,6 +5873,47 @@ ReactElementFactory.Instance.registerElement("sv-paneldynamic-remove-btn", (prop
|
|
|
5840
5873
|
return _$1(SurveyQuestionPanelDynamicRemoveButton, props);
|
|
5841
5874
|
});
|
|
5842
5875
|
|
|
5876
|
+
class SurveyQuestionPanelDynamicPrevButton extends SurveyQuestionPanelDynamicAction {
|
|
5877
|
+
constructor() {
|
|
5878
|
+
super(...arguments);
|
|
5879
|
+
this.handleClick = (event) => {
|
|
5880
|
+
this.question.goToPrevPanel();
|
|
5881
|
+
};
|
|
5882
|
+
}
|
|
5883
|
+
renderElement() {
|
|
5884
|
+
return (_$1("div", { title: this.question.panelPrevText, onClick: this.handleClick, className: this.question.getPrevButtonCss() },
|
|
5885
|
+
_$1(SvgIcon, { iconName: this.question.cssClasses.progressBtnIcon, size: "auto" })));
|
|
5886
|
+
}
|
|
5887
|
+
}
|
|
5888
|
+
ReactElementFactory.Instance.registerElement("sv-paneldynamic-prev-btn", (props) => {
|
|
5889
|
+
return _$1(SurveyQuestionPanelDynamicPrevButton, props);
|
|
5890
|
+
});
|
|
5891
|
+
|
|
5892
|
+
class SurveyQuestionPanelDynamicNextButton extends SurveyQuestionPanelDynamicAction {
|
|
5893
|
+
constructor() {
|
|
5894
|
+
super(...arguments);
|
|
5895
|
+
this.handleClick = (event) => {
|
|
5896
|
+
this.question.goToNextPanel();
|
|
5897
|
+
};
|
|
5898
|
+
}
|
|
5899
|
+
renderElement() {
|
|
5900
|
+
return (_$1("div", { title: this.question.panelNextText, onClick: this.handleClick, className: this.question.getNextButtonCss() },
|
|
5901
|
+
_$1(SvgIcon, { iconName: this.question.cssClasses.progressBtnIcon, size: "auto" })));
|
|
5902
|
+
}
|
|
5903
|
+
}
|
|
5904
|
+
ReactElementFactory.Instance.registerElement("sv-paneldynamic-next-btn", (props) => {
|
|
5905
|
+
return _$1(SurveyQuestionPanelDynamicNextButton, props);
|
|
5906
|
+
});
|
|
5907
|
+
|
|
5908
|
+
class SurveyQuestionPanelDynamicProgressText extends SurveyQuestionPanelDynamicAction {
|
|
5909
|
+
renderElement() {
|
|
5910
|
+
return (_$1("div", { className: this.question.cssClasses.progressText }, this.question.progressText));
|
|
5911
|
+
}
|
|
5912
|
+
}
|
|
5913
|
+
ReactElementFactory.Instance.registerElement("sv-paneldynamic-progress-text", (props) => {
|
|
5914
|
+
return _$1(SurveyQuestionPanelDynamicProgressText, props);
|
|
5915
|
+
});
|
|
5916
|
+
|
|
5843
5917
|
class SurveyNavigationButton extends ReactSurveyElement {
|
|
5844
5918
|
get item() {
|
|
5845
5919
|
return this.props.item;
|
|
@@ -6105,7 +6179,7 @@ SurveyModel.prototype["render"] = function (element = null) {
|
|
|
6105
6179
|
}
|
|
6106
6180
|
};
|
|
6107
6181
|
const preact = React;
|
|
6108
|
-
checkLibraryVersion(`${"2.0.
|
|
6182
|
+
checkLibraryVersion(`${"2.0.7"}`, "survey-js-ui");
|
|
6109
6183
|
|
|
6110
|
-
export { CharacterCounterComponent, O as Children, x$2 as Component, ComponentsContainer, k$2 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, Cn as StrictMode, Survey, SurveyActionBar, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyNavigationButton, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionButtonGroup, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImagePicker, SurveyQuestionMatrix, SurveyQuestionMatrixCell, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixRow, SurveyQuestionMultipleText, SurveyQuestionOptionItem, SurveyQuestionPanelDynamic, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicProgressText, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionRadioItem, SurveyQuestionRadiogroup, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionSignaturePad, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyRow, SurveyTimerPanel, SurveyWindow, P as Suspense, B as SuspenseList, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click, _n as cloneElement, K$1 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, mn as isFragment, yn as isMemo, pn 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$1 as useCallback, x$1 as useContext, P$1 as useDebugValue, w as useDeferredValue, y as useEffect, g$1 as useId, F$1 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$1 as useMemo, h as useReducer, A$1 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
|
|
6184
|
+
export { CharacterCounterComponent, O as Children, x$2 as Component, ComponentsContainer, k$2 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, Cn as StrictMode, Survey, SurveyActionBar, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyNavigationButton, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionButtonGroup, SurveyQuestionButtonGroupDropdown, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImagePicker, SurveyQuestionMatrix, SurveyQuestionMatrixCell, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixRow, SurveyQuestionMultipleText, SurveyQuestionOptionItem, SurveyQuestionPanelDynamic, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicProgressText, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionRadioItem, SurveyQuestionRadiogroup, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionSignaturePad, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyRow, SurveyTimerPanel, SurveyWindow, P as Suspense, B as SuspenseList, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click, _n as cloneElement, K$1 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, mn as isFragment, yn as isMemo, pn 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$1 as useCallback, x$1 as useContext, P$1 as useDebugValue, w as useDeferredValue, y as useEffect, g$1 as useId, F$1 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$1 as useMemo, h as useReducer, A$1 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
|
|
6111
6185
|
//# sourceMappingURL=survey-js-ui.mjs.map
|