survey-core 1.12.16 → 1.12.18
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 +2 -2
- package/defaultV2.fontless.css +2 -2
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +2 -2
- package/i18n/arabic.min.js +2 -2
- package/i18n/basque.js +2 -2
- package/i18n/basque.min.js +2 -2
- package/i18n/bulgarian.js +2 -2
- package/i18n/bulgarian.min.js +2 -2
- package/i18n/burmese.js +218 -0
- package/i18n/burmese.js.map +1 -0
- package/i18n/burmese.min.js +6 -0
- package/i18n/catalan.js +2 -2
- package/i18n/catalan.min.js +3 -3
- package/i18n/croatian.js +2 -2
- package/i18n/croatian.min.js +3 -3
- package/i18n/czech.js +2 -2
- package/i18n/czech.min.js +3 -3
- package/i18n/danish.js +2 -2
- package/i18n/danish.min.js +3 -3
- package/i18n/dutch.js +2 -2
- package/i18n/dutch.min.js +2 -2
- package/i18n/english.js +2 -2
- package/i18n/english.min.js +3 -3
- package/i18n/estonian.js +2 -2
- package/i18n/estonian.min.js +3 -3
- package/i18n/finnish.js +2 -2
- package/i18n/finnish.min.js +3 -3
- package/i18n/french.js +2 -2
- package/i18n/french.min.js +3 -3
- package/i18n/georgian.js +2 -2
- package/i18n/georgian.min.js +3 -3
- package/i18n/german.js +2 -2
- package/i18n/german.min.js +3 -3
- package/i18n/greek.js +2 -2
- package/i18n/greek.min.js +3 -3
- package/i18n/hebrew.js +2 -2
- package/i18n/hebrew.min.js +3 -3
- package/i18n/hindi.js +2 -2
- package/i18n/hindi.min.js +3 -3
- package/i18n/hungarian.js +2 -2
- package/i18n/hungarian.min.js +3 -3
- package/i18n/icelandic.js +2 -2
- package/i18n/icelandic.min.js +3 -3
- package/i18n/index.js +107 -2
- package/i18n/index.js.map +1 -1
- package/i18n/index.min.js +3 -3
- package/i18n/indonesian.js +2 -2
- package/i18n/indonesian.min.js +3 -3
- package/i18n/italian.js +2 -2
- package/i18n/italian.min.js +3 -3
- package/i18n/japanese.js +2 -2
- package/i18n/japanese.min.js +3 -3
- package/i18n/kazakh.js +2 -2
- package/i18n/kazakh.min.js +3 -3
- package/i18n/korean.js +2 -2
- package/i18n/korean.min.js +3 -3
- package/i18n/latvian.js +2 -2
- package/i18n/latvian.min.js +3 -3
- package/i18n/lithuanian.js +2 -2
- package/i18n/lithuanian.min.js +3 -3
- package/i18n/macedonian.js +2 -2
- package/i18n/macedonian.min.js +3 -3
- package/i18n/malay.js +2 -2
- package/i18n/malay.min.js +3 -3
- package/i18n/nl-BE.js +2 -2
- package/i18n/nl-BE.min.js +3 -3
- package/i18n/norwegian.js +2 -2
- package/i18n/norwegian.min.js +3 -3
- package/i18n/persian.js +2 -2
- package/i18n/persian.min.js +3 -3
- package/i18n/philippines.js +2 -2
- package/i18n/philippines.min.js +3 -3
- package/i18n/polish.js +2 -2
- package/i18n/polish.min.js +3 -3
- package/i18n/portuguese-br.js +2 -2
- package/i18n/portuguese-br.min.js +3 -3
- package/i18n/portuguese.js +2 -2
- package/i18n/portuguese.min.js +3 -3
- package/i18n/romanian.js +2 -2
- package/i18n/romanian.min.js +3 -3
- package/i18n/russian.js +2 -2
- package/i18n/russian.min.js +3 -3
- package/i18n/serbian.js +2 -2
- package/i18n/serbian.min.js +3 -3
- package/i18n/simplified-chinese.js +2 -2
- package/i18n/simplified-chinese.min.js +3 -3
- package/i18n/slovak.js +2 -2
- package/i18n/slovak.min.js +3 -3
- package/i18n/spanish.js +2 -2
- package/i18n/spanish.min.js +3 -3
- package/i18n/swahili.js +2 -2
- package/i18n/swahili.min.js +3 -3
- package/i18n/swedish.js +2 -2
- package/i18n/swedish.min.js +3 -3
- package/i18n/tajik.js +2 -2
- package/i18n/tajik.min.js +3 -3
- package/i18n/telugu.js +2 -2
- package/i18n/telugu.min.js +3 -3
- package/i18n/thai.js +2 -2
- package/i18n/thai.min.js +3 -3
- package/i18n/traditional-chinese.js +2 -2
- package/i18n/traditional-chinese.min.js +3 -3
- package/i18n/turkish.js +2 -2
- package/i18n/turkish.min.js +3 -3
- package/i18n/ukrainian.js +2 -2
- package/i18n/ukrainian.min.js +3 -3
- package/i18n/urdu.js +2 -2
- package/i18n/urdu.min.js +3 -3
- package/i18n/vietnamese.js +2 -2
- package/i18n/vietnamese.min.js +3 -3
- package/i18n/welsh.js +2 -2
- package/i18n/welsh.min.js +3 -3
- package/icons/iconsV1.js +2 -2
- package/icons/iconsV1.min.js +2 -2
- package/icons/iconsV2.js +2 -2
- package/icons/iconsV2.min.js +2 -2
- package/modern.css +2 -2
- package/modern.fontless.css +2 -2
- package/modern.fontless.min.css +2 -2
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/plugins/bootstrap-integration/index.js +2 -2
- package/plugins/bootstrap-integration/index.min.js +2 -2
- package/plugins/bootstrap-material-integration/index.js +2 -2
- package/plugins/bootstrap-material-integration/index.min.js +2 -2
- package/survey.core.js +206 -87
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +4 -4
- package/survey.css +2 -2
- package/survey.i18n.js +107 -2
- package/survey.i18n.js.map +1 -1
- package/survey.i18n.min.js +3 -3
- package/survey.min.css +2 -2
- package/themes/borderless-dark-panelless.js +2 -2
- package/themes/borderless-dark-panelless.min.js +2 -2
- package/themes/borderless-dark.js +2 -2
- package/themes/borderless-dark.min.js +2 -2
- package/themes/borderless-light-panelless..js +2 -2
- package/themes/borderless-light-panelless..min.js +2 -2
- package/themes/borderless-light.js +2 -2
- package/themes/borderless-light.min.js +2 -2
- package/themes/contrast-dark-panelless.js +2 -2
- package/themes/contrast-dark-panelless.min.js +2 -2
- package/themes/contrast-dark.js +2 -2
- package/themes/contrast-dark.min.js +2 -2
- package/themes/contrast-light-panelless.js +2 -2
- package/themes/contrast-light-panelless.min.js +2 -2
- package/themes/contrast-light.js +2 -2
- package/themes/contrast-light.min.js +2 -2
- package/themes/default-dark-panelless.js +2 -2
- package/themes/default-dark-panelless.min.js +2 -2
- package/themes/default-dark.js +2 -2
- package/themes/default-dark.min.js +2 -2
- package/themes/default-light-panelless.js +2 -2
- package/themes/default-light-panelless.min.js +2 -2
- package/themes/default-light.js +2 -2
- package/themes/default-light.min.js +2 -2
- package/themes/doubleborder-dark-panelless.js +2 -2
- package/themes/doubleborder-dark-panelless.min.js +2 -2
- package/themes/doubleborder-dark.js +2 -2
- package/themes/doubleborder-dark.min.js +2 -2
- package/themes/doubleborder-light-panelles.js +2 -2
- package/themes/doubleborder-light-panelles.min.js +2 -2
- package/themes/doubleborder-light.js +2 -2
- package/themes/doubleborder-light.min.js +2 -2
- package/themes/flat-dark-panelless.js +2 -2
- package/themes/flat-dark-panelless.min.js +2 -2
- package/themes/flat-dark.js +2 -2
- package/themes/flat-dark.min.js +2 -2
- package/themes/flat-light-panelless.js +2 -2
- package/themes/flat-light-panelless.min.js +2 -2
- package/themes/flat-light.js +2 -2
- package/themes/flat-light.min.js +2 -2
- package/themes/index.js +2 -2
- package/themes/index.min.js +2 -2
- package/themes/layered-dark-panelless.js +2 -2
- package/themes/layered-dark-panelless.min.js +2 -2
- package/themes/layered-dark.js +2 -2
- package/themes/layered-dark.min.js +2 -2
- package/themes/layered-light-panelless.js +2 -2
- package/themes/layered-light-panelless.min.js +2 -2
- package/themes/layered-light.js +2 -2
- package/themes/layered-light.min.js +2 -2
- package/themes/plain-dark-panelless.js +2 -2
- package/themes/plain-dark-panelless.min.js +2 -2
- package/themes/plain-dark.js +2 -2
- package/themes/plain-dark.min.js +2 -2
- package/themes/plain-light-panelless.js +2 -2
- package/themes/plain-light-panelless.min.js +2 -2
- package/themes/plain-light.js +2 -2
- package/themes/plain-light.min.js +2 -2
- package/themes/sharp-dark-panelless.js +2 -2
- package/themes/sharp-dark-panelless.min.js +2 -2
- package/themes/sharp-dark.js +2 -2
- package/themes/sharp-dark.min.js +2 -2
- package/themes/sharp-light-panelless.js +2 -2
- package/themes/sharp-light-panelless.min.js +2 -2
- package/themes/sharp-light.js +2 -2
- package/themes/sharp-light.min.js +2 -2
- package/themes/solid-dark-panelless.js +2 -2
- package/themes/solid-dark-panelless.min.js +2 -2
- package/themes/solid-dark.js +2 -2
- package/themes/solid-dark.min.js +2 -2
- package/themes/solid-light-panelless.js +2 -2
- package/themes/solid-light-panelless.min.js +2 -2
- package/themes/solid-light.js +2 -2
- package/themes/solid-light.min.js +2 -2
- package/themes/three-dimensional-dark-panelless.js +2 -2
- package/themes/three-dimensional-dark-panelless.min.js +2 -2
- package/themes/three-dimensional-dark.js +2 -2
- package/themes/three-dimensional-dark.min.js +2 -2
- package/themes/three-dimensional-light-panelless.js +2 -2
- package/themes/three-dimensional-light-panelless.min.js +2 -2
- package/themes/three-dimensional-light.js +2 -2
- package/themes/three-dimensional-light.min.js +2 -2
- package/ts3.4/typings/packages/survey-core/src/base-interfaces.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/panel.d.ts +3 -2
- package/ts3.4/typings/packages/survey-core/src/question.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/question_imagepicker.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/question_matrixdropdownrendered.d.ts +2 -2
- package/ts3.4/typings/packages/survey-core/src/settings.d.ts +1 -0
- package/ts3.4/typings/packages/survey-core/src/survey-events-api.d.ts +38 -10
- package/ts3.4/typings/packages/survey-core/src/survey.d.ts +48 -25
- package/ts3.4/typings/packages/survey-core/src/utils/utils.d.ts +1 -1
- package/typings/packages/survey-core/src/base-interfaces.d.ts +1 -0
- package/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
- package/typings/packages/survey-core/src/panel.d.ts +3 -2
- package/typings/packages/survey-core/src/question.d.ts +1 -1
- package/typings/packages/survey-core/src/question_imagepicker.d.ts +1 -0
- package/typings/packages/survey-core/src/question_matrixdropdownrendered.d.ts +2 -2
- package/typings/packages/survey-core/src/settings.d.ts +1 -0
- package/typings/packages/survey-core/src/survey-events-api.d.ts +38 -10
- package/typings/packages/survey-core/src/survey.d.ts +49 -25
- package/typings/packages/survey-core/src/utils/utils.d.ts +1 -1
package/survey.core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.12.
|
|
3
|
-
* Copyright (c) 2015-
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.18
|
|
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
|
*/
|
|
6
6
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -10185,13 +10185,13 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
|
10185
10185
|
var _this = this;
|
|
10186
10186
|
this.isEmpty = this.renderedActions.filter(function (action) { return _this.isItemVisible(action); }).length === 0;
|
|
10187
10187
|
};
|
|
10188
|
-
ListModel.prototype.scrollToItem = function (
|
|
10188
|
+
ListModel.prototype.scrollToItem = function (classes, ms) {
|
|
10189
10189
|
var _this = this;
|
|
10190
10190
|
if (ms === void 0) { ms = 0; }
|
|
10191
10191
|
setTimeout(function () {
|
|
10192
10192
|
if (!_this.listContainerHtmlElement)
|
|
10193
10193
|
return;
|
|
10194
|
-
var item = _this.listContainerHtmlElement.querySelector(
|
|
10194
|
+
var item = _this.listContainerHtmlElement.querySelector(classesToSelector(classes));
|
|
10195
10195
|
if (item) {
|
|
10196
10196
|
setTimeout(function () {
|
|
10197
10197
|
item.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "start" });
|
|
@@ -10259,7 +10259,7 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
|
10259
10259
|
});
|
|
10260
10260
|
Object.defineProperty(ListModel.prototype, "scrollableContainer", {
|
|
10261
10261
|
get: function () {
|
|
10262
|
-
return this.listContainerHtmlElement.querySelector(
|
|
10262
|
+
return this.listContainerHtmlElement.querySelector(classesToSelector(this.cssClasses.itemsContainer));
|
|
10263
10263
|
},
|
|
10264
10264
|
enumerable: false,
|
|
10265
10265
|
configurable: true
|
|
@@ -13265,11 +13265,11 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
|
13265
13265
|
var columns = this.parent.getColumsForElement(this);
|
|
13266
13266
|
_width = columns.reduce(function (sum, col) { return col.effectiveWidth + sum; }, 0);
|
|
13267
13267
|
if (!!_width && _width !== 100) {
|
|
13268
|
-
style["flexGrow"] =
|
|
13268
|
+
style["flexGrow"] = 1;
|
|
13269
13269
|
style["flexShrink"] = 0;
|
|
13270
13270
|
style["flexBasis"] = _width + "%";
|
|
13271
13271
|
style["minWidth"] = undefined;
|
|
13272
|
-
style["maxWidth"] =
|
|
13272
|
+
style["maxWidth"] = this.maxWidth;
|
|
13273
13273
|
}
|
|
13274
13274
|
}
|
|
13275
13275
|
if (Object.keys(style).length == 0) {
|
|
@@ -14992,8 +14992,8 @@ function cleanHtmlElementAfterAnimation(el) {
|
|
|
14992
14992
|
delete el["__sv_created_properties"];
|
|
14993
14993
|
}
|
|
14994
14994
|
}
|
|
14995
|
-
function
|
|
14996
|
-
return Math.
|
|
14995
|
+
function floorTo2Decimals(number) {
|
|
14996
|
+
return Math.floor(number * 100) / 100;
|
|
14997
14997
|
}
|
|
14998
14998
|
|
|
14999
14999
|
|
|
@@ -15036,6 +15036,7 @@ var columnWidthsByType = {
|
|
|
15036
15036
|
* ```
|
|
15037
15037
|
*/
|
|
15038
15038
|
var settings = {
|
|
15039
|
+
version: "",
|
|
15039
15040
|
/**
|
|
15040
15041
|
* An object that configures survey appearance when the survey is being designed in Survey Creator.
|
|
15041
15042
|
*
|
|
@@ -19520,7 +19521,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19520
19521
|
/**
|
|
19521
19522
|
* A correct answer to this question. Specify this property if you want to [create a quiz](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
|
|
19522
19523
|
* @see SurveyModel.getCorrectAnswerCount
|
|
19523
|
-
* @see SurveyModel.
|
|
19524
|
+
* @see SurveyModel.getIncorrectAnswerCount
|
|
19524
19525
|
*/
|
|
19525
19526
|
get: function () {
|
|
19526
19527
|
return this.getPropertyValue("correctAnswer");
|
|
@@ -19569,7 +19570,14 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
19569
19570
|
Question.prototype.checkIfAnswerCorrect = function () {
|
|
19570
19571
|
var isEqual = helpers_Helpers.isTwoValueEquals(this.value, this.correctAnswer, this.getAnswerCorrectIgnoreOrder(), settings.comparator.caseSensitive, true);
|
|
19571
19572
|
var correct = isEqual ? 1 : 0;
|
|
19572
|
-
var
|
|
19573
|
+
var incorrect = this.quizQuestionCount - correct;
|
|
19574
|
+
var options = {
|
|
19575
|
+
result: isEqual,
|
|
19576
|
+
correctAnswers: correct,
|
|
19577
|
+
correctAnswerCount: correct,
|
|
19578
|
+
incorrectAnswers: incorrect,
|
|
19579
|
+
incorrectAnswerCount: incorrect,
|
|
19580
|
+
};
|
|
19573
19581
|
if (!!this.survey) {
|
|
19574
19582
|
this.survey.onCorrectQuestionAnswer(this, options);
|
|
19575
19583
|
}
|
|
@@ -25943,6 +25951,9 @@ var question_matrixdropdownrendered_spreadArray = (undefined && undefined.__spre
|
|
|
25943
25951
|
|
|
25944
25952
|
|
|
25945
25953
|
|
|
25954
|
+
function getId(id, isError, isDetail) {
|
|
25955
|
+
return id + (isError ? "-error" : "") + (isDetail ? "-detail" : "");
|
|
25956
|
+
}
|
|
25946
25957
|
var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
25947
25958
|
function QuestionMatrixDropdownRenderedCell() {
|
|
25948
25959
|
this.minWidth = "";
|
|
@@ -25985,7 +25996,11 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell = /** @cl
|
|
|
25985
25996
|
});
|
|
25986
25997
|
Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "id", {
|
|
25987
25998
|
get: function () {
|
|
25988
|
-
|
|
25999
|
+
var id = this.question ? this.question.id : this.idValue.toString();
|
|
26000
|
+
if (this.isChoice) {
|
|
26001
|
+
id += "-" + (Number.isInteger(this.choiceIndex) ? "index" + this.choiceIndex.toString() : this.item.id);
|
|
26002
|
+
}
|
|
26003
|
+
return getId(id, this.isErrorsCell, this.isDetailRowCell);
|
|
25989
26004
|
},
|
|
25990
26005
|
enumerable: false,
|
|
25991
26006
|
configurable: true
|
|
@@ -26167,7 +26182,8 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedRow = /** @cla
|
|
|
26167
26182
|
}
|
|
26168
26183
|
Object.defineProperty(QuestionMatrixDropdownRenderedRow.prototype, "id", {
|
|
26169
26184
|
get: function () {
|
|
26170
|
-
|
|
26185
|
+
var _a;
|
|
26186
|
+
return getId(((_a = this.row) === null || _a === void 0 ? void 0 : _a.id) || this.idValue.toString(), this.isErrorsRow, this.isDetailRow);
|
|
26171
26187
|
},
|
|
26172
26188
|
enumerable: false,
|
|
26173
26189
|
configurable: true
|
|
@@ -33197,6 +33213,7 @@ var defaultV2Css = {
|
|
|
33197
33213
|
itemBody: "sv-list__item-body sd-list__item-body",
|
|
33198
33214
|
itemSelected: "sv-list__item--selected sd-list__item--selected",
|
|
33199
33215
|
itemFocused: "sv-list__item--focused sd-list__item--focused",
|
|
33216
|
+
itemHovered: "sv-list__item--hovered sd-list__item--hovered",
|
|
33200
33217
|
},
|
|
33201
33218
|
actionBar: {
|
|
33202
33219
|
root: "sd-action-bar",
|
|
@@ -34850,7 +34867,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
34850
34867
|
_this.isRandomizing = false;
|
|
34851
34868
|
_this.onColumnPropertyValueChangedCallback = function (name, oldValue, newValue, sender, arrayChanges) {
|
|
34852
34869
|
if (_this._columnsReady) {
|
|
34853
|
-
_this.updateColumnWidth(_this.
|
|
34870
|
+
_this.updateColumnWidth(_this.gridLayoutColumns);
|
|
34854
34871
|
_this.updateRootStyle();
|
|
34855
34872
|
}
|
|
34856
34873
|
};
|
|
@@ -34894,7 +34911,8 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
34894
34911
|
isAnimationEnabled: function () { return _this.animationAllowed; },
|
|
34895
34912
|
getAnimatedElement: function (row) { return row.getRootElement(); },
|
|
34896
34913
|
getLeaveOptions: function (row, info) {
|
|
34897
|
-
return {
|
|
34914
|
+
return {
|
|
34915
|
+
cssClass: _this.cssClasses.rowLeave,
|
|
34898
34916
|
onBeforeRunAnimation: prepareElementForVerticalAnimation,
|
|
34899
34917
|
onAfterRunAnimation: cleanHtmlElementAfterAnimation,
|
|
34900
34918
|
};
|
|
@@ -34947,7 +34965,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
34947
34965
|
this.updateDescriptionVisibility(this.description);
|
|
34948
34966
|
this.markQuestionListDirty();
|
|
34949
34967
|
this.onRowsChanged();
|
|
34950
|
-
this.
|
|
34968
|
+
this.gridLayoutColumns.forEach(function (col) {
|
|
34951
34969
|
col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
|
|
34952
34970
|
});
|
|
34953
34971
|
};
|
|
@@ -35775,7 +35793,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
35775
35793
|
}
|
|
35776
35794
|
});
|
|
35777
35795
|
if (!!remainingColCount) {
|
|
35778
|
-
var oneColumnWidth =
|
|
35796
|
+
var oneColumnWidth = floorTo2Decimals((100 - remainingSpace) / remainingColCount);
|
|
35779
35797
|
for (var index = 0; index < columns.length; index++) {
|
|
35780
35798
|
if (!columns[index].width) {
|
|
35781
35799
|
columns[index].setPropertyValue("effectiveWidth", oneColumnWidth);
|
|
@@ -35864,12 +35882,12 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
35864
35882
|
});
|
|
35865
35883
|
PanelModelBase.prototype.generateColumns = function () {
|
|
35866
35884
|
var maxRowColSpan = this.calcMaxRowColSpan();
|
|
35867
|
-
var columns = [].concat(this.
|
|
35868
|
-
if (maxRowColSpan <= this.
|
|
35869
|
-
columns = this.
|
|
35885
|
+
var columns = [].concat(this.gridLayoutColumns);
|
|
35886
|
+
if (maxRowColSpan <= this.gridLayoutColumns.length) {
|
|
35887
|
+
columns = this.gridLayoutColumns.slice(0, maxRowColSpan);
|
|
35870
35888
|
}
|
|
35871
35889
|
else {
|
|
35872
|
-
for (var index = this.
|
|
35890
|
+
for (var index = this.gridLayoutColumns.length; index < maxRowColSpan; index++) {
|
|
35873
35891
|
var newCol = new panel_layout_column_PanelLayoutColumnModel();
|
|
35874
35892
|
newCol.onPropertyValueChangedCallback = this.onColumnPropertyValueChangedCallback;
|
|
35875
35893
|
columns.push(newCol);
|
|
@@ -35883,7 +35901,13 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
35883
35901
|
finally {
|
|
35884
35902
|
this._columnsReady = true;
|
|
35885
35903
|
}
|
|
35886
|
-
this.
|
|
35904
|
+
this.gridLayoutColumns = columns;
|
|
35905
|
+
};
|
|
35906
|
+
PanelModelBase.prototype.updateGridColumns = function () {
|
|
35907
|
+
this.updateColumns();
|
|
35908
|
+
this.elements.forEach(function (el) {
|
|
35909
|
+
el.isPanel && el.updateGridColumns();
|
|
35910
|
+
});
|
|
35887
35911
|
};
|
|
35888
35912
|
PanelModelBase.prototype.getColumsForElement = function (el) {
|
|
35889
35913
|
var row = this.findRowByElement(el);
|
|
@@ -36739,13 +36763,13 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
36739
36763
|
};
|
|
36740
36764
|
PanelModelBase.prototype.getSerializableColumnsValue = function () {
|
|
36741
36765
|
var tailIndex = -1;
|
|
36742
|
-
for (var index = this.
|
|
36743
|
-
if (!this.
|
|
36766
|
+
for (var index = this.gridLayoutColumns.length - 1; index >= 0; index--) {
|
|
36767
|
+
if (!this.gridLayoutColumns[index].isEmpty()) {
|
|
36744
36768
|
tailIndex = index;
|
|
36745
36769
|
break;
|
|
36746
36770
|
}
|
|
36747
36771
|
}
|
|
36748
|
-
return this.
|
|
36772
|
+
return this.gridLayoutColumns.slice(0, tailIndex + 1);
|
|
36749
36773
|
};
|
|
36750
36774
|
PanelModelBase.prototype.afterRender = function (el) {
|
|
36751
36775
|
this.afterRenderCore(el);
|
|
@@ -36769,7 +36793,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
|
36769
36793
|
PanelModelBase.panelCounter = 100;
|
|
36770
36794
|
panel_decorate([
|
|
36771
36795
|
propertyArray()
|
|
36772
|
-
], PanelModelBase.prototype, "
|
|
36796
|
+
], PanelModelBase.prototype, "gridLayoutColumns", void 0);
|
|
36773
36797
|
panel_decorate([
|
|
36774
36798
|
jsonobject_property({ defaultValue: true })
|
|
36775
36799
|
], PanelModelBase.prototype, "showTitle", void 0);
|
|
@@ -36942,13 +36966,18 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
36942
36966
|
* @see visibleIf
|
|
36943
36967
|
*/
|
|
36944
36968
|
get: function () {
|
|
36945
|
-
|
|
36969
|
+
var _this = this;
|
|
36970
|
+
return this.getPropertyValue("no", undefined, function () { return _this.calcNo(); });
|
|
36946
36971
|
},
|
|
36947
36972
|
enumerable: false,
|
|
36948
36973
|
configurable: true
|
|
36949
36974
|
});
|
|
36950
|
-
PanelModel.prototype.
|
|
36951
|
-
|
|
36975
|
+
PanelModel.prototype.calcNo = function () {
|
|
36976
|
+
var no = helpers_Helpers.getNumberByIndex(this.visibleIndex, this.getStartIndex());
|
|
36977
|
+
if (this.survey) {
|
|
36978
|
+
no = this.survey.getUpdatedPanelNo(this, no);
|
|
36979
|
+
}
|
|
36980
|
+
return no || "";
|
|
36952
36981
|
};
|
|
36953
36982
|
PanelModel.prototype.notifyStateChanged = function (prevState) {
|
|
36954
36983
|
if (!this.isLoadingFromJson) {
|
|
@@ -36975,7 +37004,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
36975
37004
|
visibleIndex = index;
|
|
36976
37005
|
}
|
|
36977
37006
|
this.setPropertyValue("visibleIndex", visibleIndex);
|
|
36978
|
-
this.
|
|
37007
|
+
this.resetPropertyValue("no");
|
|
36979
37008
|
return visibleIndex < 0 ? 0 : 1;
|
|
36980
37009
|
};
|
|
36981
37010
|
PanelModel.prototype.getPanelStartIndex = function (index) {
|
|
@@ -37263,7 +37292,7 @@ Serializer.addClass("panelbase", [
|
|
|
37263
37292
|
choices: ["default", "top", "bottom", "left", "hidden"],
|
|
37264
37293
|
},
|
|
37265
37294
|
{
|
|
37266
|
-
name: "
|
|
37295
|
+
name: "gridLayoutColumns:panellayoutcolumns",
|
|
37267
37296
|
className: "panellayoutcolumn", isArray: true,
|
|
37268
37297
|
onSerializeValue: function (obj) { return obj.getSerializableColumnsValue(); },
|
|
37269
37298
|
visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
|
|
@@ -38503,6 +38532,7 @@ var survey_decorate = (undefined && undefined.__decorate) || function (decorator
|
|
|
38503
38532
|
|
|
38504
38533
|
|
|
38505
38534
|
|
|
38535
|
+
|
|
38506
38536
|
/**
|
|
38507
38537
|
* The `SurveyModel` object contains properties and methods that allow you to control the survey and access its elements.
|
|
38508
38538
|
*
|
|
@@ -38794,9 +38824,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
38794
38824
|
*/
|
|
38795
38825
|
_this.onGetQuestionNumber = _this.addEvent();
|
|
38796
38826
|
/**
|
|
38797
|
-
*
|
|
38827
|
+
* Obsolete. Use the [`onGetQuestionNumber`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetQuestionNumber) event instead.
|
|
38828
|
+
* @deprecated
|
|
38798
38829
|
*/
|
|
38799
38830
|
_this.onGetQuestionNo = _this.onGetQuestionNumber;
|
|
38831
|
+
/**
|
|
38832
|
+
* An event that is raised before the survey calculates a panel number. Handle this event to modify panel numbers.
|
|
38833
|
+
*
|
|
38834
|
+
* This event is raised only for the panels with a [specified title](https://surveyjs.io/form-library/documentation/api-reference/panel-model#title) and [visible number](https://surveyjs.io/form-library/documentation/api-reference/panel-model#showNumber).
|
|
38835
|
+
*/
|
|
38836
|
+
_this.onGetPanelNumber = _this.addEvent();
|
|
38800
38837
|
/**
|
|
38801
38838
|
* An event that is raised before the survey calculates a page number. Handle this event to modify page numbers.
|
|
38802
38839
|
*
|
|
@@ -38812,7 +38849,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
38812
38849
|
* @see showProgressBar
|
|
38813
38850
|
* @see progressBarType
|
|
38814
38851
|
*/
|
|
38815
|
-
_this.
|
|
38852
|
+
_this.onGetProgressText = _this.addEvent();
|
|
38853
|
+
/**
|
|
38854
|
+
* Obsolete. Use the [`onGetProgressText`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetProgressText) event instead.
|
|
38855
|
+
* @deprecated
|
|
38856
|
+
*/
|
|
38857
|
+
_this.onProgressText = _this.onGetProgressText;
|
|
38816
38858
|
/**
|
|
38817
38859
|
* An event that is raised to convert Markdown content to HTML.
|
|
38818
38860
|
*
|
|
@@ -39014,7 +39056,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
39014
39056
|
*/
|
|
39015
39057
|
_this.onMatrixRowAdding = _this.addEvent();
|
|
39016
39058
|
/**
|
|
39017
|
-
*
|
|
39059
|
+
* Obsolete. Use the [`onMatrixRowAdding`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRowAdding) event instead.
|
|
39060
|
+
* @deprecated
|
|
39018
39061
|
*/
|
|
39019
39062
|
_this.onMatrixBeforeRowAdded = _this.onMatrixRowAdding;
|
|
39020
39063
|
/**
|
|
@@ -39034,7 +39077,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
39034
39077
|
*/
|
|
39035
39078
|
_this.onMatrixRenderRemoveButton = _this.addEvent();
|
|
39036
39079
|
/**
|
|
39037
|
-
*
|
|
39080
|
+
* Obsolete. Use the [`onMatrixRenderRemoveButton`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead.
|
|
39081
|
+
* @deprecated
|
|
39038
39082
|
*/
|
|
39039
39083
|
_this.onMatrixAllowRemoveRow = _this.onMatrixRenderRemoveButton;
|
|
39040
39084
|
/**
|
|
@@ -39057,7 +39101,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
39057
39101
|
*/
|
|
39058
39102
|
_this.onAfterRenderMatrixCell = _this.addEvent();
|
|
39059
39103
|
/**
|
|
39060
|
-
*
|
|
39104
|
+
* Obsolete. Use the [`onAfterRenderMatrixCell`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onAfterRenderMatrixCell) event instead.
|
|
39105
|
+
* @deprecated
|
|
39061
39106
|
*/
|
|
39062
39107
|
_this.onMatrixAfterCellRender = _this.onAfterRenderMatrixCell;
|
|
39063
39108
|
/**
|
|
@@ -39131,7 +39176,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
39131
39176
|
/**
|
|
39132
39177
|
* An event that is raised to define whether a question answer is correct. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
|
|
39133
39178
|
*/
|
|
39134
|
-
_this.
|
|
39179
|
+
_this.onCheckAnswerCorrect = _this.addEvent();
|
|
39180
|
+
/**
|
|
39181
|
+
* Obsolete. Use the [`onCheckAnswerCorrect`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onCheckAnswerCorrect) event instead.
|
|
39182
|
+
* @deprecated
|
|
39183
|
+
*/
|
|
39184
|
+
_this.onIsAnswerCorrect = _this.onCheckAnswerCorrect;
|
|
39135
39185
|
/**
|
|
39136
39186
|
* An event that is raised when users drag and drop survey elements while designing the survey in [Survey Creator](https://surveyjs.io/survey-creator/documentation/overview). Use this event to control drag and drop operations.
|
|
39137
39187
|
* @see isDesignMode
|
|
@@ -39140,7 +39190,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
39140
39190
|
/**
|
|
39141
39191
|
* An event this is raised before a survey element (usually page) is scrolled to the top. Use this event to cancel the scroll operation.
|
|
39142
39192
|
*/
|
|
39143
|
-
_this.
|
|
39193
|
+
_this.onScrollToTop = _this.addEvent();
|
|
39194
|
+
/**
|
|
39195
|
+
* Obsolete. Use the [`onScrollToTop`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onScrollToTop) event instead.
|
|
39196
|
+
* @deprecated
|
|
39197
|
+
*/
|
|
39198
|
+
_this.onScrollingElementToTop = _this.onScrollToTop;
|
|
39144
39199
|
_this.onLocaleChangedEvent = _this.addEvent();
|
|
39145
39200
|
/**
|
|
39146
39201
|
* An event that allows you to add, delete, or modify actions in a question title.
|
|
@@ -39179,9 +39234,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
39179
39234
|
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
|
39180
39235
|
*/
|
|
39181
39236
|
_this.onGetMatrixRowActions = _this.addEvent();
|
|
39182
|
-
/**
|
|
39183
|
-
* An event that is raised after a survey element is [expanded or collapsed](https://surveyjs.io/form-library/documentation/api-reference/question#state).
|
|
39184
|
-
*/
|
|
39185
39237
|
_this.onElementContentVisibilityChanged = _this.addEvent();
|
|
39186
39238
|
/**
|
|
39187
39239
|
* An event that is raised before an [Expression](https://surveyjs.io/form-library/documentation/api-reference/expression-model) question displays a value. Use this event to override the display value.
|
|
@@ -39355,7 +39407,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
39355
39407
|
_this.onGetQuestionNumber.onCallbacksChanged = function () {
|
|
39356
39408
|
_this.resetVisibleIndexes();
|
|
39357
39409
|
};
|
|
39358
|
-
_this.
|
|
39410
|
+
_this.onGetPanelNumber.onCallbacksChanged = function () {
|
|
39411
|
+
_this.resetVisibleIndexes();
|
|
39412
|
+
};
|
|
39413
|
+
_this.onGetProgressText.onCallbacksChanged = function () {
|
|
39359
39414
|
_this.updateProgressText();
|
|
39360
39415
|
};
|
|
39361
39416
|
_this.onTextMarkdown.onCallbacksChanged = function () {
|
|
@@ -39498,6 +39553,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
39498
39553
|
enumerable: false,
|
|
39499
39554
|
configurable: true
|
|
39500
39555
|
});
|
|
39556
|
+
Object.defineProperty(SurveyModel.prototype, "sjsVersion", {
|
|
39557
|
+
get: function () {
|
|
39558
|
+
return this.getPropertyValue("sjsVersion");
|
|
39559
|
+
},
|
|
39560
|
+
set: function (val) {
|
|
39561
|
+
this.setPropertyValue("sjsVersion", val);
|
|
39562
|
+
},
|
|
39563
|
+
enumerable: false,
|
|
39564
|
+
configurable: true
|
|
39565
|
+
});
|
|
39501
39566
|
SurveyModel.prototype.processClosedPopup = function (question, popupModel) {
|
|
39502
39567
|
throw new Error("Method not implemented.");
|
|
39503
39568
|
};
|
|
@@ -41425,6 +41490,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
41425
41490
|
this.onGetQuestionNumber.fire(this, options);
|
|
41426
41491
|
return options.no === no ? options.number : options.no;
|
|
41427
41492
|
};
|
|
41493
|
+
SurveyModel.prototype.getUpdatedPanelNo = function (panel, no) {
|
|
41494
|
+
if (this.onGetPanelNumber.isEmpty)
|
|
41495
|
+
return no;
|
|
41496
|
+
var options = { panel: panel, number: no };
|
|
41497
|
+
this.onGetPanelNumber.fire(this, options);
|
|
41498
|
+
return options.number;
|
|
41499
|
+
};
|
|
41428
41500
|
SurveyModel.prototype.getUpdatedPageNo = function (page, no) {
|
|
41429
41501
|
if (this.onGetPageNumber.isEmpty)
|
|
41430
41502
|
return no;
|
|
@@ -42215,7 +42287,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
42215
42287
|
this.currentPageNo = index;
|
|
42216
42288
|
return true;
|
|
42217
42289
|
}
|
|
42218
|
-
|
|
42290
|
+
if (!this.validateCurrentPage())
|
|
42291
|
+
return false;
|
|
42292
|
+
for (var i = this.currentPageNo + 1; i < index; i++) {
|
|
42219
42293
|
var page_1 = this.visiblePages[i];
|
|
42220
42294
|
if (!page_1.validate(true, true))
|
|
42221
42295
|
return false;
|
|
@@ -42647,7 +42721,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
42647
42721
|
get: function () {
|
|
42648
42722
|
if (this.isDesignMode)
|
|
42649
42723
|
return "none";
|
|
42650
|
-
var page = this.
|
|
42724
|
+
var page = this.activePage;
|
|
42651
42725
|
if (!page)
|
|
42652
42726
|
return "none";
|
|
42653
42727
|
if (page.navigationButtonsVisibility === "show") {
|
|
@@ -42812,7 +42886,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
42812
42886
|
};
|
|
42813
42887
|
Object.defineProperty(SurveyModel.prototype, "ignoreValidation", {
|
|
42814
42888
|
/**
|
|
42815
|
-
*
|
|
42889
|
+
* Obsolete. Use the [`validationEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#validationEnabled) property instead.
|
|
42890
|
+
* @deprecated
|
|
42816
42891
|
*/
|
|
42817
42892
|
get: function () { return !this.validationEnabled; },
|
|
42818
42893
|
set: function (val) { this.validationEnabled = !val; },
|
|
@@ -43110,7 +43185,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43110
43185
|
}
|
|
43111
43186
|
if (!page)
|
|
43112
43187
|
return true;
|
|
43113
|
-
var res =
|
|
43188
|
+
var res = false;
|
|
43189
|
+
if (this.currentSingleQuestion) {
|
|
43190
|
+
res = !this.currentSingleQuestion.validate(true);
|
|
43191
|
+
}
|
|
43192
|
+
else {
|
|
43193
|
+
res = !page.validate(true, isFocuseOnFirstError);
|
|
43194
|
+
}
|
|
43114
43195
|
this.fireValidatedErrorsOnPage(page);
|
|
43115
43196
|
return res;
|
|
43116
43197
|
};
|
|
@@ -43167,7 +43248,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43167
43248
|
* @see isCurrentPageValid
|
|
43168
43249
|
* @see nextPage
|
|
43169
43250
|
*/
|
|
43170
|
-
SurveyModel.prototype.
|
|
43251
|
+
SurveyModel.prototype.tryComplete = function () {
|
|
43171
43252
|
if (this.isValidateOnComplete) {
|
|
43172
43253
|
this.cancelPreview();
|
|
43173
43254
|
}
|
|
@@ -43177,6 +43258,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43177
43258
|
}
|
|
43178
43259
|
return res;
|
|
43179
43260
|
};
|
|
43261
|
+
/**
|
|
43262
|
+
* Obsolete. Use the [`tryComplete`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#tryComplete) method instead.
|
|
43263
|
+
* @deprecated
|
|
43264
|
+
*/
|
|
43265
|
+
SurveyModel.prototype.completeLastPage = function () {
|
|
43266
|
+
return this.tryComplete();
|
|
43267
|
+
};
|
|
43180
43268
|
SurveyModel.prototype.navigationMouseDown = function () {
|
|
43181
43269
|
this.isNavigationButtonPressed = true;
|
|
43182
43270
|
return true;
|
|
@@ -43443,7 +43531,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43443
43531
|
configurable: true
|
|
43444
43532
|
});
|
|
43445
43533
|
SurveyModel.prototype.onQuestionsOnPageModeChanged = function (oldValue) {
|
|
43446
|
-
if (this.isShowingPreview)
|
|
43534
|
+
if (this.isShowingPreview || this.isDesignMode)
|
|
43447
43535
|
return;
|
|
43448
43536
|
this.currentSingleQuestion = undefined;
|
|
43449
43537
|
if (oldValue === "singlePage") {
|
|
@@ -43948,7 +44036,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43948
44036
|
};
|
|
43949
44037
|
Object.defineProperty(SurveyModel.prototype, "progressText", {
|
|
43950
44038
|
/**
|
|
43951
|
-
* Returns text displayed by the progress bar (for instance, "Page 2 of 3" or "Answered 3/8 questions"). Handle the [`
|
|
44039
|
+
* Returns text displayed by the progress bar (for instance, "Page 2 of 3" or "Answered 3/8 questions"). Handle the [`onGetProgressText`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetProgressText) event to change this text.
|
|
43952
44040
|
* @see progressValue
|
|
43953
44041
|
* @see showProgressBar
|
|
43954
44042
|
* @see progressBarType
|
|
@@ -43970,7 +44058,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43970
44058
|
return;
|
|
43971
44059
|
if (onValueChanged &&
|
|
43972
44060
|
this.progressBarType == "pages" &&
|
|
43973
|
-
this.
|
|
44061
|
+
this.onGetProgressText.isEmpty)
|
|
43974
44062
|
return;
|
|
43975
44063
|
this.isCalculatingProgressText = true;
|
|
43976
44064
|
this.setPropertyValue("progressText", this.getProgressText());
|
|
@@ -43991,7 +44079,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43991
44079
|
if (type === "questions" ||
|
|
43992
44080
|
type === "requiredquestions" ||
|
|
43993
44081
|
type === "correctquestions" ||
|
|
43994
|
-
!this.
|
|
44082
|
+
!this.onGetProgressText.isEmpty) {
|
|
43995
44083
|
var info = this.getProgressInfo();
|
|
43996
44084
|
options.questionCount = info.questionCount;
|
|
43997
44085
|
options.answeredQuestionCount = info.answeredQuestionCount;
|
|
@@ -44000,7 +44088,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
44000
44088
|
info.requiredAnsweredQuestionCount;
|
|
44001
44089
|
}
|
|
44002
44090
|
options.text = this.getProgressTextCore(options);
|
|
44003
|
-
this.
|
|
44091
|
+
this.onGetProgressText.fire(this, options);
|
|
44004
44092
|
return options.text;
|
|
44005
44093
|
};
|
|
44006
44094
|
SurveyModel.prototype.getProgressTextCore = function (info) {
|
|
@@ -44385,29 +44473,39 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
44385
44473
|
return this.getUpdatedPanelTitleActions(element, titleActions);
|
|
44386
44474
|
return this.getUpdatedQuestionTitleActions(element, titleActions);
|
|
44387
44475
|
};
|
|
44476
|
+
SurveyModel.prototype.getTitleActionsResult = function (titleActions, options) {
|
|
44477
|
+
if (titleActions != options.actions)
|
|
44478
|
+
return options.actions;
|
|
44479
|
+
if (titleActions != options.titleActions)
|
|
44480
|
+
return options.titleActions;
|
|
44481
|
+
return titleActions;
|
|
44482
|
+
};
|
|
44388
44483
|
SurveyModel.prototype.getUpdatedQuestionTitleActions = function (question, titleActions) {
|
|
44389
44484
|
var options = {
|
|
44390
44485
|
question: question,
|
|
44486
|
+
actions: titleActions,
|
|
44391
44487
|
titleActions: titleActions,
|
|
44392
44488
|
};
|
|
44393
44489
|
this.onGetQuestionTitleActions.fire(this, options);
|
|
44394
|
-
return
|
|
44490
|
+
return this.getTitleActionsResult(titleActions, options);
|
|
44395
44491
|
};
|
|
44396
44492
|
SurveyModel.prototype.getUpdatedPanelTitleActions = function (panel, titleActions) {
|
|
44397
44493
|
var options = {
|
|
44398
44494
|
panel: panel,
|
|
44495
|
+
actions: titleActions,
|
|
44399
44496
|
titleActions: titleActions,
|
|
44400
44497
|
};
|
|
44401
44498
|
this.onGetPanelTitleActions.fire(this, options);
|
|
44402
|
-
return
|
|
44499
|
+
return this.getTitleActionsResult(titleActions, options);
|
|
44403
44500
|
};
|
|
44404
44501
|
SurveyModel.prototype.getUpdatedPageTitleActions = function (page, titleActions) {
|
|
44405
44502
|
var options = {
|
|
44406
44503
|
page: page,
|
|
44504
|
+
actions: titleActions,
|
|
44407
44505
|
titleActions: titleActions,
|
|
44408
44506
|
};
|
|
44409
44507
|
this.onGetPageTitleActions.fire(this, options);
|
|
44410
|
-
return
|
|
44508
|
+
return this.getTitleActionsResult(titleActions, options);
|
|
44411
44509
|
};
|
|
44412
44510
|
SurveyModel.prototype.getUpdatedMatrixRowActions = function (question, row, actions) {
|
|
44413
44511
|
var options = {
|
|
@@ -44426,9 +44524,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
44426
44524
|
page: page,
|
|
44427
44525
|
elementId: id,
|
|
44428
44526
|
cancel: false,
|
|
44527
|
+
allow: true,
|
|
44429
44528
|
};
|
|
44430
|
-
this.
|
|
44431
|
-
if (!options.cancel) {
|
|
44529
|
+
this.onScrollToTop.fire(this, options);
|
|
44530
|
+
if (!options.cancel && options.allow) {
|
|
44432
44531
|
var elementPage_1 = this.getPageByElement(element);
|
|
44433
44532
|
if (this.isLazyRendering && !!elementPage_1) {
|
|
44434
44533
|
var elementsToRenderBefore = 1;
|
|
@@ -44715,13 +44814,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
44715
44814
|
}
|
|
44716
44815
|
return null;
|
|
44717
44816
|
};
|
|
44718
|
-
/**
|
|
44719
|
-
* Returns an array of questions with specified [names](https://surveyjs.io/form-library/documentation/api-reference/question#name).
|
|
44720
|
-
* @param names An array of question names.
|
|
44721
|
-
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
44722
|
-
* @returns An array of questions with specified names
|
|
44723
|
-
* @see getAllQuestions
|
|
44724
|
-
*/
|
|
44725
44817
|
SurveyModel.prototype.getQuestionsByNames = function (names, caseInsensitive) {
|
|
44726
44818
|
if (caseInsensitive === void 0) { caseInsensitive = false; }
|
|
44727
44819
|
var result = [];
|
|
@@ -44766,10 +44858,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
44766
44858
|
}
|
|
44767
44859
|
return null;
|
|
44768
44860
|
};
|
|
44769
|
-
/**
|
|
44770
|
-
* Returns an array of pages with specified names.
|
|
44771
|
-
* @param names An array of page names.
|
|
44772
|
-
*/
|
|
44773
44861
|
SurveyModel.prototype.getPagesByNames = function (names) {
|
|
44774
44862
|
var result = [];
|
|
44775
44863
|
if (!names)
|
|
@@ -45357,6 +45445,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45357
45445
|
return;
|
|
45358
45446
|
this.questionHashesClear();
|
|
45359
45447
|
this.jsonErrors = null;
|
|
45448
|
+
this.sjsVersion = undefined;
|
|
45360
45449
|
var jsonConverter = new jsonobject_JsonObject();
|
|
45361
45450
|
jsonConverter.toObject(json, this, options);
|
|
45362
45451
|
if (jsonConverter.errors.length > 0) {
|
|
@@ -45364,6 +45453,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45364
45453
|
}
|
|
45365
45454
|
this.onStateAndCurrentPageChanged();
|
|
45366
45455
|
this.updateState();
|
|
45456
|
+
if (!!this.sjsVersion && !!settings.version) {
|
|
45457
|
+
if (helpers_Helpers.compareVerions(this.sjsVersion, settings.version) > 0) {
|
|
45458
|
+
ConsoleWarnings.warn("The version of the survey JSON schema (v"
|
|
45459
|
+
+ this.sjsVersion + ") is newer than your current Form Library version ("
|
|
45460
|
+
+ settings.version + "). Please update the Form Library to make sure that all survey features work as expected.");
|
|
45461
|
+
}
|
|
45462
|
+
}
|
|
45367
45463
|
};
|
|
45368
45464
|
SurveyModel.prototype.startLoadingFromJson = function (json) {
|
|
45369
45465
|
_super.prototype.startLoadingFromJson.call(this, json);
|
|
@@ -45463,7 +45559,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45463
45559
|
mouseDown: function () { return _this.navigationMouseDown(); },
|
|
45464
45560
|
},
|
|
45465
45561
|
locTitle: this.locCompleteText,
|
|
45466
|
-
action: function () { return _this.taskManager.waitAndExecute(function () { return _this.
|
|
45562
|
+
action: function () { return _this.taskManager.waitAndExecute(function () { return _this.tryComplete(); }); },
|
|
45467
45563
|
component: defaultComponent
|
|
45468
45564
|
});
|
|
45469
45565
|
this.updateNavigationItemCssCallback = function () {
|
|
@@ -45834,7 +45930,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45834
45930
|
_this.showPreview();
|
|
45835
45931
|
}
|
|
45836
45932
|
else {
|
|
45837
|
-
_this.
|
|
45933
|
+
_this.tryComplete();
|
|
45838
45934
|
}
|
|
45839
45935
|
}
|
|
45840
45936
|
};
|
|
@@ -46152,7 +46248,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46152
46248
|
* For more information about quizzes, refer to the following tutorial: [Create a Quiz](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
|
|
46153
46249
|
* @returns The number of correct answers in a quiz.
|
|
46154
46250
|
* @see getQuizQuestionCount
|
|
46155
|
-
* @see
|
|
46251
|
+
* @see getIncorrectAnswerCount
|
|
46156
46252
|
*/
|
|
46157
46253
|
SurveyModel.prototype.getCorrectAnswerCount = function () {
|
|
46158
46254
|
return this.getCorrectedAnswerCountCore(true);
|
|
@@ -46175,7 +46271,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46175
46271
|
return res;
|
|
46176
46272
|
};
|
|
46177
46273
|
SurveyModel.prototype.getInCorrectedAnswerCount = function () {
|
|
46178
|
-
return this.
|
|
46274
|
+
return this.getIncorrectAnswerCount();
|
|
46275
|
+
};
|
|
46276
|
+
SurveyModel.prototype.getInCorrectAnswerCount = function () {
|
|
46277
|
+
return this.getIncorrectAnswerCount();
|
|
46179
46278
|
};
|
|
46180
46279
|
/**
|
|
46181
46280
|
* Returns the number of incorrect answers in a quiz.
|
|
@@ -46184,7 +46283,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46184
46283
|
* @returns The number of incorrect answers in a quiz.
|
|
46185
46284
|
* @see getCorrectAnswerCount
|
|
46186
46285
|
*/
|
|
46187
|
-
SurveyModel.prototype.
|
|
46286
|
+
SurveyModel.prototype.getIncorrectAnswerCount = function () {
|
|
46188
46287
|
return this.getCorrectedAnswerCountCore(false);
|
|
46189
46288
|
};
|
|
46190
46289
|
SurveyModel.prototype.onCorrectQuestionAnswer = function (question, options) {
|
|
@@ -46331,6 +46430,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46331
46430
|
enumerable: false,
|
|
46332
46431
|
configurable: true
|
|
46333
46432
|
});
|
|
46433
|
+
SurveyModel.prototype.updateGridColumns = function () {
|
|
46434
|
+
this.pages.forEach(function (page) { return page.updateGridColumns(); });
|
|
46435
|
+
};
|
|
46334
46436
|
Object.defineProperty(SurveyModel.prototype, "widthMode", {
|
|
46335
46437
|
/**
|
|
46336
46438
|
* Specifies how to calculate the survey width.
|
|
@@ -46676,13 +46778,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46676
46778
|
this.onTimerTick.fire(this, {});
|
|
46677
46779
|
if (this.timeLimit > 0 && this.timeLimit <= this.timeSpent) {
|
|
46678
46780
|
this.timeSpent = this.timeLimit;
|
|
46679
|
-
this.
|
|
46781
|
+
this.tryComplete();
|
|
46680
46782
|
}
|
|
46681
46783
|
if (page) {
|
|
46682
46784
|
var pageLimit = page.getMaxTimeToFinish();
|
|
46683
46785
|
if (pageLimit > 0 && pageLimit == page.timeSpent) {
|
|
46684
46786
|
if (this.isLastPage) {
|
|
46685
|
-
this.
|
|
46787
|
+
this.tryComplete();
|
|
46686
46788
|
}
|
|
46687
46789
|
else {
|
|
46688
46790
|
this.nextPage();
|
|
@@ -46804,6 +46906,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46804
46906
|
var isNeedWaitForPageRendered = this.activePage !== question.page && !question.page.isStartPage;
|
|
46805
46907
|
if (isNeedWaitForPageRendered) {
|
|
46806
46908
|
this.currentPage = question.page;
|
|
46909
|
+
if (this.isSingleVisibleQuestion && !this.isDesignMode) {
|
|
46910
|
+
this.currentSingleQuestion = question;
|
|
46911
|
+
}
|
|
46807
46912
|
}
|
|
46808
46913
|
if (!isNeedWaitForPageRendered) {
|
|
46809
46914
|
this.focusQuestionInfo();
|
|
@@ -47240,7 +47345,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47240
47345
|
jsonobject_property()
|
|
47241
47346
|
], SurveyModel.prototype, "rootCss", void 0);
|
|
47242
47347
|
survey_decorate([
|
|
47243
|
-
jsonobject_property(
|
|
47348
|
+
jsonobject_property({
|
|
47349
|
+
onSet: function (newValue, target) {
|
|
47350
|
+
target.updateGridColumns();
|
|
47351
|
+
}
|
|
47352
|
+
})
|
|
47244
47353
|
], SurveyModel.prototype, "gridLayoutEnabled", void 0);
|
|
47245
47354
|
survey_decorate([
|
|
47246
47355
|
jsonobject_property()
|
|
@@ -47338,6 +47447,7 @@ Serializer.addClass("survey", [
|
|
|
47338
47447
|
name: "calculatedValues:calculatedvalues",
|
|
47339
47448
|
className: "calculatedvalue", isArray: true
|
|
47340
47449
|
},
|
|
47450
|
+
{ name: "sjsVersion", visible: false },
|
|
47341
47451
|
{ name: "surveyId", visible: false },
|
|
47342
47452
|
{ name: "surveyPostId", visible: false },
|
|
47343
47453
|
{ name: "surveyShowDataSaving:boolean", visible: false },
|
|
@@ -62929,10 +63039,17 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
|
|
|
62929
63039
|
enumerable: false,
|
|
62930
63040
|
configurable: true
|
|
62931
63041
|
});
|
|
63042
|
+
Object.defineProperty(QuestionImagePickerModel.prototype, "imageScale", {
|
|
63043
|
+
get: function () {
|
|
63044
|
+
return this.survey ? this.survey["widthScale"] / 100 : 1;
|
|
63045
|
+
},
|
|
63046
|
+
enumerable: false,
|
|
63047
|
+
configurable: true
|
|
63048
|
+
});
|
|
62932
63049
|
Object.defineProperty(QuestionImagePickerModel.prototype, "renderedImageHeight", {
|
|
62933
63050
|
get: function () {
|
|
62934
|
-
var height = this.isResponsive ? Math.floor(this.responsiveImageHeight) : this.imageHeight;
|
|
62935
|
-
return (height ? height : 150);
|
|
63051
|
+
var height = this.isResponsive ? Math.floor(this.responsiveImageHeight) : this.imageHeight * this.imageScale;
|
|
63052
|
+
return (height ? height : 150 * this.imageScale);
|
|
62936
63053
|
},
|
|
62937
63054
|
enumerable: false,
|
|
62938
63055
|
configurable: true
|
|
@@ -62959,8 +63076,8 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
|
|
|
62959
63076
|
});
|
|
62960
63077
|
Object.defineProperty(QuestionImagePickerModel.prototype, "renderedImageWidth", {
|
|
62961
63078
|
get: function () {
|
|
62962
|
-
var width = this.isResponsive ? Math.floor(this.responsiveImageWidth) : this.imageWidth;
|
|
62963
|
-
return (width ? width : 200);
|
|
63079
|
+
var width = this.isResponsive ? Math.floor(this.responsiveImageWidth) : this.imageWidth * this.imageScale;
|
|
63080
|
+
return (width ? width : 200 * this.imageScale);
|
|
62964
63081
|
},
|
|
62965
63082
|
enumerable: false,
|
|
62966
63083
|
configurable: true
|
|
@@ -63068,11 +63185,11 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
|
|
|
63068
63185
|
};
|
|
63069
63186
|
if (this.isResponsive) {
|
|
63070
63187
|
var itemsCount = this.choices.length + (this.isDesignMode ? 1 : 0);
|
|
63071
|
-
var gap = this.gapBetweenItems || 0;
|
|
63072
|
-
var minWidth = this.minImageWidth;
|
|
63073
|
-
var maxWidth = this.maxImageWidth;
|
|
63074
|
-
var maxHeight = this.maxImageHeight;
|
|
63075
|
-
var minHeight = this.minImageHeight;
|
|
63188
|
+
var gap = (this.gapBetweenItems || 0) * this.imageScale;
|
|
63189
|
+
var minWidth = this.minImageWidth * this.imageScale;
|
|
63190
|
+
var maxWidth = this.maxImageWidth * this.imageScale;
|
|
63191
|
+
var maxHeight = this.maxImageHeight * this.imageScale;
|
|
63192
|
+
var minHeight = this.minImageHeight * this.imageScale;
|
|
63076
63193
|
var colCount = this.colCount;
|
|
63077
63194
|
var width_1;
|
|
63078
63195
|
if (colCount === 0) {
|
|
@@ -70685,10 +70802,12 @@ Serializer.addClass("currencymask", [
|
|
|
70685
70802
|
// import "../../src/main.scss";
|
|
70686
70803
|
//import "../../src/modern.scss";
|
|
70687
70804
|
|
|
70805
|
+
|
|
70688
70806
|
var Version;
|
|
70689
70807
|
var ReleaseDate;
|
|
70690
|
-
Version = "" + "1.12.
|
|
70691
|
-
|
|
70808
|
+
Version = "" + "1.12.18";
|
|
70809
|
+
settings.version = Version;
|
|
70810
|
+
ReleaseDate = "" + "2025-01-10";
|
|
70692
70811
|
function checkLibraryVersion(ver, libraryName) {
|
|
70693
70812
|
if (Version != ver) {
|
|
70694
70813
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|