survey-react 1.9.91 → 1.9.92
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 +5 -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 +6 -5
- package/survey.react.js +38 -29
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/modern.css
CHANGED
package/modern.min.css
CHANGED
package/package.json
CHANGED
package/survey.css
CHANGED
package/survey.min.css
CHANGED
package/survey.react.d.ts
CHANGED
@@ -3906,7 +3906,6 @@ declare module "question_baseselect" {
|
|
3906
3906
|
private noneItemValue;
|
3907
3907
|
private newItemValue;
|
3908
3908
|
private canShowOptionItemCallback;
|
3909
|
-
private isUsingCarrayForward;
|
3910
3909
|
private waitingGetChoiceDisplayValueResponse;
|
3911
3910
|
protected selectedItemValues: any;
|
3912
3911
|
constructor(name: string);
|
@@ -3916,6 +3915,8 @@ declare module "question_baseselect" {
|
|
3916
3915
|
protected getCommentElementsId(): Array<string>;
|
3917
3916
|
protected getItemValueType(): string;
|
3918
3917
|
createItemValue(value: any, text?: string): ItemValue;
|
3918
|
+
get isUsingCarryForward(): boolean;
|
3919
|
+
private setIsUsingCarrayForward;
|
3919
3920
|
supportGoNextPageError(): boolean;
|
3920
3921
|
isLayoutTypeSupported(layoutType: string): boolean;
|
3921
3922
|
localeChanged(): void;
|
@@ -4081,6 +4082,7 @@ declare module "question_baseselect" {
|
|
4081
4082
|
*/
|
4082
4083
|
get choicesFromQuestion(): string;
|
4083
4084
|
set choicesFromQuestion(val: string);
|
4085
|
+
private isLockVisibleChoices;
|
4084
4086
|
private addIntoDependedQuestion;
|
4085
4087
|
private removeFromDependedQuestion;
|
4086
4088
|
/**
|
@@ -10316,7 +10318,6 @@ declare module "survey-element" {
|
|
10316
10318
|
set paddingLeft(val: string);
|
10317
10319
|
get paddingRight(): string;
|
10318
10320
|
set paddingRight(val: string);
|
10319
|
-
get isDescriptionVisible(): boolean;
|
10320
10321
|
allowRootStyle: boolean;
|
10321
10322
|
get rootStyle(): {
|
10322
10323
|
[index: string]: any;
|
@@ -12006,7 +12007,7 @@ declare module "itemvalue" {
|
|
12006
12007
|
import { IShortcutText, ISurvey } from "base-interfaces";
|
12007
12008
|
import { BaseAction } from "actions/action";
|
12008
12009
|
/**
|
12009
|
-
* Array of ItemValue is used in
|
12010
|
+
* Array of ItemValue is used in checkbox, dropdown and radiogroup choices, matrix columns and rows.
|
12010
12011
|
* It has two main properties: value and text. If text is empty, value is used for displaying.
|
12011
12012
|
* The text property is localizable and support markdown.
|
12012
12013
|
*/
|
@@ -12640,7 +12641,6 @@ declare module "dropdownListModel" {
|
|
12640
12641
|
searchEnabled: boolean;
|
12641
12642
|
filterString: string;
|
12642
12643
|
inputString: string;
|
12643
|
-
showSelectedItemLocText: boolean;
|
12644
12644
|
showInputFieldComponent: boolean;
|
12645
12645
|
ariaActivedescendant: string;
|
12646
12646
|
private applyInputString;
|
@@ -14151,8 +14151,9 @@ declare module "question_signaturepad" {
|
|
14151
14151
|
declare module "surveyToc" {
|
14152
14152
|
import { Action } from "actions/action";
|
14153
14153
|
import { ListModel } from "list";
|
14154
|
+
import { PageModel } from "page";
|
14154
14155
|
import { SurveyModel } from "survey";
|
14155
|
-
export function tryNavigateToPage(survey: SurveyModel,
|
14156
|
+
export function tryNavigateToPage(survey: SurveyModel, page: PageModel): boolean;
|
14156
14157
|
export function createTOCListModel(survey: SurveyModel): ListModel<Action>;
|
14157
14158
|
export function getTocRootCss(survey: SurveyModel): string;
|
14158
14159
|
}
|
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.92
|
3
3
|
* Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -7249,11 +7249,9 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7249
7249
|
question.onPropertyChanged.add(function (sender, options) {
|
7250
7250
|
if (options.name == "value") {
|
7251
7251
|
_this.showInputFieldComponent = _this.question.showInputFieldComponent;
|
7252
|
-
_this.showSelectedItemLocText = _this.question.showSelectedItemLocText;
|
7253
7252
|
}
|
7254
7253
|
});
|
7255
7254
|
_this.showInputFieldComponent = _this.question.showInputFieldComponent;
|
7256
|
-
_this.showSelectedItemLocText = _this.question.showSelectedItemLocText;
|
7257
7255
|
_this.listModel = _this.createListModel();
|
7258
7256
|
_this.updateAfterListModelCreated(_this.listModel);
|
7259
7257
|
_this.setSearchEnabled(_this.question.searchEnabled);
|
@@ -7769,13 +7767,9 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7769
7767
|
defaultValue: "",
|
7770
7768
|
onSet: function (newValue, target) {
|
7771
7769
|
target.question.inputHasValue = !!newValue;
|
7772
|
-
target.showSelectedItemLocText = target.question.showSelectedItemLocText;
|
7773
7770
|
}
|
7774
7771
|
})
|
7775
7772
|
], DropdownListModel.prototype, "inputString", void 0);
|
7776
|
-
__decorate([
|
7777
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({})
|
7778
|
-
], DropdownListModel.prototype, "showSelectedItemLocText", void 0);
|
7779
7773
|
__decorate([
|
7780
7774
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({})
|
7781
7775
|
], DropdownListModel.prototype, "showInputFieldComponent", void 0);
|
@@ -8788,7 +8782,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
8788
8782
|
// import "../../main.scss";
|
8789
8783
|
//import "../../modern.scss";
|
8790
8784
|
var Version;
|
8791
|
-
Version = "" + "1.9.
|
8785
|
+
Version = "" + "1.9.92";
|
8792
8786
|
function checkLibraryVersion(ver, libraryName) {
|
8793
8787
|
if (Version != ver) {
|
8794
8788
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -16553,7 +16547,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
16553
16547
|
|
16554
16548
|
|
16555
16549
|
/**
|
16556
|
-
* Array of ItemValue is used in
|
16550
|
+
* Array of ItemValue is used in checkbox, dropdown and radiogroup choices, matrix columns and rows.
|
16557
16551
|
* It has two main properties: value and text. If text is empty, value is used for displaying.
|
16558
16552
|
* The text property is localizable and support markdown.
|
16559
16553
|
*/
|
@@ -33763,6 +33757,16 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
33763
33757
|
res.text = text;
|
33764
33758
|
return res;
|
33765
33759
|
};
|
33760
|
+
Object.defineProperty(QuestionSelectBase.prototype, "isUsingCarryForward", {
|
33761
|
+
get: function () {
|
33762
|
+
return this.getPropertyValue("isUsingCarrayForward", false);
|
33763
|
+
},
|
33764
|
+
enumerable: false,
|
33765
|
+
configurable: true
|
33766
|
+
});
|
33767
|
+
QuestionSelectBase.prototype.setIsUsingCarrayForward = function (val) {
|
33768
|
+
this.setPropertyValue("isUsingCarrayForward", val);
|
33769
|
+
};
|
33766
33770
|
QuestionSelectBase.prototype.supportGoNextPageError = function () {
|
33767
33771
|
return !this.isOtherSelected || !!this.otherValue;
|
33768
33772
|
};
|
@@ -33946,7 +33950,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
33946
33950
|
};
|
33947
33951
|
QuestionSelectBase.prototype.runCondition = function (values, properties) {
|
33948
33952
|
_super.prototype.runCondition.call(this, values, properties);
|
33949
|
-
if (this.
|
33953
|
+
if (this.isUsingCarryForward)
|
33950
33954
|
return;
|
33951
33955
|
this.runItemsEnableCondition(values, properties);
|
33952
33956
|
this.runItemsCondition(values, properties);
|
@@ -34379,10 +34383,12 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
34379
34383
|
},
|
34380
34384
|
set: function (val) {
|
34381
34385
|
var question = this.getQuestionWithChoices();
|
34382
|
-
|
34386
|
+
this.isLockVisibleChoices = !!question && question.name === val;
|
34387
|
+
if (!!question && question.name !== val) {
|
34383
34388
|
question.removeFromDependedQuestion(this);
|
34384
34389
|
}
|
34385
34390
|
this.setPropertyValue("choicesFromQuestion", val);
|
34391
|
+
this.isLockVisibleChoices = false;
|
34386
34392
|
},
|
34387
34393
|
enumerable: false,
|
34388
34394
|
configurable: true
|
@@ -34621,7 +34627,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
34621
34627
|
if (!this.newItemValue) {
|
34622
34628
|
this.newItemValue = this.createItemValue("newitem"); //TODO
|
34623
34629
|
}
|
34624
|
-
if (this.canShowOptionItem(this.newItemValue, isAddAll, false)) {
|
34630
|
+
if (!this.isUsingCarryForward && this.canShowOptionItem(this.newItemValue, isAddAll, false)) {
|
34625
34631
|
items.push(this.newItemValue);
|
34626
34632
|
}
|
34627
34633
|
}
|
@@ -34737,8 +34743,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
34737
34743
|
Object.defineProperty(QuestionSelectBase.prototype, "activeChoices", {
|
34738
34744
|
get: function () {
|
34739
34745
|
var question = this.getQuestionWithChoices();
|
34740
|
-
this.
|
34741
|
-
if (this.
|
34746
|
+
this.setIsUsingCarrayForward(!!question);
|
34747
|
+
if (this.isUsingCarryForward) {
|
34742
34748
|
this.addIntoDependedQuestion(question);
|
34743
34749
|
return this.getChoicesFromQuestion(question);
|
34744
34750
|
}
|
@@ -34754,6 +34760,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
34754
34760
|
return !!res && !!res.visibleChoices && Array.isArray(res.dependedQuestions) && res !== this ? res : null;
|
34755
34761
|
};
|
34756
34762
|
QuestionSelectBase.prototype.getChoicesFromQuestion = function (question) {
|
34763
|
+
if (this.isDesignMode)
|
34764
|
+
return [];
|
34757
34765
|
var res = [];
|
34758
34766
|
var isSelected = this.choicesFromQuestionMode == "selected"
|
34759
34767
|
? true
|
@@ -35035,7 +35043,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
35035
35043
|
return { value: value };
|
35036
35044
|
};
|
35037
35045
|
QuestionSelectBase.prototype.updateChoicesDependedQuestions = function () {
|
35038
|
-
if (this.isLoadingFromJson || this.isUpdatingChoicesDependedQuestions
|
35046
|
+
if (this.isLoadingFromJson || this.isUpdatingChoicesDependedQuestions ||
|
35047
|
+
!this.allowNotifyValueChanged || this.choicesByUrl.isRunning)
|
35039
35048
|
return;
|
35040
35049
|
this.isUpdatingChoicesDependedQuestions = true;
|
35041
35050
|
for (var i = 0; i < this.dependedQuestions.length; i++) {
|
@@ -35050,7 +35059,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
35050
35059
|
this.updateChoicesDependedQuestions();
|
35051
35060
|
};
|
35052
35061
|
QuestionSelectBase.prototype.onVisibleChoicesChanged = function () {
|
35053
|
-
if (this.isLoadingFromJson)
|
35062
|
+
if (this.isLoadingFromJson || this.isLockVisibleChoices)
|
35054
35063
|
return;
|
35055
35064
|
this.updateVisibleChoices();
|
35056
35065
|
this.onVisibleChanged();
|
@@ -60027,7 +60036,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
60027
60036
|
};
|
60028
60037
|
SurveyElementBase.renderQuestionDescription = function (question) {
|
60029
60038
|
var descriptionText = SurveyElementBase.renderLocString(question.locDescription);
|
60030
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: question.
|
60039
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: question.hasDescription ? undefined : { display: "none" }, className: question.cssDescription }, descriptionText);
|
60031
60040
|
};
|
60032
60041
|
SurveyElementBase.prototype.componentDidMount = function () {
|
60033
60042
|
this.makeBaseElementsReact();
|
@@ -64291,7 +64300,12 @@ var SurveyElementCore = /** @class */ (function (_super) {
|
|
64291
64300
|
});
|
64292
64301
|
SurveyElementCore.prototype.getDefaultTitleValue = function () { return undefined; };
|
64293
64302
|
SurveyElementCore.prototype.updateDescriptionVisibility = function (newDescription) {
|
64294
|
-
|
64303
|
+
var showPlaceholder = false;
|
64304
|
+
if (this.isDesignMode) {
|
64305
|
+
var property_1 = _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].findProperty(this.getType(), "description");
|
64306
|
+
showPlaceholder = !!(property_1 === null || property_1 === void 0 ? void 0 : property_1.placeholder);
|
64307
|
+
}
|
64308
|
+
this.hasDescription = !!newDescription || showPlaceholder;
|
64295
64309
|
};
|
64296
64310
|
Object.defineProperty(SurveyElementCore.prototype, "locDescription", {
|
64297
64311
|
get: function () {
|
@@ -64394,7 +64408,7 @@ var SurveyElementCore = /** @class */ (function (_super) {
|
|
64394
64408
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
|
64395
64409
|
localizable: true,
|
64396
64410
|
onSet: function (newDescription, self) {
|
64397
|
-
self.updateDescriptionVisibility(
|
64411
|
+
self.updateDescriptionVisibility(newDescription);
|
64398
64412
|
}
|
64399
64413
|
})
|
64400
64414
|
], SurveyElementCore.prototype, "description", void 0);
|
@@ -65032,6 +65046,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
65032
65046
|
if (!this.survey) {
|
65033
65047
|
this.onSurveyLoad();
|
65034
65048
|
}
|
65049
|
+
this.updateDescriptionVisibility(this.description);
|
65035
65050
|
};
|
65036
65051
|
SurveyElement.prototype.setVisibleIndex = function (index) {
|
65037
65052
|
return 0;
|
@@ -65378,13 +65393,6 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
65378
65393
|
enumerable: false,
|
65379
65394
|
configurable: true
|
65380
65395
|
});
|
65381
|
-
Object.defineProperty(SurveyElement.prototype, "isDescriptionVisible", {
|
65382
|
-
get: function () {
|
65383
|
-
return (!!this.description || this.isDesignMode);
|
65384
|
-
},
|
65385
|
-
enumerable: false,
|
65386
|
-
configurable: true
|
65387
|
-
});
|
65388
65396
|
Object.defineProperty(SurveyElement.prototype, "rootStyle", {
|
65389
65397
|
get: function () {
|
65390
65398
|
var style = {};
|
@@ -73829,9 +73837,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
73829
73837
|
|
73830
73838
|
|
73831
73839
|
|
73832
|
-
function tryNavigateToPage(survey,
|
73840
|
+
function tryNavigateToPage(survey, page) {
|
73833
73841
|
if (survey.isDesignMode)
|
73834
73842
|
return;
|
73843
|
+
var index = survey.visiblePages.indexOf(page);
|
73835
73844
|
if (index < survey.currentPageNo) {
|
73836
73845
|
survey.currentPageNo = index;
|
73837
73846
|
}
|
@@ -73844,7 +73853,7 @@ function tryNavigateToPage(survey, index) {
|
|
73844
73853
|
return true;
|
73845
73854
|
}
|
73846
73855
|
function createTOCListModel(survey) {
|
73847
|
-
var items = survey.pages.map(function (page
|
73856
|
+
var items = survey.pages.map(function (page) {
|
73848
73857
|
return new _actions_action__WEBPACK_IMPORTED_MODULE_0__["Action"]({
|
73849
73858
|
id: page.name,
|
73850
73859
|
title: page.navigationTitle || page.title || page.name,
|
@@ -73852,7 +73861,7 @@ function createTOCListModel(survey) {
|
|
73852
73861
|
if (typeof document !== undefined && !!document.activeElement) {
|
73853
73862
|
!!document.activeElement.blur && document.activeElement.blur();
|
73854
73863
|
}
|
73855
|
-
return tryNavigateToPage(survey,
|
73864
|
+
return tryNavigateToPage(survey, page);
|
73856
73865
|
},
|
73857
73866
|
visible: new _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return page.isVisible && !page.isStartPage; })
|
73858
73867
|
});
|