survey-react 1.12.12 → 1.12.13
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 +45 -10
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +16 -1
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +16 -1
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +15 -7
- package/survey.react.js +94 -46
- 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.12.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.13
|
|
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
|
*/
|
|
@@ -2427,13 +2427,16 @@ var helpers_Helpers = /** @class */ (function () {
|
|
|
2427
2427
|
};
|
|
2428
2428
|
Helpers.getNumberCore = function (value) {
|
|
2429
2429
|
if (typeof value == "string") {
|
|
2430
|
-
|
|
2430
|
+
value = value.trim();
|
|
2431
|
+
if (!value)
|
|
2431
2432
|
return NaN;
|
|
2432
2433
|
if (value.indexOf("0x") == 0) {
|
|
2433
2434
|
if (value.length > 32)
|
|
2434
2435
|
return NaN;
|
|
2435
2436
|
return parseInt(value);
|
|
2436
2437
|
}
|
|
2438
|
+
if (value.length > 15 && Helpers.isDigitsOnly(value))
|
|
2439
|
+
return NaN;
|
|
2437
2440
|
if (Helpers.isStringHasOperator(value))
|
|
2438
2441
|
return NaN;
|
|
2439
2442
|
}
|
|
@@ -2545,6 +2548,15 @@ var helpers_Helpers = /** @class */ (function () {
|
|
|
2545
2548
|
Helpers.isCharDigit = function (ch) {
|
|
2546
2549
|
return ch >= "0" && ch <= "9";
|
|
2547
2550
|
};
|
|
2551
|
+
Helpers.isDigitsOnly = function (str) {
|
|
2552
|
+
if (!str)
|
|
2553
|
+
return false;
|
|
2554
|
+
for (var i = 0; i < str.length; i++) {
|
|
2555
|
+
if (!Helpers.isCharDigit(str[i]))
|
|
2556
|
+
return false;
|
|
2557
|
+
}
|
|
2558
|
+
return true;
|
|
2559
|
+
};
|
|
2548
2560
|
Helpers.getNumberFromStr = function (str, index) {
|
|
2549
2561
|
if (!this.isCharDigit(str[index]))
|
|
2550
2562
|
return NaN;
|
|
@@ -3607,7 +3619,7 @@ var CustomPropertiesCollection = /** @class */ (function () {
|
|
|
3607
3619
|
prop.serializationProperty &&
|
|
3608
3620
|
obj.createCustomLocalizableObj) {
|
|
3609
3621
|
var locStr = obj.createCustomLocalizableObj(prop.name);
|
|
3610
|
-
locStr.defaultValue = prop.
|
|
3622
|
+
locStr.defaultValue = prop.getDefaultValue(obj);
|
|
3611
3623
|
var locDesc = {
|
|
3612
3624
|
get: function () {
|
|
3613
3625
|
return obj.getLocalizableString(prop.name);
|
|
@@ -3625,7 +3637,6 @@ var CustomPropertiesCollection = /** @class */ (function () {
|
|
|
3625
3637
|
Object.defineProperty(obj, prop.name, desc);
|
|
3626
3638
|
}
|
|
3627
3639
|
else {
|
|
3628
|
-
var defaultValue = prop.defaultValue;
|
|
3629
3640
|
var isArrayProp = prop.isArray || prop.type === "multiplevalues";
|
|
3630
3641
|
if (typeof obj.createNewArray === "function") {
|
|
3631
3642
|
if (Serializer.isDescendantOf(prop.className, "itemvalue")) {
|
|
@@ -3642,10 +3653,10 @@ var CustomPropertiesCollection = /** @class */ (function () {
|
|
|
3642
3653
|
}
|
|
3643
3654
|
}
|
|
3644
3655
|
if (isArrayProp) {
|
|
3656
|
+
var defaultValue = prop.getDefaultValue(obj);
|
|
3645
3657
|
if (Array.isArray(defaultValue)) {
|
|
3646
3658
|
obj.setPropertyValue(prop.name, defaultValue);
|
|
3647
3659
|
}
|
|
3648
|
-
defaultValue = null;
|
|
3649
3660
|
}
|
|
3650
3661
|
}
|
|
3651
3662
|
if (!!obj.getPropertyValue && !!obj.setPropertyValue) {
|
|
@@ -3654,7 +3665,7 @@ var CustomPropertiesCollection = /** @class */ (function () {
|
|
|
3654
3665
|
if (!!prop.onGetValue) {
|
|
3655
3666
|
return prop.onGetValue(obj);
|
|
3656
3667
|
}
|
|
3657
|
-
return obj.getPropertyValue(prop.name,
|
|
3668
|
+
return obj.getPropertyValue(prop.name, undefined);
|
|
3658
3669
|
},
|
|
3659
3670
|
set: function (v) {
|
|
3660
3671
|
if (!!prop.onSetValue) {
|
|
@@ -10378,9 +10389,9 @@ var base_Base = /** @class */ (function () {
|
|
|
10378
10389
|
var prop = this.getPropertyByName(name);
|
|
10379
10390
|
if (!prop || prop.isCustom && this.isCreating)
|
|
10380
10391
|
return undefined;
|
|
10381
|
-
var dValue = prop.defaultValue;
|
|
10382
10392
|
if (!!prop.defaultValueFunc)
|
|
10383
|
-
return
|
|
10393
|
+
return prop.defaultValueFunc(this);
|
|
10394
|
+
var dValue = prop.getDefaultValue(this);
|
|
10384
10395
|
if (!this.isPropertyEmpty(dValue) && !Array.isArray(dValue))
|
|
10385
10396
|
return dValue;
|
|
10386
10397
|
var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
|
|
@@ -14157,6 +14168,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
14157
14168
|
SurveyElement.prototype.getTitleToolbar = function () {
|
|
14158
14169
|
if (!this.titleToolbarValue) {
|
|
14159
14170
|
this.titleToolbarValue = this.createActionContainer(true);
|
|
14171
|
+
this.titleToolbarValue.locOwner = this;
|
|
14160
14172
|
this.titleToolbarValue.containerCss = (this.isPanel ? this.cssClasses.panel.titleBar : this.cssClasses.titleBar) || "sv-action-title-bar";
|
|
14161
14173
|
this.titleToolbarValue.setItems(this.getTitleActions());
|
|
14162
14174
|
}
|
|
@@ -14193,6 +14205,12 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
14193
14205
|
}
|
|
14194
14206
|
this.setPropertyValue("titleActions", actions);
|
|
14195
14207
|
};
|
|
14208
|
+
SurveyElement.prototype.locStrsChanged = function () {
|
|
14209
|
+
_super.prototype.locStrsChanged.call(this);
|
|
14210
|
+
if (!!this.titleToolbarValue) {
|
|
14211
|
+
this.titleToolbarValue.locStrsChanged();
|
|
14212
|
+
}
|
|
14213
|
+
};
|
|
14196
14214
|
Object.defineProperty(SurveyElement.prototype, "hasTitleActions", {
|
|
14197
14215
|
get: function () {
|
|
14198
14216
|
return this.getTitleActions().length > 0;
|
|
@@ -19389,10 +19407,8 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19389
19407
|
this.triggersInfo.push(info);
|
|
19390
19408
|
return info;
|
|
19391
19409
|
};
|
|
19392
|
-
Question.prototype.runTriggerInfo = function (info,
|
|
19410
|
+
Question.prototype.runTriggerInfo = function (info, keys) {
|
|
19393
19411
|
var expression = this[info.name];
|
|
19394
|
-
var keys = {};
|
|
19395
|
-
keys[name] = value;
|
|
19396
19412
|
if (!expression || info.isRunning || !info.canRun()) {
|
|
19397
19413
|
if (info.runSecondCheck(keys)) {
|
|
19398
19414
|
info.doComplete();
|
|
@@ -19416,12 +19432,16 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19416
19432
|
info.isRunning = true;
|
|
19417
19433
|
info.runner.run(this.getDataFilteredValues(), this.getDataFilteredProperties());
|
|
19418
19434
|
};
|
|
19419
|
-
Question.prototype.runTriggers = function (name, value) {
|
|
19435
|
+
Question.prototype.runTriggers = function (name, value, keys) {
|
|
19420
19436
|
var _this = this;
|
|
19421
19437
|
if (this.isSettingQuestionValue || (this.parentQuestion && this.parentQuestion.getValueName() === name))
|
|
19422
19438
|
return;
|
|
19439
|
+
if (!keys) {
|
|
19440
|
+
keys = {};
|
|
19441
|
+
keys[name] = value;
|
|
19442
|
+
}
|
|
19423
19443
|
this.triggersInfo.forEach(function (info) {
|
|
19424
|
-
_this.runTriggerInfo(info,
|
|
19444
|
+
_this.runTriggerInfo(info, keys);
|
|
19425
19445
|
});
|
|
19426
19446
|
};
|
|
19427
19447
|
Question.prototype.runConditions = function () {
|
|
@@ -20063,8 +20083,8 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
20063
20083
|
};
|
|
20064
20084
|
Question.prototype.getCssDescription = function (cssClasses) {
|
|
20065
20085
|
return new CssClassBuilder()
|
|
20066
|
-
.append(cssClasses.description
|
|
20067
|
-
.append(cssClasses.descriptionUnderInput, this.
|
|
20086
|
+
.append(cssClasses.description)
|
|
20087
|
+
.append(cssClasses.descriptionUnderInput, this.getDescriptionLocation() == "underInput")
|
|
20068
20088
|
.toString();
|
|
20069
20089
|
};
|
|
20070
20090
|
Question.prototype.showErrorOnCore = function (location) {
|
|
@@ -28117,7 +28137,7 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
|
28117
28137
|
return;
|
|
28118
28138
|
this.headerRowValue = this.createRenderedRow(this.cssClasses);
|
|
28119
28139
|
if (this.isRowsDragAndDrop) {
|
|
28120
|
-
this.headerRow.cells.push(this.createHeaderCell(null, "action"));
|
|
28140
|
+
this.headerRow.cells.push(this.createHeaderCell(null, "action", this.cssClasses.actionsCellDrag));
|
|
28121
28141
|
}
|
|
28122
28142
|
if (this.hasActionCellInRows("start")) {
|
|
28123
28143
|
this.headerRow.cells.push(this.createHeaderCell(null, "action"));
|
|
@@ -28665,22 +28685,23 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
|
28665
28685
|
return null;
|
|
28666
28686
|
return choices;
|
|
28667
28687
|
};
|
|
28668
|
-
QuestionMatrixDropdownRenderedTable.prototype.setHeaderCellCssClasses = function (cell, cellType) {
|
|
28688
|
+
QuestionMatrixDropdownRenderedTable.prototype.setHeaderCellCssClasses = function (cell, cellType, classMod) {
|
|
28669
28689
|
cell.className = new CssClassBuilder()
|
|
28670
28690
|
.append(this.cssClasses.headerCell)
|
|
28671
28691
|
.append(this.cssClasses.columnTitleCell, this.matrix.isColumnLayoutHorizontal)
|
|
28672
28692
|
.append(this.cssClasses.emptyCell, !!cell.isEmpty)
|
|
28673
28693
|
.append(this.cssClasses.cell + "--" + cellType, !!cellType)
|
|
28694
|
+
.append(classMod, !!classMod)
|
|
28674
28695
|
.toString();
|
|
28675
28696
|
};
|
|
28676
|
-
QuestionMatrixDropdownRenderedTable.prototype.createHeaderCell = function (column, cellType) {
|
|
28697
|
+
QuestionMatrixDropdownRenderedTable.prototype.createHeaderCell = function (column, cellType, classMod) {
|
|
28677
28698
|
if (cellType === void 0) { cellType = null; }
|
|
28678
28699
|
var cell = !!column ? this.createTextCell(column.locTitle) : this.createEmptyCell();
|
|
28679
28700
|
cell.column = column;
|
|
28680
28701
|
this.setHeaderCell(column, cell);
|
|
28681
28702
|
if (!cellType)
|
|
28682
28703
|
cellType = (!!column && column.cellType !== "default") ? column.cellType : this.matrix.cellType;
|
|
28683
|
-
this.setHeaderCellCssClasses(cell, cellType);
|
|
28704
|
+
this.setHeaderCellCssClasses(cell, cellType, classMod);
|
|
28684
28705
|
return cell;
|
|
28685
28706
|
};
|
|
28686
28707
|
QuestionMatrixDropdownRenderedTable.prototype.setHeaderCell = function (column, cell) {
|
|
@@ -30316,9 +30337,9 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
30316
30337
|
counter < 3);
|
|
30317
30338
|
this.updateVisibilityBasedOnRows();
|
|
30318
30339
|
};
|
|
30319
|
-
QuestionMatrixDropdownModelBase.prototype.runTriggers = function (name, value) {
|
|
30320
|
-
_super.prototype.runTriggers.call(this, name, value);
|
|
30321
|
-
this.runFuncForCellQuestions(function (q) { q.runTriggers(name, value); });
|
|
30340
|
+
QuestionMatrixDropdownModelBase.prototype.runTriggers = function (name, value, keys) {
|
|
30341
|
+
_super.prototype.runTriggers.call(this, name, value, keys);
|
|
30342
|
+
this.runFuncForCellQuestions(function (q) { q.runTriggers(name, value, keys); });
|
|
30322
30343
|
};
|
|
30323
30344
|
QuestionMatrixDropdownModelBase.prototype.updateElementVisibility = function () {
|
|
30324
30345
|
_super.prototype.updateElementVisibility.call(this);
|
|
@@ -30553,7 +30574,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
|
30553
30574
|
/**
|
|
30554
30575
|
* An error message displayed when users enter a duplicate value into a column that accepts only unique values (`isUnique` is set to `true` or `keyName` is specified).
|
|
30555
30576
|
*
|
|
30556
|
-
* A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/
|
|
30577
|
+
* A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/01bd8abd0c574719956d4d579d48c8010cd389d4/packages/survey-core/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
|
|
30557
30578
|
* @see isUniqueCaseSensitive
|
|
30558
30579
|
*/
|
|
30559
30580
|
get: function () {
|
|
@@ -32816,7 +32837,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
|
32816
32837
|
return true;
|
|
32817
32838
|
};
|
|
32818
32839
|
QuestionMatrixDynamicModel.prototype.onPointerDown = function (pointerDownEvent, row) {
|
|
32819
|
-
if (!row || !this.isRowsDragAndDrop)
|
|
32840
|
+
if (!row || !this.isRowsDragAndDrop || this.isDesignMode)
|
|
32820
32841
|
return;
|
|
32821
32842
|
if (this.isBanStartDrag(pointerDownEvent))
|
|
32822
32843
|
return;
|
|
@@ -34131,7 +34152,7 @@ var defaultV2Css = {
|
|
|
34131
34152
|
requiredText: "sd-question__required-text",
|
|
34132
34153
|
number: "sd-element__num",
|
|
34133
34154
|
description: "sd-description sd-question__description",
|
|
34134
|
-
descriptionUnderInput: "sd-
|
|
34155
|
+
descriptionUnderInput: "sd-question__description--under-input",
|
|
34135
34156
|
comment: "sd-input sd-comment",
|
|
34136
34157
|
other: "sd-input sd-comment",
|
|
34137
34158
|
required: "sd-question--required",
|
|
@@ -45847,7 +45868,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45847
45868
|
}, elementsToRenderBefore);
|
|
45848
45869
|
}
|
|
45849
45870
|
else {
|
|
45850
|
-
if (
|
|
45871
|
+
if (element.isPage && !this.isSinglePage && !this.isDesignMode && this.rootElement) {
|
|
45851
45872
|
var elementToScroll = this.rootElement.querySelector(classesToSelector(this.css.rootWrapper));
|
|
45852
45873
|
survey_element_SurveyElement.ScrollElementToViewCore(elementToScroll, false, scrollIfVisible, scrollIntoViewOptions, onScolledCallback);
|
|
45853
45874
|
}
|
|
@@ -46372,12 +46393,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46372
46393
|
var question = questions[i];
|
|
46373
46394
|
this.checkQuestionErrorOnValueChanged(question);
|
|
46374
46395
|
question.onSurveyValueChanged(newValue);
|
|
46375
|
-
this.fireOnValueChanged(valueName, newValue, question);
|
|
46376
46396
|
}
|
|
46377
46397
|
}
|
|
46378
|
-
|
|
46379
|
-
this.fireOnValueChanged(valueName, newValue, null);
|
|
46380
|
-
}
|
|
46398
|
+
this.fireOnValueChanged(valueName, newValue, !!questionName ? this.getQuestionByName(questionName) : undefined);
|
|
46381
46399
|
if (this.isDisposed)
|
|
46382
46400
|
return;
|
|
46383
46401
|
this.checkElementsBindings(valueName, newValue);
|
|
@@ -46551,11 +46569,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46551
46569
|
SurveyModel.prototype.runConditionOnValueChanged = function (name, value) {
|
|
46552
46570
|
if (this.isRunningConditions) {
|
|
46553
46571
|
this.conditionValues[name] = value;
|
|
46572
|
+
if (this.questionTriggersKeys) {
|
|
46573
|
+
this.questionTriggersKeys[name] = value;
|
|
46574
|
+
}
|
|
46554
46575
|
this.isValueChangedOnRunningCondition = true;
|
|
46555
46576
|
}
|
|
46556
46577
|
else {
|
|
46578
|
+
this.questionTriggersKeys = {};
|
|
46579
|
+
this.questionTriggersKeys[name] = value;
|
|
46557
46580
|
this.runConditions();
|
|
46558
46581
|
this.runQuestionsTriggers(name, value);
|
|
46582
|
+
this.questionTriggersKeys = undefined;
|
|
46559
46583
|
}
|
|
46560
46584
|
};
|
|
46561
46585
|
SurveyModel.prototype.runConditionsCore = function (properties) {
|
|
@@ -46572,10 +46596,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46572
46596
|
}
|
|
46573
46597
|
};
|
|
46574
46598
|
SurveyModel.prototype.runQuestionsTriggers = function (name, value) {
|
|
46599
|
+
var _this = this;
|
|
46575
46600
|
if (this.isDisplayMode || this.isDesignMode)
|
|
46576
46601
|
return;
|
|
46577
46602
|
var questions = this.getAllQuestions();
|
|
46578
|
-
questions.forEach(function (q) {
|
|
46603
|
+
questions.forEach(function (q) {
|
|
46604
|
+
q.runTriggers(name, value, _this.questionTriggersKeys);
|
|
46605
|
+
});
|
|
46579
46606
|
};
|
|
46580
46607
|
SurveyModel.prototype.checkIfNewPagesBecomeVisible = function (oldCurrentPageIndex) {
|
|
46581
46608
|
var newCurrentPageIndex = this.pages.indexOf(this.currentPage);
|
|
@@ -52479,11 +52506,8 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
|
52479
52506
|
var _this = this;
|
|
52480
52507
|
var isUpdate = (this.itemsSettings.skip + 1) < this.itemsSettings.totalCount;
|
|
52481
52508
|
if (!this.itemsSettings.skip || isUpdate) {
|
|
52509
|
+
this.resetTimer();
|
|
52482
52510
|
if (!!this.filterString && settings.dropdownSearchDelay > 0) {
|
|
52483
|
-
if (!!this.timer) {
|
|
52484
|
-
clearTimeout(this.timer);
|
|
52485
|
-
this.timer = undefined;
|
|
52486
|
-
}
|
|
52487
52511
|
this.timer = setTimeout(function () {
|
|
52488
52512
|
_this.loadQuestionChoices(callbackAfterItemsLoaded);
|
|
52489
52513
|
}, settings.dropdownSearchDelay);
|
|
@@ -52493,6 +52517,12 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
|
52493
52517
|
}
|
|
52494
52518
|
}
|
|
52495
52519
|
};
|
|
52520
|
+
DropdownListModel.prototype.resetTimer = function () {
|
|
52521
|
+
if (!!this.timer) {
|
|
52522
|
+
clearTimeout(this.timer);
|
|
52523
|
+
this.timer = undefined;
|
|
52524
|
+
}
|
|
52525
|
+
};
|
|
52496
52526
|
DropdownListModel.prototype.updatePopupFocusFirstInputSelector = function () {
|
|
52497
52527
|
this._popupModel.focusFirstInputSelector = this.focusFirstInputSelector;
|
|
52498
52528
|
};
|
|
@@ -60349,6 +60379,12 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
|
|
|
60349
60379
|
_super.prototype.setNewValue.call(this, newValue);
|
|
60350
60380
|
};
|
|
60351
60381
|
QuestionCommentModel.prototype.getValueSeparator = function () { return "\n"; };
|
|
60382
|
+
QuestionCommentModel.prototype.notifyStateChanged = function (prevState) {
|
|
60383
|
+
_super.prototype.notifyStateChanged.call(this, prevState);
|
|
60384
|
+
if (!this.isCollapsed) {
|
|
60385
|
+
this.textAreaModel.updateElement();
|
|
60386
|
+
}
|
|
60387
|
+
};
|
|
60352
60388
|
Object.defineProperty(QuestionCommentModel.prototype, "className", {
|
|
60353
60389
|
get: function () {
|
|
60354
60390
|
return (this.cssClasses ? this.getControlClass() : "panel-comment-root") || undefined;
|
|
@@ -62267,7 +62303,7 @@ var question_radiogroup_QuestionRadiogroupModel = /** @class */ (function (_supe
|
|
|
62267
62303
|
var actions = [];
|
|
62268
62304
|
if (this.isDefaultV2Theme && !this.isDesignMode) {
|
|
62269
62305
|
var clearAction = new action_Action({
|
|
62270
|
-
|
|
62306
|
+
locTitleName: "clearCaption",
|
|
62271
62307
|
id: "sv-clr-btn-" + this.id,
|
|
62272
62308
|
action: function () { _this.clearValue(true); },
|
|
62273
62309
|
innerCss: this.cssClasses.clearButton,
|
|
@@ -66514,7 +66550,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
66514
66550
|
/**
|
|
66515
66551
|
* A placeholder for tab titles that applies when the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) expression doesn't produce a meaningful value.
|
|
66516
66552
|
*
|
|
66517
|
-
* Default value: `"New Panel"` (taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/
|
|
66553
|
+
* Default value: `"New Panel"` (taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/01bd8abd0c574719956d4d579d48c8010cd389d4/packages/survey-core/src/localization))
|
|
66518
66554
|
*/
|
|
66519
66555
|
get: function () {
|
|
66520
66556
|
return this.locTabTitlePlaceholder.text;
|
|
@@ -66942,7 +66978,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
66942
66978
|
/**
|
|
66943
66979
|
* An error message displayed when users enter a duplicate value into a question that accepts only unique values (`isUnique` is set to `true` or `keyName` is specified).
|
|
66944
66980
|
*
|
|
66945
|
-
* A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/
|
|
66981
|
+
* A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/01bd8abd0c574719956d4d579d48c8010cd389d4/packages/survey-core/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
|
|
66946
66982
|
* @see keyName
|
|
66947
66983
|
*/
|
|
66948
66984
|
get: function () {
|
|
@@ -68165,10 +68201,10 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
|
68165
68201
|
_super.prototype.runCondition.call(this, values, properties);
|
|
68166
68202
|
this.runPanelsCondition(this.panelsCore, values, properties);
|
|
68167
68203
|
};
|
|
68168
|
-
QuestionPanelDynamicModel.prototype.runTriggers = function (name, value) {
|
|
68169
|
-
_super.prototype.runTriggers.call(this, name, value);
|
|
68204
|
+
QuestionPanelDynamicModel.prototype.runTriggers = function (name, value, keys) {
|
|
68205
|
+
_super.prototype.runTriggers.call(this, name, value, keys);
|
|
68170
68206
|
this.visiblePanelsCore.forEach(function (p) {
|
|
68171
|
-
p.questions.forEach(function (q) { return q.runTriggers(name, value); });
|
|
68207
|
+
p.questions.forEach(function (q) { return q.runTriggers(name, value, keys); });
|
|
68172
68208
|
});
|
|
68173
68209
|
};
|
|
68174
68210
|
QuestionPanelDynamicModel.prototype.reRunCondition = function () {
|
|
@@ -70614,7 +70650,7 @@ var mask_base_InputMaskBase = /** @class */ (function (_super) {
|
|
|
70614
70650
|
var properties = Serializer.getProperties(this.getType());
|
|
70615
70651
|
properties.forEach(function (property) {
|
|
70616
70652
|
var currentValue = json[property.name];
|
|
70617
|
-
_this[property.name] = currentValue !== undefined ? currentValue : property.
|
|
70653
|
+
_this[property.name] = currentValue !== undefined ? currentValue : property.getDefaultValue(_this);
|
|
70618
70654
|
});
|
|
70619
70655
|
};
|
|
70620
70656
|
InputMaskBase.prototype.getData = function () {
|
|
@@ -71995,8 +72031,8 @@ Serializer.addClass("currencymask", [
|
|
|
71995
72031
|
|
|
71996
72032
|
var Version;
|
|
71997
72033
|
var ReleaseDate;
|
|
71998
|
-
Version = "" + "1.12.
|
|
71999
|
-
ReleaseDate = "" + "2024-
|
|
72034
|
+
Version = "" + "1.12.13";
|
|
72035
|
+
ReleaseDate = "" + "2024-12-04";
|
|
72000
72036
|
function checkLibraryVersion(ver, libraryName) {
|
|
72001
72037
|
if (Version != ver) {
|
|
72002
72038
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -83451,7 +83487,7 @@ var title_element_TitleElement = /** @class */ (function (_super) {
|
|
|
83451
83487
|
if (!this.element.getCssTitleExpandableSvg())
|
|
83452
83488
|
return null;
|
|
83453
83489
|
var iconName = this.element.isExpanded ? "icon-collapse-16x16" : "icon-expand-16x16";
|
|
83454
|
-
return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { className: this.element.getCssTitleExpandableSvg(), iconName: iconName, size:
|
|
83490
|
+
return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { className: this.element.getCssTitleExpandableSvg(), iconName: iconName, size: "auto" });
|
|
83455
83491
|
};
|
|
83456
83492
|
TitleElement.prototype.render = function () {
|
|
83457
83493
|
var element = this.element;
|
|
@@ -83563,6 +83599,7 @@ var text_area_TextAreaComponent = /** @class */ (function (_super) {
|
|
|
83563
83599
|
function TextAreaComponent(props) {
|
|
83564
83600
|
var _this = _super.call(this, props) || this;
|
|
83565
83601
|
_this.initialValue = _this.viewModel.getTextValue() || "";
|
|
83602
|
+
_this.textareaRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
|
|
83566
83603
|
return _this;
|
|
83567
83604
|
}
|
|
83568
83605
|
Object.defineProperty(TextAreaComponent.prototype, "viewModel", {
|
|
@@ -83575,9 +83612,20 @@ var text_area_TextAreaComponent = /** @class */ (function (_super) {
|
|
|
83575
83612
|
TextAreaComponent.prototype.canRender = function () {
|
|
83576
83613
|
return !!this.viewModel.question;
|
|
83577
83614
|
};
|
|
83615
|
+
TextAreaComponent.prototype.componentDidMount = function () {
|
|
83616
|
+
_super.prototype.componentDidMount.call(this);
|
|
83617
|
+
var el = this.textareaRef.current;
|
|
83618
|
+
if (!!el) {
|
|
83619
|
+
this.viewModel.setElement(el);
|
|
83620
|
+
}
|
|
83621
|
+
};
|
|
83622
|
+
TextAreaComponent.prototype.componentWillUnmount = function () {
|
|
83623
|
+
_super.prototype.componentWillUnmount.call(this);
|
|
83624
|
+
this.viewModel.resetElement();
|
|
83625
|
+
};
|
|
83578
83626
|
TextAreaComponent.prototype.renderElement = function () {
|
|
83579
83627
|
var _this = this;
|
|
83580
|
-
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("textarea", { id: this.viewModel.id, className: this.viewModel.className, ref:
|
|
83628
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("textarea", { id: this.viewModel.id, className: this.viewModel.className, ref: this.textareaRef, disabled: this.viewModel.isDisabledAttr, readOnly: this.viewModel.isReadOnlyAttr, rows: this.viewModel.rows, cols: this.viewModel.cols, placeholder: this.viewModel.placeholder, maxLength: this.viewModel.maxLength, defaultValue: this.initialValue, onChange: function (event) { _this.viewModel.onTextAreaInput(event); }, onFocus: function (event) { _this.viewModel.onTextAreaFocus(event); }, onBlur: function (event) { _this.viewModel.onTextAreaBlur(event); }, onKeyDown: function (event) { _this.viewModel.onTextAreaKeyDown(event); }, "aria-required": this.viewModel.ariaRequired, "aria-label": this.viewModel.ariaLabel, "aria-labelledby": this.viewModel.ariaLabelledBy, "aria-describedby": this.viewModel.ariaDescribedBy, "aria-invalid": this.viewModel.ariaInvalid, "aria-errormessage": this.viewModel.ariaErrormessage, style: { resize: this.viewModel.question.resizeStyle } }));
|
|
83581
83629
|
};
|
|
83582
83630
|
return TextAreaComponent;
|
|
83583
83631
|
}(reactquestion_element_SurveyElementBase));
|