survey-js-ui 3.2.3 → 3.2.4
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 +115 -31
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +116 -31
- package/survey-js-ui.js.map +1 -1
- package/survey-js-ui.min.js +2 -2
- package/typings/survey-react-ui/entries/react-ui-model.d.ts +2 -1
- package/typings/survey-react-ui/src/components/list/list-loading.d.ts +12 -0
- package/typings/survey-react-ui/src/components/list/list.d.ts +2 -1
- package/typings/survey-react-ui/src/components/question-hint.d.ts +8 -0
- package/typings/survey-react-ui/src/imagepicker.d.ts +1 -0
- package/typings/survey-react-ui/src/reactquestion_comment.d.ts +2 -0
- package/typings/survey-react-ui/src/reactquestion_view.d.ts +7 -0
- package/typings/survey-react-ui/src/components/records-sort-dialog.d.ts +0 -12
package/fesm/survey-js-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v3.2.
|
|
2
|
+
* surveyjs - Survey JavaScript library v3.2.4
|
|
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
|
*/
|
|
@@ -644,7 +644,7 @@ class SurveyActionBarItem extends SurveyElementBase {
|
|
|
644
644
|
const className = this.item.getActionBarItemCss();
|
|
645
645
|
const buttonContent = this.renderButtonContent();
|
|
646
646
|
const tabIndex = this.item.disableTabStop ? -1 : undefined;
|
|
647
|
-
const button = attachKey2click(_$1("button", { ref: this.ref, className: className, type: "button", disabled: this.item.disabled, onMouseDown: (args) => this.item.doMouseDown(args), onFocus: (args) => this.item.doFocus(args), onClick: (args) => this.item.doAction(args), title: this.item.getTooltip(), tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, "aria-controls": this.item.ariaControls, "aria-labelledby": this.item.ariaLabelledBy, "aria-label": this.item.ariaLabel, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
|
|
647
|
+
const button = attachKey2click(_$1("button", { ref: this.ref, className: className, type: "button", disabled: this.item.disabled, onMouseDown: (args) => this.item.doMouseDown(args), onFocus: (args) => this.item.doFocus(args), onClick: (args) => this.item.doAction(args), title: this.item.getTooltip(), "data-sv-tooltip": this.item.getTooltip(), tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, "aria-controls": this.item.ariaControls, "aria-labelledby": this.item.ariaLabelledBy, "aria-label": this.item.ariaLabel, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
|
|
648
648
|
return button;
|
|
649
649
|
}
|
|
650
650
|
componentDidMount() {
|
|
@@ -1083,7 +1083,7 @@ class PopupContainer extends SurveyElementBase {
|
|
|
1083
1083
|
return _$1("div", { className: "sv-popup__content" }, contentComponent);
|
|
1084
1084
|
}
|
|
1085
1085
|
renderHeaderPopup(popupModel) {
|
|
1086
|
-
return popupModel.showCloseButton ? _$1("button", { tabIndex: -1, className: "sv-popup__close-button sd-action sd-action--icon", onClick: () => this.model.clickClose() },
|
|
1086
|
+
return popupModel.showCloseButton ? _$1("button", { tabIndex: -1, className: "sv-popup__close-button sd-action sd-action--small sd-action--icon", onClick: () => this.model.clickClose() },
|
|
1087
1087
|
_$1(SvgIcon, { className: "sv-popup__close-button-icon", iconName: "icon-close-24x24", size: "auto" })) : null;
|
|
1088
1088
|
}
|
|
1089
1089
|
renderFooter(popuModel) {
|
|
@@ -1285,12 +1285,14 @@ function requireIconsV2 () {
|
|
|
1285
1285
|
|
|
1286
1286
|
var image_48x48 = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M33 10.25H15C12.38 10.25 10.25 12.38 10.25 15V33C10.25 35.62 12.38 37.75 15 37.75H33C35.62 37.75 37.75 35.62 37.75 33V15C37.75 12.38 35.62 10.25 33 10.25ZM36.25 33C36.25 34.79 34.79 36.25 33 36.25H15C13.21 36.25 11.75 34.79 11.75 33V15C11.75 13.21 13.21 11.75 15 11.75H33C34.79 11.75 36.25 13.21 36.25 15V33ZM30.5 14.25C28.71 14.25 27.25 15.71 27.25 17.5C27.25 19.29 28.71 20.75 30.5 20.75C32.29 20.75 33.75 19.29 33.75 17.5C33.75 15.71 32.29 14.25 30.5 14.25ZM30.5 19.25C29.54 19.25 28.75 18.46 28.75 17.5C28.75 16.54 29.54 15.75 30.5 15.75C31.46 15.75 32.25 16.54 32.25 17.5C32.25 18.46 31.46 19.25 30.5 19.25ZM29.26 26.28C28.94 25.92 28.49 25.71 28.01 25.7C27.54 25.68 27.07 25.87 26.73 26.2L24.95 27.94L22.28 25.23C21.94 24.89 21.5 24.71 21 24.71C20.52 24.71 20.06 24.93 19.74 25.28L14.74 30.78C14.25 31.3 14.12 32.06 14.41 32.72C14.69 33.36 15.28 33.75 15.95 33.75H32.07C32.74 33.75 33.33 33.35 33.61 32.72C33.89 32.06 33.77 31.31 33.29 30.79L29.27 26.29L29.26 26.28ZM32.22 32.12C32.18 32.2 32.13 32.25 32.06 32.25H15.94C15.87 32.25 15.81 32.21 15.78 32.12C15.77 32.09 15.71 31.93 15.83 31.8L20.84 26.29C20.9 26.22 20.99 26.21 21.02 26.21C21.06 26.21 21.14 26.22 21.2 26.29L24.4 29.54C24.69 29.83 25.16 29.84 25.46 29.54L27.77 27.27C27.83 27.21 27.9 27.2 27.94 27.2C28.01 27.2 28.06 27.21 28.13 27.28L32.16 31.79C32.16 31.79 32.16 31.79 32.17 31.8C32.29 31.93 32.23 32.09 32.22 32.12Z\"/></svg>";
|
|
1287
1287
|
|
|
1288
|
-
var loading_48x48 = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_19679_369428)\"><path opacity=\"0.
|
|
1288
|
+
var loading_48x48 = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_19679_369428)\"><path opacity=\"0.25\" d=\"M24 40C15.18 40 8 32.82 8 24C8 15.18 15.18 8 24 8C32.82 8 40 15.18 40 24C40 32.82 32.82 40 24 40ZM24 12C17.38 12 12 17.38 12 24C12 30.62 17.38 36 24 36C30.62 36 36 30.62 36 24C36 17.38 30.62 12 24 12Z\"/><path d=\"M10 26C8.9 26 8 25.1 8 24C8 15.18 15.18 8 24 8C25.1 8 26 8.9 26 10C26 11.1 25.1 12 24 12C17.38 12 12 17.38 12 24C12 25.1 11.1 26 10 26Z\"/></g><defs><clipPath id=\"clip0_19679_369428\"><rect width=\"32\" height=\"32\" fill=\"white\" transform=\"translate(8 8)\"/></clipPath></defs></svg>";
|
|
1289
1289
|
|
|
1290
1290
|
var maximize_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13.75 3V7C13.75 7.41 13.41 7.75 13 7.75C12.59 7.75 12.25 7.41 12.25 7V4.81L9.53 7.53C9.38 7.68 9.19 7.75 9 7.75C8.81 7.75 8.62 7.68 8.47 7.53C8.18 7.24 8.18 6.76 8.47 6.47L11.19 3.75H9C8.59 3.75 8.25 3.41 8.25 3C8.25 2.59 8.59 2.25 9 2.25H13C13.1 2.25 13.19 2.27 13.29 2.31C13.47 2.39 13.62 2.53 13.7 2.72C13.74 2.81 13.76 2.91 13.76 3.01L13.75 3ZM7.53 8.47C7.24 8.18 6.76 8.18 6.47 8.47L3.75 11.19V9C3.75 8.59 3.41 8.25 3 8.25C2.59 8.25 2.25 8.59 2.25 9V13C2.25 13.1 2.27 13.19 2.31 13.29C2.39 13.47 2.53 13.62 2.72 13.7C2.81 13.74 2.91 13.76 3.01 13.76H7.01C7.42 13.76 7.76 13.42 7.76 13.01C7.76 12.6 7.42 12.26 7.01 12.26H4.82L7.54 9.54C7.83 9.25 7.83 8.77 7.54 8.48L7.53 8.47Z\"/></svg>";
|
|
1291
1291
|
|
|
1292
1292
|
var minimize_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13.75 8C13.75 8.41 13.41 8.75 13 8.75H3C2.59 8.75 2.25 8.41 2.25 8C2.25 7.59 2.59 7.25 3 7.25H13C13.41 7.25 13.75 7.59 13.75 8Z\"/></svg>";
|
|
1293
1293
|
|
|
1294
|
+
var more_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8 6.5C7.18 6.5 6.5 7.18 6.5 8C6.5 8.82 7.18 9.5 8 9.5C8.82 9.5 9.5 8.82 9.5 8C9.5 7.18 8.82 6.5 8 6.5ZM2.86 6.5C2.03 6.5 1.36 7.18 1.36 8C1.36 8.82 2.03 9.5 2.86 9.5C3.68 9.5 4.36 8.82 4.36 8C4.36 7.18 3.68 6.5 2.86 6.5ZM13.14 6.5C12.32 6.5 11.64 7.18 11.64 8C11.64 8.82 12.32 9.5 13.14 9.5C13.97 9.5 14.64 8.82 14.64 8C14.64 7.18 13.97 6.5 13.14 6.5Z\"/></svg>";
|
|
1295
|
+
|
|
1294
1296
|
var more_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 10.25C11.04 10.25 10.25 11.04 10.25 12C10.25 12.96 11.04 13.75 12 13.75C12.96 13.75 13.75 12.96 13.75 12C13.75 11.04 12.96 10.25 12 10.25ZM11.75 12C11.75 11.86 11.86 11.75 12 11.75C12.14 11.75 12.25 11.86 12.25 12C12.25 12.28 11.75 12.28 11.75 12ZM19 10.25C18.04 10.25 17.25 11.04 17.25 12C17.25 12.96 18.04 13.75 19 13.75C19.96 13.75 20.75 12.96 20.75 12C20.75 11.04 19.96 10.25 19 10.25ZM18.75 12C18.75 11.86 18.86 11.75 19 11.75C19.14 11.75 19.25 11.86 19.25 12C19.25 12.28 18.75 12.28 18.75 12ZM5 10.25C4.04 10.25 3.25 11.04 3.25 12C3.25 12.96 4.04 13.75 5 13.75C5.96 13.75 6.75 12.96 6.75 12C6.75 11.04 5.96 10.25 5 10.25ZM4.75 12C4.75 11.86 4.86 11.75 5 11.75C5.14 11.75 5.25 11.86 5.25 12C5.25 12.28 4.75 12.28 4.75 12Z\"/></svg>";
|
|
1295
1297
|
|
|
1296
1298
|
var navmenu_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.25 7C3.25 6.59 3.59 6.25 4 6.25H15C15.41 6.25 15.75 6.59 15.75 7C15.75 7.41 15.41 7.75 15 7.75H4C3.59 7.75 3.25 7.41 3.25 7ZM20 11.25H4C3.59 11.25 3.25 11.59 3.25 12C3.25 12.41 3.59 12.75 4 12.75H20C20.41 12.75 20.75 12.41 20.75 12C20.75 11.59 20.41 11.25 20 11.25ZM9 16.25H4C3.59 16.25 3.25 16.59 3.25 17C3.25 17.41 3.59 17.75 4 17.75H9C9.41 17.75 9.75 17.41 9.75 17C9.75 16.59 9.41 16.25 9 16.25Z\"/></svg>";
|
|
@@ -1393,6 +1395,7 @@ function requireIconsV2 () {
|
|
|
1393
1395
|
"loading-48x48": loading_48x48,
|
|
1394
1396
|
"maximize-16x16": maximize_16x16,
|
|
1395
1397
|
"minimize-16x16": minimize_16x16,
|
|
1398
|
+
"more-16x16": more_16x16,
|
|
1396
1399
|
"more-24x24": more_24x24,
|
|
1397
1400
|
"navmenu-24x24": navmenu_24x24,
|
|
1398
1401
|
"noimage-48x48": noimage_48x48,
|
|
@@ -2131,8 +2134,14 @@ class SurveyQuestionCommentItem extends ReactSurveyElement {
|
|
|
2131
2134
|
getTextAreaModel() {
|
|
2132
2135
|
return this.props.question.commentTextAreaModel;
|
|
2133
2136
|
}
|
|
2137
|
+
getViewText() {
|
|
2138
|
+
return this.props.question.getCommentViewText();
|
|
2139
|
+
}
|
|
2134
2140
|
renderElement() {
|
|
2135
2141
|
const question = this.props.question;
|
|
2142
|
+
if (question.isViewMode) {
|
|
2143
|
+
return _$1("div", { className: question.viewModeCssClass }, this.getViewText());
|
|
2144
|
+
}
|
|
2136
2145
|
if (question.isReadOnlyRenderDiv()) {
|
|
2137
2146
|
const comment = this.textAreaModel.getTextValue() || "";
|
|
2138
2147
|
return _$1("div", null, comment);
|
|
@@ -2148,6 +2157,9 @@ class SurveyQuestionCommentValueItem extends SurveyQuestionCommentItem {
|
|
|
2148
2157
|
getTextAreaModel() {
|
|
2149
2158
|
return this.props.question.getCommentTextAreaModel(this.props.item);
|
|
2150
2159
|
}
|
|
2160
|
+
getViewText() {
|
|
2161
|
+
return this.props.question.getCommentViewText(this.props.item);
|
|
2162
|
+
}
|
|
2151
2163
|
getKey() { return this.props.item.uniqueId; }
|
|
2152
2164
|
}
|
|
2153
2165
|
ReactQuestionFactory.Instance.registerQuestion("comment", (props) => {
|
|
@@ -2313,6 +2325,21 @@ ReactElementFactory.Instance.registerElement("sv-breadcrumbs", (props) => {
|
|
|
2313
2325
|
return _$1(SurveyBreadcrumbs, props);
|
|
2314
2326
|
});
|
|
2315
2327
|
|
|
2328
|
+
class QuestionHint extends x$3 {
|
|
2329
|
+
renderHint(hint, index) {
|
|
2330
|
+
if (hint.alternatives.length > 0) {
|
|
2331
|
+
return (_$1("span", { className: hint.className, key: index }, hint.alternatives.map((alternative, alternativeIndex) => this.renderHint(alternative, alternativeIndex))));
|
|
2332
|
+
}
|
|
2333
|
+
return (_$1("span", { className: hint.className, key: index }, hint.parts.map((part, partIndex) => (_$1("span", { key: partIndex, className: part.className }, part.text)))));
|
|
2334
|
+
}
|
|
2335
|
+
render() {
|
|
2336
|
+
const keyboardHintModel = this.props.question.getKeyboardHintModel();
|
|
2337
|
+
if (!keyboardHintModel.hasItems())
|
|
2338
|
+
return null;
|
|
2339
|
+
return (_$1("div", { className: keyboardHintModel.cssClasses.keyboardHintContainer, "aria-hidden": "true" }, keyboardHintModel.items.map((hint, index) => this.renderHint(hint, index))));
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2316
2343
|
class SurveyQuestion extends SurveyElementBase {
|
|
2317
2344
|
static renderQuestionBody(creator, question) {
|
|
2318
2345
|
// if (!question.isVisible) return null;
|
|
@@ -2421,7 +2448,8 @@ class SurveyQuestion extends SurveyElementBase {
|
|
|
2421
2448
|
headerTop,
|
|
2422
2449
|
questionContent,
|
|
2423
2450
|
headerBottom),
|
|
2424
|
-
errorsBelowQuestion))
|
|
2451
|
+
errorsBelowQuestion)),
|
|
2452
|
+
question.canShowKeyboardHints() ? _$1(QuestionHint, { question: question }) : null));
|
|
2425
2453
|
}
|
|
2426
2454
|
renderSingleInputQuestion(question, cssClasses) {
|
|
2427
2455
|
const singleQuestion = question.singleInputQuestion;
|
|
@@ -3288,7 +3316,7 @@ ReactElementFactory.Instance.registerElement("sv-rating-item", (props) => {
|
|
|
3288
3316
|
class RatingItemStar extends RatingItemBase {
|
|
3289
3317
|
render() {
|
|
3290
3318
|
return (_$1("label", { className: this.item.className, onMouseDown: this.handleOnMouseDown, onMouseOver: e => this.question.onItemMouseIn(this.item), onMouseOut: e => this.question.onItemMouseOut(this.item), title: this.item.text },
|
|
3291
|
-
_$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-label": this.question.ariaLabel }),
|
|
3319
|
+
_$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, tabIndex: this.question.itemTabIndex, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: () => { }, "aria-label": this.question.ariaLabel }),
|
|
3292
3320
|
_$1(SvgIcon, { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon }),
|
|
3293
3321
|
_$1(SvgIcon, { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt })));
|
|
3294
3322
|
}
|
|
@@ -3300,7 +3328,7 @@ ReactElementFactory.Instance.registerElement("sv-rating-item-star", (props) => {
|
|
|
3300
3328
|
class RatingItemSmiley extends RatingItemBase {
|
|
3301
3329
|
render() {
|
|
3302
3330
|
return (_$1("label", { style: this.item.style, className: this.item.className, onMouseDown: this.handleOnMouseDown, onMouseOver: e => this.question.onItemMouseIn(this.item), onMouseOut: e => this.question.onItemMouseOut(this.item), title: this.item.text },
|
|
3303
|
-
_$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-label": this.question.ariaLabel }),
|
|
3331
|
+
_$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, tabIndex: this.question.itemTabIndex, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: () => { }, "aria-label": this.question.ariaLabel }),
|
|
3304
3332
|
_$1(SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item) })));
|
|
3305
3333
|
}
|
|
3306
3334
|
}
|
|
@@ -3869,13 +3897,19 @@ class SurveyQuestionMatrixCell extends ReactSurveyElement {
|
|
|
3869
3897
|
return !!this.question && !!this.row;
|
|
3870
3898
|
}
|
|
3871
3899
|
renderElement() {
|
|
3900
|
+
const viewText = this.question.getCellViewText(this.row, this.column);
|
|
3901
|
+
const mobileSpan = this.question.isMobile ?
|
|
3902
|
+
(_$1("span", { className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(this.column.locText)))
|
|
3903
|
+
: undefined;
|
|
3904
|
+
if (viewText) {
|
|
3905
|
+
return (_$1(k$3, null,
|
|
3906
|
+
_$1("div", { className: this.question.viewModeCssClass }, viewText),
|
|
3907
|
+
mobileSpan));
|
|
3908
|
+
}
|
|
3872
3909
|
const isChecked = this.row.isChecked(this.column);
|
|
3873
3910
|
const inputId = this.question.inputId + "_" + this.row.name + "_" + this.columnIndex;
|
|
3874
3911
|
const itemClass = this.question.getItemClass(this.row, this.column);
|
|
3875
3912
|
const itemSvgIcon = this.question.getItemSvgIcon(this.row, this.column);
|
|
3876
|
-
const mobileSpan = this.question.isMobile ?
|
|
3877
|
-
(_$1("span", { className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(this.column.locText)))
|
|
3878
|
-
: undefined;
|
|
3879
3913
|
return (_$1("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
|
|
3880
3914
|
this.renderInput(inputId, isChecked),
|
|
3881
3915
|
_$1("span", { className: this.question.cssMaterialDecorator, "aria-hidden": "true" }, itemSvgIcon ?
|
|
@@ -3951,7 +3985,13 @@ class SurveyQuestionFile extends SurveyQuestionElementBase {
|
|
|
3951
3985
|
const className = !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss();
|
|
3952
3986
|
const style = this.isDisplayMode ? { color: "transparent" } : {};
|
|
3953
3987
|
let fileInput;
|
|
3954
|
-
if (this.question.
|
|
3988
|
+
if (this.question.isViewMode && this.question.isEmpty()) {
|
|
3989
|
+
return (_$1("div", { className: this.question.viewModeCssClass, id: this.question.inputId, ref: el => (this.setControl(el)) }, this.question.viewDisplayText));
|
|
3990
|
+
}
|
|
3991
|
+
if (this.question.isViewMode) {
|
|
3992
|
+
fileInput = null;
|
|
3993
|
+
}
|
|
3994
|
+
else if (this.question.isReadOnlyAttr) {
|
|
3955
3995
|
fileInput = _$1("input", { readOnly: true, type: "file", className: className, id: this.question.inputId, ref: input => (this.setControl(input)), style: style, multiple: this.question.allowMultiple, placeholder: this.question.title, accept: acceptedTypes });
|
|
3956
3996
|
}
|
|
3957
3997
|
else if (this.question.isDisabledAttr) {
|
|
@@ -4553,10 +4593,12 @@ class SurveyMatrixHeaderSortButton extends ReactSurveyElement {
|
|
|
4553
4593
|
renderElement() {
|
|
4554
4594
|
const cell = this.cell;
|
|
4555
4595
|
const description = cell.sortDescription;
|
|
4596
|
+
const rank = cell.sortRank;
|
|
4556
4597
|
return (_$1("button", { type: "button", className: cell.sortButtonCss, "aria-label": cell.sortAriaLabel, title: cell.sortTooltip, "aria-describedby": !!description ? cell.sortDescriptionId : undefined, "aria-disabled": !cell.canToggleSort ? "true" : undefined, onClick: this.onClick },
|
|
4557
4598
|
_$1("span", { className: cell.sortTitleCss }, this.props.content),
|
|
4558
4599
|
_$1("span", { className: cell.sortCss, "aria-hidden": "true" },
|
|
4559
|
-
_$1(SvgIcon, { iconName: cell.sortIconName, size: 16 })
|
|
4600
|
+
_$1(SvgIcon, { iconName: cell.sortIconName, size: 16 }),
|
|
4601
|
+
!!rank ? _$1("span", { className: cell.sortRankCss }, rank) : null),
|
|
4560
4602
|
!!description ? _$1("span", { id: cell.sortDescriptionId, className: "sv-visuallyhidden" }, description) : null));
|
|
4561
4603
|
}
|
|
4562
4604
|
}
|
|
@@ -5264,6 +5306,22 @@ ReactElementFactory.Instance.registerElement("sv-list-item", (props) => {
|
|
|
5264
5306
|
return _$1(ListItem, props);
|
|
5265
5307
|
});
|
|
5266
5308
|
|
|
5309
|
+
class ListLoading extends SurveyElementBase {
|
|
5310
|
+
get model() {
|
|
5311
|
+
return this.props.model;
|
|
5312
|
+
}
|
|
5313
|
+
getStateElement() {
|
|
5314
|
+
return this.model;
|
|
5315
|
+
}
|
|
5316
|
+
render() {
|
|
5317
|
+
return (_$1("div", { className: this.model.cssClasses.emptyContainer, role: "status", "aria-label": this.model.getLocalizationString("loadingData") },
|
|
5318
|
+
_$1(LoadingIndicatorComponent, null)));
|
|
5319
|
+
}
|
|
5320
|
+
}
|
|
5321
|
+
ReactElementFactory.Instance.registerElement("sv-list-loading", (props) => {
|
|
5322
|
+
return _$1(ListLoading, props);
|
|
5323
|
+
});
|
|
5324
|
+
|
|
5267
5325
|
class List extends SurveyElementBase {
|
|
5268
5326
|
constructor(props) {
|
|
5269
5327
|
super(props);
|
|
@@ -5361,6 +5419,9 @@ class List extends SurveyElementBase {
|
|
|
5361
5419
|
}
|
|
5362
5420
|
}
|
|
5363
5421
|
emptyContent() {
|
|
5422
|
+
if (this.model.loadingState === "loading") {
|
|
5423
|
+
return ReactElementFactory.Instance.createElement(this.model.loadingComponent, { model: this.model });
|
|
5424
|
+
}
|
|
5364
5425
|
const style = { display: this.model.isEmpty ? null : "none" };
|
|
5365
5426
|
return (_$1("div", { className: this.model.cssClasses.emptyContainer, style: style },
|
|
5366
5427
|
_$1("div", { className: this.model.cssClasses.emptyText, "aria-label": this.model.emptyMessage }, this.model.emptyMessage)));
|
|
@@ -5553,6 +5614,19 @@ ReactQuestionFactory.Instance.registerQuestion("expression", (props) => {
|
|
|
5553
5614
|
return _$1(SurveyQuestionExpression, props);
|
|
5554
5615
|
});
|
|
5555
5616
|
|
|
5617
|
+
class SurveyQuestionView extends SurveyQuestionElementBase {
|
|
5618
|
+
get question() {
|
|
5619
|
+
return this.questionBase;
|
|
5620
|
+
}
|
|
5621
|
+
renderElement() {
|
|
5622
|
+
return (_$1("div", { id: this.question.inputId, className: this.question.viewModeCssClass, ref: (div) => (this.setControl(div)) }, this.question.viewDisplayText));
|
|
5623
|
+
}
|
|
5624
|
+
}
|
|
5625
|
+
ReactQuestionFactory.Instance.registerQuestion("sv-question-view", (props) => {
|
|
5626
|
+
return _$1(SurveyQuestionView, props);
|
|
5627
|
+
});
|
|
5628
|
+
RendererFactory.Instance.registerRenderer("question", "view", "sv-question-view");
|
|
5629
|
+
|
|
5556
5630
|
class PopupSurvey extends Survey {
|
|
5557
5631
|
constructor(props) {
|
|
5558
5632
|
super(props);
|
|
@@ -5665,11 +5739,31 @@ class SurveyQuestionImagePicker extends SurveyQuestionElementBase {
|
|
|
5665
5739
|
return this.questionBase;
|
|
5666
5740
|
}
|
|
5667
5741
|
renderElement() {
|
|
5742
|
+
if (this.question.isViewMode) {
|
|
5743
|
+
return this.renderViewMode();
|
|
5744
|
+
}
|
|
5668
5745
|
var cssClasses = this.question.cssClasses;
|
|
5669
5746
|
return (_$1("fieldset", { className: this.question.getSelectBaseRootCss(), style: this.question.getContainerStyle(), onKeyDown: (event) => { var _a, _b; return (_b = (_a = this.question).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, event); } },
|
|
5670
5747
|
_$1("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
|
|
5671
5748
|
this.question.hasColumns ? this.getColumns(cssClasses) : this.getItems(cssClasses)));
|
|
5672
5749
|
}
|
|
5750
|
+
renderViewMode() {
|
|
5751
|
+
const items = this.question.getViewModeItems();
|
|
5752
|
+
if (items.length === 0) {
|
|
5753
|
+
return (_$1("div", { className: this.question.viewModeCssClass, id: this.question.inputId, ref: (root) => (this.setControl(root)) }, this.question.viewDisplayText));
|
|
5754
|
+
}
|
|
5755
|
+
const isVideo = this.question.contentMode === "video";
|
|
5756
|
+
const style = { objectFit: this.question.imageFit };
|
|
5757
|
+
return (_$1("div", { className: this.question.getSelectBaseRootCss(), id: this.question.inputId, ref: (root) => (this.setControl(root)) }, items.map((item) => {
|
|
5758
|
+
const src = item.locImageLink.renderedHtml;
|
|
5759
|
+
const width = this.question.renderedImageWidth;
|
|
5760
|
+
const height = this.question.renderedImageHeight;
|
|
5761
|
+
if (isVideo) {
|
|
5762
|
+
return (_$1("video", { key: item.uniqueId, className: this.question.cssClasses.image, src: src, width: width, height: height, style: style, onLoadedMetadata: (event) => { this.question.onContentLoaded(item, event.nativeEvent); } }));
|
|
5763
|
+
}
|
|
5764
|
+
return (_$1("img", { key: item.uniqueId, className: this.question.cssClasses.image, src: src, alt: item.locText.renderedHtml, width: width, height: height, style: style, onLoad: (event) => { this.question.onContentLoaded(item, event.nativeEvent); } }));
|
|
5765
|
+
})));
|
|
5766
|
+
}
|
|
5673
5767
|
getColumns(cssClasses) {
|
|
5674
5768
|
return this.question.columns.map((column, ci) => {
|
|
5675
5769
|
var items = column.map((item, ii) => this.renderItem(item, cssClasses));
|
|
@@ -5882,6 +5976,12 @@ class SurveyQuestionSignaturePad extends SurveyQuestionElementBase {
|
|
|
5882
5976
|
return this.questionBase;
|
|
5883
5977
|
}
|
|
5884
5978
|
renderElement() {
|
|
5979
|
+
if (this.question.isViewMode) {
|
|
5980
|
+
if (!this.question.value) {
|
|
5981
|
+
return (_$1("div", { className: this.question.viewModeCssClass, id: this.question.inputId, ref: (root) => (this.setControl(root)) }, this.question.viewDisplayText));
|
|
5982
|
+
}
|
|
5983
|
+
return (_$1("img", { className: this.question.viewModeCssClass, id: this.question.inputId, src: this.question.value, alt: "", ref: (root) => (this.setControl(root)) }));
|
|
5984
|
+
}
|
|
5885
5985
|
var cssClasses = this.question.cssClasses;
|
|
5886
5986
|
const loadingIndicator = this.question.showLoadingIndicator ? this.renderLoadingIndicator() : null;
|
|
5887
5987
|
var toolbar = this.renderToolbar();
|
|
@@ -6127,22 +6227,6 @@ ReactElementFactory.Instance.registerElement("sv-sort-bar-level", (props) => {
|
|
|
6127
6227
|
return _$1(SurveySortBarLevel, props);
|
|
6128
6228
|
});
|
|
6129
6229
|
|
|
6130
|
-
// The content of the "Sort by" dialog: one action bar per row (field, direction, remove).
|
|
6131
|
-
class SurveyRecordsSortDialog extends SurveyElementBase {
|
|
6132
|
-
get model() {
|
|
6133
|
-
return this.props.model;
|
|
6134
|
-
}
|
|
6135
|
-
getStateElement() {
|
|
6136
|
-
return this.model;
|
|
6137
|
-
}
|
|
6138
|
-
renderElement() {
|
|
6139
|
-
return _$1("div", { className: this.model.rootCss }, this.model.rows.map((row) => _$1(k$3, { key: row.uniqueId }, ReactElementFactory.Instance.createElement("sv-action-bar", { model: row }))));
|
|
6140
|
-
}
|
|
6141
|
-
}
|
|
6142
|
-
ReactElementFactory.Instance.registerElement("sv-records-sort-dialog", (props) => {
|
|
6143
|
-
return _$1(SurveyRecordsSortDialog, props);
|
|
6144
|
-
});
|
|
6145
|
-
|
|
6146
6230
|
class LogoImage extends x$3 {
|
|
6147
6231
|
constructor(props) {
|
|
6148
6232
|
super(props);
|
|
@@ -6172,7 +6256,7 @@ class SurveyQuestionMatrixDynamicDragDropIcon extends ReactSurveyElement {
|
|
|
6172
6256
|
return this.props.item;
|
|
6173
6257
|
}
|
|
6174
6258
|
renderElement() {
|
|
6175
|
-
return _$1("div", { onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); } }, this.renderIcon());
|
|
6259
|
+
return _$1("div", { className: this.question.cssClasses.dragHandle, role: "button", tabIndex: 0, "aria-label": this.props.item.ariaLabel, onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); }, onKeyDown: (event) => { this.question.onDragHandleKeyDown(event.nativeEvent, this.row); } }, this.renderIcon());
|
|
6176
6260
|
}
|
|
6177
6261
|
renderIcon() {
|
|
6178
6262
|
if (this.question.iconDragElement) {
|
|
@@ -6464,7 +6548,7 @@ SurveyModel.prototype["render"] = function (element = null) {
|
|
|
6464
6548
|
}
|
|
6465
6549
|
};
|
|
6466
6550
|
const preact = React;
|
|
6467
|
-
checkLibraryVersion(`${"3.2.
|
|
6551
|
+
checkLibraryVersion(`${"3.2.4"}`, "survey-js-ui");
|
|
6468
6552
|
|
|
6469
|
-
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, SurveyMatrixHeaderSortButton, 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,
|
|
6553
|
+
export { CharacterCounterComponent, O as Children, x$3 as Component, ComponentsContainer, k$3 as Fragment, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, ListLoading, 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, SurveyMatrixHeaderSortButton, 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, SurveyQuestionView, SurveyRow, SurveySortBarLevel, 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 };
|
|
6470
6554
|
//# sourceMappingURL=survey-js-ui.mjs.map
|