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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-js-ui",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://surveyjs.io/",
|
|
6
6
|
"author": "DevSoft Baltic OU <info@devsoftbaltic.com>",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"survey-core": "3.2.
|
|
63
|
+
"survey-core": "3.2.4",
|
|
64
64
|
"@types/react-dom": "*",
|
|
65
65
|
"@types/react": "*"
|
|
66
66
|
}
|
package/survey-js-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v3.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
|
*/
|
|
@@ -645,7 +645,7 @@
|
|
|
645
645
|
const className = this.item.getActionBarItemCss();
|
|
646
646
|
const buttonContent = this.renderButtonContent();
|
|
647
647
|
const tabIndex = this.item.disableTabStop ? -1 : undefined;
|
|
648
|
-
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 });
|
|
648
|
+
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 });
|
|
649
649
|
return button;
|
|
650
650
|
}
|
|
651
651
|
componentDidMount() {
|
|
@@ -1084,7 +1084,7 @@
|
|
|
1084
1084
|
return _$1("div", { className: "sv-popup__content" }, contentComponent);
|
|
1085
1085
|
}
|
|
1086
1086
|
renderHeaderPopup(popupModel) {
|
|
1087
|
-
return popupModel.showCloseButton ? _$1("button", { tabIndex: -1, className: "sv-popup__close-button sd-action sd-action--icon", onClick: () => this.model.clickClose() },
|
|
1087
|
+
return popupModel.showCloseButton ? _$1("button", { tabIndex: -1, className: "sv-popup__close-button sd-action sd-action--small sd-action--icon", onClick: () => this.model.clickClose() },
|
|
1088
1088
|
_$1(SvgIcon, { className: "sv-popup__close-button-icon", iconName: "icon-close-24x24", size: "auto" })) : null;
|
|
1089
1089
|
}
|
|
1090
1090
|
renderFooter(popuModel) {
|
|
@@ -1286,12 +1286,14 @@
|
|
|
1286
1286
|
|
|
1287
1287
|
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>";
|
|
1288
1288
|
|
|
1289
|
-
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.
|
|
1289
|
+
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>";
|
|
1290
1290
|
|
|
1291
1291
|
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>";
|
|
1292
1292
|
|
|
1293
1293
|
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>";
|
|
1294
1294
|
|
|
1295
|
+
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>";
|
|
1296
|
+
|
|
1295
1297
|
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>";
|
|
1296
1298
|
|
|
1297
1299
|
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>";
|
|
@@ -1394,6 +1396,7 @@
|
|
|
1394
1396
|
"loading-48x48": loading_48x48,
|
|
1395
1397
|
"maximize-16x16": maximize_16x16,
|
|
1396
1398
|
"minimize-16x16": minimize_16x16,
|
|
1399
|
+
"more-16x16": more_16x16,
|
|
1397
1400
|
"more-24x24": more_24x24,
|
|
1398
1401
|
"navmenu-24x24": navmenu_24x24,
|
|
1399
1402
|
"noimage-48x48": noimage_48x48,
|
|
@@ -2132,8 +2135,14 @@
|
|
|
2132
2135
|
getTextAreaModel() {
|
|
2133
2136
|
return this.props.question.commentTextAreaModel;
|
|
2134
2137
|
}
|
|
2138
|
+
getViewText() {
|
|
2139
|
+
return this.props.question.getCommentViewText();
|
|
2140
|
+
}
|
|
2135
2141
|
renderElement() {
|
|
2136
2142
|
const question = this.props.question;
|
|
2143
|
+
if (question.isViewMode) {
|
|
2144
|
+
return _$1("div", { className: question.viewModeCssClass }, this.getViewText());
|
|
2145
|
+
}
|
|
2137
2146
|
if (question.isReadOnlyRenderDiv()) {
|
|
2138
2147
|
const comment = this.textAreaModel.getTextValue() || "";
|
|
2139
2148
|
return _$1("div", null, comment);
|
|
@@ -2149,6 +2158,9 @@
|
|
|
2149
2158
|
getTextAreaModel() {
|
|
2150
2159
|
return this.props.question.getCommentTextAreaModel(this.props.item);
|
|
2151
2160
|
}
|
|
2161
|
+
getViewText() {
|
|
2162
|
+
return this.props.question.getCommentViewText(this.props.item);
|
|
2163
|
+
}
|
|
2152
2164
|
getKey() { return this.props.item.uniqueId; }
|
|
2153
2165
|
}
|
|
2154
2166
|
ReactQuestionFactory.Instance.registerQuestion("comment", (props) => {
|
|
@@ -2314,6 +2326,21 @@
|
|
|
2314
2326
|
return _$1(SurveyBreadcrumbs, props);
|
|
2315
2327
|
});
|
|
2316
2328
|
|
|
2329
|
+
class QuestionHint extends x$2 {
|
|
2330
|
+
renderHint(hint, index) {
|
|
2331
|
+
if (hint.alternatives.length > 0) {
|
|
2332
|
+
return (_$1("span", { className: hint.className, key: index }, hint.alternatives.map((alternative, alternativeIndex) => this.renderHint(alternative, alternativeIndex))));
|
|
2333
|
+
}
|
|
2334
|
+
return (_$1("span", { className: hint.className, key: index }, hint.parts.map((part, partIndex) => (_$1("span", { key: partIndex, className: part.className }, part.text)))));
|
|
2335
|
+
}
|
|
2336
|
+
render() {
|
|
2337
|
+
const keyboardHintModel = this.props.question.getKeyboardHintModel();
|
|
2338
|
+
if (!keyboardHintModel.hasItems())
|
|
2339
|
+
return null;
|
|
2340
|
+
return (_$1("div", { className: keyboardHintModel.cssClasses.keyboardHintContainer, "aria-hidden": "true" }, keyboardHintModel.items.map((hint, index) => this.renderHint(hint, index))));
|
|
2341
|
+
}
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2317
2344
|
class SurveyQuestion extends SurveyElementBase {
|
|
2318
2345
|
static renderQuestionBody(creator, question) {
|
|
2319
2346
|
// if (!question.isVisible) return null;
|
|
@@ -2422,7 +2449,8 @@
|
|
|
2422
2449
|
headerTop,
|
|
2423
2450
|
questionContent,
|
|
2424
2451
|
headerBottom),
|
|
2425
|
-
errorsBelowQuestion))
|
|
2452
|
+
errorsBelowQuestion)),
|
|
2453
|
+
question.canShowKeyboardHints() ? _$1(QuestionHint, { question: question }) : null));
|
|
2426
2454
|
}
|
|
2427
2455
|
renderSingleInputQuestion(question, cssClasses) {
|
|
2428
2456
|
const singleQuestion = question.singleInputQuestion;
|
|
@@ -3289,7 +3317,7 @@
|
|
|
3289
3317
|
class RatingItemStar extends RatingItemBase {
|
|
3290
3318
|
render() {
|
|
3291
3319
|
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 },
|
|
3292
|
-
_$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 }),
|
|
3320
|
+
_$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 }),
|
|
3293
3321
|
_$1(SvgIcon, { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon }),
|
|
3294
3322
|
_$1(SvgIcon, { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt })));
|
|
3295
3323
|
}
|
|
@@ -3301,7 +3329,7 @@
|
|
|
3301
3329
|
class RatingItemSmiley extends RatingItemBase {
|
|
3302
3330
|
render() {
|
|
3303
3331
|
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 },
|
|
3304
|
-
_$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 }),
|
|
3332
|
+
_$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 }),
|
|
3305
3333
|
_$1(SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item) })));
|
|
3306
3334
|
}
|
|
3307
3335
|
}
|
|
@@ -3870,13 +3898,19 @@
|
|
|
3870
3898
|
return !!this.question && !!this.row;
|
|
3871
3899
|
}
|
|
3872
3900
|
renderElement() {
|
|
3901
|
+
const viewText = this.question.getCellViewText(this.row, this.column);
|
|
3902
|
+
const mobileSpan = this.question.isMobile ?
|
|
3903
|
+
(_$1("span", { className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(this.column.locText)))
|
|
3904
|
+
: undefined;
|
|
3905
|
+
if (viewText) {
|
|
3906
|
+
return (_$1(k$2, null,
|
|
3907
|
+
_$1("div", { className: this.question.viewModeCssClass }, viewText),
|
|
3908
|
+
mobileSpan));
|
|
3909
|
+
}
|
|
3873
3910
|
const isChecked = this.row.isChecked(this.column);
|
|
3874
3911
|
const inputId = this.question.inputId + "_" + this.row.name + "_" + this.columnIndex;
|
|
3875
3912
|
const itemClass = this.question.getItemClass(this.row, this.column);
|
|
3876
3913
|
const itemSvgIcon = this.question.getItemSvgIcon(this.row, this.column);
|
|
3877
|
-
const mobileSpan = this.question.isMobile ?
|
|
3878
|
-
(_$1("span", { className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(this.column.locText)))
|
|
3879
|
-
: undefined;
|
|
3880
3914
|
return (_$1("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
|
|
3881
3915
|
this.renderInput(inputId, isChecked),
|
|
3882
3916
|
_$1("span", { className: this.question.cssMaterialDecorator, "aria-hidden": "true" }, itemSvgIcon ?
|
|
@@ -3952,7 +3986,13 @@
|
|
|
3952
3986
|
const className = !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss();
|
|
3953
3987
|
const style = this.isDisplayMode ? { color: "transparent" } : {};
|
|
3954
3988
|
let fileInput;
|
|
3955
|
-
if (this.question.
|
|
3989
|
+
if (this.question.isViewMode && this.question.isEmpty()) {
|
|
3990
|
+
return (_$1("div", { className: this.question.viewModeCssClass, id: this.question.inputId, ref: el => (this.setControl(el)) }, this.question.viewDisplayText));
|
|
3991
|
+
}
|
|
3992
|
+
if (this.question.isViewMode) {
|
|
3993
|
+
fileInput = null;
|
|
3994
|
+
}
|
|
3995
|
+
else if (this.question.isReadOnlyAttr) {
|
|
3956
3996
|
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 });
|
|
3957
3997
|
}
|
|
3958
3998
|
else if (this.question.isDisabledAttr) {
|
|
@@ -4554,10 +4594,12 @@
|
|
|
4554
4594
|
renderElement() {
|
|
4555
4595
|
const cell = this.cell;
|
|
4556
4596
|
const description = cell.sortDescription;
|
|
4597
|
+
const rank = cell.sortRank;
|
|
4557
4598
|
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 },
|
|
4558
4599
|
_$1("span", { className: cell.sortTitleCss }, this.props.content),
|
|
4559
4600
|
_$1("span", { className: cell.sortCss, "aria-hidden": "true" },
|
|
4560
|
-
_$1(SvgIcon, { iconName: cell.sortIconName, size: 16 })
|
|
4601
|
+
_$1(SvgIcon, { iconName: cell.sortIconName, size: 16 }),
|
|
4602
|
+
!!rank ? _$1("span", { className: cell.sortRankCss }, rank) : null),
|
|
4561
4603
|
!!description ? _$1("span", { id: cell.sortDescriptionId, className: "sv-visuallyhidden" }, description) : null));
|
|
4562
4604
|
}
|
|
4563
4605
|
}
|
|
@@ -5265,6 +5307,22 @@
|
|
|
5265
5307
|
return _$1(ListItem, props);
|
|
5266
5308
|
});
|
|
5267
5309
|
|
|
5310
|
+
class ListLoading extends SurveyElementBase {
|
|
5311
|
+
get model() {
|
|
5312
|
+
return this.props.model;
|
|
5313
|
+
}
|
|
5314
|
+
getStateElement() {
|
|
5315
|
+
return this.model;
|
|
5316
|
+
}
|
|
5317
|
+
render() {
|
|
5318
|
+
return (_$1("div", { className: this.model.cssClasses.emptyContainer, role: "status", "aria-label": this.model.getLocalizationString("loadingData") },
|
|
5319
|
+
_$1(LoadingIndicatorComponent, null)));
|
|
5320
|
+
}
|
|
5321
|
+
}
|
|
5322
|
+
ReactElementFactory.Instance.registerElement("sv-list-loading", (props) => {
|
|
5323
|
+
return _$1(ListLoading, props);
|
|
5324
|
+
});
|
|
5325
|
+
|
|
5268
5326
|
class List extends SurveyElementBase {
|
|
5269
5327
|
constructor(props) {
|
|
5270
5328
|
super(props);
|
|
@@ -5362,6 +5420,9 @@
|
|
|
5362
5420
|
}
|
|
5363
5421
|
}
|
|
5364
5422
|
emptyContent() {
|
|
5423
|
+
if (this.model.loadingState === "loading") {
|
|
5424
|
+
return ReactElementFactory.Instance.createElement(this.model.loadingComponent, { model: this.model });
|
|
5425
|
+
}
|
|
5365
5426
|
const style = { display: this.model.isEmpty ? null : "none" };
|
|
5366
5427
|
return (_$1("div", { className: this.model.cssClasses.emptyContainer, style: style },
|
|
5367
5428
|
_$1("div", { className: this.model.cssClasses.emptyText, "aria-label": this.model.emptyMessage }, this.model.emptyMessage)));
|
|
@@ -5554,6 +5615,19 @@
|
|
|
5554
5615
|
return _$1(SurveyQuestionExpression, props);
|
|
5555
5616
|
});
|
|
5556
5617
|
|
|
5618
|
+
class SurveyQuestionView extends SurveyQuestionElementBase {
|
|
5619
|
+
get question() {
|
|
5620
|
+
return this.questionBase;
|
|
5621
|
+
}
|
|
5622
|
+
renderElement() {
|
|
5623
|
+
return (_$1("div", { id: this.question.inputId, className: this.question.viewModeCssClass, ref: (div) => (this.setControl(div)) }, this.question.viewDisplayText));
|
|
5624
|
+
}
|
|
5625
|
+
}
|
|
5626
|
+
ReactQuestionFactory.Instance.registerQuestion("sv-question-view", (props) => {
|
|
5627
|
+
return _$1(SurveyQuestionView, props);
|
|
5628
|
+
});
|
|
5629
|
+
surveyCore.RendererFactory.Instance.registerRenderer("question", "view", "sv-question-view");
|
|
5630
|
+
|
|
5557
5631
|
class PopupSurvey extends Survey {
|
|
5558
5632
|
constructor(props) {
|
|
5559
5633
|
super(props);
|
|
@@ -5666,11 +5740,31 @@
|
|
|
5666
5740
|
return this.questionBase;
|
|
5667
5741
|
}
|
|
5668
5742
|
renderElement() {
|
|
5743
|
+
if (this.question.isViewMode) {
|
|
5744
|
+
return this.renderViewMode();
|
|
5745
|
+
}
|
|
5669
5746
|
var cssClasses = this.question.cssClasses;
|
|
5670
5747
|
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); } },
|
|
5671
5748
|
_$1("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
|
|
5672
5749
|
this.question.hasColumns ? this.getColumns(cssClasses) : this.getItems(cssClasses)));
|
|
5673
5750
|
}
|
|
5751
|
+
renderViewMode() {
|
|
5752
|
+
const items = this.question.getViewModeItems();
|
|
5753
|
+
if (items.length === 0) {
|
|
5754
|
+
return (_$1("div", { className: this.question.viewModeCssClass, id: this.question.inputId, ref: (root) => (this.setControl(root)) }, this.question.viewDisplayText));
|
|
5755
|
+
}
|
|
5756
|
+
const isVideo = this.question.contentMode === "video";
|
|
5757
|
+
const style = { objectFit: this.question.imageFit };
|
|
5758
|
+
return (_$1("div", { className: this.question.getSelectBaseRootCss(), id: this.question.inputId, ref: (root) => (this.setControl(root)) }, items.map((item) => {
|
|
5759
|
+
const src = item.locImageLink.renderedHtml;
|
|
5760
|
+
const width = this.question.renderedImageWidth;
|
|
5761
|
+
const height = this.question.renderedImageHeight;
|
|
5762
|
+
if (isVideo) {
|
|
5763
|
+
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); } }));
|
|
5764
|
+
}
|
|
5765
|
+
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); } }));
|
|
5766
|
+
})));
|
|
5767
|
+
}
|
|
5674
5768
|
getColumns(cssClasses) {
|
|
5675
5769
|
return this.question.columns.map((column, ci) => {
|
|
5676
5770
|
var items = column.map((item, ii) => this.renderItem(item, cssClasses));
|
|
@@ -5883,6 +5977,12 @@
|
|
|
5883
5977
|
return this.questionBase;
|
|
5884
5978
|
}
|
|
5885
5979
|
renderElement() {
|
|
5980
|
+
if (this.question.isViewMode) {
|
|
5981
|
+
if (!this.question.value) {
|
|
5982
|
+
return (_$1("div", { className: this.question.viewModeCssClass, id: this.question.inputId, ref: (root) => (this.setControl(root)) }, this.question.viewDisplayText));
|
|
5983
|
+
}
|
|
5984
|
+
return (_$1("img", { className: this.question.viewModeCssClass, id: this.question.inputId, src: this.question.value, alt: "", ref: (root) => (this.setControl(root)) }));
|
|
5985
|
+
}
|
|
5886
5986
|
var cssClasses = this.question.cssClasses;
|
|
5887
5987
|
const loadingIndicator = this.question.showLoadingIndicator ? this.renderLoadingIndicator() : null;
|
|
5888
5988
|
var toolbar = this.renderToolbar();
|
|
@@ -6128,22 +6228,6 @@
|
|
|
6128
6228
|
return _$1(SurveySortBarLevel, props);
|
|
6129
6229
|
});
|
|
6130
6230
|
|
|
6131
|
-
// The content of the "Sort by" dialog: one action bar per row (field, direction, remove).
|
|
6132
|
-
class SurveyRecordsSortDialog extends SurveyElementBase {
|
|
6133
|
-
get model() {
|
|
6134
|
-
return this.props.model;
|
|
6135
|
-
}
|
|
6136
|
-
getStateElement() {
|
|
6137
|
-
return this.model;
|
|
6138
|
-
}
|
|
6139
|
-
renderElement() {
|
|
6140
|
-
return _$1("div", { className: this.model.rootCss }, this.model.rows.map((row) => _$1(k$2, { key: row.uniqueId }, ReactElementFactory.Instance.createElement("sv-action-bar", { model: row }))));
|
|
6141
|
-
}
|
|
6142
|
-
}
|
|
6143
|
-
ReactElementFactory.Instance.registerElement("sv-records-sort-dialog", (props) => {
|
|
6144
|
-
return _$1(SurveyRecordsSortDialog, props);
|
|
6145
|
-
});
|
|
6146
|
-
|
|
6147
6231
|
class LogoImage extends x$2 {
|
|
6148
6232
|
constructor(props) {
|
|
6149
6233
|
super(props);
|
|
@@ -6173,7 +6257,7 @@
|
|
|
6173
6257
|
return this.props.item;
|
|
6174
6258
|
}
|
|
6175
6259
|
renderElement() {
|
|
6176
|
-
return _$1("div", { onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); } }, this.renderIcon());
|
|
6260
|
+
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());
|
|
6177
6261
|
}
|
|
6178
6262
|
renderIcon() {
|
|
6179
6263
|
if (this.question.iconDragElement) {
|
|
@@ -6465,7 +6549,7 @@
|
|
|
6465
6549
|
}
|
|
6466
6550
|
};
|
|
6467
6551
|
const preact = React;
|
|
6468
|
-
surveyCore.checkLibraryVersion(`${"3.2.
|
|
6552
|
+
surveyCore.checkLibraryVersion(`${"3.2.4"}`, "survey-js-ui");
|
|
6469
6553
|
|
|
6470
6554
|
Object.defineProperty(exports, 'Model', {
|
|
6471
6555
|
enumerable: true,
|
|
@@ -6502,6 +6586,7 @@
|
|
|
6502
6586
|
exports.List = List;
|
|
6503
6587
|
exports.ListItemContent = ListItemContent;
|
|
6504
6588
|
exports.ListItemGroup = ListItemGroup;
|
|
6589
|
+
exports.ListLoading = ListLoading;
|
|
6505
6590
|
exports.LoadingIndicatorComponent = LoadingIndicatorComponent;
|
|
6506
6591
|
exports.LogoImage = LogoImage;
|
|
6507
6592
|
exports.MatrixRow = MatrixRow;
|
|
@@ -6592,7 +6677,7 @@
|
|
|
6592
6677
|
exports.SurveyQuestionTagbox = SurveyQuestionTagbox;
|
|
6593
6678
|
exports.SurveyQuestionTagboxItem = SurveyQuestionTagboxItem;
|
|
6594
6679
|
exports.SurveyQuestionText = SurveyQuestionText;
|
|
6595
|
-
exports.
|
|
6680
|
+
exports.SurveyQuestionView = SurveyQuestionView;
|
|
6596
6681
|
exports.SurveyRow = SurveyRow;
|
|
6597
6682
|
exports.SurveySortBarLevel = SurveySortBarLevel;
|
|
6598
6683
|
exports.SurveyTimerPanel = SurveyTimerPanel;
|