survey-core 1.12.19 → 1.12.20
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 +1 -1
- package/defaultV2.fontless.css +1 -1
- package/defaultV2.fontless.min.css +1 -1
- package/defaultV2.min.css +1 -1
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/burmese.js +1 -1
- package/i18n/burmese.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/philippines.js +1 -1
- package/i18n/philippines.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/icons/iconsV1.js +1 -1
- package/icons/iconsV1.min.js +1 -1
- package/icons/iconsV2.js +1 -1
- package/icons/iconsV2.min.js +1 -1
- package/modern.css +1 -1
- package/modern.fontless.css +1 -1
- package/modern.fontless.min.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/plugins/bootstrap-integration/index.js +1 -1
- package/plugins/bootstrap-integration/index.min.js +1 -1
- package/plugins/bootstrap-material-integration/index.js +1 -1
- package/plugins/bootstrap-material-integration/index.min.js +1 -1
- package/survey.core.js +138 -57
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js +1 -1
- package/survey.min.css +1 -1
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/ts3.4/typings/packages/survey-core/src/question.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/question_rating.d.ts +11 -4
- package/ts3.4/typings/packages/survey-core/src/question_text.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/survey.d.ts +2 -1
- package/typings/packages/survey-core/src/question.d.ts +1 -0
- package/typings/packages/survey-core/src/question_rating.d.ts +11 -4
- package/typings/packages/survey-core/src/question_text.d.ts +1 -0
- package/typings/packages/survey-core/src/survey.d.ts +2 -1
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.12.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.20
|
|
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
|
*/
|
|
@@ -8694,8 +8694,15 @@ var base_Base = /** @class */ (function () {
|
|
|
8694
8694
|
if (!!calcFunc) {
|
|
8695
8695
|
var newVal = calcFunc();
|
|
8696
8696
|
if (newVal !== undefined) {
|
|
8697
|
-
|
|
8698
|
-
|
|
8697
|
+
if (Array.isArray(newVal)) {
|
|
8698
|
+
var array = this.createNewArray(name);
|
|
8699
|
+
array.splice.apply(array, base_spreadArray([0, 0], newVal));
|
|
8700
|
+
return array;
|
|
8701
|
+
}
|
|
8702
|
+
else {
|
|
8703
|
+
this.setPropertyValueDirectly(name, newVal);
|
|
8704
|
+
return newVal;
|
|
8705
|
+
}
|
|
8699
8706
|
}
|
|
8700
8707
|
}
|
|
8701
8708
|
var propDefaultValue = this.getDefaultPropertyValue(name);
|
|
@@ -17808,7 +17815,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
17808
17815
|
this.ensureSetValueExpressionRunner();
|
|
17809
17816
|
if (!this.setValueExpressionRunner)
|
|
17810
17817
|
return false;
|
|
17811
|
-
return
|
|
17818
|
+
return this.canExecuteTriggerByKeys(keys, this.setValueExpressionRunner);
|
|
17812
17819
|
};
|
|
17813
17820
|
Question.prototype.addTriggerInfo = function (name, canRun, doComplete) {
|
|
17814
17821
|
var info = new TriggerExpressionInfo(name, canRun, doComplete);
|
|
@@ -17835,11 +17842,17 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
17835
17842
|
else {
|
|
17836
17843
|
info.runner.expression = expression;
|
|
17837
17844
|
}
|
|
17838
|
-
if (!
|
|
17845
|
+
if (!this.canExecuteTriggerByKeys(keys, info.runner) && !info.runSecondCheck(keys))
|
|
17839
17846
|
return;
|
|
17840
17847
|
info.isRunning = true;
|
|
17841
17848
|
info.runner.run(this.getDataFilteredValues(), this.getDataFilteredProperties());
|
|
17842
17849
|
};
|
|
17850
|
+
Question.prototype.canExecuteTriggerByKeys = function (keys, runner) {
|
|
17851
|
+
var vars = runner.getVariables();
|
|
17852
|
+
if ((!vars || vars.length === 0) && runner.hasFunction())
|
|
17853
|
+
return true;
|
|
17854
|
+
return new conditionProcessValue_ProcessValue().isAnyKeyChanged(keys, vars);
|
|
17855
|
+
};
|
|
17843
17856
|
Question.prototype.runTriggers = function (name, value, keys) {
|
|
17844
17857
|
var _this = this;
|
|
17845
17858
|
if (this.isSettingQuestionValue || (this.parentQuestion && this.parentQuestion.getValueName() === name))
|
|
@@ -26321,6 +26334,9 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
|
26321
26334
|
},
|
|
26322
26335
|
getEnterOptions: function (_, info) {
|
|
26323
26336
|
return { cssClass: _this.cssClasses.rowEnter, onBeforeRunAnimation: onBeforeRunAnimation, onAfterRunAnimation: onAfterRunAnimation };
|
|
26337
|
+
},
|
|
26338
|
+
getKey: function (item) {
|
|
26339
|
+
return item.id;
|
|
26324
26340
|
}
|
|
26325
26341
|
};
|
|
26326
26342
|
};
|
|
@@ -38361,11 +38377,6 @@ function createTOCListModel(survey, onAction) {
|
|
|
38361
38377
|
var items = getTOCItems(survey, onAction);
|
|
38362
38378
|
var listOptions = {
|
|
38363
38379
|
items: items,
|
|
38364
|
-
onSelectionChanged: function (item) {
|
|
38365
|
-
if (!!item.action()) {
|
|
38366
|
-
listModel.selectedItem = item;
|
|
38367
|
-
}
|
|
38368
|
-
},
|
|
38369
38380
|
searchEnabled: false,
|
|
38370
38381
|
locOwner: survey,
|
|
38371
38382
|
};
|
|
@@ -38398,7 +38409,6 @@ function getTOCItems(survey, onAction) {
|
|
|
38398
38409
|
if (page.isPage) {
|
|
38399
38410
|
return survey.tryNavigateToPage(page);
|
|
38400
38411
|
}
|
|
38401
|
-
return tryFocusPage(survey, page);
|
|
38402
38412
|
},
|
|
38403
38413
|
visible: new ComputedUpdater(function () {
|
|
38404
38414
|
return page.isVisible && !(page["isStartPage"]);
|
|
@@ -42278,7 +42288,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
42278
42288
|
enumerable: false,
|
|
42279
42289
|
configurable: true
|
|
42280
42290
|
});
|
|
42281
|
-
SurveyModel.prototype.tryNavigateToPage = function (page) {
|
|
42291
|
+
SurveyModel.prototype.tryNavigateToPage = function (page /*, serverValidationRes?: (res: boolean)=> void*/) {
|
|
42292
|
+
if (!this.performValidationOnPageChanging(page))
|
|
42293
|
+
return false;
|
|
42294
|
+
var index = this.visiblePages.indexOf(page);
|
|
42295
|
+
var res = index < this.currentPageNo || !this.doServerValidation(false, false, page);
|
|
42296
|
+
if (res) {
|
|
42297
|
+
this.currentPage = page;
|
|
42298
|
+
}
|
|
42299
|
+
return res;
|
|
42300
|
+
};
|
|
42301
|
+
SurveyModel.prototype.performValidationOnPageChanging = function (page) {
|
|
42282
42302
|
if (this.isDesignMode)
|
|
42283
42303
|
return false;
|
|
42284
42304
|
var index = this.visiblePages.indexOf(page);
|
|
@@ -42286,10 +42306,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
42286
42306
|
return false;
|
|
42287
42307
|
if (index === this.currentPageNo)
|
|
42288
42308
|
return false;
|
|
42289
|
-
if (index < this.currentPageNo || this.checkErrorsMode === "onComplete" || this.validationAllowSwitchPages)
|
|
42290
|
-
this.currentPageNo = index;
|
|
42309
|
+
if (index < this.currentPageNo || this.checkErrorsMode === "onComplete" || this.validationAllowSwitchPages)
|
|
42291
42310
|
return true;
|
|
42292
|
-
}
|
|
42293
42311
|
if (!this.validateCurrentPage())
|
|
42294
42312
|
return false;
|
|
42295
42313
|
for (var i = this.currentPageNo + 1; i < index; i++) {
|
|
@@ -42298,7 +42316,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
42298
42316
|
return false;
|
|
42299
42317
|
page_1.passed = true;
|
|
42300
42318
|
}
|
|
42301
|
-
this.currentPage = page;
|
|
42302
42319
|
return true;
|
|
42303
42320
|
};
|
|
42304
42321
|
SurveyModel.prototype.updateCurrentPage = function () {
|
|
@@ -43841,14 +43858,14 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43841
43858
|
this.setPropertyValue("isValidatingOnServer", val);
|
|
43842
43859
|
this.onIsValidatingOnServerChanged();
|
|
43843
43860
|
};
|
|
43844
|
-
SurveyModel.prototype.createServerValidationOptions = function (doComplete, isPreview) {
|
|
43861
|
+
SurveyModel.prototype.createServerValidationOptions = function (doComplete, isPreview, page) {
|
|
43845
43862
|
var self = this;
|
|
43846
43863
|
var options = {
|
|
43847
43864
|
data: {},
|
|
43848
43865
|
errors: {},
|
|
43849
43866
|
survey: this,
|
|
43850
43867
|
complete: function () {
|
|
43851
|
-
self.completeServerValidation(options, isPreview);
|
|
43868
|
+
self.completeServerValidation(options, isPreview, page);
|
|
43852
43869
|
},
|
|
43853
43870
|
};
|
|
43854
43871
|
if (doComplete && this.isValidateOnComplete) {
|
|
@@ -43868,7 +43885,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43868
43885
|
return options;
|
|
43869
43886
|
};
|
|
43870
43887
|
SurveyModel.prototype.onIsValidatingOnServerChanged = function () { };
|
|
43871
|
-
SurveyModel.prototype.doServerValidation = function (doComplete, isPreview) {
|
|
43888
|
+
SurveyModel.prototype.doServerValidation = function (doComplete, isPreview, page) {
|
|
43872
43889
|
var _this = this;
|
|
43873
43890
|
if (isPreview === void 0) { isPreview = false; }
|
|
43874
43891
|
if (!this.onServerValidateQuestions ||
|
|
@@ -43880,14 +43897,14 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43880
43897
|
var isFunc = typeof this.onServerValidateQuestions === "function";
|
|
43881
43898
|
this.serverValidationEventCount = !isFunc ? this.onServerValidateQuestions.length : 1;
|
|
43882
43899
|
if (isFunc) {
|
|
43883
|
-
this.onServerValidateQuestions(this, this.createServerValidationOptions(doComplete, isPreview));
|
|
43900
|
+
this.onServerValidateQuestions(this, this.createServerValidationOptions(doComplete, isPreview, page));
|
|
43884
43901
|
}
|
|
43885
43902
|
else {
|
|
43886
|
-
this.onServerValidateQuestions.fireByCreatingOptions(this, function () { return _this.createServerValidationOptions(doComplete, isPreview); });
|
|
43903
|
+
this.onServerValidateQuestions.fireByCreatingOptions(this, function () { return _this.createServerValidationOptions(doComplete, isPreview, page); });
|
|
43887
43904
|
}
|
|
43888
43905
|
return true;
|
|
43889
43906
|
};
|
|
43890
|
-
SurveyModel.prototype.completeServerValidation = function (options, isPreview) {
|
|
43907
|
+
SurveyModel.prototype.completeServerValidation = function (options, isPreview, page) {
|
|
43891
43908
|
if (this.serverValidationEventCount > 1) {
|
|
43892
43909
|
this.serverValidationEventCount--;
|
|
43893
43910
|
if (!!options && !!options.errors && Object.keys(options.errors).length === 0)
|
|
@@ -43922,10 +43939,15 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43922
43939
|
this.showPreviewCore();
|
|
43923
43940
|
}
|
|
43924
43941
|
else {
|
|
43925
|
-
if (
|
|
43926
|
-
|
|
43927
|
-
|
|
43928
|
-
|
|
43942
|
+
if (page) {
|
|
43943
|
+
this.currentPage = page;
|
|
43944
|
+
}
|
|
43945
|
+
else {
|
|
43946
|
+
if (self.isLastPage)
|
|
43947
|
+
self.doComplete();
|
|
43948
|
+
else
|
|
43949
|
+
self.doNextPage();
|
|
43950
|
+
}
|
|
43929
43951
|
}
|
|
43930
43952
|
}
|
|
43931
43953
|
};
|
|
@@ -53790,6 +53812,11 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
|
53790
53812
|
this.setRenderedMinMax(values, properties);
|
|
53791
53813
|
}
|
|
53792
53814
|
};
|
|
53815
|
+
QuestionTextModel.prototype.getDisplayValueCore = function (keysAsText, value) {
|
|
53816
|
+
if (!this.maskTypeIsEmpty && !helpers_Helpers.isValueEmpty(value))
|
|
53817
|
+
return this.maskInstance.getMaskedValue(value);
|
|
53818
|
+
return _super.prototype.getDisplayValueCore.call(this, keysAsText, value);
|
|
53819
|
+
};
|
|
53793
53820
|
QuestionTextModel.prototype.isLayoutTypeSupported = function (layoutType) {
|
|
53794
53821
|
return true;
|
|
53795
53822
|
};
|
|
@@ -61218,24 +61245,24 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
61218
61245
|
function QuestionRatingModel(name) {
|
|
61219
61246
|
var _this = _super.call(this, name) || this;
|
|
61220
61247
|
_this._syncPropertiesChanging = false;
|
|
61248
|
+
_this.iCounter = 0;
|
|
61221
61249
|
_this.createItemValues("rateValues");
|
|
61222
|
-
_this.createRenderedRateItems();
|
|
61223
61250
|
_this.createLocalizableString("ratingOptionsCaption", _this, false, true);
|
|
61224
61251
|
_this.registerFunctionOnPropertiesValueChanged(["rateMin", "rateMax",
|
|
61225
|
-
"minRateDescription", "maxRateDescription", "rateStep", "displayRateDescriptionsAsExtremeItems"], function () { return _this.
|
|
61252
|
+
"minRateDescription", "maxRateDescription", "rateStep", "displayRateDescriptionsAsExtremeItems"], function () { return _this.resetRenderedItems(); });
|
|
61226
61253
|
_this.registerFunctionOnPropertiesValueChanged(["rateType"], function () {
|
|
61227
61254
|
_this.setIconsToRateValues();
|
|
61228
|
-
_this.
|
|
61255
|
+
_this.resetRenderedItems();
|
|
61229
61256
|
_this.updateRateCount();
|
|
61230
61257
|
});
|
|
61231
61258
|
_this.registerFunctionOnPropertiesValueChanged(["rateValues"], function () {
|
|
61232
61259
|
_this.setIconsToRateValues();
|
|
61233
|
-
_this.
|
|
61260
|
+
_this.resetRenderedItems();
|
|
61234
61261
|
});
|
|
61235
61262
|
_this.registerSychProperties(["rateValues"], function () {
|
|
61236
61263
|
_this.autoGenerate = _this.rateValues.length == 0;
|
|
61237
61264
|
_this.setIconsToRateValues();
|
|
61238
|
-
_this.
|
|
61265
|
+
_this.resetRenderedItems();
|
|
61239
61266
|
});
|
|
61240
61267
|
_this.registerFunctionOnPropertiesValueChanged(["rateColorMode", "scaleColorMode"], function () {
|
|
61241
61268
|
_this.updateColors(_this.survey.themeVariables);
|
|
@@ -61251,7 +61278,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
61251
61278
|
_this.rateValues.splice(0, _this.rateValues.length);
|
|
61252
61279
|
_this.updateRateMax();
|
|
61253
61280
|
}
|
|
61254
|
-
_this.
|
|
61281
|
+
_this.resetRenderedItems();
|
|
61255
61282
|
});
|
|
61256
61283
|
_this.createLocalizableString("minRateDescription", _this, true)
|
|
61257
61284
|
.onStringChanged.add(function (sender, options) {
|
|
@@ -61282,7 +61309,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
61282
61309
|
this.autoGenerate = !this.jsonObj.rateValues.length;
|
|
61283
61310
|
this.updateRateCount();
|
|
61284
61311
|
this.setIconsToRateValues();
|
|
61285
|
-
this.createRenderedRateItems();
|
|
61286
61312
|
};
|
|
61287
61313
|
QuestionRatingModel.prototype.registerSychProperties = function (names, func) {
|
|
61288
61314
|
var _this = this;
|
|
@@ -61386,7 +61412,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
61386
61412
|
},
|
|
61387
61413
|
set: function (val) {
|
|
61388
61414
|
this.setPropertyValue("rateValues", val);
|
|
61389
|
-
this.createRenderedRateItems();
|
|
61390
61415
|
},
|
|
61391
61416
|
enumerable: false,
|
|
61392
61417
|
configurable: true
|
|
@@ -61495,6 +61520,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
61495
61520
|
QuestionRatingModel.normalColorLight = getRGBColor("--sjs-special-yellow-light", "--sd-rating-normal-color-light");
|
|
61496
61521
|
QuestionRatingModel.goodColorLight = getRGBColor("--sjs-special-green-light", "--sd-rating-good-color-light");
|
|
61497
61522
|
this.colorsCalculated = true;
|
|
61523
|
+
this.resetRenderedItems();
|
|
61498
61524
|
};
|
|
61499
61525
|
QuestionRatingModel.prototype.getDisplayValueCore = function (keysAsText, value) {
|
|
61500
61526
|
if (!this.useRateValues)
|
|
@@ -61515,22 +61541,55 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
61515
61541
|
this.autoGenerate = false;
|
|
61516
61542
|
_super.prototype.itemValuePropertyChanged.call(this, item, name, oldValue, newValue);
|
|
61517
61543
|
};
|
|
61518
|
-
QuestionRatingModel.prototype.
|
|
61519
|
-
|
|
61520
|
-
|
|
61521
|
-
|
|
61522
|
-
|
|
61544
|
+
QuestionRatingModel.prototype.runConditionCore = function (values, properties) {
|
|
61545
|
+
_super.prototype.runConditionCore.call(this, values, properties);
|
|
61546
|
+
this.runRateItesmCondition(values, properties);
|
|
61547
|
+
};
|
|
61548
|
+
QuestionRatingModel.prototype.runRateItesmCondition = function (values, properties) {
|
|
61549
|
+
var _a;
|
|
61550
|
+
if (!this.useRateValues())
|
|
61551
|
+
return;
|
|
61552
|
+
var isChanged = false;
|
|
61553
|
+
if ((_a = this.survey) === null || _a === void 0 ? void 0 : _a.areInvisibleElementsShowing) {
|
|
61554
|
+
this.rateValues.forEach(function (item) {
|
|
61555
|
+
isChanged = isChanged || !item.isVisible;
|
|
61556
|
+
item.setIsVisible(item, true);
|
|
61557
|
+
});
|
|
61523
61558
|
}
|
|
61524
61559
|
else {
|
|
61525
|
-
|
|
61560
|
+
isChanged = itemvalue_ItemValue.runConditionsForItems(this.rateValues, undefined, undefined, values, properties, true);
|
|
61526
61561
|
}
|
|
61527
|
-
if (
|
|
61528
|
-
this.
|
|
61562
|
+
if (isChanged) {
|
|
61563
|
+
this.resetRenderedItems();
|
|
61564
|
+
if (!this.isEmpty() && !this.isReadOnly) {
|
|
61565
|
+
var item = itemvalue_ItemValue.getItemByValue(this.rateValues, this.value);
|
|
61566
|
+
if (item && !item.isVisible) {
|
|
61567
|
+
this.clearValue();
|
|
61568
|
+
}
|
|
61569
|
+
}
|
|
61529
61570
|
}
|
|
61571
|
+
};
|
|
61572
|
+
QuestionRatingModel.prototype.getRateValuesCore = function () {
|
|
61573
|
+
if (!this.useRateValues())
|
|
61574
|
+
return this.createRateValues();
|
|
61575
|
+
var items = new Array();
|
|
61576
|
+
this.rateValues.forEach(function (item) {
|
|
61577
|
+
if (item.isVisible) {
|
|
61578
|
+
items.push(item);
|
|
61579
|
+
}
|
|
61580
|
+
});
|
|
61581
|
+
return items;
|
|
61582
|
+
};
|
|
61583
|
+
QuestionRatingModel.prototype.calculateRateValues = function () {
|
|
61584
|
+
var rateValues = this.getRateValuesCore();
|
|
61530
61585
|
if (this.rateType == "smileys" && rateValues.length > 10)
|
|
61531
61586
|
rateValues = rateValues.slice(0, 10);
|
|
61532
|
-
|
|
61533
|
-
|
|
61587
|
+
return rateValues;
|
|
61588
|
+
};
|
|
61589
|
+
QuestionRatingModel.prototype.calculateRenderedRateItems = function () {
|
|
61590
|
+
var _this = this;
|
|
61591
|
+
var rateValues = this.calculateRateValues();
|
|
61592
|
+
return rateValues.map(function (v, i) {
|
|
61534
61593
|
var renderedItem = null;
|
|
61535
61594
|
if (_this.displayRateDescriptionsAsExtremeItems) {
|
|
61536
61595
|
if (i == 0)
|
|
@@ -61543,6 +61602,39 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
61543
61602
|
return renderedItem;
|
|
61544
61603
|
});
|
|
61545
61604
|
};
|
|
61605
|
+
QuestionRatingModel.prototype.calculateVisibleChoices = function () {
|
|
61606
|
+
var _this = this;
|
|
61607
|
+
var rateValues = this.calculateRateValues();
|
|
61608
|
+
return rateValues.map(function (i, idx) { return _this.getRatingItemValue(i, idx); });
|
|
61609
|
+
};
|
|
61610
|
+
QuestionRatingModel.prototype.resetRenderedItems = function () {
|
|
61611
|
+
if (this.autoGenerate) {
|
|
61612
|
+
var rateValues = this.getRateValuesCore();
|
|
61613
|
+
this.rateMax = rateValues[rateValues.length - 1].value;
|
|
61614
|
+
}
|
|
61615
|
+
if (Array.isArray(this.getPropertyValueWithoutDefault("renderedRateItems"))) {
|
|
61616
|
+
this.setArrayPropertyDirectly("renderedRateItems", this.calculateRenderedRateItems());
|
|
61617
|
+
}
|
|
61618
|
+
if (Array.isArray(this.getPropertyValueWithoutDefault("visibleChoices"))) {
|
|
61619
|
+
this.setArrayPropertyDirectly("visibleChoices", this.calculateVisibleChoices);
|
|
61620
|
+
}
|
|
61621
|
+
};
|
|
61622
|
+
Object.defineProperty(QuestionRatingModel.prototype, "renderedRateItems", {
|
|
61623
|
+
get: function () {
|
|
61624
|
+
var _this = this;
|
|
61625
|
+
return this.getPropertyValue("renderedRateItems", undefined, function () { return _this.calculateRenderedRateItems(); });
|
|
61626
|
+
},
|
|
61627
|
+
enumerable: false,
|
|
61628
|
+
configurable: true
|
|
61629
|
+
});
|
|
61630
|
+
Object.defineProperty(QuestionRatingModel.prototype, "visibleChoices", {
|
|
61631
|
+
get: function () {
|
|
61632
|
+
var _this = this;
|
|
61633
|
+
return this.getPropertyValue("visibleChoices", undefined, function () { return _this.calculateVisibleChoices(); });
|
|
61634
|
+
},
|
|
61635
|
+
enumerable: false,
|
|
61636
|
+
configurable: true
|
|
61637
|
+
});
|
|
61546
61638
|
QuestionRatingModel.prototype.createRateValues = function () {
|
|
61547
61639
|
var res = [];
|
|
61548
61640
|
var value = this.rateMin;
|
|
@@ -62016,13 +62108,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
62016
62108
|
QuestionRatingModel.prototype.isItemSelected = function (item) {
|
|
62017
62109
|
return item.value == this.value;
|
|
62018
62110
|
};
|
|
62019
|
-
Object.defineProperty(QuestionRatingModel.prototype, "visibleChoices", {
|
|
62020
|
-
get: function () {
|
|
62021
|
-
return this.visibleChoicesValue;
|
|
62022
|
-
},
|
|
62023
|
-
enumerable: false,
|
|
62024
|
-
configurable: true
|
|
62025
|
-
});
|
|
62026
62111
|
Object.defineProperty(QuestionRatingModel.prototype, "readOnlyText", {
|
|
62027
62112
|
get: function () {
|
|
62028
62113
|
if (this.readOnly)
|
|
@@ -62091,7 +62176,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
62091
62176
|
QuestionRatingModel.prototype.themeChanged = function (theme) {
|
|
62092
62177
|
this.colorsCalculated = false;
|
|
62093
62178
|
this.updateColors(theme.cssVariables);
|
|
62094
|
-
this.createRenderedRateItems();
|
|
62095
62179
|
};
|
|
62096
62180
|
QuestionRatingModel.prototype.setSurveyImpl = function (value, isLight) {
|
|
62097
62181
|
_super.prototype.setSurveyImpl.call(this, value, isLight);
|
|
@@ -62117,9 +62201,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
62117
62201
|
question_rating_decorate([
|
|
62118
62202
|
jsonobject_property()
|
|
62119
62203
|
], QuestionRatingModel.prototype, "rateCount", void 0);
|
|
62120
|
-
question_rating_decorate([
|
|
62121
|
-
propertyArray()
|
|
62122
|
-
], QuestionRatingModel.prototype, "renderedRateItems", void 0);
|
|
62123
62204
|
question_rating_decorate([
|
|
62124
62205
|
jsonobject_property({ defaultValue: false })
|
|
62125
62206
|
], QuestionRatingModel.prototype, "hasMinRateDescription", void 0);
|
|
@@ -70827,9 +70908,9 @@ Serializer.addClass("currencymask", [
|
|
|
70827
70908
|
|
|
70828
70909
|
var Version;
|
|
70829
70910
|
var ReleaseDate;
|
|
70830
|
-
Version = "" + "1.12.
|
|
70911
|
+
Version = "" + "1.12.20";
|
|
70831
70912
|
settings.version = Version;
|
|
70832
|
-
ReleaseDate = "" + "2025-01-
|
|
70913
|
+
ReleaseDate = "" + "2025-01-21";
|
|
70833
70914
|
function checkLibraryVersion(ver, libraryName) {
|
|
70834
70915
|
if (Version != ver) {
|
|
70835
70916
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|