survey-react-ui 1.9.86 → 1.9.88
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/package.json +2 -2
- package/survey-react-ui.js +96 -32
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -2
- package/typings/react/tagbox-item.d.ts +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-react-ui",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.88",
|
|
4
4
|
"description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"typings": "survey-react-ui.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"survey-core": "1.9.
|
|
24
|
+
"survey-core": "1.9.88",
|
|
25
25
|
"react": "^16.5.0 || ^17.0.1 || ^18.1.0",
|
|
26
26
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0"
|
|
27
27
|
}
|
package/survey-react-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.88
|
|
3
3
|
* Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -1189,7 +1189,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1189
1189
|
|
|
1190
1190
|
|
|
1191
1191
|
|
|
1192
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.
|
|
1192
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.88", "survey-react-ui");
|
|
1193
1193
|
|
|
1194
1194
|
|
|
1195
1195
|
/***/ }),
|
|
@@ -2084,10 +2084,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2084
2084
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "List", function() { return List; });
|
|
2085
2085
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
2086
2086
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
2087
|
-
/* harmony import */ var
|
|
2088
|
-
/* harmony import */ var
|
|
2089
|
-
/* harmony import */ var
|
|
2090
|
-
/* harmony import */ var
|
|
2087
|
+
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
2088
|
+
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
2089
|
+
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../element-factory */ "./src/react/element-factory.tsx");
|
|
2090
|
+
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../reactquestion_element */ "./src/react/reactquestion_element.tsx");
|
|
2091
|
+
/* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
|
|
2092
|
+
/* harmony import */ var _list_item__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./list-item */ "./src/react/components/list/list-item.tsx");
|
|
2091
2093
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
2092
2094
|
var extendStatics = function (d, b) {
|
|
2093
2095
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -2108,6 +2110,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
2108
2110
|
|
|
2109
2111
|
|
|
2110
2112
|
|
|
2113
|
+
|
|
2111
2114
|
var List = /** @class */ (function (_super) {
|
|
2112
2115
|
__extends(List, _super);
|
|
2113
2116
|
function List(props) {
|
|
@@ -2165,7 +2168,7 @@ var List = /** @class */ (function (_super) {
|
|
|
2165
2168
|
return null;
|
|
2166
2169
|
}
|
|
2167
2170
|
return items.map(function (item, itemIndex) {
|
|
2168
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(
|
|
2171
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_list_item__WEBPACK_IMPORTED_MODULE_5__["ListItem"], { model: _this.model, item: item, key: "item" + itemIndex }));
|
|
2169
2172
|
});
|
|
2170
2173
|
};
|
|
2171
2174
|
List.prototype.searchElementContent = function () {
|
|
@@ -2174,7 +2177,8 @@ var List = /** @class */ (function (_super) {
|
|
|
2174
2177
|
return null;
|
|
2175
2178
|
else {
|
|
2176
2179
|
var onChange = function (e) {
|
|
2177
|
-
|
|
2180
|
+
var root = survey_core__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.root;
|
|
2181
|
+
if (e.target === root.activeElement) {
|
|
2178
2182
|
_this.model.filterString = e.target.value;
|
|
2179
2183
|
}
|
|
2180
2184
|
};
|
|
@@ -2183,10 +2187,10 @@ var List = /** @class */ (function (_super) {
|
|
|
2183
2187
|
};
|
|
2184
2188
|
var clearButton = this.model.showSearchClearButton && !!this.model.filterString ?
|
|
2185
2189
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { className: this.model.cssClasses.searchClearButtonIcon, onClick: function (event) { _this.model.onClickSearchClearButton(event); } },
|
|
2186
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(
|
|
2190
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__["SvgIcon"], { iconName: "icon-searchclear", size: "auto" })) : null;
|
|
2187
2191
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.filter },
|
|
2188
2192
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.filterIcon },
|
|
2189
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(
|
|
2193
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__["SvgIcon"], { iconName: "icon-search", size: "auto" })),
|
|
2190
2194
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "text", className: this.model.cssClasses.filterInput, "aria-label": this.model.filterStringPlaceholder, placeholder: this.model.filterStringPlaceholder, value: this.state.filterString, onKeyUp: onKeyUp, onChange: onChange }),
|
|
2191
2195
|
clearButton));
|
|
2192
2196
|
}
|
|
@@ -2197,9 +2201,9 @@ var List = /** @class */ (function (_super) {
|
|
|
2197
2201
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.emptyText, "aria-label": this.model.emptyMessage }, this.model.emptyMessage)));
|
|
2198
2202
|
};
|
|
2199
2203
|
return List;
|
|
2200
|
-
}(
|
|
2204
|
+
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
|
|
2201
2205
|
|
|
2202
|
-
|
|
2206
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.registerElement("sv-list", function (props) {
|
|
2203
2207
|
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(List, props);
|
|
2204
2208
|
});
|
|
2205
2209
|
|
|
@@ -2552,7 +2556,7 @@ var NotifierComponent = /** @class */ (function (_super) {
|
|
|
2552
2556
|
if (!this.notifier.isDisplayed)
|
|
2553
2557
|
return null;
|
|
2554
2558
|
var style = { visibility: this.notifier.active ? "visible" : "hidden" };
|
|
2555
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.notifier.css, style: style },
|
|
2559
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.notifier.css, style: style, role: "alert", "aria-live": "polite" },
|
|
2556
2560
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, this.notifier.message),
|
|
2557
2561
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_3__["SurveyActionBar"], { model: this.notifier.actionBar })));
|
|
2558
2562
|
};
|
|
@@ -3250,8 +3254,8 @@ var RatingItemStar = /** @class */ (function (_super) {
|
|
|
3250
3254
|
var _this = this;
|
|
3251
3255
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); } },
|
|
3252
3256
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
|
|
3253
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star", size: "auto", iconName:
|
|
3254
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star-2", size: "auto", iconName:
|
|
3257
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon, title: this.item.text }),
|
|
3258
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt, title: this.item.text })));
|
|
3255
3259
|
};
|
|
3256
3260
|
return RatingItemStar;
|
|
3257
3261
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
|
|
@@ -3821,7 +3825,8 @@ var TitleContent = /** @class */ (function (_super) {
|
|
|
3821
3825
|
}
|
|
3822
3826
|
var questionNumber = element.no;
|
|
3823
3827
|
if (questionNumber) {
|
|
3824
|
-
|
|
3828
|
+
var panelNumber = !!cssClasses.panel ? cssClasses.panel.number : undefined;
|
|
3829
|
+
spans.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { "data-key": "q_num", key: "q_num", className: cssClasses.number || panelNumber, style: { position: "static" }, "aria-hidden": true }, questionNumber));
|
|
3825
3830
|
spans.push(getSpaceSpan("num-sp"));
|
|
3826
3831
|
}
|
|
3827
3832
|
if (element.isRequireTextBeforeTitle) {
|
|
@@ -4119,8 +4124,9 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
4119
4124
|
SurveyQuestionDropdownBase.prototype.renderInput = function (dropdownListModel) {
|
|
4120
4125
|
var _this = this;
|
|
4121
4126
|
var valueElement = this.renderValueElement(dropdownListModel);
|
|
4127
|
+
var root = survey_core__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.root;
|
|
4122
4128
|
var onInputChange = function (e) {
|
|
4123
|
-
if (e.target ===
|
|
4129
|
+
if (e.target === root.activeElement) {
|
|
4124
4130
|
dropdownListModel.inputStringRendered = e.target.value;
|
|
4125
4131
|
}
|
|
4126
4132
|
};
|
|
@@ -7706,6 +7712,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7706
7712
|
/* harmony import */ var _components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
|
|
7707
7713
|
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
|
|
7708
7714
|
/* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/react/reactquestion_factory.tsx");
|
|
7715
|
+
/* harmony import */ var _reactSurvey__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./reactSurvey */ "./src/react/reactSurvey.tsx");
|
|
7709
7716
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
7710
7717
|
var extendStatics = function (d, b) {
|
|
7711
7718
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -7726,6 +7733,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
7726
7733
|
|
|
7727
7734
|
|
|
7728
7735
|
|
|
7736
|
+
|
|
7729
7737
|
var SurveyQuestionFile = /** @class */ (function (_super) {
|
|
7730
7738
|
__extends(SurveyQuestionFile, _super);
|
|
7731
7739
|
function SurveyQuestionFile(props) {
|
|
@@ -7763,7 +7771,7 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
|
|
|
7763
7771
|
var questionCss = this.question.cssClasses;
|
|
7764
7772
|
var noFileChosen = null;
|
|
7765
7773
|
var chooseFile = null;
|
|
7766
|
-
chooseFile = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { role: "button", tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonCaption },
|
|
7774
|
+
chooseFile = Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_5__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { role: "button", tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonCaption },
|
|
7767
7775
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.question.chooseButtonCaption),
|
|
7768
7776
|
(!!this.question.cssClasses.chooseFileIconId) ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { title: this.question.chooseButtonCaption, iconName: this.question.cssClasses.chooseFileIconId, size: "auto" }) : null));
|
|
7769
7777
|
if (this.question.isEmpty()) {
|
|
@@ -10337,7 +10345,8 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
|
10337
10345
|
}
|
|
10338
10346
|
};
|
|
10339
10347
|
TagboxFilterString.prototype.onChange = function (e) {
|
|
10340
|
-
|
|
10348
|
+
var root = survey_core__WEBPACK_IMPORTED_MODULE_1__["settings"].environment.root;
|
|
10349
|
+
if (e.target === root.activeElement) {
|
|
10341
10350
|
this.model.inputStringRendered = e.target.value;
|
|
10342
10351
|
}
|
|
10343
10352
|
};
|
|
@@ -10355,7 +10364,16 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
|
10355
10364
|
};
|
|
10356
10365
|
TagboxFilterString.prototype.render = function () {
|
|
10357
10366
|
var _this = this;
|
|
10358
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("
|
|
10367
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hint },
|
|
10368
|
+
this.model.showHintPrefix ?
|
|
10369
|
+
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintPrefix },
|
|
10370
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.model.hintStringPrefix))) : null,
|
|
10371
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffixWrapper },
|
|
10372
|
+
this.model.showHintString ?
|
|
10373
|
+
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffix },
|
|
10374
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, this.model.inputStringRendered),
|
|
10375
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.model.hintStringSuffix))) : null,
|
|
10376
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: !this.model.searchEnabled ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-label": this.question.placeholder, "aria-expanded": this.question.ariaExpanded ? "true" : "false", "aria-controls": this.model.listElementId, "aria-activedescendant": this.model.ariaActivedescendant, placeholder: this.model.filterStringPlaceholder, onKeyDown: function (e) { _this.keyhandler(e); }, onChange: function (e) { _this.onChange(e); }, onBlur: function (e) { _this.onBlur(e); }, onFocus: function (e) { _this.onFocus(e); } }))));
|
|
10359
10377
|
};
|
|
10360
10378
|
return TagboxFilterString;
|
|
10361
10379
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
|
|
@@ -10404,9 +10422,6 @@ var SurveyQuestionTagboxItem = /** @class */ (function (_super) {
|
|
|
10404
10422
|
function SurveyQuestionTagboxItem(props) {
|
|
10405
10423
|
return _super.call(this, props) || this;
|
|
10406
10424
|
}
|
|
10407
|
-
SurveyQuestionTagboxItem.prototype.getStateElement = function () {
|
|
10408
|
-
return this.item;
|
|
10409
|
-
};
|
|
10410
10425
|
Object.defineProperty(SurveyQuestionTagboxItem.prototype, "question", {
|
|
10411
10426
|
get: function () {
|
|
10412
10427
|
return this.props.question;
|
|
@@ -10452,7 +10467,29 @@ var SurveyQuestionTagboxItem = /** @class */ (function (_super) {
|
|
|
10452
10467
|
|
|
10453
10468
|
"use strict";
|
|
10454
10469
|
__webpack_require__.r(__webpack_exports__);
|
|
10455
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; });
|
|
10470
|
+
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; });
|
|
10471
|
+
var document = global.document;
|
|
10472
|
+
var defaultEnvironment = (!!document ? {
|
|
10473
|
+
root: document,
|
|
10474
|
+
_rootElement: document.body,
|
|
10475
|
+
get rootElement() {
|
|
10476
|
+
var _a;
|
|
10477
|
+
return (_a = this._rootElement) !== null && _a !== void 0 ? _a : document.body;
|
|
10478
|
+
},
|
|
10479
|
+
set rootElement(rootElement) {
|
|
10480
|
+
this._rootElement = rootElement;
|
|
10481
|
+
},
|
|
10482
|
+
_popupMountContainer: document.body,
|
|
10483
|
+
get popupMountContainer() {
|
|
10484
|
+
var _a;
|
|
10485
|
+
return (_a = this._popupMountContainer) !== null && _a !== void 0 ? _a : document.body;
|
|
10486
|
+
},
|
|
10487
|
+
set popupMountContainer(popupMountContainer) {
|
|
10488
|
+
this._popupMountContainer = popupMountContainer;
|
|
10489
|
+
},
|
|
10490
|
+
svgMountContainer: document.head,
|
|
10491
|
+
stylesSheetsMountContainer: document.head,
|
|
10492
|
+
} : undefined);
|
|
10456
10493
|
var columnWidthsByType = {
|
|
10457
10494
|
"file": { minWidth: "240px" },
|
|
10458
10495
|
"comment": { minWidth: "200px" }
|
|
@@ -10834,6 +10871,10 @@ var settings = {
|
|
|
10834
10871
|
* - `"icon"` - Users can only use the choice item icon as a drag handle.
|
|
10835
10872
|
*/
|
|
10836
10873
|
rankingDragHandleArea: "entireItem",
|
|
10874
|
+
/**
|
|
10875
|
+
* Specifies environment in which SurveyJS will exist
|
|
10876
|
+
*/
|
|
10877
|
+
environment: defaultEnvironment,
|
|
10837
10878
|
titleTags: {
|
|
10838
10879
|
survey: "h3",
|
|
10839
10880
|
page: "h4",
|
|
@@ -10921,12 +10962,17 @@ var settings = {
|
|
|
10921
10962
|
* - `columnWidthsByType`: `Object`\
|
|
10922
10963
|
* An object that specifies fixed and minimum column width based on the column type.\
|
|
10923
10964
|
* Example: `settings.matrix.columnWidthsByType = { "tagbox": { minWidth: "240px", width: "300px" } }`
|
|
10965
|
+
*
|
|
10966
|
+
* - `rateSize`: `"small"` (default) | `"normal"`\
|
|
10967
|
+
* Specifies the size of rate values. Applies to [Rating Scale](https://surveyjs.io/form-library/examples/rating-scale/) questions within matrixes.
|
|
10924
10968
|
*/
|
|
10925
10969
|
matrix: {
|
|
10926
|
-
columnWidthsByType: columnWidthsByType
|
|
10970
|
+
columnWidthsByType: columnWidthsByType,
|
|
10971
|
+
rateSize: "small",
|
|
10927
10972
|
}
|
|
10928
10973
|
};
|
|
10929
10974
|
|
|
10975
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node_modules/webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
|
|
10930
10976
|
|
|
10931
10977
|
/***/ }),
|
|
10932
10978
|
|
|
@@ -11103,7 +11149,7 @@ var VerticalResponsivityManager = /** @class */ (function (_super) {
|
|
|
11103
11149
|
/*!****************************!*\
|
|
11104
11150
|
!*** ./src/utils/utils.ts ***!
|
|
11105
11151
|
\****************************/
|
|
11106
|
-
/*! exports provided: unwrap, getSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames */
|
|
11152
|
+
/*! exports provided: unwrap, getSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames */
|
|
11107
11153
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
11108
11154
|
|
|
11109
11155
|
"use strict";
|
|
@@ -11125,6 +11171,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11125
11171
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectIEBrowser", function() { return detectIEBrowser; });
|
|
11126
11172
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadFileFromBase64", function() { return loadFileFromBase64; });
|
|
11127
11173
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMobile", function() { return isMobile; });
|
|
11174
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isShadowDOM", function() { return isShadowDOM; });
|
|
11175
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElement", function() { return getElement; });
|
|
11128
11176
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isElementVisible", function() { return isElementVisible; });
|
|
11129
11177
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findScrollableParent", function() { return findScrollableParent; });
|
|
11130
11178
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollElementByChildId", function() { return scrollElementByChildId; });
|
|
@@ -11202,13 +11250,24 @@ function loadFileFromBase64(b64Data, fileName) {
|
|
|
11202
11250
|
function isMobile() {
|
|
11203
11251
|
return (typeof window !== "undefined" && typeof window.orientation !== "undefined");
|
|
11204
11252
|
}
|
|
11253
|
+
var isShadowDOM = function (rootElement) {
|
|
11254
|
+
return !!rootElement && !!("host" in rootElement && rootElement.host);
|
|
11255
|
+
};
|
|
11256
|
+
var getElement = function (element) {
|
|
11257
|
+
var root = _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.root;
|
|
11258
|
+
return typeof element === "string" ? root.getElementById(element) : element;
|
|
11259
|
+
};
|
|
11205
11260
|
function isElementVisible(element, threshold) {
|
|
11206
11261
|
if (threshold === void 0) { threshold = 0; }
|
|
11207
|
-
if (typeof
|
|
11262
|
+
if (typeof _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment === "undefined") {
|
|
11208
11263
|
return false;
|
|
11209
11264
|
}
|
|
11265
|
+
var root = _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.root;
|
|
11266
|
+
var clientHeight = isShadowDOM(root)
|
|
11267
|
+
? root.host.clientHeight
|
|
11268
|
+
: root.documentElement.clientHeight;
|
|
11210
11269
|
var elementRect = element.getBoundingClientRect();
|
|
11211
|
-
var viewHeight = Math.max(
|
|
11270
|
+
var viewHeight = Math.max(clientHeight, window.innerHeight);
|
|
11212
11271
|
var topWin = -threshold;
|
|
11213
11272
|
var bottomWin = viewHeight + threshold;
|
|
11214
11273
|
var topEl = elementRect.top;
|
|
@@ -11218,8 +11277,11 @@ function isElementVisible(element, threshold) {
|
|
|
11218
11277
|
return maxTop <= minBottom;
|
|
11219
11278
|
}
|
|
11220
11279
|
function findScrollableParent(element) {
|
|
11280
|
+
var root = _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.root;
|
|
11221
11281
|
if (!element) {
|
|
11222
|
-
return
|
|
11282
|
+
return isShadowDOM(root)
|
|
11283
|
+
? root.host
|
|
11284
|
+
: root.documentElement;
|
|
11223
11285
|
}
|
|
11224
11286
|
if (element.scrollHeight > element.clientHeight &&
|
|
11225
11287
|
(getComputedStyle(element).overflowY === "scroll" ||
|
|
@@ -11234,9 +11296,11 @@ function findScrollableParent(element) {
|
|
|
11234
11296
|
return findScrollableParent(element.parentElement);
|
|
11235
11297
|
}
|
|
11236
11298
|
function scrollElementByChildId(id) {
|
|
11237
|
-
|
|
11299
|
+
var environment = _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment;
|
|
11300
|
+
if (!environment)
|
|
11238
11301
|
return;
|
|
11239
|
-
var
|
|
11302
|
+
var root = environment.root;
|
|
11303
|
+
var el = root.getElementById(id);
|
|
11240
11304
|
if (!el)
|
|
11241
11305
|
return;
|
|
11242
11306
|
var scrollableEl = findScrollableParent(el);
|
|
@@ -11409,7 +11473,7 @@ function mergeValues(src, dest) {
|
|
|
11409
11473
|
return;
|
|
11410
11474
|
for (var key in src) {
|
|
11411
11475
|
var value = src[key];
|
|
11412
|
-
if (value && typeof value === "object") {
|
|
11476
|
+
if (!Array.isArray(value) && value && typeof value === "object") {
|
|
11413
11477
|
if (!dest[key] || typeof dest[key] !== "object")
|
|
11414
11478
|
dest[key] = {};
|
|
11415
11479
|
mergeValues(value, dest[key]);
|