survey-react-ui 1.9.102 → 1.9.104
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 +51 -20
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -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.104",
|
|
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.104",
|
|
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.104
|
|
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
|
*/
|
|
@@ -690,7 +690,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
690
690
|
|
|
691
691
|
|
|
692
692
|
|
|
693
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.
|
|
693
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.104", "survey-react-ui");
|
|
694
694
|
|
|
695
695
|
|
|
696
696
|
/***/ }),
|
|
@@ -3617,7 +3617,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
3617
3617
|
if (!this.question.cssClasses.chevronButtonIconId)
|
|
3618
3618
|
return null;
|
|
3619
3619
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.chevronButton },
|
|
3620
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: this.question.cssClasses.chevronButtonSvg, iconName: this.question.cssClasses.chevronButtonIconId, size:
|
|
3620
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: this.question.cssClasses.chevronButtonSvg, iconName: this.question.cssClasses.chevronButtonIconId, size: "auto" })));
|
|
3621
3621
|
};
|
|
3622
3622
|
SurveyQuestionDropdownBase.prototype.renderOther = function (cssClasses) {
|
|
3623
3623
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getCommentAreaCss(true) },
|
|
@@ -3635,7 +3635,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
|
3635
3635
|
if (!!this.inputElement) {
|
|
3636
3636
|
var control = this.inputElement;
|
|
3637
3637
|
var newValue = this.question.dropdownListModel.inputStringRendered;
|
|
3638
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true)) {
|
|
3638
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true, false)) {
|
|
3639
3639
|
control.value = this.question.dropdownListModel.inputStringRendered;
|
|
3640
3640
|
}
|
|
3641
3641
|
}
|
|
@@ -6989,7 +6989,7 @@ var SurveyQuestionUncontrolledElement = /** @class */ (function (_super) {
|
|
|
6989
6989
|
function SurveyQuestionUncontrolledElement(props) {
|
|
6990
6990
|
var _this = _super.call(this, props) || this;
|
|
6991
6991
|
_this.updateValueOnEvent = function (event) {
|
|
6992
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(_this.questionBase.value, event.target.value, false, true)) {
|
|
6992
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(_this.questionBase.value, event.target.value, false, true, false)) {
|
|
6993
6993
|
_this.setValueCore(event.target.value);
|
|
6994
6994
|
}
|
|
6995
6995
|
};
|
|
@@ -7013,7 +7013,7 @@ var SurveyQuestionUncontrolledElement = /** @class */ (function (_super) {
|
|
|
7013
7013
|
if (!!this.control) {
|
|
7014
7014
|
var control = this.control;
|
|
7015
7015
|
var newValue = this.getValueCore();
|
|
7016
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true)) {
|
|
7016
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true, false)) {
|
|
7017
7017
|
control.value = this.getValue(newValue);
|
|
7018
7018
|
}
|
|
7019
7019
|
}
|
|
@@ -7262,9 +7262,9 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
|
|
|
7262
7262
|
var questionCss = this.question.cssClasses;
|
|
7263
7263
|
var noFileChosen = null;
|
|
7264
7264
|
var chooseFile = null;
|
|
7265
|
-
chooseFile = this.question.isReadOnly ? null : 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.
|
|
7266
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.question.
|
|
7267
|
-
(!!this.question.cssClasses.chooseFileIconId) ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { title: this.question.
|
|
7265
|
+
chooseFile = this.question.isReadOnly ? null : 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.chooseButtonText },
|
|
7266
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.question.chooseButtonText),
|
|
7267
|
+
(!!this.question.cssClasses.chooseFileIconId) ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { title: this.question.chooseButtonText, iconName: this.question.cssClasses.chooseFileIconId, size: "auto" }) : null));
|
|
7268
7268
|
if (this.question.isEmpty()) {
|
|
7269
7269
|
noFileChosen = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.noFileChosen }, this.question.noFileChosenCaption));
|
|
7270
7270
|
}
|
|
@@ -9921,7 +9921,7 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
|
9921
9921
|
if (!!this.inputElement) {
|
|
9922
9922
|
var control = this.inputElement;
|
|
9923
9923
|
var newValue = this.model.inputStringRendered;
|
|
9924
|
-
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true)) {
|
|
9924
|
+
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value, false, true, false)) {
|
|
9925
9925
|
control.value = this.model.inputStringRendered;
|
|
9926
9926
|
}
|
|
9927
9927
|
}
|
|
@@ -10485,12 +10485,6 @@ var settings = {
|
|
|
10485
10485
|
*
|
|
10486
10486
|
* - `caseSensitive`: `Boolean`\
|
|
10487
10487
|
* Specifies whether to differentiate between capital and lower-case letters. Default value: `false`.
|
|
10488
|
-
*
|
|
10489
|
-
* - `normalizedTextCallback`: `(str: string, reason: string) => string`
|
|
10490
|
-
* Use the following function { str.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); }
|
|
10491
|
-
* If you want to 'Brouillé' to be equal to 'Brouille'.
|
|
10492
|
-
* Use the following function { return reason === "filter" ? str.normalize("NFD").replace(/[\u0300-\u036f]/g, ""): ""; }
|
|
10493
|
-
* If you want to use this functionality during filtering only, for example in list.
|
|
10494
10488
|
*/
|
|
10495
10489
|
comparator: {
|
|
10496
10490
|
trimStrings: true,
|
|
@@ -10527,12 +10521,24 @@ var settings = {
|
|
|
10527
10521
|
*/
|
|
10528
10522
|
tagboxCloseOnSelect: false,
|
|
10529
10523
|
/**
|
|
10530
|
-
* A property that allows you to display a custom confirm dialog instead of the standard browser dialog.
|
|
10524
|
+
* A property that allows you to display a custom confirm dialog instead of the standard browser dialog.
|
|
10525
|
+
*
|
|
10526
|
+
* Set this property to a function that renders your custom dialog window. This function should return `true` if a user confirms an action or `false` otherwise.
|
|
10531
10527
|
* @param message A message to be displayed in the confirm dialog window.
|
|
10532
10528
|
*/
|
|
10533
10529
|
confirmActionFunc: function (message) {
|
|
10534
10530
|
return confirm(message);
|
|
10535
10531
|
},
|
|
10532
|
+
/**
|
|
10533
|
+
* A property that allows you to display a custom confirm dialog instead of the standard browser dialog in async mode.
|
|
10534
|
+
*
|
|
10535
|
+
* Set this property to a function that renders your custom dialog window. This function should return `true` to be enabled; otherwise, a survey executes the [`confirmActionFunc`](#confirmActionFunc) function. Pass the dialog result as the `callback` parameter: `true` if a user confirms an action, `false` otherwise.
|
|
10536
|
+
* @param message A message to be displayed in the confirm dialog window.
|
|
10537
|
+
* @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
|
|
10538
|
+
*/
|
|
10539
|
+
confirmActionAsync: function (message, callback) {
|
|
10540
|
+
return false;
|
|
10541
|
+
},
|
|
10536
10542
|
/**
|
|
10537
10543
|
* A minimum width value for all survey elements.
|
|
10538
10544
|
*
|
|
@@ -10624,11 +10630,22 @@ var settings = {
|
|
|
10624
10630
|
* - `"icon"` - Users can only use the choice item icon as a drag handle.
|
|
10625
10631
|
*/
|
|
10626
10632
|
rankingDragHandleArea: "entireItem",
|
|
10633
|
+
environment: defaultEnvironment,
|
|
10627
10634
|
/**
|
|
10628
|
-
*
|
|
10635
|
+
* Allows you to hide the maximum length indicator in text input questions.
|
|
10636
|
+
*
|
|
10637
|
+
* If you specify a question's [`maxLength`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#maxLength) property or a survey's [`maxTextLength`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#maxTextLength) property, text input questions indicate the number of entered characters and the character limit. Assign `false` to the `settings.showMaxLengthIndicator` property if you want to hide this indicator.
|
|
10638
|
+
*
|
|
10639
|
+
* Default value: `true`
|
|
10629
10640
|
*/
|
|
10630
|
-
environment: defaultEnvironment,
|
|
10631
10641
|
showMaxLengthIndicator: true,
|
|
10642
|
+
/**
|
|
10643
|
+
* An object that specifies heading levels (`<h1>`, `<h2>`, etc.) to use when rendering survey, page, panel, and question titles.
|
|
10644
|
+
*
|
|
10645
|
+
* Default value: `{ survey: "h3", page: "h4", panel: "h4", question: "h5" }`
|
|
10646
|
+
*
|
|
10647
|
+
* If you want to modify heading levels for individual titles, handle `SurveyModel`'s [`onGetTitleTagName`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetTitleTagName) event.
|
|
10648
|
+
*/
|
|
10632
10649
|
titleTags: {
|
|
10633
10650
|
survey: "h3",
|
|
10634
10651
|
page: "h4",
|
|
@@ -10881,7 +10898,7 @@ var VerticalResponsivityManager = /** @class */ (function (_super) {
|
|
|
10881
10898
|
/*!****************************!*\
|
|
10882
10899
|
!*** ./src/utils/utils.ts ***!
|
|
10883
10900
|
\****************************/
|
|
10884
|
-
/*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, 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, getFirstVisibleChild */
|
|
10901
|
+
/*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, confirmActionAsync, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild */
|
|
10885
10902
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10886
10903
|
|
|
10887
10904
|
"use strict";
|
|
@@ -10900,6 +10917,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10900
10917
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "classesToSelector", function() { return classesToSelector; });
|
|
10901
10918
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareVersions", function() { return compareVersions; });
|
|
10902
10919
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "confirmAction", function() { return confirmAction; });
|
|
10920
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "confirmActionAsync", function() { return confirmActionAsync; });
|
|
10903
10921
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectIEOrEdge", function() { return detectIEOrEdge; });
|
|
10904
10922
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectIEBrowser", function() { return detectIEBrowser; });
|
|
10905
10923
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadFileFromBase64", function() { return loadFileFromBase64; });
|
|
@@ -10937,6 +10955,19 @@ function confirmAction(message) {
|
|
|
10937
10955
|
return _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].confirmActionFunc(message);
|
|
10938
10956
|
return confirm(message);
|
|
10939
10957
|
}
|
|
10958
|
+
function confirmActionAsync(message, funcOnYes, funcOnNo) {
|
|
10959
|
+
var callbackFunc = function (res) {
|
|
10960
|
+
if (res)
|
|
10961
|
+
funcOnYes();
|
|
10962
|
+
else if (!!funcOnNo)
|
|
10963
|
+
funcOnNo();
|
|
10964
|
+
};
|
|
10965
|
+
if (!!_settings__WEBPACK_IMPORTED_MODULE_0__["settings"] && !!_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].confirmActionAsync) {
|
|
10966
|
+
if (_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].confirmActionAsync(message, callbackFunc))
|
|
10967
|
+
return;
|
|
10968
|
+
}
|
|
10969
|
+
callbackFunc(confirmAction(message));
|
|
10970
|
+
}
|
|
10940
10971
|
function detectIEBrowser() {
|
|
10941
10972
|
if (typeof window === "undefined")
|
|
10942
10973
|
return false;
|