survey-react 1.12.33 → 1.12.34
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.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 +16 -4
- package/survey.react.js +106 -34
- 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
@@ -17241,7 +17241,8 @@ declare module "packages/survey-core/src/dropdownListModel" {
|
|
17241
17241
|
protected applyHintString(): void;
|
17242
17242
|
get inputStringRendered(): string;
|
17243
17243
|
set inputStringRendered(val: string);
|
17244
|
-
|
17244
|
+
inputPlaceholder: string;
|
17245
|
+
get placeholderRendered(): string;
|
17245
17246
|
get listElementId(): string;
|
17246
17247
|
hasScroll: boolean;
|
17247
17248
|
hintString: string;
|
@@ -17261,6 +17262,7 @@ declare module "packages/survey-core/src/dropdownListModel" {
|
|
17261
17262
|
get inputMode(): "none" | "text";
|
17262
17263
|
setSearchEnabled(newValue: boolean): void;
|
17263
17264
|
setChoicesLazyLoadEnabled(newValue: boolean): void;
|
17265
|
+
setInputPlaceholder(newValue: string): void;
|
17264
17266
|
updateItems(): void;
|
17265
17267
|
onClick(event: any): void;
|
17266
17268
|
chevronPointerDown(event: any): void;
|
@@ -17296,9 +17298,10 @@ declare module "packages/survey-core/src/question_dropdown" {
|
|
17296
17298
|
export class QuestionDropdownModel extends QuestionSelectBase {
|
17297
17299
|
dropdownListModelValue: DropdownListModel;
|
17298
17300
|
lastSelectedItemValue: ItemValue;
|
17299
|
-
updateReadOnlyText(): void;
|
17300
17301
|
constructor(name: string);
|
17301
17302
|
locStrsChanged(): void;
|
17303
|
+
private updateReadOnlyText;
|
17304
|
+
private updateInputPlaceholder;
|
17302
17305
|
get showOptionsCaption(): boolean;
|
17303
17306
|
set showOptionsCaption(val: boolean);
|
17304
17307
|
get showClearButton(): boolean;
|
@@ -17394,7 +17397,10 @@ declare module "packages/survey-core/src/question_dropdown" {
|
|
17394
17397
|
*/
|
17395
17398
|
textWrapEnabled: boolean;
|
17396
17399
|
inputHasValue: boolean;
|
17397
|
-
readOnlyText: string;
|
17400
|
+
get readOnlyText(): string;
|
17401
|
+
set readOnlyText(val: string);
|
17402
|
+
get locReadOnlyText(): LocalizableString;
|
17403
|
+
protected calculateReadOnlyText(): string;
|
17398
17404
|
/**
|
17399
17405
|
* Enables lazy loading. If you set this property to `true`, you should implement the Survey's [`onChoicesLazyLoad`](https://surveyjs.io/form-library/documentation/surveymodel#onChoicesLazyLoad) event handler.
|
17400
17406
|
* @see choicesLazyLoadPageSize
|
@@ -18572,6 +18578,8 @@ declare module "packages/survey-core/src/question_rating" {
|
|
18572
18578
|
export class QuestionRatingModel extends Question {
|
18573
18579
|
constructor(name: string);
|
18574
18580
|
private setIconsToRateValues;
|
18581
|
+
locStrsChanged(): void;
|
18582
|
+
private updateReadOnlyText;
|
18575
18583
|
endLoadingFromJson(): void;
|
18576
18584
|
private _syncPropertiesChanging;
|
18577
18585
|
private registerSychProperties;
|
@@ -18829,7 +18837,9 @@ declare module "packages/survey-core/src/question_rating" {
|
|
18829
18837
|
get renderedValue(): any;
|
18830
18838
|
set renderedValue(val: any);
|
18831
18839
|
isItemSelected(item: ItemValue): boolean;
|
18832
|
-
get readOnlyText():
|
18840
|
+
get readOnlyText(): string;
|
18841
|
+
set readOnlyText(val: string);
|
18842
|
+
get locReadOnlyText(): LocalizableString;
|
18833
18843
|
needResponsiveWidth(): boolean;
|
18834
18844
|
protected supportResponsiveness(): boolean;
|
18835
18845
|
protected onBeforeSetCompactRenderer(): void;
|
@@ -19233,6 +19243,8 @@ declare module "packages/survey-core/src/question_buttongroup" {
|
|
19233
19243
|
*/
|
19234
19244
|
export class QuestionButtonGroupModel extends QuestionCheckboxBase {
|
19235
19245
|
constructor(name: string);
|
19246
|
+
locStrsChanged(): void;
|
19247
|
+
private updateReadOnlyText;
|
19236
19248
|
getType(): string;
|
19237
19249
|
protected getItemValueType(): string;
|
19238
19250
|
supportOther(): boolean;
|
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.12.
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.34
|
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
|
*/
|
@@ -49110,12 +49110,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
49110
49110
|
}
|
49111
49111
|
else if (isStrCiEqual(layoutElement.id, "buttons-navigation")) {
|
49112
49112
|
if (container === "contentTop") {
|
49113
|
-
if (
|
49113
|
+
if (this.isNavigationButtonsShowingOnTop) {
|
49114
49114
|
containerLayoutElements.push(layoutElement);
|
49115
49115
|
}
|
49116
49116
|
}
|
49117
49117
|
if (container === "contentBottom") {
|
49118
|
-
if (
|
49118
|
+
if (this.isNavigationButtonsShowingOnBottom) {
|
49119
49119
|
containerLayoutElements.push(layoutElement);
|
49120
49120
|
}
|
49121
49121
|
}
|
@@ -51387,7 +51387,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
51387
51387
|
};
|
51388
51388
|
QuestionSelectBase.prototype.updateValueFromSurvey = function (newValue, clearData) {
|
51389
51389
|
var newComment = "";
|
51390
|
-
if (this.hasOther &&
|
51390
|
+
if (this.hasOther && this.activeChoices.length > 0 &&
|
51391
51391
|
!this.isRunningChoices &&
|
51392
51392
|
!this.choicesByUrl.isRunning &&
|
51393
51393
|
this.getStoreOthersAsComment()) {
|
@@ -53229,6 +53229,7 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
53229
53229
|
_this.listModel = _this.createListModel();
|
53230
53230
|
_this.updateAfterListModelCreated(_this.listModel);
|
53231
53231
|
_this.setChoicesLazyLoadEnabled(_this.question.choicesLazyLoadEnabled);
|
53232
|
+
_this.setInputPlaceholder(_this.question.placeholder);
|
53232
53233
|
_this.setSearchEnabled(_this.question.searchEnabled);
|
53233
53234
|
_this.setTextWrapEnabled(_this.question.textWrapEnabled);
|
53234
53235
|
_this.createPopup();
|
@@ -53554,7 +53555,7 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
53554
53555
|
});
|
53555
53556
|
Object.defineProperty(DropdownListModel.prototype, "placeholderRendered", {
|
53556
53557
|
get: function () {
|
53557
|
-
return this.hintString ? "" : this.
|
53558
|
+
return (this.hintString || this.question.readOnly || !this.question.isEmpty()) ? "" : this.inputPlaceholder;
|
53558
53559
|
},
|
53559
53560
|
enumerable: false,
|
53560
53561
|
configurable: true
|
@@ -53665,6 +53666,9 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
53665
53666
|
DropdownListModel.prototype.setChoicesLazyLoadEnabled = function (newValue) {
|
53666
53667
|
this.listModel.setOnFilterStringChangedCallback(newValue ? this.listModelFilterStringChanged : undefined);
|
53667
53668
|
};
|
53669
|
+
DropdownListModel.prototype.setInputPlaceholder = function (newValue) {
|
53670
|
+
this.inputPlaceholder = newValue;
|
53671
|
+
};
|
53668
53672
|
DropdownListModel.prototype.updateItems = function () {
|
53669
53673
|
this.listModel.setItems(this.getAvailableItems());
|
53670
53674
|
};
|
@@ -53881,6 +53885,9 @@ var dropdownListModel_DropdownListModel = /** @class */ (function (_super) {
|
|
53881
53885
|
dropdownListModel_decorate([
|
53882
53886
|
jsonobject_property()
|
53883
53887
|
], DropdownListModel.prototype, "ariaActivedescendant", void 0);
|
53888
|
+
dropdownListModel_decorate([
|
53889
|
+
jsonobject_property()
|
53890
|
+
], DropdownListModel.prototype, "inputPlaceholder", void 0);
|
53884
53891
|
dropdownListModel_decorate([
|
53885
53892
|
jsonobject_property({
|
53886
53893
|
defaultValue: false,
|
@@ -53945,33 +53952,29 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
53945
53952
|
_this.ariaExpanded = "false";
|
53946
53953
|
_this.createLocalizableString("placeholder", _this, false, true);
|
53947
53954
|
_this.createLocalizableString("clearCaption", _this, false, true);
|
53955
|
+
_this.createLocalizableString("readOnlyText", _this, true);
|
53948
53956
|
_this.registerPropertyChangedHandlers(["choicesMin", "choicesMax", "choicesStep"], function () {
|
53949
53957
|
_this.onVisibleChoicesChanged();
|
53950
53958
|
});
|
53951
53959
|
_this.registerPropertyChangedHandlers(["value", "renderAs", "showOtherItem", "otherText", "placeholder", "choices", "visibleChoices"], function () {
|
53960
|
+
_this.getSingleSelectedItem();
|
53952
53961
|
_this.updateReadOnlyText();
|
53953
53962
|
});
|
53954
53963
|
_this.updateReadOnlyText();
|
53955
53964
|
return _this;
|
53956
53965
|
}
|
53957
|
-
QuestionDropdownModel.prototype.updateReadOnlyText = function () {
|
53958
|
-
var result = !!this.selectedItem ? "" : this.placeholder;
|
53959
|
-
if (this.renderAs == "select") {
|
53960
|
-
if (this.isOtherSelected) {
|
53961
|
-
result = this.otherText;
|
53962
|
-
}
|
53963
|
-
else if (this.isNoneSelected) {
|
53964
|
-
result = this.noneText;
|
53965
|
-
}
|
53966
|
-
else if (!!this.selectedItem) {
|
53967
|
-
result = this.selectedItemText;
|
53968
|
-
}
|
53969
|
-
}
|
53970
|
-
this.readOnlyText = result;
|
53971
|
-
};
|
53972
53966
|
QuestionDropdownModel.prototype.locStrsChanged = function () {
|
53973
53967
|
_super.prototype.locStrsChanged.call(this);
|
53974
53968
|
this.updateReadOnlyText();
|
53969
|
+
this.updateInputPlaceholder(this.placeholder);
|
53970
|
+
};
|
53971
|
+
QuestionDropdownModel.prototype.updateReadOnlyText = function () {
|
53972
|
+
this.readOnlyText = this.calculateReadOnlyText();
|
53973
|
+
};
|
53974
|
+
QuestionDropdownModel.prototype.updateInputPlaceholder = function (val) {
|
53975
|
+
if (!!this.dropdownListModelValue) {
|
53976
|
+
this.dropdownListModel.setInputPlaceholder(val);
|
53977
|
+
}
|
53975
53978
|
};
|
53976
53979
|
Object.defineProperty(QuestionDropdownModel.prototype, "showOptionsCaption", {
|
53977
53980
|
get: function () {
|
@@ -54009,6 +54012,7 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
54009
54012
|
},
|
54010
54013
|
set: function (val) {
|
54011
54014
|
this.setLocalizableStringText("placeholder", val);
|
54015
|
+
this.updateInputPlaceholder(val);
|
54012
54016
|
},
|
54013
54017
|
enumerable: false,
|
54014
54018
|
configurable: true
|
@@ -54156,6 +54160,34 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
54156
54160
|
enumerable: false,
|
54157
54161
|
configurable: true
|
54158
54162
|
});
|
54163
|
+
Object.defineProperty(QuestionDropdownModel.prototype, "readOnlyText", {
|
54164
|
+
get: function () {
|
54165
|
+
return this.getLocalizableStringText("readOnlyText");
|
54166
|
+
},
|
54167
|
+
set: function (val) {
|
54168
|
+
this.setLocalizableStringText("readOnlyText", val);
|
54169
|
+
},
|
54170
|
+
enumerable: false,
|
54171
|
+
configurable: true
|
54172
|
+
});
|
54173
|
+
Object.defineProperty(QuestionDropdownModel.prototype, "locReadOnlyText", {
|
54174
|
+
get: function () {
|
54175
|
+
return this.getLocalizableString("readOnlyText");
|
54176
|
+
},
|
54177
|
+
enumerable: false,
|
54178
|
+
configurable: true
|
54179
|
+
});
|
54180
|
+
QuestionDropdownModel.prototype.calculateReadOnlyText = function () {
|
54181
|
+
if (this.renderAs == "select") {
|
54182
|
+
if (this.isOtherSelected)
|
54183
|
+
return this.otherText;
|
54184
|
+
if (this.isNoneSelected)
|
54185
|
+
return this.noneText;
|
54186
|
+
if (!!this.selectedItem)
|
54187
|
+
return this.selectedItemText;
|
54188
|
+
}
|
54189
|
+
return !!this.selectedItem ? this.selectedItemText : this.placeholder;
|
54190
|
+
};
|
54159
54191
|
QuestionDropdownModel.prototype.getControlClass = function () {
|
54160
54192
|
return new CssClassBuilder()
|
54161
54193
|
.append(this.cssClasses.control)
|
@@ -54343,9 +54375,6 @@ var question_dropdown_QuestionDropdownModel = /** @class */ (function (_super) {
|
|
54343
54375
|
question_dropdown_decorate([
|
54344
54376
|
jsonobject_property({ defaultValue: false })
|
54345
54377
|
], QuestionDropdownModel.prototype, "inputHasValue", void 0);
|
54346
|
-
question_dropdown_decorate([
|
54347
|
-
jsonobject_property({ defaultValue: "" })
|
54348
|
-
], QuestionDropdownModel.prototype, "readOnlyText", void 0);
|
54349
54378
|
question_dropdown_decorate([
|
54350
54379
|
jsonobject_property({
|
54351
54380
|
onSet: function (newValue, target) {
|
@@ -59443,6 +59472,9 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
59443
59472
|
},
|
59444
59473
|
set: function (val) {
|
59445
59474
|
this.setLocalizableStringText("placeholder", val);
|
59475
|
+
if (!!this.dropdownListModelValue) {
|
59476
|
+
this.dropdownListModel.setInputPlaceholder(val);
|
59477
|
+
}
|
59446
59478
|
},
|
59447
59479
|
enumerable: false,
|
59448
59480
|
configurable: true
|
@@ -63340,6 +63372,11 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63340
63372
|
.onStringChanged.add(function (sender, options) {
|
63341
63373
|
_this.hasMaxRateDescription = !sender.isEmpty;
|
63342
63374
|
});
|
63375
|
+
_this.createLocalizableString("readOnlyText", _this, true);
|
63376
|
+
_this.registerPropertyChangedHandlers(["value", "renderAs", "placeholder", "choices", "visibleChoices"], function () {
|
63377
|
+
_this.updateReadOnlyText();
|
63378
|
+
});
|
63379
|
+
_this.updateReadOnlyText();
|
63343
63380
|
_this.initPropertyDependencies();
|
63344
63381
|
return _this;
|
63345
63382
|
}
|
@@ -63349,6 +63386,15 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
63349
63386
|
this.rateValues.map(function (item) { return item.icon = _this.getItemSmiley(item); });
|
63350
63387
|
}
|
63351
63388
|
};
|
63389
|
+
QuestionRatingModel.prototype.locStrsChanged = function () {
|
63390
|
+
var _a;
|
63391
|
+
_super.prototype.locStrsChanged.call(this);
|
63392
|
+
this.updateReadOnlyText();
|
63393
|
+
(_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.locStrsChanged();
|
63394
|
+
};
|
63395
|
+
QuestionRatingModel.prototype.updateReadOnlyText = function () {
|
63396
|
+
this.readOnlyText = this.displayValue || this.placeholder;
|
63397
|
+
};
|
63352
63398
|
QuestionRatingModel.prototype.endLoadingFromJson = function () {
|
63353
63399
|
_super.prototype.endLoadingFromJson.call(this);
|
63354
63400
|
if (this.jsonObj.rateMin !== undefined && this.jsonObj.rateCount !== undefined && this.jsonObj.rateMax === undefined) {
|
@@ -64154,9 +64200,17 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
64154
64200
|
};
|
64155
64201
|
Object.defineProperty(QuestionRatingModel.prototype, "readOnlyText", {
|
64156
64202
|
get: function () {
|
64157
|
-
|
64158
|
-
|
64159
|
-
|
64203
|
+
return this.getLocalizableStringText("readOnlyText");
|
64204
|
+
},
|
64205
|
+
set: function (val) {
|
64206
|
+
this.setLocalizableStringText("readOnlyText", val);
|
64207
|
+
},
|
64208
|
+
enumerable: false,
|
64209
|
+
configurable: true
|
64210
|
+
});
|
64211
|
+
Object.defineProperty(QuestionRatingModel.prototype, "locReadOnlyText", {
|
64212
|
+
get: function () {
|
64213
|
+
return this.getLocalizableString("readOnlyText");
|
64160
64214
|
},
|
64161
64215
|
enumerable: false,
|
64162
64216
|
configurable: true
|
@@ -71413,8 +71467,24 @@ var question_buttongroup_ButtonGroupItemValue = /** @class */ (function (_super)
|
|
71413
71467
|
var QuestionButtonGroupModel = /** @class */ (function (_super) {
|
71414
71468
|
question_buttongroup_extends(QuestionButtonGroupModel, _super);
|
71415
71469
|
function QuestionButtonGroupModel(name) {
|
71416
|
-
|
71470
|
+
var _this = _super.call(this, name) || this;
|
71471
|
+
_this.createLocalizableString("buttongroupOptionsCaption", _this, false, true);
|
71472
|
+
_this.createLocalizableString("readOnlyText", _this, true);
|
71473
|
+
_this.registerPropertyChangedHandlers(["value", "renderAs", "placeholder", "choices", "visibleChoices"], function () {
|
71474
|
+
_this.updateReadOnlyText();
|
71475
|
+
});
|
71476
|
+
_this.updateReadOnlyText();
|
71477
|
+
return _this;
|
71417
71478
|
}
|
71479
|
+
QuestionButtonGroupModel.prototype.locStrsChanged = function () {
|
71480
|
+
var _a;
|
71481
|
+
_super.prototype.locStrsChanged.call(this);
|
71482
|
+
this.updateReadOnlyText();
|
71483
|
+
(_a = this.dropdownListModelValue) === null || _a === void 0 ? void 0 : _a.locStrsChanged();
|
71484
|
+
};
|
71485
|
+
QuestionButtonGroupModel.prototype.updateReadOnlyText = function () {
|
71486
|
+
this.readOnlyText = this.displayValue || this.placeholder;
|
71487
|
+
};
|
71418
71488
|
QuestionButtonGroupModel.prototype.getType = function () {
|
71419
71489
|
return "buttongroup";
|
71420
71490
|
};
|
@@ -72999,9 +73069,9 @@ Serializer.addClass("currencymask", [
|
|
72999
73069
|
|
73000
73070
|
var Version;
|
73001
73071
|
var ReleaseDate;
|
73002
|
-
Version = "" + "1.12.
|
73072
|
+
Version = "" + "1.12.34";
|
73003
73073
|
settings.version = Version;
|
73004
|
-
ReleaseDate = "" + "2025-04-
|
73074
|
+
ReleaseDate = "" + "2025-04-29";
|
73005
73075
|
function checkLibraryVersion(ver, libraryName) {
|
73006
73076
|
if (Version != ver) {
|
73007
73077
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -87515,19 +87585,21 @@ var dropdown_base_SurveyQuestionDropdownBase = /** @class */ (function (_super)
|
|
87515
87585
|
return this.questionBase.renderedValue;
|
87516
87586
|
};
|
87517
87587
|
SurveyQuestionDropdownBase.prototype.renderReadOnlyElement = function () {
|
87518
|
-
|
87588
|
+
if (this.question.locReadOnlyText) {
|
87589
|
+
return this.renderLocString(this.question.locReadOnlyText);
|
87590
|
+
}
|
87591
|
+
else {
|
87592
|
+
return null;
|
87593
|
+
}
|
87519
87594
|
};
|
87520
87595
|
SurveyQuestionDropdownBase.prototype.renderSelect = function (cssClasses) {
|
87521
87596
|
var _this = this;
|
87522
87597
|
var _a, _b;
|
87523
87598
|
var selectElement = null;
|
87524
87599
|
if (this.question.isReadOnly) {
|
87525
|
-
var text = (this.question.selectedItemLocText) ? this.renderLocString(this.question.selectedItemLocText) : "";
|
87526
87600
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
87527
87601
|
// @ts-ignore
|
87528
|
-
selectElement = external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { id: this.question.inputId, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, tabIndex: this.question.isDisabledAttr ? undefined : 0, className: this.question.getControlClass(), ref: function (div) { return (_this.setControl(div)); } },
|
87529
|
-
text,
|
87530
|
-
this.renderReadOnlyElement());
|
87602
|
+
selectElement = external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { id: this.question.inputId, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, tabIndex: this.question.isDisabledAttr ? undefined : 0, className: this.question.getControlClass(), ref: function (div) { return (_this.setControl(div)); } }, this.renderReadOnlyElement());
|
87531
87603
|
}
|
87532
87604
|
else {
|
87533
87605
|
selectElement = external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](external_root_React_commonjs2_react_commonjs_react_amd_react_["Fragment"], null,
|