survey-react-ui 1.9.133 → 1.9.134
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
CHANGED
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.134
|
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -495,6 +495,7 @@ var Action = /** @class */ (function (_super) {
|
|
|
495
495
|
return this._component;
|
|
496
496
|
};
|
|
497
497
|
Action.prototype.dispose = function () {
|
|
498
|
+
this.updateCallback = undefined;
|
|
498
499
|
this.action = undefined;
|
|
499
500
|
_super.prototype.dispose.call(this);
|
|
500
501
|
if (this.popupModel) {
|
|
@@ -3584,7 +3585,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3584
3585
|
|
|
3585
3586
|
|
|
3586
3587
|
|
|
3587
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.
|
|
3588
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.134", "survey-react-ui");
|
|
3588
3589
|
|
|
3589
3590
|
|
|
3590
3591
|
/***/ }),
|
|
@@ -12232,6 +12233,19 @@ var SurveyActionBar = /** @class */ (function (_super) {
|
|
|
12232
12233
|
this.model.resetResponsivityManager();
|
|
12233
12234
|
}
|
|
12234
12235
|
};
|
|
12236
|
+
SurveyActionBar.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
12237
|
+
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
|
12238
|
+
if (prevProps.model == this.props.model) {
|
|
12239
|
+
return;
|
|
12240
|
+
}
|
|
12241
|
+
if (!!this.model.hasActions) {
|
|
12242
|
+
this.model.resetResponsivityManager();
|
|
12243
|
+
var container = this.rootRef.current;
|
|
12244
|
+
if (!!container) {
|
|
12245
|
+
this.model.initResponsivityManager(container, function (callback) { setTimeout(callback); });
|
|
12246
|
+
}
|
|
12247
|
+
}
|
|
12248
|
+
};
|
|
12235
12249
|
SurveyActionBar.prototype.getStateElement = function () {
|
|
12236
12250
|
return this.model;
|
|
12237
12251
|
};
|
|
@@ -20857,7 +20871,7 @@ var SurveyQuestionText = /** @class */ (function (_super) {
|
|
|
20857
20871
|
var inputClass = this.question.getControlClass();
|
|
20858
20872
|
var placeholder = this.question.renderedPlaceholder;
|
|
20859
20873
|
if (this.question.isReadOnlyRenderDiv()) {
|
|
20860
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, this.question.
|
|
20874
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, this.question.inputValue);
|
|
20861
20875
|
}
|
|
20862
20876
|
var counter = !!this.question.getMaxLength() ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_character_counter__WEBPACK_IMPORTED_MODULE_3__["CharacterCounterComponent"], { counter: this.question.characterCounter, remainingCharacterCounter: this.question.cssClasses.remainingCharacterCounter })) : null;
|
|
20863
20877
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
|
|
@@ -20873,6 +20887,12 @@ var SurveyQuestionText = /** @class */ (function (_super) {
|
|
|
20873
20887
|
this.renderDataList()) :
|
|
20874
20888
|
this.renderInput());
|
|
20875
20889
|
};
|
|
20890
|
+
SurveyQuestionText.prototype.setValueCore = function (newValue) {
|
|
20891
|
+
this.question.inputValue = newValue;
|
|
20892
|
+
};
|
|
20893
|
+
SurveyQuestionText.prototype.getValueCore = function () {
|
|
20894
|
+
return this.question.inputValue;
|
|
20895
|
+
};
|
|
20876
20896
|
SurveyQuestionText.prototype.renderDataList = function () {
|
|
20877
20897
|
if (!this.question.dataListId)
|
|
20878
20898
|
return null;
|
|
@@ -22424,7 +22444,16 @@ var settings = {
|
|
|
22424
22444
|
"impp",
|
|
22425
22445
|
]
|
|
22426
22446
|
},
|
|
22427
|
-
legacyProgressBarView: false
|
|
22447
|
+
legacyProgressBarView: false,
|
|
22448
|
+
maskSettings: {
|
|
22449
|
+
patternPlaceholderChar: "_",
|
|
22450
|
+
patternEscapeChar: "\\",
|
|
22451
|
+
patternDefinitions: {
|
|
22452
|
+
"9": /[0-9]/,
|
|
22453
|
+
"a": /[a-zA-Z]/,
|
|
22454
|
+
"#": /[a-zA-Z0-9]/
|
|
22455
|
+
}
|
|
22456
|
+
}
|
|
22428
22457
|
};
|
|
22429
22458
|
|
|
22430
22459
|
|
|
@@ -22694,13 +22723,25 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
22694
22723
|
if (!elementId || typeof root === "undefined")
|
|
22695
22724
|
return false;
|
|
22696
22725
|
var el = root.getElementById(elementId);
|
|
22726
|
+
return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible);
|
|
22727
|
+
};
|
|
22728
|
+
SurveyElement.ScrollElementToViewCore = function (el, checkLeft, scrollIfVisible) {
|
|
22697
22729
|
if (!el || !el.scrollIntoView)
|
|
22698
22730
|
return false;
|
|
22699
|
-
var
|
|
22700
|
-
var needScroll =
|
|
22701
|
-
|
|
22731
|
+
var elTop = scrollIfVisible ? -1 : el.getBoundingClientRect().top;
|
|
22732
|
+
var needScroll = elTop < 0;
|
|
22733
|
+
var elLeft = -1;
|
|
22734
|
+
if (!needScroll && checkLeft) {
|
|
22735
|
+
elLeft = el.getBoundingClientRect().left;
|
|
22736
|
+
needScroll = elLeft < 0;
|
|
22737
|
+
}
|
|
22738
|
+
if (!!window && !needScroll) {
|
|
22702
22739
|
var height = window.innerHeight;
|
|
22703
|
-
needScroll = height > 0 && height <
|
|
22740
|
+
needScroll = height > 0 && height < elTop;
|
|
22741
|
+
if (!needScroll && checkLeft) {
|
|
22742
|
+
var width = window.innerWidth;
|
|
22743
|
+
needScroll = width > 0 && width < elLeft;
|
|
22744
|
+
}
|
|
22704
22745
|
}
|
|
22705
22746
|
if (needScroll) {
|
|
22706
22747
|
el.scrollIntoView();
|
|
@@ -22743,6 +22784,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
22743
22784
|
var el = root.getElementById(elementId);
|
|
22744
22785
|
// https://stackoverflow.com/questions/19669786/check-if-element-is-visible-in-dom
|
|
22745
22786
|
if (el && !el["disabled"] && el.style.display !== "none" && el.offsetParent !== null) {
|
|
22787
|
+
SurveyElement.ScrollElementToViewCore(el, true, false);
|
|
22746
22788
|
el.focus();
|
|
22747
22789
|
return true;
|
|
22748
22790
|
}
|