survey-js-ui 3.2.2 → 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/README.md +1 -1
- package/fesm/survey-js-ui.mjs +231 -58
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +234 -58
- 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 +4 -1
- package/typings/survey-react-ui/src/boolean-switch.d.ts +1 -0
- 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/matrix/header-sort-button.d.ts +10 -0
- package/typings/survey-react-ui/src/components/popup/popup.d.ts +1 -1
- package/typings/survey-react-ui/src/components/question-hint.d.ts +8 -0
- package/typings/survey-react-ui/src/components/sort-bar-level.d.ts +12 -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_matrixdropdown.d.ts +1 -0
- package/typings/survey-react-ui/src/reactquestion_matrixdropdownbase.d.ts +2 -0
- package/typings/survey-react-ui/src/reactquestion_matrixdynamic.d.ts +3 -4
- package/typings/survey-react-ui/src/reactquestion_paneldynamic.d.ts +1 -0
- package/typings/survey-react-ui/src/reactquestion_view.d.ts +7 -0
- package/typings/survey-react-ui/src/components/records-bar.d.ts +0 -12
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() {
|
|
@@ -776,7 +776,7 @@
|
|
|
776
776
|
}
|
|
777
777
|
render() {
|
|
778
778
|
const titleContent = _$1(TitleContent, { element: this.element, cssClasses: this.cssClasses });
|
|
779
|
-
if (!this.element.
|
|
779
|
+
if (!this.element.hasVisibleTitleActions)
|
|
780
780
|
return titleContent;
|
|
781
781
|
return (_$1("div", { className: "sv-title-actions" },
|
|
782
782
|
_$1("span", { className: "sv-title-actions__title" }, titleContent),
|
|
@@ -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) {
|
|
@@ -1092,6 +1092,9 @@
|
|
|
1092
1092
|
_$1(SurveyActionBar, { model: popuModel.footerToolbar })));
|
|
1093
1093
|
}
|
|
1094
1094
|
render() {
|
|
1095
|
+
// Stays mounted and subscribed to the view model: Popup does not re-render when the popup opens.
|
|
1096
|
+
if (!this.model.hasBeenShown)
|
|
1097
|
+
return null;
|
|
1095
1098
|
const container = this.renderContainer(this.model);
|
|
1096
1099
|
const className = new surveyCore.CssClassBuilder()
|
|
1097
1100
|
.append("sv-popup")
|
|
@@ -1213,10 +1216,14 @@
|
|
|
1213
1216
|
|
|
1214
1217
|
var add_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15.75 12C15.75 12.41 15.41 12.75 15 12.75H12.75V15C12.75 15.41 12.41 15.75 12 15.75C11.59 15.75 11.25 15.41 11.25 15V12.75H9C8.59 12.75 8.25 12.41 8.25 12C8.25 11.59 8.59 11.25 9 11.25H11.25V9C11.25 8.59 11.59 8.25 12 8.25C12.41 8.25 12.75 8.59 12.75 9V11.25H15C15.41 11.25 15.75 11.59 15.75 12ZM21.75 12C21.75 17.38 17.38 21.75 12 21.75C6.62 21.75 2.25 17.38 2.25 12C2.25 6.62 6.62 2.25 12 2.25C17.38 2.25 21.75 6.62 21.75 12ZM20.25 12C20.25 7.45 16.55 3.75 12 3.75C7.45 3.75 3.75 7.45 3.75 12C3.75 16.55 7.45 20.25 12 20.25C16.55 20.25 20.25 16.55 20.25 12Z\"/></svg>";
|
|
1215
1218
|
|
|
1219
|
+
var arrowdown_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.5275 8.53L8.5275 12.53C8.4575 12.6 8.3775 12.65 8.2875 12.69C8.1975 12.73 8.0975 12.75 7.9975 12.75C7.8975 12.75 7.7975 12.73 7.7075 12.69C7.6175 12.65 7.5375 12.6 7.4675 12.53L3.4675 8.53C3.1775 8.24 3.1775 7.76 3.4675 7.47C3.7575 7.18 4.2375 7.18 4.5275 7.47L7.2475 10.19V3C7.2475 2.59 7.5875 2.25 7.9975 2.25C8.4075 2.25 8.7475 2.59 8.7475 3V10.19L11.4675 7.47C11.7575 7.18 12.2375 7.18 12.5275 7.47C12.8175 7.76 12.8175 8.24 12.5275 8.53Z\"/></svg>";
|
|
1220
|
+
|
|
1216
1221
|
var arrowleft_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M14.7475 7.9975C14.7475 8.4075 14.4075 8.7475 13.9975 8.7475H3.8075L7.5275 12.4675C7.8175 12.7575 7.8175 13.2375 7.5275 13.5275C7.3775 13.6775 7.1875 13.7475 6.9975 13.7475C6.8075 13.7475 6.6175 13.6775 6.4675 13.5275L1.4675 8.5275C1.1775 8.2375 1.1775 7.7575 1.4675 7.4675L6.4675 2.4675C6.7575 2.1775 7.2375 2.1775 7.5275 2.4675C7.8175 2.7575 7.8175 3.2375 7.5275 3.5275L3.8075 7.2475H13.9975C14.4075 7.2475 14.7475 7.5875 14.7475 7.9975Z\"/></svg>";
|
|
1217
1222
|
|
|
1218
1223
|
var arrowright_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M14.53 8.5275L9.53 13.5275C9.38 13.6775 9.19 13.7475 9 13.7475C8.81 13.7475 8.62 13.6775 8.47 13.5275C8.18 13.2375 8.18 12.7575 8.47 12.4675L12.19 8.7475H2C1.59 8.7475 1.25 8.4075 1.25 7.9975C1.25 7.5875 1.59 7.2475 2 7.2475H12.19L8.47 3.5275C8.18 3.2375 8.18 2.7575 8.47 2.4675C8.76 2.1775 9.24 2.1775 9.53 2.4675L14.53 7.4675C14.82 7.7575 14.82 8.2375 14.53 8.5275Z\"/></svg>";
|
|
1219
1224
|
|
|
1225
|
+
var arrowup_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.5275 7.53C12.3775 7.68 12.1875 7.75 11.9975 7.75C11.8075 7.75 11.6175 7.68 11.4675 7.53L8.7475 4.81V12C8.7475 12.41 8.4075 12.75 7.9975 12.75C7.5875 12.75 7.2475 12.41 7.2475 12V4.81L4.5275 7.53C4.2375 7.82 3.7575 7.82 3.4675 7.53C3.1775 7.24 3.1775 6.76 3.4675 6.47L7.4675 2.47C7.5375 2.4 7.6175 2.35 7.7075 2.31C7.8875 2.23 8.0975 2.23 8.2775 2.31C8.3675 2.35 8.4475 2.4 8.5175 2.47L12.5175 6.47C12.8075 6.76 12.8075 7.24 12.5175 7.53H12.5275Z\"/></svg>";
|
|
1226
|
+
|
|
1220
1227
|
var camera_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M19.19 4.25H17.12C16.72 4.25 16.35 4.03 16.17 3.67C15.73 2.8 14.86 2.25 13.88 2.25H10.12C9.14 2.25 8.27 2.79 7.83 3.67C7.65 4.03 7.29 4.25 6.88 4.25H4.81C3.4 4.25 2.25 5.4 2.25 6.81V18.19C2.25 19.6 3.4 20.75 4.81 20.75H19.19C20.6 20.75 21.75 19.6 21.75 18.19V6.81C21.75 5.4 20.6 4.25 19.19 4.25ZM20.25 18.19C20.25 18.77 19.78 19.25 19.19 19.25H4.81C4.23 19.25 3.75 18.78 3.75 18.19V6.81C3.75 6.23 4.22 5.75 4.81 5.75H6.88C7.86 5.75 8.73 5.21 9.17 4.33C9.35 3.97 9.71 3.75 10.12 3.75H13.88C14.28 3.75 14.65 3.97 14.83 4.33C15.27 5.2 16.14 5.75 17.12 5.75H19.19C19.77 5.75 20.25 6.22 20.25 6.81V18.19ZM12 6.25C8.83 6.25 6.25 8.83 6.25 12C6.25 15.17 8.83 17.75 12 17.75C15.17 17.75 17.75 15.17 17.75 12C17.75 8.83 15.17 6.25 12 6.25ZM12 16.25C9.66 16.25 7.75 14.34 7.75 12C7.75 9.66 9.66 7.75 12 7.75C14.34 7.75 16.25 9.66 16.25 12C16.25 14.34 14.34 16.25 12 16.25ZM14.75 12C14.75 13.52 13.52 14.75 12 14.75C11.59 14.75 11.25 14.41 11.25 14C11.25 13.59 11.59 13.25 12 13.25C12.69 13.25 13.25 12.69 13.25 12C13.25 11.59 13.59 11.25 14 11.25C14.41 11.25 14.75 11.59 14.75 12Z\"/></svg>";
|
|
1221
1228
|
|
|
1222
1229
|
var camera_32x32 = "<svg viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M25 7.25H22.19C21.73 7.25 21.31 7 21.09 6.59L20.89 6.22C20.23 5.01 18.97 4.25 17.59 4.25H14.41C13.03 4.25 11.77 5 11.11 6.22L10.91 6.6C10.69 7 10.27 7.26 9.81 7.26H7C4.93 7.26 3.25 8.94 3.25 11.01V24.01C3.25 26.08 4.93 27.76 7 27.76H25C27.07 27.76 28.75 26.08 28.75 24.01V11C28.75 8.93 27.07 7.25 25 7.25ZM27.25 24C27.25 25.24 26.24 26.25 25 26.25H7C5.76 26.25 4.75 25.24 4.75 24V11C4.75 9.76 5.76 8.75 7 8.75H9.81C10.82 8.75 11.75 8.2 12.23 7.31L12.43 6.94C12.82 6.21 13.58 5.76 14.41 5.76H17.59C18.42 5.76 19.18 6.21 19.57 6.94L19.77 7.31C20.25 8.2 21.18 8.76 22.19 8.76H25C26.24 8.76 27.25 9.77 27.25 11.01V24.01V24ZM16 10.25C12.28 10.25 9.25 13.28 9.25 17C9.25 20.72 12.28 23.75 16 23.75C19.72 23.75 22.75 20.72 22.75 17C22.75 13.28 19.72 10.25 16 10.25ZM16 22.25C13.11 22.25 10.75 19.89 10.75 17C10.75 14.11 13.11 11.75 16 11.75C18.89 11.75 21.25 14.11 21.25 17C21.25 19.89 18.89 22.25 16 22.25ZM19.75 17C19.75 19.07 18.07 20.75 16 20.75C15.59 20.75 15.25 20.41 15.25 20C15.25 19.59 15.59 19.25 16 19.25C17.24 19.25 18.25 18.24 18.25 17C18.25 16.59 18.59 16.25 19 16.25C19.41 16.25 19.75 16.59 19.75 17Z\"/></svg>";
|
|
@@ -1279,18 +1286,22 @@
|
|
|
1279
1286
|
|
|
1280
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>";
|
|
1281
1288
|
|
|
1282
|
-
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>";
|
|
1283
1290
|
|
|
1284
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>";
|
|
1285
1292
|
|
|
1286
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>";
|
|
1287
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
|
+
|
|
1288
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>";
|
|
1289
1298
|
|
|
1290
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>";
|
|
1291
1300
|
|
|
1292
1301
|
var noimage_48x48 = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M30.4975 14.2475C28.7075 14.2475 27.2475 15.7075 27.2475 17.4975C27.2475 19.2875 28.7075 20.7475 30.4975 20.7475C32.2875 20.7475 33.7475 19.2875 33.7475 17.4975C33.7475 15.7075 32.2875 14.2475 30.4975 14.2475ZM30.4975 19.2475C29.5375 19.2475 28.7475 18.4575 28.7475 17.4975C28.7475 16.5375 29.5375 15.7475 30.4975 15.7475C31.4575 15.7475 32.2475 16.5375 32.2475 17.4975C32.2475 18.4575 31.4575 19.2475 30.4975 19.2475ZM13.5175 11.2175C13.4375 10.8075 13.7075 10.4175 14.1175 10.3375C14.4275 10.2775 14.7175 10.2475 14.9975 10.2475H32.9975C35.6175 10.2475 37.7475 12.3775 37.7475 14.9975V32.9975C37.7475 33.2775 37.7175 33.5675 37.6575 33.8775C37.5875 34.2375 37.2775 34.4875 36.9175 34.4875C36.8675 34.4875 36.8275 34.4875 36.7775 34.4775C36.3675 34.3975 36.1075 34.0075 36.1775 33.5975C36.2175 33.3775 36.2375 33.1775 36.2375 32.9975V14.9975C36.2375 13.2075 34.7775 11.7475 32.9875 11.7475H14.9975C14.8075 11.7475 14.6175 11.7675 14.3975 11.8075C13.9875 11.8875 13.5975 11.6175 13.5175 11.2075V11.2175ZM34.4775 36.7775C34.5575 37.1875 34.2875 37.5775 33.8775 37.6575C33.5675 37.7175 33.2775 37.7475 32.9975 37.7475H14.9975C12.3775 37.7475 10.2475 35.6175 10.2475 32.9975V14.9975C10.2475 14.7175 10.2775 14.4275 10.3375 14.1175C10.4175 13.7075 10.8075 13.4375 11.2175 13.5175C11.6275 13.5975 11.8875 13.9875 11.8175 14.3975C11.7775 14.6175 11.7575 14.8175 11.7575 14.9975V32.9975C11.7575 34.7875 13.2175 36.2475 15.0075 36.2475H33.0075C33.1975 36.2475 33.3875 36.2275 33.6075 36.1875C34.0075 36.1075 34.4075 36.3775 34.4875 36.7875L34.4775 36.7775ZM15.8275 31.7975C15.6975 31.9375 15.7575 32.0875 15.7775 32.1175C15.8175 32.1975 15.8675 32.2475 15.9375 32.2475H29.8175C30.2275 32.2475 30.5675 32.5875 30.5675 32.9975C30.5675 33.4075 30.2275 33.7475 29.8175 33.7475H15.9375C15.2675 33.7475 14.6775 33.3475 14.3975 32.7175C14.1075 32.0575 14.2375 31.2975 14.7275 30.7775L19.7275 25.2775C20.0475 24.9275 20.5075 24.7175 20.9875 24.7075C21.4875 24.7275 21.9375 24.8875 22.2675 25.2275L25.4675 28.4775C25.7575 28.7675 25.7575 29.2475 25.4675 29.5375C25.1675 29.8275 24.6975 29.8275 24.4075 29.5375L21.2075 26.2875C21.1475 26.2175 21.0675 26.1875 21.0275 26.2075C20.9875 26.2075 20.9075 26.2175 20.8475 26.2875L15.8375 31.7975H15.8275ZM38.5275 38.5275C38.3775 38.6775 38.1875 38.7475 37.9975 38.7475C37.8075 38.7475 37.6175 38.6775 37.4675 38.5275L9.4675 10.5275C9.1775 10.2375 9.1775 9.7575 9.4675 9.4675C9.7575 9.1775 10.2375 9.1775 10.5275 9.4675L38.5275 37.4675C38.8175 37.7575 38.8175 38.2375 38.5275 38.5275Z\"/></svg>";
|
|
1293
1302
|
|
|
1303
|
+
var plus_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8 2.25C8.41 2.25 8.75 2.59 8.75 3V7.25H13C13.41 7.25 13.75 7.59 13.75 8C13.75 8.41 13.41 8.75 13 8.75H8.75V13C8.75 13.41 8.41 13.75 8 13.75C7.59 13.75 7.25 13.41 7.25 13V8.75H3C2.59 8.75 2.25 8.41 2.25 8C2.25 7.59 2.59 7.25 3 7.25H7.25V3C7.25 2.59 7.59 2.25 8 2.25Z\"/></svg>";
|
|
1304
|
+
|
|
1294
1305
|
var radio_16x16 = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><circle cx=\"8\" cy=\"8\" r=\"4\"/></svg>";
|
|
1295
1306
|
|
|
1296
1307
|
var ranking_arrows = "<svg viewBox=\"0 0 10 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10 5L5 0L0 5H4V9H6V5H10Z\"/><path d=\"M6 19V15H4V19H0L5 24L10 19H6Z\"/></svg>";
|
|
@@ -1335,6 +1346,8 @@
|
|
|
1335
1346
|
|
|
1336
1347
|
var smiley_rate9_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.01 24C6.85767 24 1.15509 20.96 0.0145752 14.16C-0.0354475 13.87 0.0445888 13.57 0.234675 13.35C0.424761 13.13 0.704888 13 0.995019 13H23.005C23.2951 13 23.5752 13.13 23.7653 13.35C23.9554 13.57 24.0354 13.87 23.9854 14.16C22.8549 20.95 17.1423 24 11.99 24H12.01ZM2.25559 15C3.61621 19.82 8.0182 22 12.01 22C16.0018 22 20.4038 19.82 21.7644 15H2.25559ZM8.00819 6V2C8.00819 1.45 7.55799 1 7.00774 1C6.45749 1 6.00729 1.45 6.00729 2V6C6.00729 6.55 6.45749 7 7.00774 7C7.55799 7 8.00819 6.55 8.00819 6ZM18.0127 6V2C18.0127 1.45 17.5625 1 17.0123 1C16.462 1 16.0118 1.45 16.0118 2V6C16.0118 6.55 16.462 7 17.0123 7C17.5625 7 18.0127 6.55 18.0127 6Z\"/></svg>";
|
|
1337
1348
|
|
|
1349
|
+
var sort_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.28284 7.47861C5.37477 7.51396 5.45962 7.57053 5.53033 7.64124L8.35876 10.4697C8.64867 10.7596 8.64867 11.2404 8.35876 11.5303C8.06884 11.8202 7.58801 11.8202 7.2981 11.5303L5.74953 9.98177L5.74953 13.8284C5.74953 14.0406 5.66468 14.2244 5.53033 14.3588C5.39598 14.4931 5.21213 14.578 5 14.578C4.58988 14.578 4.25047 14.2385 4.25047 13.8284L4.25047 9.98177L2.7019 11.5303C2.41199 11.8202 1.93116 11.8202 1.64124 11.5303C1.35133 11.2404 1.35133 10.7596 1.64124 10.4697L4.46967 7.64124C4.54038 7.57053 4.61816 7.52103 4.71716 7.47861C4.901 7.4079 5.10607 7.40083 5.29698 7.47861H5.28284ZM13.296 4.47467L11.7475 6.02323L11.7475 2.17657C11.7475 1.76645 11.4081 1.42704 10.9979 1.42704C10.5878 1.42704 10.2484 1.76645 10.2484 2.17657V6.02323L8.69983 4.47467C8.40992 4.18476 7.92909 4.18476 7.63917 4.47467C7.34926 4.76458 7.34926 5.24542 7.63917 5.53533L10.4676 8.36376C10.5383 8.43447 10.6161 8.48397 10.7151 8.52639C10.8989 8.5971 11.104 8.60417 11.2949 8.52639C11.3868 8.49104 11.4717 8.43447 11.5424 8.36376L14.3708 5.53533C14.6607 5.24542 14.6607 4.76458 14.3708 4.47467C14.0809 4.18476 13.6001 4.18476 13.3102 4.47467H13.296Z\"/></svg>";
|
|
1350
|
+
|
|
1338
1351
|
const icons = {
|
|
1339
1352
|
"modernbooleancheckchecked": modernbooleancheckchecked,
|
|
1340
1353
|
"modernbooleancheckind": modernbooleancheckind,
|
|
@@ -1345,8 +1358,10 @@
|
|
|
1345
1358
|
"removefile": removefile,
|
|
1346
1359
|
"timercircle": timercircle,
|
|
1347
1360
|
"add-24x24": add_24x24,
|
|
1361
|
+
"arrowdown-16x16": arrowdown_16x16,
|
|
1348
1362
|
"arrowleft-16x16": arrowleft_16x16,
|
|
1349
1363
|
"arrowright-16x16": arrowright_16x16,
|
|
1364
|
+
"arrowup-16x16": arrowup_16x16,
|
|
1350
1365
|
"camera-24x24": camera_24x24,
|
|
1351
1366
|
"camera-32x32": camera_32x32,
|
|
1352
1367
|
"cancel-24x24": cancel_24x24,
|
|
@@ -1381,9 +1396,11 @@
|
|
|
1381
1396
|
"loading-48x48": loading_48x48,
|
|
1382
1397
|
"maximize-16x16": maximize_16x16,
|
|
1383
1398
|
"minimize-16x16": minimize_16x16,
|
|
1399
|
+
"more-16x16": more_16x16,
|
|
1384
1400
|
"more-24x24": more_24x24,
|
|
1385
1401
|
"navmenu-24x24": navmenu_24x24,
|
|
1386
1402
|
"noimage-48x48": noimage_48x48,
|
|
1403
|
+
"plus-16x16": plus_16x16,
|
|
1387
1404
|
"radio-16x16": radio_16x16,
|
|
1388
1405
|
"ranking-arrows": ranking_arrows,
|
|
1389
1406
|
"rankingdot-16x16": rankingdot_16x16,
|
|
@@ -1406,6 +1423,7 @@
|
|
|
1406
1423
|
"smiley-rate7-24x24": smiley_rate7_24x24,
|
|
1407
1424
|
"smiley-rate8-24x24": smiley_rate8_24x24,
|
|
1408
1425
|
"smiley-rate9-24x24": smiley_rate9_24x24,
|
|
1426
|
+
"sort-16x16": sort_16x16,
|
|
1409
1427
|
};
|
|
1410
1428
|
|
|
1411
1429
|
exports.icons = icons;
|
|
@@ -2117,8 +2135,14 @@
|
|
|
2117
2135
|
getTextAreaModel() {
|
|
2118
2136
|
return this.props.question.commentTextAreaModel;
|
|
2119
2137
|
}
|
|
2138
|
+
getViewText() {
|
|
2139
|
+
return this.props.question.getCommentViewText();
|
|
2140
|
+
}
|
|
2120
2141
|
renderElement() {
|
|
2121
2142
|
const question = this.props.question;
|
|
2143
|
+
if (question.isViewMode) {
|
|
2144
|
+
return _$1("div", { className: question.viewModeCssClass }, this.getViewText());
|
|
2145
|
+
}
|
|
2122
2146
|
if (question.isReadOnlyRenderDiv()) {
|
|
2123
2147
|
const comment = this.textAreaModel.getTextValue() || "";
|
|
2124
2148
|
return _$1("div", null, comment);
|
|
@@ -2134,6 +2158,9 @@
|
|
|
2134
2158
|
getTextAreaModel() {
|
|
2135
2159
|
return this.props.question.getCommentTextAreaModel(this.props.item);
|
|
2136
2160
|
}
|
|
2161
|
+
getViewText() {
|
|
2162
|
+
return this.props.question.getCommentViewText(this.props.item);
|
|
2163
|
+
}
|
|
2137
2164
|
getKey() { return this.props.item.uniqueId; }
|
|
2138
2165
|
}
|
|
2139
2166
|
ReactQuestionFactory.Instance.registerQuestion("comment", (props) => {
|
|
@@ -2299,6 +2326,21 @@
|
|
|
2299
2326
|
return _$1(SurveyBreadcrumbs, props);
|
|
2300
2327
|
});
|
|
2301
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
|
+
|
|
2302
2344
|
class SurveyQuestion extends SurveyElementBase {
|
|
2303
2345
|
static renderQuestionBody(creator, question) {
|
|
2304
2346
|
// if (!question.isVisible) return null;
|
|
@@ -2407,7 +2449,8 @@
|
|
|
2407
2449
|
headerTop,
|
|
2408
2450
|
questionContent,
|
|
2409
2451
|
headerBottom),
|
|
2410
|
-
errorsBelowQuestion))
|
|
2452
|
+
errorsBelowQuestion)),
|
|
2453
|
+
question.canShowKeyboardHints() ? _$1(QuestionHint, { question: question }) : null));
|
|
2411
2454
|
}
|
|
2412
2455
|
renderSingleInputQuestion(question, cssClasses) {
|
|
2413
2456
|
const singleQuestion = question.singleInputQuestion;
|
|
@@ -3274,7 +3317,7 @@
|
|
|
3274
3317
|
class RatingItemStar extends RatingItemBase {
|
|
3275
3318
|
render() {
|
|
3276
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 },
|
|
3277
|
-
_$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 }),
|
|
3278
3321
|
_$1(SvgIcon, { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon }),
|
|
3279
3322
|
_$1(SvgIcon, { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt })));
|
|
3280
3323
|
}
|
|
@@ -3286,7 +3329,7 @@
|
|
|
3286
3329
|
class RatingItemSmiley extends RatingItemBase {
|
|
3287
3330
|
render() {
|
|
3288
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 },
|
|
3289
|
-
_$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 }),
|
|
3290
3333
|
_$1(SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item) })));
|
|
3291
3334
|
}
|
|
3292
3335
|
}
|
|
@@ -3855,13 +3898,19 @@
|
|
|
3855
3898
|
return !!this.question && !!this.row;
|
|
3856
3899
|
}
|
|
3857
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
|
+
}
|
|
3858
3910
|
const isChecked = this.row.isChecked(this.column);
|
|
3859
3911
|
const inputId = this.question.inputId + "_" + this.row.name + "_" + this.columnIndex;
|
|
3860
3912
|
const itemClass = this.question.getItemClass(this.row, this.column);
|
|
3861
3913
|
const itemSvgIcon = this.question.getItemSvgIcon(this.row, this.column);
|
|
3862
|
-
const mobileSpan = this.question.isMobile ?
|
|
3863
|
-
(_$1("span", { className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(this.column.locText)))
|
|
3864
|
-
: undefined;
|
|
3865
3914
|
return (_$1("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
|
|
3866
3915
|
this.renderInput(inputId, isChecked),
|
|
3867
3916
|
_$1("span", { className: this.question.cssMaterialDecorator, "aria-hidden": "true" }, itemSvgIcon ?
|
|
@@ -3937,7 +3986,13 @@
|
|
|
3937
3986
|
const className = !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss();
|
|
3938
3987
|
const style = this.isDisplayMode ? { color: "transparent" } : {};
|
|
3939
3988
|
let fileInput;
|
|
3940
|
-
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) {
|
|
3941
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 });
|
|
3942
3997
|
}
|
|
3943
3998
|
else if (this.question.isDisabledAttr) {
|
|
@@ -4431,10 +4486,18 @@
|
|
|
4431
4486
|
const button = attachKey2click(_$1("div", { className: buttonClass, tabIndex: 0, role: "checkbox", "aria-checked": this.question.booleanValue || false, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage },
|
|
4432
4487
|
_$1("div", { className: cssClasses.switchThumb },
|
|
4433
4488
|
_$1("div", { className: cssClasses.switchThumbCircle }))), this.question, { processEsc: false });
|
|
4434
|
-
return (_$1("div", { className: cssClasses.rootSwitch, onClick: () => this.
|
|
4489
|
+
return (_$1("div", { className: cssClasses.rootSwitch, onClick: (event) => this.onRootClick(event) },
|
|
4435
4490
|
button,
|
|
4436
4491
|
this.question.isLabelRendered && (_$1("div", { className: cssClasses.switchCaption },
|
|
4437
|
-
_$1("div", { className: cssClasses.switchTitle, id: this.question.labelRenderedAriaID },
|
|
4492
|
+
_$1("div", { className: cssClasses.switchTitle, id: this.question.labelRenderedAriaID },
|
|
4493
|
+
_$1(TitleActions, { element: this.question, cssClasses: this.question.cssClasses }))))));
|
|
4494
|
+
}
|
|
4495
|
+
onRootClick(event) {
|
|
4496
|
+
var _a;
|
|
4497
|
+
const target = event.target;
|
|
4498
|
+
if ((_a = target === null || target === void 0 ? void 0 : target.closest) === null || _a === void 0 ? void 0 : _a.call(target, ".sd-action-bar"))
|
|
4499
|
+
return;
|
|
4500
|
+
this.question.booleanValue = !this.question.booleanValue;
|
|
4438
4501
|
}
|
|
4439
4502
|
}
|
|
4440
4503
|
ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", (props) => {
|
|
@@ -4509,6 +4572,41 @@
|
|
|
4509
4572
|
return _$1(MatrixRow, props);
|
|
4510
4573
|
});
|
|
4511
4574
|
|
|
4575
|
+
// The button a sortable column header holds: the title (content), the direction indicator and the
|
|
4576
|
+
// description of the whole sort. The cell computes every value; this only renders it.
|
|
4577
|
+
class SurveyMatrixHeaderSortButton extends ReactSurveyElement {
|
|
4578
|
+
constructor() {
|
|
4579
|
+
super(...arguments);
|
|
4580
|
+
this.onClick = (event) => {
|
|
4581
|
+
this.cell.toggleSort(event.shiftKey || event.ctrlKey || event.metaKey);
|
|
4582
|
+
};
|
|
4583
|
+
}
|
|
4584
|
+
get cell() {
|
|
4585
|
+
return this.props.cell;
|
|
4586
|
+
}
|
|
4587
|
+
get question() {
|
|
4588
|
+
return this.props.question;
|
|
4589
|
+
}
|
|
4590
|
+
// The sort, the loading state and the page move live on the question.
|
|
4591
|
+
getStateElement() {
|
|
4592
|
+
return this.question;
|
|
4593
|
+
}
|
|
4594
|
+
renderElement() {
|
|
4595
|
+
const cell = this.cell;
|
|
4596
|
+
const description = cell.sortDescription;
|
|
4597
|
+
const rank = cell.sortRank;
|
|
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 },
|
|
4599
|
+
_$1("span", { className: cell.sortTitleCss }, this.props.content),
|
|
4600
|
+
_$1("span", { className: cell.sortCss, "aria-hidden": "true" },
|
|
4601
|
+
_$1(SvgIcon, { iconName: cell.sortIconName, size: 16 }),
|
|
4602
|
+
!!rank ? _$1("span", { className: cell.sortRankCss }, rank) : null),
|
|
4603
|
+
!!description ? _$1("span", { id: cell.sortDescriptionId, className: "sv-visuallyhidden" }, description) : null));
|
|
4604
|
+
}
|
|
4605
|
+
}
|
|
4606
|
+
ReactElementFactory.Instance.registerElement("sv-matrix-header-sort-button", (props) => {
|
|
4607
|
+
return _$1(SurveyMatrixHeaderSortButton, props);
|
|
4608
|
+
});
|
|
4609
|
+
|
|
4512
4610
|
class SurveyQuestionMatrixTable extends SurveyElementBase {
|
|
4513
4611
|
get question() {
|
|
4514
4612
|
return this.props.question;
|
|
@@ -4533,7 +4631,9 @@
|
|
|
4533
4631
|
const cells = table.headerRow.cells;
|
|
4534
4632
|
for (var i = 0; i < cells.length; i++) {
|
|
4535
4633
|
const cell = cells[i];
|
|
4536
|
-
|
|
4634
|
+
// Keyed by the cell id, which a column header keeps across the rebuild a sort makes: the
|
|
4635
|
+
// focused sort button stays the same DOM node.
|
|
4636
|
+
const key = cell.id;
|
|
4537
4637
|
const columnStyle = {};
|
|
4538
4638
|
if (!!cell.width) {
|
|
4539
4639
|
columnStyle.width = cell.width;
|
|
@@ -4543,7 +4643,7 @@
|
|
|
4543
4643
|
}
|
|
4544
4644
|
const cellContent = this.renderCellContent(cell, "column-header", {});
|
|
4545
4645
|
const header = cell.hasTitle ?
|
|
4546
|
-
_$1("th", { className: cell.className, key: key, style: columnStyle },
|
|
4646
|
+
_$1("th", { className: cell.className, key: key, style: columnStyle, "aria-sort": cell.ariaSort },
|
|
4547
4647
|
" ",
|
|
4548
4648
|
cellContent,
|
|
4549
4649
|
" ")
|
|
@@ -4620,6 +4720,11 @@
|
|
|
4620
4720
|
cellContent = (_$1(k$2, null,
|
|
4621
4721
|
str,
|
|
4622
4722
|
require));
|
|
4723
|
+
if (cell.isSortable) {
|
|
4724
|
+
cellContent = ReactElementFactory.Instance.createElement("sv-matrix-header-sort-button", {
|
|
4725
|
+
cell: cell, question: this.question, content: cellContent
|
|
4726
|
+
});
|
|
4727
|
+
}
|
|
4623
4728
|
}
|
|
4624
4729
|
if (cell.isActionsCell) {
|
|
4625
4730
|
cellContent = (ReactElementFactory.Instance.createElement("sv-matrixdynamic-actions-cell", {
|
|
@@ -4675,9 +4780,15 @@
|
|
|
4675
4780
|
renderElement() {
|
|
4676
4781
|
return this.renderTableDiv();
|
|
4677
4782
|
}
|
|
4678
|
-
// The records bar under the table: the pager.
|
|
4679
4783
|
renderRecordsBar() {
|
|
4680
|
-
return ReactElementFactory.Instance.createElement("sv-
|
|
4784
|
+
return ReactElementFactory.Instance.createElement("sv-action-bar", { model: this.question.recordsBar.pagerActions });
|
|
4785
|
+
}
|
|
4786
|
+
// The sort bar above the table, while the question header is not on top or on the left.
|
|
4787
|
+
renderSortBar() {
|
|
4788
|
+
if (this.question.sortBarLocation !== "top")
|
|
4789
|
+
return null;
|
|
4790
|
+
return _$1("div", { className: this.question.cssClasses.sortBarTop },
|
|
4791
|
+
_$1(SurveyActionBar, { model: this.question.recordsBar.sortActions }));
|
|
4681
4792
|
}
|
|
4682
4793
|
renderTableDiv() {
|
|
4683
4794
|
return (_$1("div", { className: this.question.getTableWrapperCss(), ref: (root) => (this.setControl(root)) },
|
|
@@ -4846,8 +4957,14 @@
|
|
|
4846
4957
|
// A fragment: a matrix that does not page renders the table alone, as before the pager.
|
|
4847
4958
|
renderElement() {
|
|
4848
4959
|
return (_$1(k$2, null,
|
|
4960
|
+
this.renderSortBar(),
|
|
4849
4961
|
this.renderTableDiv(),
|
|
4850
|
-
this.
|
|
4962
|
+
this.renderFooterBar()));
|
|
4963
|
+
}
|
|
4964
|
+
renderFooterBar() {
|
|
4965
|
+
if (this.question.showPager) {
|
|
4966
|
+
return _$1("div", { className: this.question.cssClasses.footerBar }, this.renderRecordsBar());
|
|
4967
|
+
}
|
|
4851
4968
|
}
|
|
4852
4969
|
}
|
|
4853
4970
|
ReactQuestionFactory.Instance.registerQuestion("matrixdropdown", props => {
|
|
@@ -4872,30 +4989,26 @@
|
|
|
4872
4989
|
? this.renderTableDiv()
|
|
4873
4990
|
: this.renderNoRowsContent(cssClasses);
|
|
4874
4991
|
return (_$1("div", null,
|
|
4875
|
-
this.
|
|
4992
|
+
this.renderHeaderBar(),
|
|
4993
|
+
this.renderSortBar(),
|
|
4876
4994
|
mainDiv,
|
|
4877
|
-
this.
|
|
4995
|
+
this.renderFooterBar()));
|
|
4878
4996
|
}
|
|
4879
4997
|
// The footer exists only with the pager: the bottom toolbar and the pager in one row.
|
|
4880
4998
|
// Without the pager the bottom toolbar is the next sibling of the table, as without paging.
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
}
|
|
4889
|
-
renderToolbar(location) {
|
|
4890
|
-
if (!this.matrix.getShowToolbar(location))
|
|
4891
|
-
return null;
|
|
4892
|
-
return _$1("div", { className: this.matrix.getToolbarCssClass(location) }, ReactElementFactory.Instance.createElement("sv-action-bar", { model: this.matrix.toolbar }));
|
|
4999
|
+
renderFooterBar() {
|
|
5000
|
+
if (this.matrix.getShowToolbar("bottom") || this.matrix.showPager) {
|
|
5001
|
+
return _$1("div", { className: this.matrix.cssClasses.footerBar },
|
|
5002
|
+
this.matrix.getShowToolbar("bottom") ? this.renderToolbar() : null,
|
|
5003
|
+
this.matrix.showPager ? this.renderRecordsBar() : null);
|
|
5004
|
+
}
|
|
5005
|
+
return null;
|
|
4893
5006
|
}
|
|
4894
|
-
|
|
4895
|
-
return
|
|
5007
|
+
renderToolbar() {
|
|
5008
|
+
return ReactElementFactory.Instance.createElement("sv-action-bar", { model: this.matrix.toolbar });
|
|
4896
5009
|
}
|
|
4897
|
-
|
|
4898
|
-
return this.
|
|
5010
|
+
renderHeaderBar() {
|
|
5011
|
+
return this.matrix.getShowToolbar("top") ? _$1("div", { className: this.matrix.cssClasses.headerBar }, this.renderToolbar()) : null;
|
|
4899
5012
|
}
|
|
4900
5013
|
renderNoRowsContent(cssClasses) {
|
|
4901
5014
|
return ReactElementFactory.Instance.createElement("sv-placeholder-matrixdynamic", { cssClasses: cssClasses, question: this.matrix });
|
|
@@ -4967,14 +5080,22 @@
|
|
|
4967
5080
|
return (_$1("div", { className: cssClasses.root },
|
|
4968
5081
|
this.question.hasTabbedMenu ? _$1("div", { className: this.question.getTabsContainerCss() },
|
|
4969
5082
|
_$1(SurveyActionBar, { model: this.question.tabbedMenu })) : null,
|
|
5083
|
+
this.renderSortBar(),
|
|
4970
5084
|
noEntriesPlaceholder,
|
|
4971
5085
|
rangeTop,
|
|
4972
5086
|
_$1("div", { className: this.question.cssClasses.panelsContainer }, panels),
|
|
4973
5087
|
navigation));
|
|
4974
5088
|
}
|
|
5089
|
+
// The sort bar above the panels, while the question header is not on top or on the left.
|
|
5090
|
+
renderSortBar() {
|
|
5091
|
+
if (this.question.sortBarLocation !== "top")
|
|
5092
|
+
return null;
|
|
5093
|
+
return _$1("div", { className: this.question.cssClasses.sortBarTop },
|
|
5094
|
+
_$1(SurveyActionBar, { model: this.question.recordsBar.sortActions }));
|
|
5095
|
+
}
|
|
4975
5096
|
// The records bar in the footer: the pager.
|
|
4976
5097
|
renderRecordsBar() {
|
|
4977
|
-
return ReactElementFactory.Instance.createElement("sv-
|
|
5098
|
+
return ReactElementFactory.Instance.createElement("sv-action-bar", { model: this.question.recordsBar.pagerActions });
|
|
4978
5099
|
}
|
|
4979
5100
|
renderRange() {
|
|
4980
5101
|
return (_$1("div", { className: this.question.cssClasses.progress },
|
|
@@ -4984,12 +5105,10 @@
|
|
|
4984
5105
|
if (!this.question.showFooter)
|
|
4985
5106
|
return null;
|
|
4986
5107
|
const range = this.question.showFooterProgress ? this.renderRange() : null;
|
|
4987
|
-
return (_$1("div", { className: this.question.
|
|
4988
|
-
_$1("hr", { className: this.question.cssClasses.separator }),
|
|
5108
|
+
return (_$1("div", { className: this.question.cssClasses.footerBar },
|
|
4989
5109
|
range,
|
|
4990
|
-
this.question.showFooterButtons ? (_$1(
|
|
4991
|
-
|
|
4992
|
-
this.renderRecordsBar()));
|
|
5110
|
+
this.question.showFooterButtons ? (_$1(SurveyActionBar, { model: this.question.footerToolbar })) : null,
|
|
5111
|
+
this.question.showPager ? this.renderRecordsBar() : null));
|
|
4993
5112
|
}
|
|
4994
5113
|
renderPlaceholder(cssClasses) {
|
|
4995
5114
|
if (this.question.getShowNoEntriesPlaceholder())
|
|
@@ -5188,6 +5307,22 @@
|
|
|
5188
5307
|
return _$1(ListItem, props);
|
|
5189
5308
|
});
|
|
5190
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
|
+
|
|
5191
5326
|
class List extends SurveyElementBase {
|
|
5192
5327
|
constructor(props) {
|
|
5193
5328
|
super(props);
|
|
@@ -5285,6 +5420,9 @@
|
|
|
5285
5420
|
}
|
|
5286
5421
|
}
|
|
5287
5422
|
emptyContent() {
|
|
5423
|
+
if (this.model.loadingState === "loading") {
|
|
5424
|
+
return ReactElementFactory.Instance.createElement(this.model.loadingComponent, { model: this.model });
|
|
5425
|
+
}
|
|
5288
5426
|
const style = { display: this.model.isEmpty ? null : "none" };
|
|
5289
5427
|
return (_$1("div", { className: this.model.cssClasses.emptyContainer, style: style },
|
|
5290
5428
|
_$1("div", { className: this.model.cssClasses.emptyText, "aria-label": this.model.emptyMessage }, this.model.emptyMessage)));
|
|
@@ -5477,6 +5615,19 @@
|
|
|
5477
5615
|
return _$1(SurveyQuestionExpression, props);
|
|
5478
5616
|
});
|
|
5479
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
|
+
|
|
5480
5631
|
class PopupSurvey extends Survey {
|
|
5481
5632
|
constructor(props) {
|
|
5482
5633
|
super(props);
|
|
@@ -5589,11 +5740,31 @@
|
|
|
5589
5740
|
return this.questionBase;
|
|
5590
5741
|
}
|
|
5591
5742
|
renderElement() {
|
|
5743
|
+
if (this.question.isViewMode) {
|
|
5744
|
+
return this.renderViewMode();
|
|
5745
|
+
}
|
|
5592
5746
|
var cssClasses = this.question.cssClasses;
|
|
5593
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); } },
|
|
5594
5748
|
_$1("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
|
|
5595
5749
|
this.question.hasColumns ? this.getColumns(cssClasses) : this.getItems(cssClasses)));
|
|
5596
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
|
+
}
|
|
5597
5768
|
getColumns(cssClasses) {
|
|
5598
5769
|
return this.question.columns.map((column, ci) => {
|
|
5599
5770
|
var items = column.map((item, ii) => this.renderItem(item, cssClasses));
|
|
@@ -5806,6 +5977,12 @@
|
|
|
5806
5977
|
return this.questionBase;
|
|
5807
5978
|
}
|
|
5808
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
|
+
}
|
|
5809
5986
|
var cssClasses = this.question.cssClasses;
|
|
5810
5987
|
const loadingIndicator = this.question.showLoadingIndicator ? this.renderLoadingIndicator() : null;
|
|
5811
5988
|
var toolbar = this.renderToolbar();
|
|
@@ -6035,24 +6212,20 @@
|
|
|
6035
6212
|
return _$1(SurveyActionBarItemDropdown, props);
|
|
6036
6213
|
});
|
|
6037
6214
|
|
|
6038
|
-
//
|
|
6039
|
-
class
|
|
6040
|
-
get
|
|
6041
|
-
return this.props.
|
|
6215
|
+
// One level of the sort bar: an item of the bar that holds the level's own action bar (field, direction, remove).
|
|
6216
|
+
class SurveySortBarLevel extends SurveyElementBase {
|
|
6217
|
+
get item() {
|
|
6218
|
+
return this.props.item;
|
|
6042
6219
|
}
|
|
6043
6220
|
getStateElement() {
|
|
6044
|
-
return this.
|
|
6221
|
+
return this.item;
|
|
6045
6222
|
}
|
|
6046
6223
|
renderElement() {
|
|
6047
|
-
|
|
6048
|
-
return null;
|
|
6049
|
-
const css = this.model.cssClasses;
|
|
6050
|
-
return _$1("div", { className: css.root },
|
|
6051
|
-
_$1("div", { className: css.pager }, ReactElementFactory.Instance.createElement("sv-action-bar", { model: this.model.pagerActions })));
|
|
6224
|
+
return ReactElementFactory.Instance.createElement("sv-action-bar", { model: this.item.data });
|
|
6052
6225
|
}
|
|
6053
6226
|
}
|
|
6054
|
-
ReactElementFactory.Instance.registerElement("sv-
|
|
6055
|
-
return _$1(
|
|
6227
|
+
ReactElementFactory.Instance.registerElement("sv-sort-bar-level", (props) => {
|
|
6228
|
+
return _$1(SurveySortBarLevel, props);
|
|
6056
6229
|
});
|
|
6057
6230
|
|
|
6058
6231
|
class LogoImage extends x$2 {
|
|
@@ -6084,7 +6257,7 @@
|
|
|
6084
6257
|
return this.props.item;
|
|
6085
6258
|
}
|
|
6086
6259
|
renderElement() {
|
|
6087
|
-
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());
|
|
6088
6261
|
}
|
|
6089
6262
|
renderIcon() {
|
|
6090
6263
|
if (this.question.iconDragElement) {
|
|
@@ -6376,7 +6549,7 @@
|
|
|
6376
6549
|
}
|
|
6377
6550
|
};
|
|
6378
6551
|
const preact = React;
|
|
6379
|
-
surveyCore.checkLibraryVersion(`${"3.2.
|
|
6552
|
+
surveyCore.checkLibraryVersion(`${"3.2.4"}`, "survey-js-ui");
|
|
6380
6553
|
|
|
6381
6554
|
Object.defineProperty(exports, 'Model', {
|
|
6382
6555
|
enumerable: true,
|
|
@@ -6413,6 +6586,7 @@
|
|
|
6413
6586
|
exports.List = List;
|
|
6414
6587
|
exports.ListItemContent = ListItemContent;
|
|
6415
6588
|
exports.ListItemGroup = ListItemGroup;
|
|
6589
|
+
exports.ListLoading = ListLoading;
|
|
6416
6590
|
exports.LoadingIndicatorComponent = LoadingIndicatorComponent;
|
|
6417
6591
|
exports.LogoImage = LogoImage;
|
|
6418
6592
|
exports.MatrixRow = MatrixRow;
|
|
@@ -6447,6 +6621,7 @@
|
|
|
6447
6621
|
exports.SurveyHeader = SurveyHeader;
|
|
6448
6622
|
exports.SurveyLocStringEditor = SurveyLocStringEditor;
|
|
6449
6623
|
exports.SurveyLocStringViewer = SurveyLocStringViewer;
|
|
6624
|
+
exports.SurveyMatrixHeaderSortButton = SurveyMatrixHeaderSortButton;
|
|
6450
6625
|
exports.SurveyNavigationBase = SurveyNavigationBase;
|
|
6451
6626
|
exports.SurveyPage = SurveyPage;
|
|
6452
6627
|
exports.SurveyPanel = SurveyPanel;
|
|
@@ -6502,8 +6677,9 @@
|
|
|
6502
6677
|
exports.SurveyQuestionTagbox = SurveyQuestionTagbox;
|
|
6503
6678
|
exports.SurveyQuestionTagboxItem = SurveyQuestionTagboxItem;
|
|
6504
6679
|
exports.SurveyQuestionText = SurveyQuestionText;
|
|
6505
|
-
exports.
|
|
6680
|
+
exports.SurveyQuestionView = SurveyQuestionView;
|
|
6506
6681
|
exports.SurveyRow = SurveyRow;
|
|
6682
|
+
exports.SurveySortBarLevel = SurveySortBarLevel;
|
|
6507
6683
|
exports.SurveyTimerPanel = SurveyTimerPanel;
|
|
6508
6684
|
exports.SurveyWindow = SurveyWindow;
|
|
6509
6685
|
exports.Suspense = P;
|