survey-react-ui 1.9.138 → 1.9.139
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/package.json +1 -1
- package/survey-react-ui.js +60 -15
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -2
package/package.json
CHANGED
package/survey-react-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.139
|
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -188,9 +188,27 @@ var BaseAction = /** @class */ (function (_super) {
|
|
|
188
188
|
__extends(BaseAction, _super);
|
|
189
189
|
function BaseAction() {
|
|
190
190
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
191
|
+
_this.rendredIdValue = BaseAction.getNextRendredId();
|
|
191
192
|
_this.iconSize = 24;
|
|
192
193
|
return _this;
|
|
193
194
|
}
|
|
195
|
+
BaseAction.getNextRendredId = function () { return BaseAction.renderedId++; };
|
|
196
|
+
Object.defineProperty(BaseAction.prototype, "renderedId", {
|
|
197
|
+
get: function () { return this.rendredIdValue; },
|
|
198
|
+
enumerable: false,
|
|
199
|
+
configurable: true
|
|
200
|
+
});
|
|
201
|
+
Object.defineProperty(BaseAction.prototype, "owner", {
|
|
202
|
+
get: function () { return this.ownerValue; },
|
|
203
|
+
set: function (val) {
|
|
204
|
+
if (val !== this.owner) {
|
|
205
|
+
this.ownerValue = val;
|
|
206
|
+
this.locStrsChanged();
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
enumerable: false,
|
|
210
|
+
configurable: true
|
|
211
|
+
});
|
|
194
212
|
Object.defineProperty(BaseAction.prototype, "visible", {
|
|
195
213
|
get: function () {
|
|
196
214
|
return this.getVisible();
|
|
@@ -315,6 +333,7 @@ var BaseAction = /** @class */ (function (_super) {
|
|
|
315
333
|
}
|
|
316
334
|
return args.isTrusted;
|
|
317
335
|
};
|
|
336
|
+
BaseAction.renderedId = 1;
|
|
318
337
|
__decorate([
|
|
319
338
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
320
339
|
], BaseAction.prototype, "tooltip", void 0);
|
|
@@ -3589,7 +3608,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3589
3608
|
|
|
3590
3609
|
|
|
3591
3610
|
|
|
3592
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.
|
|
3611
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.139", "survey-react-ui");
|
|
3593
3612
|
|
|
3594
3613
|
|
|
3595
3614
|
/***/ }),
|
|
@@ -11542,7 +11561,7 @@ var englishStrings = {
|
|
|
11542
11561
|
uploadingFile: "Your file is uploading. Please wait several seconds and try again.",
|
|
11543
11562
|
loadingFile: "Loading...",
|
|
11544
11563
|
chooseFile: "Choose file(s)...",
|
|
11545
|
-
noFileChosen: "No file
|
|
11564
|
+
noFileChosen: "No file selected",
|
|
11546
11565
|
filePlaceholder: "Drag and drop a file here or click the button below to select a file to upload.",
|
|
11547
11566
|
confirmDelete: "Are you sure you want to delete this record?",
|
|
11548
11567
|
keyDuplicationError: "This value should be unique.",
|
|
@@ -11572,6 +11591,7 @@ var englishStrings = {
|
|
|
11572
11591
|
timerLimitSurvey: "You have spent {0} of {1} in total.",
|
|
11573
11592
|
clearCaption: "Clear",
|
|
11574
11593
|
signaturePlaceHolder: "Sign here",
|
|
11594
|
+
signaturePlaceHolderReadOnly: "No signature",
|
|
11575
11595
|
chooseFileCaption: "Select File",
|
|
11576
11596
|
takePhotoCaption: "Take Photo",
|
|
11577
11597
|
photoPlaceholder: "Click the button below to take a photo using the camera.",
|
|
@@ -11588,7 +11608,7 @@ var englishStrings = {
|
|
|
11588
11608
|
filterStringPlaceholder: "Type to search...",
|
|
11589
11609
|
emptyMessage: "No data to display",
|
|
11590
11610
|
noEntriesText: "No entries yet.\nClick the button below to add a new entry.",
|
|
11591
|
-
noEntriesReadonlyText: "No entries
|
|
11611
|
+
noEntriesReadonlyText: "No entries",
|
|
11592
11612
|
more: "More",
|
|
11593
11613
|
tagboxDoneButtonCaption: "OK",
|
|
11594
11614
|
selectToRankEmptyRankedAreaText: "All choices are selected for ranking",
|
|
@@ -12697,7 +12717,7 @@ var SurveyFilePreview = /** @class */ (function (_super) {
|
|
|
12697
12717
|
var previews = this.question.previewValue.map(function (val, index) {
|
|
12698
12718
|
if (!val)
|
|
12699
12719
|
return null;
|
|
12700
|
-
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { key: _this.question.inputId + "_" + index, className: _this.question.cssClasses.
|
|
12720
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { key: _this.question.inputId + "_" + index, className: _this.question.cssClasses.previewItem, style: { display: _this.question.isPreviewVisible(index) ? undefined : "none" } },
|
|
12701
12721
|
_this.renderFileSign(_this.question.cssClasses.fileSign, val),
|
|
12702
12722
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.getImageWrapperCss(val) },
|
|
12703
12723
|
_this.question.canPreviewImage(val) ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("img", { src: val.content, style: { height: _this.question.imageHeight, width: _this.question.imageWidth }, alt: "File preview" })) : (_this.question.cssClasses.defaultImage ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { iconName: _this.question.cssClasses.defaultImageIconId, size: "auto", className: _this.question.cssClasses.defaultImage })) : null),
|
|
@@ -12959,7 +12979,7 @@ var ListItem = /** @class */ (function (_super) {
|
|
|
12959
12979
|
event.stopPropagation();
|
|
12960
12980
|
}, onPointerDown: function (event) { return _this.model.onPointerDown(event, _this.item); } },
|
|
12961
12981
|
separator,
|
|
12962
|
-
contentWrap));
|
|
12982
|
+
contentWrap), this.item);
|
|
12963
12983
|
};
|
|
12964
12984
|
ListItem.prototype.componentDidMount = function () {
|
|
12965
12985
|
_super.prototype.componentDidMount.call(this);
|
|
@@ -20213,8 +20233,8 @@ var SurveyQuestionPanelDynamic = /** @class */ (function (_super) {
|
|
|
20213
20233
|
SurveyQuestionPanelDynamic.prototype.renderElement = function () {
|
|
20214
20234
|
var panels = [];
|
|
20215
20235
|
if (this.question.isRenderModeList) {
|
|
20216
|
-
for (var i = 0; i < this.question.
|
|
20217
|
-
var panel = this.question.
|
|
20236
|
+
for (var i = 0; i < this.question.visiblePanels.length; i++) {
|
|
20237
|
+
var panel = this.question.visiblePanels[i];
|
|
20218
20238
|
panels.push(react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionPanelDynamicItem, { key: panel.id, element: panel, question: this.question, index: i, cssClasses: this.question.cssClasses, isDisplayMode: this.isDisplayMode, creator: this.creator }));
|
|
20219
20239
|
}
|
|
20220
20240
|
}
|
|
@@ -20697,12 +20717,12 @@ var SurveyQuestionRanking = /** @class */ (function (_super) {
|
|
|
20697
20717
|
return items;
|
|
20698
20718
|
};
|
|
20699
20719
|
SurveyQuestionRanking.prototype.renderItem = function (item, i, handleKeydown, handlePointerDown, cssClasses, itemClass, question, unrankedItem) {
|
|
20700
|
-
var key =
|
|
20720
|
+
var key = "id-" + item.renderedId;
|
|
20701
20721
|
var text = this.renderLocString(item.locText);
|
|
20702
20722
|
var index = i;
|
|
20703
|
-
var indexText = this.question.getNumberByIndex(
|
|
20723
|
+
var indexText = this.question.getNumberByIndex(index);
|
|
20704
20724
|
var tabIndex = this.question.getItemTabIndex(item);
|
|
20705
|
-
var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRankingItem, { key:
|
|
20725
|
+
var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRankingItem, { key: item.value, text: text, index: index, indexText: indexText, itemTabIndex: tabIndex, handleKeydown: handleKeydown, handlePointerDown: handlePointerDown, cssClasses: cssClasses, itemClass: itemClass, question: question, unrankedItem: unrankedItem, item: item }));
|
|
20706
20726
|
var survey = this.question.survey;
|
|
20707
20727
|
var wrappedItem = null;
|
|
20708
20728
|
if (!!survey) {
|
|
@@ -21452,7 +21472,7 @@ var SurveyQuestionSignaturePad = /** @class */ (function (_super) {
|
|
|
21452
21472
|
var loadingIndicator = this.question.showLoadingIndicator ? this.renderLoadingIndicator() : null;
|
|
21453
21473
|
var clearButton = this.renderCleanButton();
|
|
21454
21474
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.root, ref: function (root) { return (_this.setControl(root)); }, style: { width: this.question.renderedCanvasWidth } },
|
|
21455
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.placeholder, style: { display: this.question.needShowPlaceholder() ? "" : "none" } }, this.renderLocString(this.question.
|
|
21475
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.placeholder, style: { display: this.question.needShowPlaceholder() ? "" : "none" } }, this.renderLocString(this.question.locRenderedPlaceholder)),
|
|
21456
21476
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null,
|
|
21457
21477
|
this.renderBackgroundImage(),
|
|
21458
21478
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("canvas", { tabIndex: -1, className: this.question.cssClasses.canvas, onBlur: this.question.onBlur })),
|
|
@@ -23733,11 +23753,14 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
23733
23753
|
enumerable: false,
|
|
23734
23754
|
configurable: true
|
|
23735
23755
|
});
|
|
23756
|
+
SurveyElement.prototype.canHaveFrameStyles = function () {
|
|
23757
|
+
return (this.parent !== undefined && (!this.hasParent || this.parent && this.parent.showPanelAsPage));
|
|
23758
|
+
};
|
|
23736
23759
|
SurveyElement.prototype.getHasFrameV2 = function () {
|
|
23737
|
-
return this.shouldAddRunnerStyles() &&
|
|
23760
|
+
return this.shouldAddRunnerStyles() && this.canHaveFrameStyles();
|
|
23738
23761
|
};
|
|
23739
23762
|
SurveyElement.prototype.getIsNested = function () {
|
|
23740
|
-
return this.shouldAddRunnerStyles() &&
|
|
23763
|
+
return this.shouldAddRunnerStyles() && !this.canHaveFrameStyles();
|
|
23741
23764
|
};
|
|
23742
23765
|
SurveyElement.prototype.getCssRoot = function (cssClasses) {
|
|
23743
23766
|
var isExpanadable = !!this.isCollapsed || !!this.isExpanded;
|
|
@@ -23957,9 +23980,31 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
23957
23980
|
.append(cssClasses.titleExpandable, isExpandable)
|
|
23958
23981
|
.append(cssClasses.titleExpanded, this.isExpanded)
|
|
23959
23982
|
.append(cssClasses.titleCollapsed, this.isCollapsed)
|
|
23960
|
-
.append(cssClasses.titleDisabled, this.
|
|
23983
|
+
.append(cssClasses.titleDisabled, this.isDisabledStyle)
|
|
23984
|
+
.append(cssClasses.titleReadOnly, this.isReadOnly)
|
|
23961
23985
|
.append(cssClasses.titleOnError, this.containsErrors).toString();
|
|
23962
23986
|
};
|
|
23987
|
+
Object.defineProperty(SurveyElement.prototype, "isDisabledStyle", {
|
|
23988
|
+
get: function () {
|
|
23989
|
+
return !this.isDefaultV2Theme && (this.isReadOnlyStyle || this.isPreviewStyle);
|
|
23990
|
+
},
|
|
23991
|
+
enumerable: false,
|
|
23992
|
+
configurable: true
|
|
23993
|
+
});
|
|
23994
|
+
Object.defineProperty(SurveyElement.prototype, "isReadOnlyStyle", {
|
|
23995
|
+
get: function () {
|
|
23996
|
+
return this.isReadOnly && !this.isPreviewStyle;
|
|
23997
|
+
},
|
|
23998
|
+
enumerable: false,
|
|
23999
|
+
configurable: true
|
|
24000
|
+
});
|
|
24001
|
+
Object.defineProperty(SurveyElement.prototype, "isPreviewStyle", {
|
|
24002
|
+
get: function () {
|
|
24003
|
+
return !!this.survey && this.survey.state === "preview";
|
|
24004
|
+
},
|
|
24005
|
+
enumerable: false,
|
|
24006
|
+
configurable: true
|
|
24007
|
+
});
|
|
23963
24008
|
SurveyElement.prototype.localeChanged = function () {
|
|
23964
24009
|
_super.prototype.localeChanged.call(this);
|
|
23965
24010
|
this.updateDescriptionVisibility(this.description);
|