survey-react 1.12.21 → 1.12.23
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 +51 -5
- 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 +55 -22
- package/survey.react.js +254 -151
- 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.23
|
3
3
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -4466,12 +4466,14 @@ var JsonMetadata = /** @class */ (function () {
|
|
4466
4466
|
return;
|
4467
4467
|
var schemaProperties = classSchema.properties;
|
4468
4468
|
var requiredProps = [];
|
4469
|
-
if (classInfo.name === "question"
|
4469
|
+
if (classInfo.name === "question") {
|
4470
4470
|
schemaProperties.type = { type: "string" };
|
4471
4471
|
requiredProps.push("type");
|
4472
4472
|
}
|
4473
4473
|
for (var i = 0; i < classInfo.properties.length; i++) {
|
4474
4474
|
var prop = classInfo.properties[i];
|
4475
|
+
if (prop.isSerializable === false)
|
4476
|
+
continue;
|
4475
4477
|
if (!!classInfo.parentName && !!Serializer.findProperty(classInfo.parentName, prop.name))
|
4476
4478
|
continue;
|
4477
4479
|
schemaProperties[prop.name] = this.generateSchemaProperty(prop, schemaDef, isRoot);
|
@@ -10508,6 +10510,8 @@ var base_Base = /** @class */ (function () {
|
|
10508
10510
|
* @param val A new value for the property.
|
10509
10511
|
*/
|
10510
10512
|
Base.prototype.setPropertyValue = function (name, val) {
|
10513
|
+
if (this.isDisposedValue)
|
10514
|
+
return;
|
10511
10515
|
if (!this.isLoadingFromJson) {
|
10512
10516
|
var prop = this.getPropertyByName(name);
|
10513
10517
|
if (!!prop) {
|
@@ -10524,9 +10528,11 @@ var base_Base = /** @class */ (function () {
|
|
10524
10528
|
}
|
10525
10529
|
}
|
10526
10530
|
else {
|
10527
|
-
|
10528
|
-
|
10529
|
-
this.
|
10531
|
+
if (val !== oldValue) {
|
10532
|
+
this.setPropertyValueDirectly(name, val);
|
10533
|
+
if (!this.isTwoValueEquals(oldValue, val)) {
|
10534
|
+
this.propertyValueChanged(name, oldValue, val);
|
10535
|
+
}
|
10530
10536
|
}
|
10531
10537
|
}
|
10532
10538
|
};
|
@@ -15430,15 +15436,13 @@ var localizablestring_LocalizableString = /** @class */ (function () {
|
|
15430
15436
|
configurable: true
|
15431
15437
|
});
|
15432
15438
|
LocalizableString.prototype.calcText = function () {
|
15433
|
-
var
|
15434
|
-
|
15435
|
-
|
15436
|
-
this.owner.getProcessedText &&
|
15437
|
-
res.indexOf("{") > -1) {
|
15439
|
+
var pureText = this.pureText;
|
15440
|
+
var res = pureText;
|
15441
|
+
if (res && this.owner && this.owner.getProcessedText && res.indexOf("{") > -1) {
|
15438
15442
|
res = this.owner.getProcessedText(res);
|
15439
15443
|
}
|
15440
15444
|
if (this.onGetTextCallback)
|
15441
|
-
res = this.onGetTextCallback(res);
|
15445
|
+
res = this.onGetTextCallback(res, pureText);
|
15442
15446
|
return res;
|
15443
15447
|
};
|
15444
15448
|
Object.defineProperty(LocalizableString.prototype, "pureText", {
|
@@ -19059,8 +19063,8 @@ var question_Question = /** @class */ (function (_super) {
|
|
19059
19063
|
var _this = this;
|
19060
19064
|
var locTitleValue = _super.prototype.createLocTitleProperty.call(this);
|
19061
19065
|
locTitleValue.storeDefaultText = true;
|
19062
|
-
locTitleValue.onGetTextCallback = function (text) {
|
19063
|
-
if (!text) {
|
19066
|
+
locTitleValue.onGetTextCallback = function (text, nonProcessedText) {
|
19067
|
+
if (!text && !nonProcessedText) {
|
19064
19068
|
text = _this.getDefaultTitle();
|
19065
19069
|
}
|
19066
19070
|
if (!_this.survey)
|
@@ -21431,8 +21435,10 @@ var question_Question = /** @class */ (function (_super) {
|
|
21431
21435
|
}
|
21432
21436
|
if (!values)
|
21433
21437
|
values = this.defaultValueExpression ? this.data.getFilteredValues() : {};
|
21434
|
-
if (!properties)
|
21438
|
+
if (!properties) {
|
21435
21439
|
properties = this.defaultValueExpression ? this.data.getFilteredProperties() : {};
|
21440
|
+
properties["question"] = this;
|
21441
|
+
}
|
21436
21442
|
if (!!runner && runner.canRun) {
|
21437
21443
|
runner.onRunComplete = function (res) {
|
21438
21444
|
if (res == undefined)
|
@@ -23995,9 +24001,12 @@ var choicesRestful_ChoicesRestful = /** @class */ (function (_super) {
|
|
23995
24001
|
if (this.processedPath.indexOf(";") > -1) {
|
23996
24002
|
pathes = this.path.split(";");
|
23997
24003
|
}
|
23998
|
-
else {
|
24004
|
+
else if (this.processedPath.indexOf(",") > -1) {
|
23999
24005
|
pathes = this.processedPath.split(",");
|
24000
24006
|
}
|
24007
|
+
else {
|
24008
|
+
pathes = this.processedPath.split(".");
|
24009
|
+
}
|
24001
24010
|
if (pathes.length == 0)
|
24002
24011
|
pathes.push(this.processedPath);
|
24003
24012
|
return pathes;
|
@@ -24522,9 +24531,7 @@ var textPreProcessor_TextPreProcessor = /** @class */ (function () {
|
|
24522
24531
|
enumerable: false,
|
24523
24532
|
configurable: true
|
24524
24533
|
});
|
24525
|
-
TextPreProcessor.prototype.process = function (text, returnDisplayValue, doEncoding) {
|
24526
|
-
if (returnDisplayValue === void 0) { returnDisplayValue = false; }
|
24527
|
-
if (doEncoding === void 0) { doEncoding = false; }
|
24534
|
+
TextPreProcessor.prototype.process = function (text, returnDisplayValue, doEncoding, replaceUndefinedValues) {
|
24528
24535
|
this.hasAllValuesOnLastRunValue = true;
|
24529
24536
|
if (!text)
|
24530
24537
|
return text;
|
@@ -24533,28 +24540,28 @@ var textPreProcessor_TextPreProcessor = /** @class */ (function () {
|
|
24533
24540
|
var items = this.getItems(text);
|
24534
24541
|
for (var i = items.length - 1; i >= 0; i--) {
|
24535
24542
|
var item = items[i];
|
24536
|
-
var
|
24537
|
-
if (
|
24538
|
-
|
24539
|
-
|
24540
|
-
|
24541
|
-
|
24542
|
-
|
24543
|
-
|
24543
|
+
var name_1 = this.getName(text.substring(item.start + 1, item.end));
|
24544
|
+
if (!!name_1) {
|
24545
|
+
var textValue = new TextPreProcessorValue(name_1, returnDisplayValue === true);
|
24546
|
+
this.onProcess(textValue);
|
24547
|
+
if (!textValue.isExists) {
|
24548
|
+
if (textValue.canProcess) {
|
24549
|
+
this.hasAllValuesOnLastRunValue = false;
|
24550
|
+
}
|
24551
|
+
}
|
24552
|
+
if (textValue.isExists || replaceUndefinedValues) {
|
24553
|
+
if (helpers_Helpers.isValueEmpty(textValue.value)) {
|
24554
|
+
this.hasAllValuesOnLastRunValue = false;
|
24555
|
+
}
|
24556
|
+
var replacedValue = !helpers_Helpers.isValueEmpty(textValue.value)
|
24557
|
+
? textValue.value
|
24558
|
+
: "";
|
24559
|
+
if (doEncoding) {
|
24560
|
+
replacedValue = encodeURIComponent(replacedValue);
|
24561
|
+
}
|
24562
|
+
text = text.substring(0, item.start) + replacedValue + text.substring(item.end + 1);
|
24544
24563
|
}
|
24545
|
-
continue;
|
24546
|
-
}
|
24547
|
-
if (helpers_Helpers.isValueEmpty(textValue.value)) {
|
24548
|
-
this.hasAllValuesOnLastRunValue = false;
|
24549
|
-
}
|
24550
|
-
var replacedValue = !helpers_Helpers.isValueEmpty(textValue.value)
|
24551
|
-
? textValue.value
|
24552
|
-
: "";
|
24553
|
-
if (doEncoding) {
|
24554
|
-
replacedValue = encodeURIComponent(replacedValue);
|
24555
24564
|
}
|
24556
|
-
text =
|
24557
|
-
text.substring(0, item.start) + replacedValue + text.substring(item.end + 1);
|
24558
24565
|
}
|
24559
24566
|
return text;
|
24560
24567
|
};
|
@@ -24566,12 +24573,19 @@ var textPreProcessor_TextPreProcessor = /** @class */ (function () {
|
|
24566
24573
|
return textValue;
|
24567
24574
|
};
|
24568
24575
|
Object.defineProperty(TextPreProcessor.prototype, "hasAllValuesOnLastRun", {
|
24569
|
-
get: function () {
|
24570
|
-
return !!this.hasAllValuesOnLastRunValue;
|
24571
|
-
},
|
24576
|
+
get: function () { return !!this.hasAllValuesOnLastRunValue; },
|
24572
24577
|
enumerable: false,
|
24573
24578
|
configurable: true
|
24574
24579
|
});
|
24580
|
+
TextPreProcessor.prototype.processText = function (text, returnDisplayValue) {
|
24581
|
+
return this.process(text, returnDisplayValue);
|
24582
|
+
};
|
24583
|
+
TextPreProcessor.prototype.processTextEx = function (params) {
|
24584
|
+
var res = { hasAllValuesOnLastRun: true, text: params.text };
|
24585
|
+
res.text = this.process(params.text, params.returnDisplayValue, params.doEncoding, params.replaceUndefinedValues);
|
24586
|
+
res.hasAllValuesOnLastRun = this.hasAllValuesOnLastRun;
|
24587
|
+
return res;
|
24588
|
+
};
|
24575
24589
|
TextPreProcessor.prototype.getItems = function (text) {
|
24576
24590
|
var items = [];
|
24577
24591
|
var length = text.length;
|
@@ -24586,13 +24600,18 @@ var textPreProcessor_TextPreProcessor = /** @class */ (function () {
|
|
24586
24600
|
var item = new TextPreProcessorItem();
|
24587
24601
|
item.start = start;
|
24588
24602
|
item.end = i;
|
24589
|
-
|
24603
|
+
if (this.isValidItemName(text.substring(start + 1, i - 1))) {
|
24604
|
+
items.push(item);
|
24605
|
+
}
|
24590
24606
|
}
|
24591
24607
|
start = -1;
|
24592
24608
|
}
|
24593
24609
|
}
|
24594
24610
|
return items;
|
24595
24611
|
};
|
24612
|
+
TextPreProcessor.prototype.isValidItemName = function (name) {
|
24613
|
+
return !!name && name.indexOf(":") < 0;
|
24614
|
+
};
|
24596
24615
|
TextPreProcessor.prototype.getName = function (name) {
|
24597
24616
|
if (!name)
|
24598
24617
|
return;
|
@@ -24672,27 +24691,31 @@ var textPreProcessor_QuestionTextProcessor = /** @class */ (function () {
|
|
24672
24691
|
textValue.value = new conditionProcessValue_ProcessValue().getValue(textValue.name, values);
|
24673
24692
|
};
|
24674
24693
|
QuestionTextProcessor.prototype.processText = function (text, returnDisplayValue) {
|
24675
|
-
|
24676
|
-
|
24677
|
-
text = this.textPreProcessor.process(text, returnDisplayValue);
|
24678
|
-
text = this.processTextCore(this.getParentTextProcessor(), text, returnDisplayValue);
|
24679
|
-
return this.processTextCore(this.survey, text, returnDisplayValue);
|
24694
|
+
var params = { text: text, returnDisplayValue: returnDisplayValue };
|
24695
|
+
return this.processTextEx(params).text;
|
24680
24696
|
};
|
24681
24697
|
QuestionTextProcessor.prototype.processTextEx = function (params) {
|
24682
|
-
|
24683
|
-
var hasAllValuesOnLastRun = this.textPreProcessor.hasAllValuesOnLastRun;
|
24698
|
+
var _a;
|
24684
24699
|
var res = { hasAllValuesOnLastRun: true, text: params.text };
|
24685
|
-
if (this.survey)
|
24686
|
-
res
|
24700
|
+
if (!params.runAtDesign && ((_a = this.survey) === null || _a === void 0 ? void 0 : _a.isDesignMode))
|
24701
|
+
return res;
|
24702
|
+
var processors = new Array();
|
24703
|
+
this.addTextPreProcessor(processors, this.textPreProcessor);
|
24704
|
+
this.addTextPreProcessor(processors, this.getParentTextProcessor());
|
24705
|
+
this.addTextPreProcessor(processors, this.survey);
|
24706
|
+
for (var i = 0; i < processors.length; i++) {
|
24707
|
+
var processor = processors[i];
|
24708
|
+
params.text = res.text;
|
24709
|
+
var processorRes = processor.processTextEx(params);
|
24710
|
+
res.text = processorRes.text;
|
24711
|
+
res.hasAllValuesOnLastRun = res.hasAllValuesOnLastRun && processorRes.hasAllValuesOnLastRun;
|
24687
24712
|
}
|
24688
|
-
res.hasAllValuesOnLastRun =
|
24689
|
-
res.hasAllValuesOnLastRun && hasAllValuesOnLastRun;
|
24690
24713
|
return res;
|
24691
24714
|
};
|
24692
|
-
QuestionTextProcessor.prototype.
|
24693
|
-
if (!textProcessor)
|
24694
|
-
return
|
24695
|
-
|
24715
|
+
QuestionTextProcessor.prototype.addTextPreProcessor = function (list, textProcessor) {
|
24716
|
+
if (!textProcessor || list.indexOf(textProcessor) > -1)
|
24717
|
+
return;
|
24718
|
+
list.push(textProcessor);
|
24696
24719
|
};
|
24697
24720
|
return QuestionTextProcessor;
|
24698
24721
|
}());
|
@@ -24722,6 +24745,7 @@ var question_custom_extends = (undefined && undefined.__extends) || (function ()
|
|
24722
24745
|
|
24723
24746
|
|
24724
24747
|
|
24748
|
+
|
24725
24749
|
var question_custom_ComponentQuestionJSON = /** @class */ (function () {
|
24726
24750
|
function ComponentQuestionJSON(name, json) {
|
24727
24751
|
this.name = name;
|
@@ -25625,9 +25649,10 @@ var question_custom_QuestionCompositeModel = /** @class */ (function (_super) {
|
|
25625
25649
|
}
|
25626
25650
|
this.initElement(res);
|
25627
25651
|
res.readOnly = this.isReadOnly;
|
25628
|
-
res.questions.forEach(function (q) {
|
25629
|
-
|
25630
|
-
|
25652
|
+
res.questions.forEach(function (q) {
|
25653
|
+
q.setParentQuestion(_this);
|
25654
|
+
q.onUpdateCssClassesCallback = function (css) { _this.onUpdateQuestionCssClasses(q, css); };
|
25655
|
+
});
|
25631
25656
|
this.setAfterRenderCallbacks(res);
|
25632
25657
|
return res;
|
25633
25658
|
};
|
@@ -25724,6 +25749,36 @@ var question_custom_QuestionCompositeModel = /** @class */ (function (_super) {
|
|
25724
25749
|
this.settingNewValue = false;
|
25725
25750
|
this.runPanelTriggers(QuestionCompositeModel.ItemVariableName + "." + name, newValue);
|
25726
25751
|
};
|
25752
|
+
QuestionCompositeModel.prototype.setComment = function (name, newValue, locNotification) {
|
25753
|
+
var val = this.getUnbindValue(this.value);
|
25754
|
+
var commentName = this.getCommentName(name);
|
25755
|
+
if (!val && !newValue || !!newValue && !!val && val[commentName] === newValue)
|
25756
|
+
return;
|
25757
|
+
if (!!newValue) {
|
25758
|
+
if (!val) {
|
25759
|
+
val = {};
|
25760
|
+
}
|
25761
|
+
val[commentName] = newValue;
|
25762
|
+
}
|
25763
|
+
else {
|
25764
|
+
delete val[commentName];
|
25765
|
+
}
|
25766
|
+
var q = this.getQuestionByName(name);
|
25767
|
+
if (!!q && q.comment !== newValue) {
|
25768
|
+
q.comment = newValue;
|
25769
|
+
}
|
25770
|
+
this.value = val;
|
25771
|
+
};
|
25772
|
+
QuestionCompositeModel.prototype.getComment = function (name) {
|
25773
|
+
var q = this.getQuestionByName(name);
|
25774
|
+
if (!!q)
|
25775
|
+
return q.comment;
|
25776
|
+
var val = this.value;
|
25777
|
+
return !!val && val[this.getCommentName(name)] || "";
|
25778
|
+
};
|
25779
|
+
QuestionCompositeModel.prototype.getCommentName = function (name) {
|
25780
|
+
return name + settings.commentSuffix;
|
25781
|
+
};
|
25727
25782
|
QuestionCompositeModel.prototype.runPanelTriggers = function (name, value) {
|
25728
25783
|
if (!!this.contentPanel) {
|
25729
25784
|
this.contentPanel.questions.forEach(function (q) {
|
@@ -25803,19 +25858,24 @@ var question_custom_QuestionCompositeModel = /** @class */ (function (_super) {
|
|
25803
25858
|
_super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
|
25804
25859
|
};
|
25805
25860
|
QuestionCompositeModel.prototype.setValuesIntoQuestions = function (newValue) {
|
25806
|
-
if (!this.contentPanel)
|
25861
|
+
if (!this.contentPanel || this.settingNewValue)
|
25807
25862
|
return;
|
25808
25863
|
newValue = this.getValueForContentPanel(newValue);
|
25809
25864
|
var oldSettingNewValue = this.settingNewValue;
|
25810
25865
|
this.settingNewValue = true;
|
25811
25866
|
var questions = this.contentPanel.questions;
|
25812
25867
|
for (var i = 0; i < questions.length; i++) {
|
25813
|
-
var key = questions[i].getValueName();
|
25814
|
-
var val = !!newValue ? newValue[key] : undefined;
|
25815
25868
|
var q = questions[i];
|
25869
|
+
var key = q.getValueName();
|
25870
|
+
var commentKey = this.getCommentName(key);
|
25871
|
+
var val = !!newValue ? newValue[key] : undefined;
|
25872
|
+
var commentVal = !!newValue && newValue[commentKey] || "";
|
25816
25873
|
if (!this.isTwoValueEquals(q.value, val) && (val !== undefined || !q.isEmpty())) {
|
25817
25874
|
q.value = val;
|
25818
25875
|
}
|
25876
|
+
if (q.comment !== commentVal) {
|
25877
|
+
q.comment = commentVal;
|
25878
|
+
}
|
25819
25879
|
}
|
25820
25880
|
this.settingNewValue = oldSettingNewValue;
|
25821
25881
|
};
|
@@ -28561,11 +28621,10 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
28561
28621
|
if (this.matrix.isMobile) {
|
28562
28622
|
actions.unshift(new action_Action({
|
28563
28623
|
id: "show-detail-mobile",
|
28564
|
-
title: "
|
28624
|
+
title: new ComputedUpdater(function () { return row.isDetailPanelShowing ? _this.matrix.getLocalizationString("hideDetails") : _this.matrix.getLocalizationString("showDetails"); }),
|
28565
28625
|
showTitle: true,
|
28566
28626
|
location: "end",
|
28567
28627
|
action: function (context) {
|
28568
|
-
context.title = row.isDetailPanelShowing ? _this.matrix.getLocalizationString("showDetails") : _this.matrix.getLocalizationString("hideDetails");
|
28569
28628
|
row.showHideDetailPanelClick();
|
28570
28629
|
},
|
28571
28630
|
}));
|
@@ -34243,6 +34302,8 @@ var defaultV2Css = {
|
|
34243
34302
|
progressBtnIcon: "icon-progressbuttonv2",
|
34244
34303
|
noEntriesPlaceholder: "sd-paneldynamic__placeholder sd-question__placeholder",
|
34245
34304
|
compact: "sd-element--with-frame sd-element--compact",
|
34305
|
+
tabsContainer: "sd-paneldynamic__tabs-container",
|
34306
|
+
tabsContainerWithHeader: "sd-paneldynamic__tabs-container--with-header",
|
34246
34307
|
tabsRoot: "sd-tabs-toolbar",
|
34247
34308
|
tabsLeft: "sd-tabs-toolbar--left",
|
34248
34309
|
tabsRight: "sd-tabs-toolbar--right",
|
@@ -36871,7 +36932,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36871
36932
|
};
|
36872
36933
|
PanelModelBase.prototype.randomizeElements = function (isRandom) {
|
36873
36934
|
if (!this.canRandomize(isRandom) || this.isRandomizing)
|
36874
|
-
return;
|
36935
|
+
return false;
|
36875
36936
|
this.isRandomizing = true;
|
36876
36937
|
var oldElements = [];
|
36877
36938
|
var elements = this.elements;
|
@@ -36883,6 +36944,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
36883
36944
|
this.updateRows();
|
36884
36945
|
this.updateVisibleIndexes();
|
36885
36946
|
this.isRandomizing = false;
|
36947
|
+
return true;
|
36886
36948
|
};
|
36887
36949
|
Object.defineProperty(PanelModelBase.prototype, "areQuestionsRandomized", {
|
36888
36950
|
/**
|
@@ -37441,6 +37503,14 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
37441
37503
|
}
|
37442
37504
|
return null;
|
37443
37505
|
};
|
37506
|
+
PanelModelBase.prototype.getFirstVisibleQuestion = function () {
|
37507
|
+
var qs = this.questions;
|
37508
|
+
for (var i = 0; i < qs.length; i++) {
|
37509
|
+
if (qs[i].isVisible)
|
37510
|
+
return qs[i];
|
37511
|
+
}
|
37512
|
+
return null;
|
37513
|
+
};
|
37444
37514
|
/**
|
37445
37515
|
* Focuses the first question in this panel/page.
|
37446
37516
|
* @see focusFirstErrorQuestion
|
@@ -39653,6 +39723,7 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39653
39723
|
configurable: true
|
39654
39724
|
});
|
39655
39725
|
PageModel.prototype.setWasShown = function (val) {
|
39726
|
+
var _a;
|
39656
39727
|
if (val == this.hasShownValue)
|
39657
39728
|
return;
|
39658
39729
|
this.hasShownValue = val;
|
@@ -39664,7 +39735,12 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
39664
39735
|
els[i].randomizeElements(this.areQuestionsRandomized);
|
39665
39736
|
}
|
39666
39737
|
}
|
39667
|
-
this.randomizeElements(this.areQuestionsRandomized)
|
39738
|
+
if (this.randomizeElements(this.areQuestionsRandomized)) {
|
39739
|
+
var singleQuestion = (_a = this.survey) === null || _a === void 0 ? void 0 : _a.currentSingleQuestion;
|
39740
|
+
if ((singleQuestion === null || singleQuestion === void 0 ? void 0 : singleQuestion.page) === this) {
|
39741
|
+
this.survey.currentSingleQuestion = this.getFirstVisibleQuestion();
|
39742
|
+
}
|
39743
|
+
}
|
39668
39744
|
};
|
39669
39745
|
/**
|
39670
39746
|
* Scrolls this page to the top.
|
@@ -40884,12 +40960,15 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
40884
40960
|
_this.onTimer = _this.onTimerTick;
|
40885
40961
|
_this.onTimerPanelInfoText = _this.addEvent();
|
40886
40962
|
/**
|
40887
|
-
* An event that is raised after
|
40963
|
+
* An event that is raised after a value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
40888
40964
|
*/
|
40889
40965
|
_this.onDynamicPanelValueChanged = _this.addEvent();
|
40966
|
+
/**
|
40967
|
+
* @deprecated Use the [`onDynamicPanelValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelValueChanged) event instead.
|
40968
|
+
*/
|
40890
40969
|
_this.onDynamicPanelItemValueChanged = _this.onDynamicPanelValueChanged;
|
40891
40970
|
/**
|
40892
|
-
* An event that is raised
|
40971
|
+
* An event that is raised before a value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
40893
40972
|
*/
|
40894
40973
|
_this.onDynamicPanelValueChanging = _this.addEvent();
|
40895
40974
|
/**
|
@@ -43319,6 +43398,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
43319
43398
|
return this.getPropertyValue("showProgressBar");
|
43320
43399
|
},
|
43321
43400
|
set: function (newValue) {
|
43401
|
+
if (newValue === true)
|
43402
|
+
newValue = "auto";
|
43403
|
+
if (newValue === false)
|
43404
|
+
newValue = "off";
|
43322
43405
|
this.setPropertyValue("showProgressBar", newValue.toLowerCase());
|
43323
43406
|
},
|
43324
43407
|
enumerable: false,
|
@@ -43990,7 +44073,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
43990
44073
|
if (newPage == this.currentPage)
|
43991
44074
|
return;
|
43992
44075
|
var oldValue = this.currentPage;
|
43993
|
-
if (!this.isShowingPreview && !this.currentPageChanging(newPage, oldValue))
|
44076
|
+
if (!this.isShowingPreview && !this.currentSingleQuestion && !this.currentPageChanging(newPage, oldValue))
|
43994
44077
|
return;
|
43995
44078
|
this.setPropertyValue("currentPage", newPage);
|
43996
44079
|
if (!!newPage) {
|
@@ -44019,6 +44102,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44019
44102
|
SurveyModel.prototype.performValidationOnPageChanging = function (page) {
|
44020
44103
|
if (this.isDesignMode)
|
44021
44104
|
return false;
|
44105
|
+
if (this.canGoTroughValidation())
|
44106
|
+
return true;
|
44022
44107
|
var index = this.visiblePages.indexOf(page);
|
44023
44108
|
if (index < 0 || index >= this.visiblePageCount)
|
44024
44109
|
return false;
|
@@ -44382,20 +44467,22 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44382
44467
|
return;
|
44383
44468
|
page.updateCustomWidgets();
|
44384
44469
|
};
|
44385
|
-
SurveyModel.prototype.currentPageChanging = function (newValue, oldValue) {
|
44386
|
-
var options = this.createPageChangeEventOptions(newValue, oldValue);
|
44470
|
+
SurveyModel.prototype.currentPageChanging = function (newValue, oldValue, newQuestion, oldQuestion) {
|
44471
|
+
var options = this.createPageChangeEventOptions(newValue, oldValue, newQuestion, oldQuestion);
|
44472
|
+
return this.currentPageChangingFromOptions(options);
|
44473
|
+
};
|
44474
|
+
SurveyModel.prototype.currentPageChangingFromOptions = function (options) {
|
44387
44475
|
options.allow = true;
|
44388
44476
|
options.allowChanging = true;
|
44389
44477
|
this.onCurrentPageChanging.fire(this, options);
|
44390
44478
|
var allow = options.allowChanging && options.allow;
|
44391
|
-
if (allow) {
|
44479
|
+
if (allow && options.newCurrentPage !== options.oldCurrentPage) {
|
44392
44480
|
this.isCurrentPageRendering = true;
|
44393
44481
|
}
|
44394
44482
|
return allow;
|
44395
44483
|
};
|
44396
44484
|
SurveyModel.prototype.currentPageChanged = function (newValue, oldValue) {
|
44397
44485
|
this.notifyQuestionsOnHidingContent(oldValue);
|
44398
|
-
var options = this.createPageChangeEventOptions(newValue, oldValue);
|
44399
44486
|
if (oldValue && !oldValue.isDisposed && !oldValue.passed) {
|
44400
44487
|
if (oldValue.validate(false)) {
|
44401
44488
|
oldValue.passed = true;
|
@@ -44404,22 +44491,31 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44404
44491
|
if (this.isCurrentPageRendered === true) {
|
44405
44492
|
this.isCurrentPageRendered = false;
|
44406
44493
|
}
|
44407
|
-
this.
|
44494
|
+
if (!this.currentSingleQuestion) {
|
44495
|
+
var options = this.createPageChangeEventOptions(newValue, oldValue);
|
44496
|
+
this.onCurrentPageChanged.fire(this, options);
|
44497
|
+
}
|
44408
44498
|
};
|
44409
44499
|
SurveyModel.prototype.notifyQuestionsOnHidingContent = function (page) {
|
44410
44500
|
if (page && !page.isDisposed) {
|
44411
44501
|
page.questions.forEach(function (q) { return q.onHidingContent(); });
|
44412
44502
|
}
|
44413
44503
|
};
|
44414
|
-
SurveyModel.prototype.createPageChangeEventOptions = function (newValue, oldValue) {
|
44504
|
+
SurveyModel.prototype.createPageChangeEventOptions = function (newValue, oldValue, newQuestion, oldQuestion) {
|
44415
44505
|
var diff = !!newValue && !!oldValue ? newValue.visibleIndex - oldValue.visibleIndex : 0;
|
44506
|
+
var qDiff = diff;
|
44507
|
+
if (qDiff === 0 && !!oldQuestion && !!newQuestion) {
|
44508
|
+
qDiff = newValue.elements.indexOf(newQuestion) - newValue.elements.indexOf(oldQuestion);
|
44509
|
+
}
|
44416
44510
|
return {
|
44511
|
+
oldCurrentQuestion: oldQuestion,
|
44512
|
+
newCurrentQuestion: newQuestion,
|
44417
44513
|
oldCurrentPage: oldValue,
|
44418
44514
|
newCurrentPage: newValue,
|
44419
44515
|
isNextPage: diff === 1,
|
44420
44516
|
isPrevPage: diff === -1,
|
44421
|
-
isGoingForward:
|
44422
|
-
isGoingBackward:
|
44517
|
+
isGoingForward: qDiff > 0,
|
44518
|
+
isGoingBackward: qDiff < 0,
|
44423
44519
|
isAfterPreview: this.changeCurrentPageFromPreview === true
|
44424
44520
|
};
|
44425
44521
|
};
|
@@ -44642,6 +44738,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44642
44738
|
* @see completeLastPage
|
44643
44739
|
*/
|
44644
44740
|
SurveyModel.prototype.nextPage = function () {
|
44741
|
+
if (this.currentSingleQuestion)
|
44742
|
+
return this.performNext();
|
44645
44743
|
if (this.isLastPage)
|
44646
44744
|
return false;
|
44647
44745
|
return this.doCurrentPageComplete(false);
|
@@ -44672,7 +44770,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44672
44770
|
};
|
44673
44771
|
SurveyModel.prototype.hasErrorsOnNavigate = function (doComplete) {
|
44674
44772
|
var _this = this;
|
44675
|
-
if (
|
44773
|
+
if (this.canGoTroughValidation())
|
44676
44774
|
return false;
|
44677
44775
|
var skipValidation = doComplete && this.validationAllowComplete || !doComplete && this.validationAllowSwitchPages;
|
44678
44776
|
var func = function (hasErrors) {
|
@@ -44687,6 +44785,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44687
44785
|
}
|
44688
44786
|
return this.validateCurrentPage(func) !== true && !skipValidation;
|
44689
44787
|
};
|
44788
|
+
SurveyModel.prototype.canGoTroughValidation = function () { return !this.isEditMode || !this.validationEnabled; };
|
44690
44789
|
SurveyModel.prototype.checkForAsyncQuestionValidation = function (questions, func) {
|
44691
44790
|
var _this = this;
|
44692
44791
|
this.clearAsyncValidationQuesitons();
|
@@ -44964,6 +45063,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
44964
45063
|
*/
|
44965
45064
|
SurveyModel.prototype.prevPage = function () {
|
44966
45065
|
var _this = this;
|
45066
|
+
if (this.currentSingleQuestion)
|
45067
|
+
return this.performPrevious();
|
44967
45068
|
if (this.isFirstPage || this.state === "starting")
|
44968
45069
|
return false;
|
44969
45070
|
this.resetNavigationButton();
|
@@ -45105,7 +45206,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45105
45206
|
* Possible values:
|
45106
45207
|
*
|
45107
45208
|
* - `"singlePage"` - Combines all survey pages into a single page.
|
45108
|
-
* - `"questionPerPage"` -
|
45209
|
+
* - `"questionPerPage"` - Displays each question on a separate page.
|
45109
45210
|
* - `"standard"` (default) - Retains the original structure specified in the JSON schema.
|
45110
45211
|
*/
|
45111
45212
|
get: function () {
|
@@ -45245,7 +45346,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45245
45346
|
Object.defineProperty(SurveyModel.prototype, "currentSingleQuestion", {
|
45246
45347
|
get: function () { return this.currentSingleQuestionValue; },
|
45247
45348
|
set: function (val) {
|
45248
|
-
|
45349
|
+
var oldVal = this.currentSingleQuestion;
|
45350
|
+
if (val !== oldVal) {
|
45351
|
+
var options = !!val && !!oldVal ? this.createPageChangeEventOptions(val.page, oldVal.page, val, oldVal) : undefined;
|
45352
|
+
if (!!options && !this.currentPageChangingFromOptions(options))
|
45353
|
+
return;
|
45249
45354
|
this.currentSingleQuestionValue = val;
|
45250
45355
|
if (!!val) {
|
45251
45356
|
var page = val.page;
|
@@ -45259,6 +45364,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45259
45364
|
}
|
45260
45365
|
}
|
45261
45366
|
this.updateButtonsVisibility();
|
45367
|
+
if (!!options) {
|
45368
|
+
this.onCurrentPageChanged.fire(this, options);
|
45369
|
+
}
|
45262
45370
|
}
|
45263
45371
|
else {
|
45264
45372
|
this.visiblePages.forEach(function (page) { return page.updateRows(); });
|
@@ -46129,7 +46237,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46129
46237
|
return options.error ? new CustomError(options.error, this) : null;
|
46130
46238
|
};
|
46131
46239
|
SurveyModel.prototype.dynamicPanelAdded = function (question, panelIndex, panel) {
|
46132
|
-
if (!this.isLoadingFromJson && this.hasQuestionVisibleIndeces(question
|
46240
|
+
if (!this.isLoadingFromJson && this.hasQuestionVisibleIndeces(question)) {
|
46133
46241
|
this.updateVisibleIndexes(question.page);
|
46134
46242
|
}
|
46135
46243
|
if (this.onDynamicPanelAdded.isEmpty)
|
@@ -46146,7 +46254,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46146
46254
|
for (var i = 0; i < questions.length; i++) {
|
46147
46255
|
questions[i].clearOnDeletingContainer();
|
46148
46256
|
}
|
46149
|
-
if (this.hasQuestionVisibleIndeces(question
|
46257
|
+
if (this.hasQuestionVisibleIndeces(question)) {
|
46150
46258
|
this.updateVisibleIndexes(question.page);
|
46151
46259
|
}
|
46152
46260
|
this.onDynamicPanelRemoved.fire(this, {
|
@@ -46155,10 +46263,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
46155
46263
|
panel: panel,
|
46156
46264
|
});
|
46157
46265
|
};
|
46158
|
-
SurveyModel.prototype.hasQuestionVisibleIndeces = function (question
|
46159
|
-
if (checkIndex) {
|
46160
|
-
question.setVisibleIndex(this.getStartVisibleIndex());
|
46161
|
-
}
|
46266
|
+
SurveyModel.prototype.hasQuestionVisibleIndeces = function (question) {
|
46162
46267
|
var qList = question.getNestedQuestions(true);
|
46163
46268
|
for (var i = 0; i < qList.length; i++) {
|
46164
46269
|
if (qList[i].visibleIndex > -1)
|
@@ -47973,7 +48078,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
47973
48078
|
var doEncoding = params.doEncoding === undefined ? settings.web.encodeUrlParams : params.doEncoding;
|
47974
48079
|
var text = params.text;
|
47975
48080
|
if (params.runAtDesign || !this.isDesignMode) {
|
47976
|
-
text = this.textPreProcessor.process(text, params.returnDisplayValue === true, doEncoding);
|
48081
|
+
text = this.textPreProcessor.process(text, params.returnDisplayValue === true, doEncoding, params.replaceUndefinedValues);
|
47977
48082
|
}
|
47978
48083
|
var res = { text: text, hasAllValuesOnLastRun: true };
|
47979
48084
|
res.hasAllValuesOnLastRun = this.textPreProcessor.hasAllValuesOnLastRun;
|
@@ -51085,6 +51190,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
51085
51190
|
var chQuestion = this.choicesFromQuestion;
|
51086
51191
|
if (!!name && chQuestion && (name === chQuestion || questionName === chQuestion)) {
|
51087
51192
|
this.onVisibleChoicesChanged();
|
51193
|
+
this.clearIncorrectValues();
|
51088
51194
|
}
|
51089
51195
|
};
|
51090
51196
|
QuestionSelectBase.prototype.updateValueFromSurvey = function (newValue, clearData) {
|
@@ -56899,6 +57005,9 @@ var question_multipletext_QuestionMultipleTextModel = /** @class */ (function (_
|
|
56899
57005
|
QuestionMultipleTextModel.prototype.onSurveyLoad = function () {
|
56900
57006
|
this.editorsOnSurveyLoad();
|
56901
57007
|
_super.prototype.onSurveyLoad.call(this);
|
57008
|
+
if (!helpers_Helpers.isValueEmpty(this.rows)) {
|
57009
|
+
this.calcVisibleRows();
|
57010
|
+
}
|
56902
57011
|
};
|
56903
57012
|
QuestionMultipleTextModel.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
|
56904
57013
|
if (updateIsAnswered === void 0) { updateIsAnswered = true; }
|
@@ -66778,6 +66887,13 @@ var QuestionPanelDynamicItemTextProcessor = /** @class */ (function (_super) {
|
|
66778
66887
|
};
|
66779
66888
|
return QuestionPanelDynamicItemTextProcessor;
|
66780
66889
|
}(textPreProcessor_QuestionTextProcessor));
|
66890
|
+
var PanelDynamicTabbedMenuItem = /** @class */ (function (_super) {
|
66891
|
+
question_paneldynamic_extends(PanelDynamicTabbedMenuItem, _super);
|
66892
|
+
function PanelDynamicTabbedMenuItem(innerItem) {
|
66893
|
+
return _super.call(this, innerItem) || this;
|
66894
|
+
}
|
66895
|
+
return PanelDynamicTabbedMenuItem;
|
66896
|
+
}(action_Action));
|
66781
66897
|
var question_paneldynamic_QuestionPanelDynamicItem = /** @class */ (function () {
|
66782
66898
|
function QuestionPanelDynamicItem(data, panel) {
|
66783
66899
|
this.data = data;
|
@@ -68161,7 +68277,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
68161
68277
|
set: function (val) {
|
68162
68278
|
this.setPropertyValue("tabAlign", val);
|
68163
68279
|
if (this.isRenderModeTab) {
|
68164
|
-
this.
|
68280
|
+
this.tabbedMenu.containerCss = this.getTabbedMenuCss();
|
68165
68281
|
}
|
68166
68282
|
},
|
68167
68283
|
enumerable: false,
|
@@ -68181,18 +68297,6 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
68181
68297
|
enumerable: false,
|
68182
68298
|
configurable: true
|
68183
68299
|
});
|
68184
|
-
Object.defineProperty(QuestionPanelDynamicModel.prototype, "hasTitleOnLeftTop", {
|
68185
|
-
get: function () {
|
68186
|
-
if (this.isRenderModeTab && this.visiblePanelCount > 0)
|
68187
|
-
return true;
|
68188
|
-
if (!this.hasTitle)
|
68189
|
-
return false;
|
68190
|
-
var location = this.getTitleLocation();
|
68191
|
-
return location === "left" || location === "top";
|
68192
|
-
},
|
68193
|
-
enumerable: false,
|
68194
|
-
configurable: true
|
68195
|
-
});
|
68196
68300
|
QuestionPanelDynamicModel.prototype.setVisibleIndex = function (value) {
|
68197
68301
|
if (!this.isVisible)
|
68198
68302
|
return 0;
|
@@ -68579,8 +68683,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
68579
68683
|
for (var i = 0; i < panels.length; i++) {
|
68580
68684
|
panels[i].locStrsChanged();
|
68581
68685
|
}
|
68582
|
-
if (this.
|
68583
|
-
this.
|
68686
|
+
if (this.tabbedMenu) {
|
68687
|
+
this.tabbedMenu.locStrsChanged();
|
68584
68688
|
}
|
68585
68689
|
};
|
68586
68690
|
QuestionPanelDynamicModel.prototype.clearIncorrectValues = function () {
|
@@ -69316,14 +69420,16 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
69316
69420
|
get: function () {
|
69317
69421
|
var showTab = this.isRenderModeTab && !!this.visiblePanelCount;
|
69318
69422
|
return new CssClassBuilder()
|
69319
|
-
.append(this.cssClasses
|
69320
|
-
.append(this.cssClasses.
|
69321
|
-
.append(this.cssClasses.headerTab, showTab)
|
69423
|
+
.append(_super.prototype.getCssHeader.call(this, this.cssClasses))
|
69424
|
+
.append(this.cssClasses.headerTab, this.hasTitleOnTop && showTab)
|
69322
69425
|
.toString();
|
69323
69426
|
},
|
69324
69427
|
enumerable: false,
|
69325
69428
|
configurable: true
|
69326
69429
|
});
|
69430
|
+
QuestionPanelDynamicModel.prototype.getTabsContainerCss = function () {
|
69431
|
+
return new CssClassBuilder().append(this.cssClasses.tabsContainer).append(this.cssClasses.tabsContainerWithHeader, this.hasTitleOnTop).toString();
|
69432
|
+
};
|
69327
69433
|
QuestionPanelDynamicModel.prototype.getPanelWrapperCss = function (panel) {
|
69328
69434
|
return new CssClassBuilder()
|
69329
69435
|
.append(this.cssClasses.panelWrapper, !panel || panel.visible)
|
@@ -69386,25 +69492,29 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
69386
69492
|
return true;
|
69387
69493
|
return false;
|
69388
69494
|
};
|
69389
|
-
Object.defineProperty(QuestionPanelDynamicModel.prototype, "
|
69495
|
+
Object.defineProperty(QuestionPanelDynamicModel.prototype, "hasTabbedMenu", {
|
69390
69496
|
get: function () {
|
69391
69497
|
return this.isRenderModeTab && this.visiblePanels.length > 0;
|
69392
69498
|
},
|
69393
69499
|
enumerable: false,
|
69394
69500
|
configurable: true
|
69395
69501
|
});
|
69396
|
-
QuestionPanelDynamicModel.prototype
|
69397
|
-
|
69398
|
-
|
69399
|
-
|
69400
|
-
this.
|
69401
|
-
|
69402
|
-
|
69403
|
-
|
69404
|
-
|
69405
|
-
|
69406
|
-
|
69407
|
-
|
69502
|
+
Object.defineProperty(QuestionPanelDynamicModel.prototype, "tabbedMenu", {
|
69503
|
+
get: function () {
|
69504
|
+
if (!this.isRenderModeTab)
|
69505
|
+
return null;
|
69506
|
+
if (!this.tabbedMenuValue) {
|
69507
|
+
this.tabbedMenuValue = new adaptive_container_AdaptiveActionContainer();
|
69508
|
+
this.tabbedMenuValue.dotsItem.popupModel.showPointer = false;
|
69509
|
+
this.tabbedMenuValue.dotsItem.popupModel.verticalPosition = "bottom";
|
69510
|
+
this.tabbedMenuValue.dotsItem.popupModel.horizontalPosition = "center";
|
69511
|
+
this.updateElementCss(false);
|
69512
|
+
}
|
69513
|
+
return this.tabbedMenuValue;
|
69514
|
+
},
|
69515
|
+
enumerable: false,
|
69516
|
+
configurable: true
|
69517
|
+
});
|
69408
69518
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "footerToolbar", {
|
69409
69519
|
get: function () {
|
69410
69520
|
if (!this.footerToolbarValue) {
|
@@ -69499,19 +69609,21 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
69499
69609
|
return options.title;
|
69500
69610
|
};
|
69501
69611
|
locTitle.sharedData = this.locTemplateTabTitle;
|
69502
|
-
var
|
69503
|
-
var
|
69504
|
-
|
69612
|
+
var panelId = panel.id;
|
69613
|
+
var isActive = this.getPanelVisibleIndexById(panelId) === this.currentIndex;
|
69614
|
+
var newItem = new PanelDynamicTabbedMenuItem({
|
69615
|
+
id: this.id + "_tab_" + panelId,
|
69616
|
+
panelId: panelId,
|
69505
69617
|
pressed: isActive,
|
69506
69618
|
locTitle: locTitle,
|
69507
69619
|
disableHide: isActive,
|
69508
69620
|
action: function () {
|
69509
|
-
_this.currentIndex = _this.getPanelVisibleIndexById(
|
69621
|
+
_this.currentIndex = _this.getPanelVisibleIndexById(panelId);
|
69510
69622
|
}
|
69511
69623
|
});
|
69512
69624
|
return newItem;
|
69513
69625
|
};
|
69514
|
-
QuestionPanelDynamicModel.prototype.
|
69626
|
+
QuestionPanelDynamicModel.prototype.getTabbedMenuCss = function (cssClasses) {
|
69515
69627
|
var css = cssClasses !== null && cssClasses !== void 0 ? cssClasses : this.cssClasses;
|
69516
69628
|
return new CssClassBuilder()
|
69517
69629
|
.append(css.tabsRoot)
|
@@ -69526,8 +69638,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
69526
69638
|
if (this.currentIndex < 0 || this.currentIndex >= this.visiblePanelCount)
|
69527
69639
|
return;
|
69528
69640
|
var panel = this.visiblePanelsCore[this.currentIndex];
|
69529
|
-
this.
|
69530
|
-
var isActive = action.
|
69641
|
+
this.tabbedMenu.renderedActions.forEach(function (action) {
|
69642
|
+
var isActive = action.panelId === panel.id;
|
69531
69643
|
action.pressed = isActive;
|
69532
69644
|
action.disableHide = isActive;
|
69533
69645
|
//should raise update if dimensions are not changed but action is active now
|
@@ -69549,22 +69661,22 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
69549
69661
|
for (var i = 0; i < visPanels.length; i++) {
|
69550
69662
|
_loop_1(i);
|
69551
69663
|
}
|
69552
|
-
this.
|
69664
|
+
this.tabbedMenu.setItems(items);
|
69553
69665
|
};
|
69554
69666
|
QuestionPanelDynamicModel.prototype.addTabFromToolbar = function (panel, index) {
|
69555
69667
|
if (!this.isRenderModeTab)
|
69556
69668
|
return;
|
69557
69669
|
var newItem = this.createTabByPanel(panel, index);
|
69558
|
-
this.
|
69670
|
+
this.tabbedMenu.actions.splice(index, 0, newItem);
|
69559
69671
|
this.updateTabToolbarItemsPressedState();
|
69560
69672
|
};
|
69561
69673
|
QuestionPanelDynamicModel.prototype.removeTabFromToolbar = function (panel) {
|
69562
69674
|
if (!this.isRenderModeTab)
|
69563
69675
|
return;
|
69564
|
-
var removedItem = this.
|
69676
|
+
var removedItem = this.tabbedMenu.actions.find(function (a) { return a.panelId == panel.id; });
|
69565
69677
|
if (!removedItem)
|
69566
69678
|
return;
|
69567
|
-
this.
|
69679
|
+
this.tabbedMenu.actions.splice(this.tabbedMenu.actions.indexOf(removedItem), 1);
|
69568
69680
|
this.updateTabToolbarItemsPressedState();
|
69569
69681
|
};
|
69570
69682
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "showLegacyNavigation", {
|
@@ -69588,12 +69700,12 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
69588
69700
|
};
|
69589
69701
|
QuestionPanelDynamicModel.prototype.calcCssClasses = function (css) {
|
69590
69702
|
var classes = _super.prototype.calcCssClasses.call(this, css);
|
69591
|
-
var
|
69592
|
-
if (!!
|
69593
|
-
|
69594
|
-
|
69595
|
-
|
69596
|
-
|
69703
|
+
var tabbedMenu = this.tabbedMenu;
|
69704
|
+
if (!!tabbedMenu) {
|
69705
|
+
tabbedMenu.containerCss = this.getTabbedMenuCss(classes);
|
69706
|
+
tabbedMenu.cssClasses = classes.tabs;
|
69707
|
+
tabbedMenu.dotsItem.cssClasses = classes.tabs;
|
69708
|
+
tabbedMenu.dotsItem.popupModel.contentComponentData.model.cssClasses = css.list;
|
69597
69709
|
}
|
69598
69710
|
return classes;
|
69599
69711
|
};
|
@@ -69715,21 +69827,10 @@ Serializer.addClass("paneldynamic", [
|
|
69715
69827
|
default: "off",
|
69716
69828
|
choices: ["off", "onPanel", "onSurvey"],
|
69717
69829
|
},
|
69718
|
-
{
|
69719
|
-
name: "showRangeInProgress:boolean",
|
69720
|
-
default: true,
|
69721
|
-
visible: false
|
69722
|
-
// visibleIf: (obj: any) => { return obj.displayMode !== "list"; }
|
69723
|
-
},
|
69724
|
-
{
|
69725
|
-
name: "renderMode",
|
69726
|
-
default: "list",
|
69727
|
-
choices: ["list", "progressTop", "progressBottom", "progressTopBottom", "tab"],
|
69728
|
-
visible: false,
|
69729
|
-
},
|
69830
|
+
{ name: "renderMode", visible: false, isSerializable: false },
|
69730
69831
|
{ name: "displayMode", default: "list", choices: ["list", "carousel", "tab"] },
|
69731
69832
|
{
|
69732
|
-
name: "showProgressBar:boolean",
|
69833
|
+
name: "showProgressBar:boolean", alternativeName: "showRangeInProgress",
|
69733
69834
|
default: true,
|
69734
69835
|
visibleIf: function (obj) { return obj.displayMode === "carousel"; }
|
69735
69836
|
},
|
@@ -72632,9 +72733,9 @@ Serializer.addClass("currencymask", [
|
|
72632
72733
|
|
72633
72734
|
var Version;
|
72634
72735
|
var ReleaseDate;
|
72635
|
-
Version = "" + "1.12.
|
72736
|
+
Version = "" + "1.12.23";
|
72636
72737
|
settings.version = Version;
|
72637
|
-
ReleaseDate = "" + "2025-
|
72738
|
+
ReleaseDate = "" + "2025-02-11";
|
72638
72739
|
function checkLibraryVersion(ver, libraryName) {
|
72639
72740
|
if (Version != ver) {
|
72640
72741
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -89674,6 +89775,8 @@ var reactquestion_paneldynamic_SurveyQuestionPanelDynamic = /** @class */ (funct
|
|
89674
89775
|
var navV2 = this.renderNavigatorV2();
|
89675
89776
|
var noEntriesPlaceholder = this.renderPlaceholder();
|
89676
89777
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: this.question.cssClasses.root },
|
89778
|
+
this.question.hasTabbedMenu ? external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: this.question.getTabsContainerCss() },
|
89779
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](action_bar_SurveyActionBar, { model: this.question.tabbedMenu })) : null,
|
89677
89780
|
noEntriesPlaceholder,
|
89678
89781
|
navTop,
|
89679
89782
|
external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: this.question.cssClasses.panelsContainer }, panels),
|