survey-react 1.12.54 → 1.12.56
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/README.md +6 -2
- package/defaultV2.css +1 -1
- package/defaultV2.min.css +1 -1
- 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 +1 -1
- package/survey.react.js +47 -43
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# SurveyJS Form Library for React
|
|
1
|
+
# SurveyJS Form Library for React (Obsolete)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
<video src="https://github.com/surveyjs/survey-library/assets/22315929/b24a68bf-d703-4096-835b-752f5f610aa6"></video>
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
SurveyJS Form Library is a free and open-source MIT-licensed JavaScript form builder library that allows you to design dynamic, data-driven, multi-language survey forms and run them in your web applications.
|
|
8
8
|
|
|
9
|
-
>
|
|
9
|
+
> This package provides a **legacy Knockout-based version** of SurveyJS Form Library for React. For new projects, use the React-only implementation instead:
|
|
10
|
+
>
|
|
11
|
+
> - [`survey-react-ui`](https://www.npmjs.com/package/survey-react-ui)
|
|
12
|
+
>
|
|
13
|
+
> To learn how to integrate it into your application, refer to the following tutorial: [Add a Survey to a React Application](https://surveyjs.io/form-library/documentation/get-started-react).
|
|
10
14
|
|
|
11
15
|
## Resources
|
|
12
16
|
|
package/defaultV2.css
CHANGED
package/defaultV2.min.css
CHANGED
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
|
@@ -7344,7 +7344,7 @@ declare module "packages/survey-core/src/question_signaturepad" {
|
|
|
7344
7344
|
* [View Demo](https://surveyjs.io/form-library/examples/signature-pad-widget-javascript/ (linkStyle))
|
|
7345
7345
|
*/
|
|
7346
7346
|
export class QuestionSignaturePadModel extends QuestionFileModelBase {
|
|
7347
|
-
|
|
7347
|
+
hasDrawnStroke: boolean;
|
|
7348
7348
|
isReadyForUpload: boolean;
|
|
7349
7349
|
private getPenColorFromTheme;
|
|
7350
7350
|
private updateColors;
|
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.56
|
|
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
|
*/
|
|
@@ -61868,6 +61868,7 @@ var question_file_QuestionFileModelBase = /** @class */ (function (_super) {
|
|
|
61868
61868
|
QuestionFileModelBase.prototype.uploadFiles = function (files) {
|
|
61869
61869
|
var _this = this;
|
|
61870
61870
|
if (this.survey) {
|
|
61871
|
+
this.errors = [];
|
|
61871
61872
|
this.stateChanged("loading");
|
|
61872
61873
|
this.survey.uploadFiles(this, this.name, files, function (arg1, arg2) {
|
|
61873
61874
|
if (Array.isArray(arg1)) {
|
|
@@ -63510,6 +63511,39 @@ var question_rating_decorate = (undefined && undefined.__decorate) || function (
|
|
|
63510
63511
|
|
|
63511
63512
|
|
|
63512
63513
|
|
|
63514
|
+
function getColorFromProperty(varName) {
|
|
63515
|
+
if ("function" === typeof getComputedStyle) {
|
|
63516
|
+
var style = getComputedStyle(DomDocumentHelper.getDocumentElement());
|
|
63517
|
+
return style.getPropertyValue && style.getPropertyValue(varName);
|
|
63518
|
+
}
|
|
63519
|
+
return "";
|
|
63520
|
+
}
|
|
63521
|
+
function getRGBColor(themeVariables, colorName, varName) {
|
|
63522
|
+
var str = !!themeVariables && themeVariables[colorName];
|
|
63523
|
+
if (!str)
|
|
63524
|
+
str = getColorFromProperty(varName);
|
|
63525
|
+
if (!str)
|
|
63526
|
+
return null;
|
|
63527
|
+
var canvasElement = DomDocumentHelper.createElement("canvas");
|
|
63528
|
+
if (!canvasElement)
|
|
63529
|
+
return null;
|
|
63530
|
+
var ctx = canvasElement.getContext("2d");
|
|
63531
|
+
ctx.fillStyle = str;
|
|
63532
|
+
if (ctx.fillStyle == "#000000") {
|
|
63533
|
+
ctx.fillStyle = getColorFromProperty(varName);
|
|
63534
|
+
}
|
|
63535
|
+
var newStr = ctx.fillStyle;
|
|
63536
|
+
if (newStr.startsWith("rgba")) {
|
|
63537
|
+
return newStr.substring(5, newStr.length - 1).split(",").map(function (c) { return +(c.trim()); });
|
|
63538
|
+
}
|
|
63539
|
+
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(newStr);
|
|
63540
|
+
return result ? [
|
|
63541
|
+
parseInt(result[1], 16),
|
|
63542
|
+
parseInt(result[2], 16),
|
|
63543
|
+
parseInt(result[3], 16),
|
|
63544
|
+
1
|
|
63545
|
+
] : null;
|
|
63546
|
+
}
|
|
63513
63547
|
var question_rating_RenderedRatingItem = /** @class */ (function (_super) {
|
|
63514
63548
|
question_rating_extends(RenderedRatingItem, _super);
|
|
63515
63549
|
function RenderedRatingItem(itemValue, locString) {
|
|
@@ -63821,42 +63855,12 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
63821
63855
|
return;
|
|
63822
63856
|
if (QuestionRatingModel.colorsCalculated)
|
|
63823
63857
|
return;
|
|
63824
|
-
|
|
63825
|
-
|
|
63826
|
-
|
|
63827
|
-
|
|
63828
|
-
|
|
63829
|
-
|
|
63830
|
-
if (!str)
|
|
63831
|
-
str = getColorFromProperty(varName);
|
|
63832
|
-
if (!str)
|
|
63833
|
-
return null;
|
|
63834
|
-
var canvasElement = DomDocumentHelper.createElement("canvas");
|
|
63835
|
-
if (!canvasElement)
|
|
63836
|
-
return null;
|
|
63837
|
-
var ctx = canvasElement.getContext("2d");
|
|
63838
|
-
ctx.fillStyle = str;
|
|
63839
|
-
if (ctx.fillStyle == "#000000") {
|
|
63840
|
-
ctx.fillStyle = getColorFromProperty(varName);
|
|
63841
|
-
}
|
|
63842
|
-
var newStr = ctx.fillStyle;
|
|
63843
|
-
if (newStr.startsWith("rgba")) {
|
|
63844
|
-
return newStr.substring(5, newStr.length - 1).split(",").map(function (c) { return +(c.trim()); });
|
|
63845
|
-
}
|
|
63846
|
-
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(newStr);
|
|
63847
|
-
return result ? [
|
|
63848
|
-
parseInt(result[1], 16),
|
|
63849
|
-
parseInt(result[2], 16),
|
|
63850
|
-
parseInt(result[3], 16),
|
|
63851
|
-
1
|
|
63852
|
-
] : null;
|
|
63853
|
-
}
|
|
63854
|
-
QuestionRatingModel.badColor = getRGBColor("--sjs-special-red", "--sd-rating-bad-color");
|
|
63855
|
-
QuestionRatingModel.normalColor = getRGBColor("--sjs-special-yellow", "--sd-rating-normal-color");
|
|
63856
|
-
QuestionRatingModel.goodColor = getRGBColor("--sjs-special-green", "--sd-rating-good-color");
|
|
63857
|
-
QuestionRatingModel.badColorLight = getRGBColor("--sjs-special-red-light", "--sd-rating-bad-color-light");
|
|
63858
|
-
QuestionRatingModel.normalColorLight = getRGBColor("--sjs-special-yellow-light", "--sd-rating-normal-color-light");
|
|
63859
|
-
QuestionRatingModel.goodColorLight = getRGBColor("--sjs-special-green-light", "--sd-rating-good-color-light");
|
|
63858
|
+
QuestionRatingModel.badColor = getRGBColor(themeVariables, "--sjs-special-red", "--sd-rating-bad-color");
|
|
63859
|
+
QuestionRatingModel.normalColor = getRGBColor(themeVariables, "--sjs-special-yellow", "--sd-rating-normal-color");
|
|
63860
|
+
QuestionRatingModel.goodColor = getRGBColor(themeVariables, "--sjs-special-green", "--sd-rating-good-color");
|
|
63861
|
+
QuestionRatingModel.badColorLight = getRGBColor(themeVariables, "--sjs-special-red-light", "--sd-rating-bad-color-light");
|
|
63862
|
+
QuestionRatingModel.normalColorLight = getRGBColor(themeVariables, "--sjs-special-yellow-light", "--sd-rating-normal-color-light");
|
|
63863
|
+
QuestionRatingModel.goodColorLight = getRGBColor(themeVariables, "--sjs-special-green-light", "--sd-rating-good-color-light");
|
|
63860
63864
|
this.colorsCalculated = true;
|
|
63861
63865
|
this.resetRenderedItems();
|
|
63862
63866
|
};
|
|
@@ -66851,6 +66855,7 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
|
66851
66855
|
this.canvas.getContext("2d").clearRect(0, 0, this.canvas.width * this.scale, this.canvas.height * this.scale);
|
|
66852
66856
|
this.signaturePad.clear();
|
|
66853
66857
|
}
|
|
66858
|
+
this.hasDrawnStroke = false;
|
|
66854
66859
|
this.valueWasChangedFromLastUpload = false;
|
|
66855
66860
|
return;
|
|
66856
66861
|
}
|
|
@@ -66914,11 +66919,10 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
|
66914
66919
|
this.updateColors(signaturePad);
|
|
66915
66920
|
signaturePad.addEventListener("beginStroke", function () {
|
|
66916
66921
|
_this.scaleCanvas();
|
|
66917
|
-
_this.
|
|
66922
|
+
_this.hasDrawnStroke = true;
|
|
66918
66923
|
canvas.focus();
|
|
66919
66924
|
}, { once: false });
|
|
66920
66925
|
signaturePad.addEventListener("endStroke", function () {
|
|
66921
|
-
_this.isDrawingValue = false;
|
|
66922
66926
|
if (_this.storeDataAsText) {
|
|
66923
66927
|
_this.updateValue();
|
|
66924
66928
|
}
|
|
@@ -67118,7 +67122,7 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
|
67118
67122
|
configurable: true
|
|
67119
67123
|
});
|
|
67120
67124
|
QuestionSignaturePadModel.prototype.nothingIsDrawn = function () {
|
|
67121
|
-
var isDrawing = this.
|
|
67125
|
+
var isDrawing = this.hasDrawnStroke;
|
|
67122
67126
|
var isEmpty = this.isEmpty();
|
|
67123
67127
|
var isUploading = this.isUploading;
|
|
67124
67128
|
var valueWasChangedFromLastUpload = this.valueWasChangedFromLastUpload;
|
|
@@ -67168,7 +67172,7 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
|
67168
67172
|
};
|
|
67169
67173
|
question_signaturepad_decorate([
|
|
67170
67174
|
jsonobject_property({ defaultValue: false })
|
|
67171
|
-
], QuestionSignaturePadModel.prototype, "
|
|
67175
|
+
], QuestionSignaturePadModel.prototype, "hasDrawnStroke", void 0);
|
|
67172
67176
|
question_signaturepad_decorate([
|
|
67173
67177
|
jsonobject_property({ defaultValue: false })
|
|
67174
67178
|
], QuestionSignaturePadModel.prototype, "isReadyForUpload", void 0);
|
|
@@ -73356,9 +73360,9 @@ Serializer.addClass("currencymask", [
|
|
|
73356
73360
|
|
|
73357
73361
|
var Version;
|
|
73358
73362
|
var ReleaseDate;
|
|
73359
|
-
Version = "" + "1.12.
|
|
73363
|
+
Version = "" + "1.12.56";
|
|
73360
73364
|
settings.version = Version;
|
|
73361
|
-
ReleaseDate = "" + "2025-
|
|
73365
|
+
ReleaseDate = "" + "2025-10-21";
|
|
73362
73366
|
function checkLibraryVersion(ver, libraryName) {
|
|
73363
73367
|
if (Version != ver) {
|
|
73364
73368
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|