survey-react 1.11.8 → 1.11.9
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/defaultV2.css +7 -8
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +25 -8
- package/survey.react.js +176 -87
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.11.
|
2
|
+
* surveyjs - Survey JavaScript library v1.11.9
|
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
|
*/
|
@@ -9960,8 +9960,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9960
9960
|
|
9961
9961
|
var Version;
|
9962
9962
|
var ReleaseDate;
|
9963
|
-
Version = "" + "1.11.
|
9964
|
-
ReleaseDate = "" + "2024-07-
|
9963
|
+
Version = "" + "1.11.9";
|
9964
|
+
ReleaseDate = "" + "2024-07-30";
|
9965
9965
|
function checkLibraryVersion(ver, libraryName) {
|
9966
9966
|
if (Version != ver) {
|
9967
9967
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -17089,7 +17089,7 @@ function displayValue(params) {
|
|
17089
17089
|
var q = getQuestionValueByContext(this, params[0]);
|
17090
17090
|
if (!q)
|
17091
17091
|
return "";
|
17092
|
-
if (params.length > 1 &&
|
17092
|
+
if (params.length > 1 && !_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(params[1]))
|
17093
17093
|
return q.getDisplayValue(true, params[1]);
|
17094
17094
|
return q.displayValue;
|
17095
17095
|
}
|
@@ -20523,13 +20523,10 @@ var JsonMetadataClass = /** @class */ (function () {
|
|
20523
20523
|
return prop;
|
20524
20524
|
};
|
20525
20525
|
JsonMetadataClass.prototype.addDependsOnProperties = function (prop, dependsOn) {
|
20526
|
-
|
20527
|
-
|
20528
|
-
|
20529
|
-
|
20530
|
-
}
|
20531
|
-
else {
|
20532
|
-
this.addDependsOnProperty(prop, dependsOn);
|
20526
|
+
var dArray = Array.isArray(dependsOn) ? dependsOn : [dependsOn];
|
20527
|
+
prop.dependsOn = dArray;
|
20528
|
+
for (var i = 0; i < dArray.length; i++) {
|
20529
|
+
this.addDependsOnProperty(prop, dArray[i]);
|
20533
20530
|
}
|
20534
20531
|
};
|
20535
20532
|
JsonMetadataClass.prototype.addDependsOnProperty = function (prop, dependsOn) {
|
@@ -21237,27 +21234,43 @@ var JsonObject = /** @class */ (function () {
|
|
21237
21234
|
}
|
21238
21235
|
properties = this.addDynamicProperties(obj, jsonObj, properties);
|
21239
21236
|
this.options = options;
|
21237
|
+
var processedProps = {};
|
21238
|
+
processedProps[JsonObject.typePropertyName] = true;
|
21239
|
+
var parentProps = {};
|
21240
21240
|
for (var key in jsonObj) {
|
21241
|
-
|
21242
|
-
continue;
|
21243
|
-
if (key === JsonObject.positionPropertyName) {
|
21244
|
-
obj[key] = jsonObj[key];
|
21245
|
-
continue;
|
21246
|
-
}
|
21247
|
-
var property = this.findProperty(properties, key);
|
21248
|
-
if (!property) {
|
21249
|
-
if (needAddErrors) {
|
21250
|
-
this.addNewError(new JsonUnknownPropertyError(key.toString(), objType), jsonObj, obj);
|
21251
|
-
}
|
21252
|
-
continue;
|
21253
|
-
}
|
21254
|
-
this.valueToObj(jsonObj[key], obj, property, jsonObj, options);
|
21241
|
+
this.setPropertyValueToObj(jsonObj, obj, key, properties, processedProps, parentProps, objType, needAddErrors, options);
|
21255
21242
|
}
|
21256
21243
|
this.options = undefined;
|
21257
21244
|
if (obj.endLoadingFromJson) {
|
21258
21245
|
obj.endLoadingFromJson();
|
21259
21246
|
}
|
21260
21247
|
};
|
21248
|
+
JsonObject.prototype.setPropertyValueToObj = function (jsonObj, obj, key, properties, processedProps, parentProps, objType, needAddErrors, options) {
|
21249
|
+
var _this = this;
|
21250
|
+
if (processedProps[key])
|
21251
|
+
return;
|
21252
|
+
if (key === JsonObject.positionPropertyName) {
|
21253
|
+
obj[key] = jsonObj[key];
|
21254
|
+
return;
|
21255
|
+
}
|
21256
|
+
var property = this.findProperty(properties, key);
|
21257
|
+
if (!property && needAddErrors) {
|
21258
|
+
this.addNewError(new JsonUnknownPropertyError(key.toString(), objType), jsonObj, obj);
|
21259
|
+
}
|
21260
|
+
if (property) {
|
21261
|
+
var dProps = property.dependsOn;
|
21262
|
+
if (Array.isArray(dProps)) {
|
21263
|
+
parentProps[key] = true;
|
21264
|
+
dProps.forEach(function (propKey) {
|
21265
|
+
if (!parentProps[propKey]) {
|
21266
|
+
_this.setPropertyValueToObj(jsonObj, obj, propKey, properties, processedProps, parentProps, objType, needAddErrors, options);
|
21267
|
+
}
|
21268
|
+
});
|
21269
|
+
}
|
21270
|
+
this.valueToObj(jsonObj[key], obj, property, jsonObj, options);
|
21271
|
+
processedProps[key] = true;
|
21272
|
+
}
|
21273
|
+
};
|
21261
21274
|
JsonObject.prototype.toJsonObjectCore = function (obj, property, options) {
|
21262
21275
|
if (!obj || !obj.getType)
|
21263
21276
|
return obj;
|
@@ -35748,7 +35761,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
|
|
35748
35761
|
{
|
35749
35762
|
name: "layoutColumns:panellayoutcolumns",
|
35750
35763
|
className: "panellayoutcolumn", isArray: true,
|
35751
|
-
onSerializeValue: function (obj) { return obj.getSerializableColumnsValue(); }
|
35764
|
+
onSerializeValue: function (obj) { return obj.getSerializableColumnsValue(); },
|
35765
|
+
visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
|
35752
35766
|
},
|
35753
35767
|
{ name: "title:text", serializationProperty: "locTitle" },
|
35754
35768
|
{ name: "description:text", serializationProperty: "locDescription" },
|
@@ -35780,7 +35794,10 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panel", [
|
|
35780
35794
|
name: "colSpan:number", visible: false,
|
35781
35795
|
onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
|
35782
35796
|
},
|
35783
|
-
{
|
35797
|
+
{
|
35798
|
+
name: "effectiveColSpan:number", minValue: 1, isSerializable: false,
|
35799
|
+
visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
|
35800
|
+
},
|
35784
35801
|
{ name: "innerIndent:number", default: 0, choices: [0, 1, 2, 3] },
|
35785
35802
|
{ name: "indent:number", default: 0, choices: [0, 1, 2, 3], visible: false },
|
35786
35803
|
{
|
@@ -38831,9 +38848,10 @@ var ProgressButtons = /** @class */ (function (_super) {
|
|
38831
38848
|
if (!listContainerElement)
|
38832
38849
|
return;
|
38833
38850
|
var listContainerElements = element.querySelectorAll(".sd-progress-buttons__connector");
|
38834
|
-
var circleWidth = this.showItemNumbers ?
|
38835
|
-
|
38836
|
-
|
38851
|
+
var circleWidth = this.showItemNumbers ? 36 : 20;
|
38852
|
+
// const sideCorrection = this.survey.isMobile ? circleWidth : listContainerElement.children[0].clientWidth;
|
38853
|
+
// const connectorWidth = (listContainerElement.clientWidth - sideCorrection) / (listContainerElement.children.length - 1) - circleWidth;
|
38854
|
+
var connectorWidth = (listContainerElement.clientWidth - circleWidth) / (listContainerElement.children.length - 1) - circleWidth;
|
38837
38855
|
for (var i = 0; i < listContainerElements.length; i++) {
|
38838
38856
|
listContainerElements[i].style.width = connectorWidth + "px";
|
38839
38857
|
}
|
@@ -38915,6 +38933,7 @@ var ProgressButtonsResponsivityManager = /** @class */ (function () {
|
|
38915
38933
|
this.canShowItemTitles = true;
|
38916
38934
|
this.processResponsiveness = function (model, options) {
|
38917
38935
|
_this.viewModel.onUpdateScroller(model.isListContainerHasScroller(_this.element));
|
38936
|
+
_this.model.clearConnectorsWidth(_this.element);
|
38918
38937
|
if (!model.showItemTitles) {
|
38919
38938
|
_this.model.adjustConnectors(_this.element);
|
38920
38939
|
return;
|
@@ -38926,7 +38945,6 @@ var ProgressButtonsResponsivityManager = /** @class */ (function () {
|
|
38926
38945
|
_this.viewModel.onResize(_this.canShowItemTitles);
|
38927
38946
|
return;
|
38928
38947
|
}
|
38929
|
-
_this.model.clearConnectorsWidth(_this.element);
|
38930
38948
|
if (_this.timer !== undefined) {
|
38931
38949
|
clearTimeout(_this.timer);
|
38932
38950
|
}
|
@@ -39031,9 +39049,6 @@ var TriggerExpressionInfo = /** @class */ (function () {
|
|
39031
39049
|
}
|
39032
39050
|
return TriggerExpressionInfo;
|
39033
39051
|
}());
|
39034
|
-
function querySelectorIncludingSelf(el, selector) {
|
39035
|
-
return el.querySelector(selector) || el != _global_variables_utils__WEBPACK_IMPORTED_MODULE_14__["DomWindowHelper"].getWindow() && el.matches(selector) && el;
|
39036
|
-
}
|
39037
39052
|
/**
|
39038
39053
|
* A base class for all questions.
|
39039
39054
|
*/
|
@@ -41991,7 +42006,7 @@ var Question = /** @class */ (function (_super) {
|
|
41991
42006
|
var scrollableSelector_1 = this.getObservedElementSelector();
|
41992
42007
|
if (!scrollableSelector_1)
|
41993
42008
|
return;
|
41994
|
-
var defaultRootEl =
|
42009
|
+
var defaultRootEl = el.querySelector(scrollableSelector_1);
|
41995
42010
|
if (!defaultRootEl)
|
41996
42011
|
return;
|
41997
42012
|
var isProcessed_1 = false;
|
@@ -42003,7 +42018,7 @@ var Question = /** @class */ (function (_super) {
|
|
42003
42018
|
isProcessed_1 = false;
|
42004
42019
|
}
|
42005
42020
|
var callback = function () {
|
42006
|
-
var rootEl =
|
42021
|
+
var rootEl = el.querySelector(scrollableSelector_1);
|
42007
42022
|
if (!requiredWidth_1 && _this.isDefaultRendering()) {
|
42008
42023
|
requiredWidth_1 = rootEl.scrollWidth;
|
42009
42024
|
}
|
@@ -42028,10 +42043,8 @@ var Question = /** @class */ (function (_super) {
|
|
42028
42043
|
});
|
42029
42044
|
this.onMobileChangedCallback = function () {
|
42030
42045
|
setTimeout(function () {
|
42031
|
-
var rootEl =
|
42032
|
-
|
42033
|
-
_this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
|
42034
|
-
}
|
42046
|
+
var rootEl = el.querySelector(scrollableSelector_1);
|
42047
|
+
_this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
|
42035
42048
|
}, 0);
|
42036
42049
|
};
|
42037
42050
|
this.resizeObserver.observe(el);
|
@@ -42279,7 +42292,10 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
|
|
42279
42292
|
name: "colSpan:number", visible: false,
|
42280
42293
|
onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
|
42281
42294
|
},
|
42282
|
-
{
|
42295
|
+
{
|
42296
|
+
name: "effectiveColSpan:number", minValue: 1, isSerializable: false,
|
42297
|
+
visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
|
42298
|
+
},
|
42283
42299
|
{ name: "startWithNewLine:boolean", default: true, layout: "row" },
|
42284
42300
|
{ name: "indent:number", default: 0, choices: [0, 1, 2, 3], layout: "row" },
|
42285
42301
|
{
|
@@ -42665,7 +42681,6 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
42665
42681
|
_this.isUpdatingChoicesDependedQuestions = false;
|
42666
42682
|
_this.headItemsCount = 0;
|
42667
42683
|
_this.footItemsCount = 0;
|
42668
|
-
_this.allowMultiColumns = true;
|
42669
42684
|
_this.prevIsOtherSelected = false;
|
42670
42685
|
_this.noneItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].noneItemValue, "noneText", "noneItemText");
|
42671
42686
|
_this.refuseItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].refuseItemValue, "refuseText", "refuseItemText");
|
@@ -44686,23 +44701,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
44686
44701
|
enumerable: false,
|
44687
44702
|
configurable: true
|
44688
44703
|
});
|
44689
|
-
QuestionSelectBase.prototype.getObservedElementSelector = function () {
|
44690
|
-
return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["classesToSelector"])(this.cssClasses.mainRoot);
|
44691
|
-
};
|
44692
|
-
QuestionSelectBase.prototype.supportResponsiveness = function () {
|
44693
|
-
return true;
|
44694
|
-
};
|
44695
|
-
QuestionSelectBase.prototype.onBeforeSetCompactRenderer = function () {
|
44696
|
-
_super.prototype.onBeforeSetDesktopRenderer.call(this);
|
44697
|
-
this.allowMultiColumns = false;
|
44698
|
-
};
|
44699
|
-
QuestionSelectBase.prototype.onBeforeSetDesktopRenderer = function () {
|
44700
|
-
_super.prototype.onBeforeSetDesktopRenderer.call(this);
|
44701
|
-
this.allowMultiColumns = true;
|
44702
|
-
};
|
44703
44704
|
Object.defineProperty(QuestionSelectBase.prototype, "hasColumns", {
|
44704
44705
|
get: function () {
|
44705
|
-
return !this.isMobile &&
|
44706
|
+
return !this.isMobile &&
|
44706
44707
|
(this.getCurrentColCount() > 1);
|
44707
44708
|
},
|
44708
44709
|
enumerable: false,
|
@@ -44860,9 +44861,6 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
44860
44861
|
__decorate([
|
44861
44862
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ localizable: true })
|
44862
44863
|
], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
|
44863
|
-
__decorate([
|
44864
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
44865
|
-
], QuestionSelectBase.prototype, "allowMultiColumns", void 0);
|
44866
44864
|
return QuestionSelectBase;
|
44867
44865
|
}(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));
|
44868
44866
|
|
@@ -47316,6 +47314,9 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
47316
47314
|
QuestionCustomModelBase.prototype.findQuestionByName = function (name) {
|
47317
47315
|
return !!this.data ? this.data.findQuestionByName(name) : null;
|
47318
47316
|
};
|
47317
|
+
QuestionCustomModelBase.prototype.getEditingSurveyElement = function () {
|
47318
|
+
return undefined;
|
47319
|
+
};
|
47319
47320
|
//IPanel
|
47320
47321
|
QuestionCustomModelBase.prototype.addElement = function (element, index) { };
|
47321
47322
|
QuestionCustomModelBase.prototype.removeElement = function (element) {
|
@@ -47698,6 +47699,40 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
47698
47699
|
this.contentPanel.updateElementCss(reNew);
|
47699
47700
|
}
|
47700
47701
|
};
|
47702
|
+
QuestionCompositeModel.prototype.dispose = function () {
|
47703
|
+
this.unConnectEditingObj();
|
47704
|
+
_super.prototype.dispose.call(this);
|
47705
|
+
};
|
47706
|
+
QuestionCompositeModel.prototype.updateEditingObj = function () {
|
47707
|
+
var _this = this;
|
47708
|
+
var _a;
|
47709
|
+
var obj = (_a = this.data) === null || _a === void 0 ? void 0 : _a.getEditingSurveyElement();
|
47710
|
+
if (!obj)
|
47711
|
+
return undefined;
|
47712
|
+
var newObj = obj[this.getValueName()];
|
47713
|
+
if (!!newObj && !newObj.onPropertyChanged) {
|
47714
|
+
newObj = undefined;
|
47715
|
+
}
|
47716
|
+
if (newObj !== this.editingObjValue) {
|
47717
|
+
this.unConnectEditingObj();
|
47718
|
+
this.editingObjValue = newObj;
|
47719
|
+
if (!!newObj) {
|
47720
|
+
this.onEditingObjPropertyChanged = function (sender, options) {
|
47721
|
+
_this.setNewValueIntoQuestion(options.name, _this.editingObjValue[options.name]);
|
47722
|
+
};
|
47723
|
+
newObj.onPropertyChanged.add(this.onEditingObjPropertyChanged);
|
47724
|
+
}
|
47725
|
+
}
|
47726
|
+
return this.editingObjValue;
|
47727
|
+
};
|
47728
|
+
QuestionCompositeModel.prototype.unConnectEditingObj = function () {
|
47729
|
+
if (!!this.editingObjValue && !this.editingObjValue.isDisposed) {
|
47730
|
+
this.editingObjValue.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
|
47731
|
+
}
|
47732
|
+
};
|
47733
|
+
QuestionCompositeModel.prototype.getEditingSurveyElement = function () {
|
47734
|
+
return this.editingObjValue;
|
47735
|
+
};
|
47701
47736
|
QuestionCompositeModel.prototype.getTextProcessor = function () {
|
47702
47737
|
return this.textProcessing;
|
47703
47738
|
};
|
@@ -47757,6 +47792,11 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
47757
47792
|
}
|
47758
47793
|
_super.prototype.onReadOnlyChanged.call(this);
|
47759
47794
|
};
|
47795
|
+
QuestionCompositeModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
|
47796
|
+
if (clearData === void 0) { clearData = false; }
|
47797
|
+
this.updateEditingObj();
|
47798
|
+
_super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
|
47799
|
+
};
|
47760
47800
|
QuestionCompositeModel.prototype.onSurveyLoad = function () {
|
47761
47801
|
this.isSettingValOnLoading = true;
|
47762
47802
|
if (!!this.contentPanel) {
|
@@ -47928,7 +47968,7 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
47928
47968
|
var key = questions[i].getValueName();
|
47929
47969
|
var val = !!newValue ? newValue[key] : undefined;
|
47930
47970
|
var q = questions[i];
|
47931
|
-
if (!this.isTwoValueEquals(q.value, val)) {
|
47971
|
+
if (!this.isTwoValueEquals(q.value, val) && (val !== undefined || !q.isEmpty())) {
|
47932
47972
|
q.value = val;
|
47933
47973
|
}
|
47934
47974
|
}
|
@@ -49650,9 +49690,11 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
49650
49690
|
});
|
49651
49691
|
QuestionFileModel.prototype.chooseFile = function (event) {
|
49652
49692
|
var _this = this;
|
49653
|
-
if (!
|
49693
|
+
if (!this.rootElement)
|
49694
|
+
return;
|
49695
|
+
var inputElement = this.rootElement.querySelector("#" + this.inputId);
|
49696
|
+
if (!inputElement)
|
49654
49697
|
return;
|
49655
|
-
var inputElement = _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomDocumentHelper"].getDocument().getElementById(this.inputId);
|
49656
49698
|
event.preventDefault();
|
49657
49699
|
event.stopImmediatePropagation();
|
49658
49700
|
if (inputElement) {
|
@@ -50199,9 +50241,11 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
50199
50241
|
return false;
|
50200
50242
|
};
|
50201
50243
|
QuestionFileModel.prototype.canDragDrop = function () { return !this.isInputReadOnly && this.currentMode !== "camera" && !this.isPlayingVideo; };
|
50202
|
-
QuestionFileModel.prototype.
|
50244
|
+
QuestionFileModel.prototype.afterRenderQuestionElement = function (el) {
|
50203
50245
|
this.rootElement = el;
|
50204
|
-
|
50246
|
+
};
|
50247
|
+
QuestionFileModel.prototype.beforeDestroyQuestionElement = function (el) {
|
50248
|
+
this.rootElement = undefined;
|
50205
50249
|
};
|
50206
50250
|
QuestionFileModel.prototype.clearFilesCore = function () {
|
50207
50251
|
if (this.rootElement) {
|
@@ -53148,6 +53192,7 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
53148
53192
|
var survey = this.getSurvey();
|
53149
53193
|
return !!survey ? survey.getQuestionByName(name) : null;
|
53150
53194
|
};
|
53195
|
+
MatrixDropdownRowModelBase.prototype.getEditingSurveyElement = function () { return undefined; };
|
53151
53196
|
MatrixDropdownRowModelBase.prototype.setValueCore = function (name, newColumnValue, isComment) {
|
53152
53197
|
if (this.isSettingValue)
|
53153
53198
|
return;
|
@@ -56495,30 +56540,34 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownc
|
|
56495
56540
|
},
|
56496
56541
|
{
|
56497
56542
|
name: "totalType",
|
56543
|
+
visibleIf: function (obj) { return !obj.isShowInMultipleColumns; },
|
56498
56544
|
default: "none",
|
56499
56545
|
choices: ["none", "sum", "count", "min", "max", "avg"],
|
56500
56546
|
},
|
56501
|
-
"totalExpression:expression",
|
56502
|
-
{ name: "totalFormat", serializationProperty: "locTotalFormat" },
|
56547
|
+
{ name: "totalExpression:expression", visibleIf: function (obj) { return !obj.isShowInMultipleColumns; } },
|
56548
|
+
{ name: "totalFormat", serializationProperty: "locTotalFormat", visibleIf: function (obj) { return obj.hasTotal; } },
|
56503
56549
|
{
|
56504
56550
|
name: "totalDisplayStyle",
|
56551
|
+
visibleIf: function (obj) { return obj.hasTotal; },
|
56505
56552
|
default: "none",
|
56506
56553
|
choices: ["none", "decimal", "currency", "percent"],
|
56507
56554
|
},
|
56508
56555
|
{
|
56509
56556
|
name: "totalAlignment",
|
56557
|
+
visibleIf: function (obj) { return obj.hasTotal; },
|
56510
56558
|
default: "auto",
|
56511
56559
|
choices: ["auto", "left", "center", "right"],
|
56512
56560
|
},
|
56513
56561
|
{
|
56514
56562
|
name: "totalCurrency",
|
56563
|
+
visibleIf: function (obj) { return obj.hasTotal; },
|
56515
56564
|
choices: function () {
|
56516
56565
|
return Object(_question_expression__WEBPACK_IMPORTED_MODULE_2__["getCurrecyCodes"])();
|
56517
56566
|
},
|
56518
56567
|
default: "USD",
|
56519
56568
|
},
|
56520
|
-
{ name: "totalMaximumFractionDigits:number", default: -1 },
|
56521
|
-
{ name: "totalMinimumFractionDigits:number", default: -1 },
|
56569
|
+
{ name: "totalMaximumFractionDigits:number", default: -1, visibleIf: function (obj) { return obj.hasTotal; } },
|
56570
|
+
{ name: "totalMinimumFractionDigits:number", default: -1, visibleIf: function (obj) { return obj.hasTotal; } },
|
56522
56571
|
{ name: "renderAs", default: "default", visible: false },
|
56523
56572
|
], function () {
|
56524
56573
|
return new MatrixDropdownColumn("");
|
@@ -59455,6 +59504,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
59455
59504
|
var survey = this.getSurvey();
|
59456
59505
|
return !!survey ? survey.getQuestionByName(name) : null;
|
59457
59506
|
};
|
59507
|
+
MultipleTextItemModel.prototype.getEditingSurveyElement = function () { return undefined; };
|
59458
59508
|
//IValidatorOwner
|
59459
59509
|
MultipleTextItemModel.prototype.getValidatorTitle = function () {
|
59460
59510
|
return this.title;
|
@@ -60388,6 +60438,7 @@ var QuestionPanelDynamicItem = /** @class */ (function () {
|
|
60388
60438
|
var survey = this.getSurvey();
|
60389
60439
|
return !!survey ? survey.getQuestionByName(name) : null;
|
60390
60440
|
};
|
60441
|
+
QuestionPanelDynamicItem.prototype.getEditingSurveyElement = function () { return undefined; };
|
60391
60442
|
QuestionPanelDynamicItem.prototype.getAllValues = function () {
|
60392
60443
|
return this.data.getPanelItemData(this);
|
60393
60444
|
};
|
@@ -66307,6 +66358,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
66307
66358
|
_this.updateRemainingCharacterCounter(event.target.value);
|
66308
66359
|
};
|
66309
66360
|
_this.onKeyDown = function (event) {
|
66361
|
+
_this.updateDateValidationMessage(event);
|
66310
66362
|
_this.onKeyDownPreprocess && _this.onKeyDownPreprocess(event);
|
66311
66363
|
if (_this.isInputTextUpdate) {
|
66312
66364
|
_this._isWaitingForEnter = event.keyCode === 229;
|
@@ -66314,6 +66366,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
66314
66366
|
_this.onTextKeyDownHandler(event);
|
66315
66367
|
};
|
66316
66368
|
_this.onChange = function (event) {
|
66369
|
+
_this.updateDateValidationMessage(event);
|
66317
66370
|
var elementIsFocused = event.target === _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].environment.root.activeElement;
|
66318
66371
|
if (elementIsFocused) {
|
66319
66372
|
if (_this.isInputTextUpdate) {
|
@@ -66745,6 +66798,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
66745
66798
|
};
|
66746
66799
|
errors.push(maxError);
|
66747
66800
|
}
|
66801
|
+
if (!!this.dateValidationMessage) {
|
66802
|
+
errors.push(new _error__WEBPACK_IMPORTED_MODULE_5__["CustomError"](this.dateValidationMessage, this));
|
66803
|
+
}
|
66748
66804
|
var valName = this.getValidatorTitle();
|
66749
66805
|
var emailValidator = new _validator__WEBPACK_IMPORTED_MODULE_4__["EmailValidator"]();
|
66750
66806
|
if (this.inputType === "email" &&
|
@@ -66895,6 +66951,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
66895
66951
|
};
|
66896
66952
|
QuestionTextModel.prototype.setNewValue = function (newValue) {
|
66897
66953
|
newValue = this.correctValueType(newValue);
|
66954
|
+
if (!!newValue) {
|
66955
|
+
this.dateValidationMessage = undefined;
|
66956
|
+
}
|
66898
66957
|
_super.prototype.setNewValue.call(this, newValue);
|
66899
66958
|
};
|
66900
66959
|
QuestionTextModel.prototype.correctValueType = function (newValue) {
|
@@ -66945,6 +67004,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
66945
67004
|
this.inputValue = newValue;
|
66946
67005
|
}
|
66947
67006
|
};
|
67007
|
+
QuestionTextModel.prototype.updateDateValidationMessage = function (event) {
|
67008
|
+
this.dateValidationMessage = this.isDateInputType && !!event.target ? event.target.validationMessage : undefined;
|
67009
|
+
};
|
66948
67010
|
QuestionTextModel.prototype.afterRenderQuestionElement = function (el) {
|
66949
67011
|
if (!!el) {
|
66950
67012
|
this.input = el instanceof HTMLInputElement ? el : el.querySelector("input");
|
@@ -67143,7 +67205,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
|
|
67143
67205
|
name: "maskSettings:masksettings",
|
67144
67206
|
className: "masksettings",
|
67145
67207
|
visibleIndex: 1,
|
67146
|
-
dependsOn: "inputType",
|
67208
|
+
dependsOn: ["inputType", "maskType"],
|
67147
67209
|
visibleIf: function (obj) {
|
67148
67210
|
return obj.inputType === "text" || obj.inputType === "tel";
|
67149
67211
|
},
|
@@ -69076,6 +69138,18 @@ var List = /** @class */ (function (_super) {
|
|
69076
69138
|
this.model.initListContainerHtmlElement(this.listContainerRef.current);
|
69077
69139
|
}
|
69078
69140
|
};
|
69141
|
+
List.prototype.componentDidUpdate = function (prevProps, prevState) {
|
69142
|
+
var _a;
|
69143
|
+
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
69144
|
+
if (this.model !== prevProps.model) {
|
69145
|
+
if (this.model && !!((_a = this.listContainerRef) === null || _a === void 0 ? void 0 : _a.current)) {
|
69146
|
+
this.model.initListContainerHtmlElement(this.listContainerRef.current);
|
69147
|
+
}
|
69148
|
+
if (prevProps.model) {
|
69149
|
+
prevProps.model.initListContainerHtmlElement(undefined);
|
69150
|
+
}
|
69151
|
+
}
|
69152
|
+
};
|
69079
69153
|
List.prototype.componentWillUnmount = function () {
|
69080
69154
|
_super.prototype.componentWillUnmount.call(this);
|
69081
69155
|
if (!!this.model) {
|
@@ -74782,19 +74856,19 @@ var SurveyQuestionElementBase = /** @class */ (function (_super) {
|
|
74782
74856
|
SurveyQuestionElementBase.prototype.componentWillUnmount = function () {
|
74783
74857
|
_super.prototype.componentWillUnmount.call(this);
|
74784
74858
|
if (!!this.questionBase) {
|
74785
|
-
var
|
74786
|
-
this.questionBase.beforeDestroyQuestionElement(
|
74787
|
-
if (!!
|
74788
|
-
|
74859
|
+
var contentElement = this.content || this.control;
|
74860
|
+
this.questionBase.beforeDestroyQuestionElement(contentElement);
|
74861
|
+
if (!!contentElement) {
|
74862
|
+
contentElement.removeAttribute("data-rendered");
|
74789
74863
|
}
|
74790
74864
|
}
|
74791
74865
|
};
|
74792
74866
|
SurveyQuestionElementBase.prototype.updateDomElement = function () {
|
74793
|
-
var
|
74794
|
-
if (!!
|
74795
|
-
if (
|
74796
|
-
|
74797
|
-
this.questionBase.afterRenderQuestionElement(
|
74867
|
+
var contentElement = this.content || this.control;
|
74868
|
+
if (!!contentElement) {
|
74869
|
+
if (contentElement.getAttribute("data-rendered") !== "r") {
|
74870
|
+
contentElement.setAttribute("data-rendered", "r");
|
74871
|
+
this.questionBase.afterRenderQuestionElement(contentElement);
|
74798
74872
|
}
|
74799
74873
|
}
|
74800
74874
|
};
|
@@ -74852,6 +74926,11 @@ var SurveyQuestionElementBase = /** @class */ (function (_super) {
|
|
74852
74926
|
this.control = element;
|
74853
74927
|
}
|
74854
74928
|
};
|
74929
|
+
SurveyQuestionElementBase.prototype.setContent = function (element) {
|
74930
|
+
if (!!element) {
|
74931
|
+
this.content = element;
|
74932
|
+
}
|
74933
|
+
};
|
74855
74934
|
return SurveyQuestionElementBase;
|
74856
74935
|
}(SurveyElementBase));
|
74857
74936
|
|
@@ -75137,7 +75216,7 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
|
|
75137
75216
|
else {
|
75138
75217
|
fileInput = null;
|
75139
75218
|
}
|
75140
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.fileRootCss },
|
75219
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.fileRootCss, ref: function (el) { return (_this.setContent(el)); } },
|
75141
75220
|
fileInput,
|
75142
75221
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.dragArea, onDrop: this.question.onDrop, onDragOver: this.question.onDragOver, onDragLeave: this.question.onDragLeave, onDragEnter: this.question.onDragEnter },
|
75143
75222
|
fileDecorator,
|
@@ -81728,8 +81807,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
81728
81807
|
_this.isNavigationButtonPressed = false;
|
81729
81808
|
_this.mouseDownPage = null;
|
81730
81809
|
_this.isCalculatingProgressText = false;
|
81731
|
-
_this.isFirstPageRendering = true;
|
81732
81810
|
_this.isCurrentPageRendering = true;
|
81811
|
+
_this.isCurrentPageRendered = undefined;
|
81733
81812
|
_this.isTriggerIsRunning = false;
|
81734
81813
|
_this.triggerValues = null;
|
81735
81814
|
_this.triggerKeys = null;
|
@@ -84272,9 +84351,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
84272
84351
|
var _this = this;
|
84273
84352
|
if (this.editingObj == val)
|
84274
84353
|
return;
|
84275
|
-
|
84276
|
-
this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
|
84277
|
-
}
|
84354
|
+
this.unConnectEditingObj();
|
84278
84355
|
this.editingObjValue = val;
|
84279
84356
|
if (this.isDisposed)
|
84280
84357
|
return;
|
@@ -84300,6 +84377,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
84300
84377
|
enumerable: false,
|
84301
84378
|
configurable: true
|
84302
84379
|
});
|
84380
|
+
SurveyModel.prototype.unConnectEditingObj = function () {
|
84381
|
+
if (!!this.editingObj && !this.editingObj.isDisposed) {
|
84382
|
+
this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
|
84383
|
+
}
|
84384
|
+
};
|
84303
84385
|
Object.defineProperty(SurveyModel.prototype, "isEditingSurveyElement", {
|
84304
84386
|
get: function () {
|
84305
84387
|
return !!this.editingObj;
|
@@ -84977,6 +85059,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
84977
85059
|
oldValue.passed = true;
|
84978
85060
|
}
|
84979
85061
|
}
|
85062
|
+
if (this.isCurrentPageRendered === true) {
|
85063
|
+
this.isCurrentPageRendered = false;
|
85064
|
+
}
|
84980
85065
|
this.onCurrentPageChanged.fire(this, options);
|
84981
85066
|
};
|
84982
85067
|
SurveyModel.prototype.notifyQuestionsOnHidingContent = function (page) {
|
@@ -86433,11 +86518,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
86433
86518
|
SurveyModel.prototype.afterRenderPage = function (htmlElement) {
|
86434
86519
|
var _this = this;
|
86435
86520
|
if (!this.isDesignMode && !this.focusingQuestionInfo) {
|
86436
|
-
var doScroll_1 =
|
86521
|
+
var doScroll_1 = this.isCurrentPageRendered === false;
|
86437
86522
|
setTimeout(function () { return _this.scrollToTopOnPageChange(doScroll_1); }, 1);
|
86438
86523
|
}
|
86439
86524
|
this.focusQuestionInfo();
|
86440
|
-
this.
|
86525
|
+
this.isCurrentPageRendered = true;
|
86441
86526
|
if (this.onAfterRenderPage.isEmpty)
|
86442
86527
|
return;
|
86443
86528
|
this.onAfterRenderPage.fire(this, {
|
@@ -86975,6 +87060,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
86975
87060
|
SurveyModel.prototype.findQuestionByName = function (name) {
|
86976
87061
|
return this.getQuestionByName(name);
|
86977
87062
|
};
|
87063
|
+
SurveyModel.prototype.getEditingSurveyElement = function () { return this.editingObjValue; };
|
86978
87064
|
/**
|
86979
87065
|
* Returns a question with a specified [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/question#valueName).
|
86980
87066
|
*
|
@@ -89219,6 +89305,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
89219
89305
|
* Call this method to release resources if your application contains multiple survey models or if you re-create a survey model at runtime.
|
89220
89306
|
*/
|
89221
89307
|
SurveyModel.prototype.dispose = function () {
|
89308
|
+
this.unConnectEditingObj();
|
89222
89309
|
this.removeScrollEventListener();
|
89223
89310
|
this.destroyResizeObserver();
|
89224
89311
|
this.rootElement = undefined;
|
@@ -89696,7 +89783,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
89696
89783
|
default: "auto",
|
89697
89784
|
choices: ["auto", "static", "responsive"],
|
89698
89785
|
},
|
89699
|
-
{ name: "gridLayoutEnabled:boolean", default: false
|
89786
|
+
{ name: "gridLayoutEnabled:boolean", default: false },
|
89700
89787
|
{ name: "width", visibleIf: function (obj) { return obj.widthMode === "static"; } },
|
89701
89788
|
{ name: "fitToContainer:boolean", default: true, visible: false },
|
89702
89789
|
{ name: "headerView", default: "basic", choices: ["basic", "advanced"], visible: false },
|
@@ -92130,6 +92217,8 @@ function _setIsTouch(val) {
|
|
92130
92217
|
function detectMouseSupport(matchMedia) {
|
92131
92218
|
if (!matchMedia)
|
92132
92219
|
return false;
|
92220
|
+
if (IsMobile)
|
92221
|
+
return false;
|
92133
92222
|
var pointerQuery = matchMedia("(pointer:fine)");
|
92134
92223
|
var hoverQuery = matchMedia("(any-hover:hover)");
|
92135
92224
|
return !!pointerQuery && pointerQuery.matches || !!hoverQuery && hoverQuery.matches;
|