survey-react-ui 1.11.5 → 1.11.6
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 +2 -2
- package/survey-react-ui.js +61 -38
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-react-ui",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.6",
|
|
4
4
|
"description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"typings": "survey-react-ui.d.ts",
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"survey-core": "1.11.
|
|
24
|
+
"survey-core": "1.11.6",
|
|
25
25
|
"react": "^16.5.0 || ^17.0.1 || ^18.2.0",
|
|
26
26
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.2.0"
|
|
27
27
|
}
|
package/survey-react-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.11.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.11.6
|
|
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
|
*/
|
|
@@ -566,6 +566,23 @@ var Action = /** @class */ (function (_super) {
|
|
|
566
566
|
this.locTooltipChanged();
|
|
567
567
|
this.locStrChangedInPopupModel();
|
|
568
568
|
};
|
|
569
|
+
Action.prototype.doAction = function (args) {
|
|
570
|
+
var evt = !!args.originalEvent ? args.originalEvent : args;
|
|
571
|
+
this.action(this, evt.isTrusted);
|
|
572
|
+
evt.preventDefault();
|
|
573
|
+
evt.stopPropagation();
|
|
574
|
+
return true;
|
|
575
|
+
};
|
|
576
|
+
Action.prototype.doMouseDown = function () {
|
|
577
|
+
this.isMouseDown = true;
|
|
578
|
+
};
|
|
579
|
+
Action.prototype.doFocus = function (args) {
|
|
580
|
+
if (!!this.onFocus) {
|
|
581
|
+
var evt = !!args.originalEvent ? args.originalEvent : args;
|
|
582
|
+
this.onFocus(this.isMouseDown, evt);
|
|
583
|
+
}
|
|
584
|
+
this.isMouseDown = false;
|
|
585
|
+
};
|
|
569
586
|
Action.prototype.locStrChangedInPopupModel = function () {
|
|
570
587
|
if (!this.popupModel || !this.popupModel.contentComponentData || !this.popupModel.contentComponentData.model)
|
|
571
588
|
return;
|
|
@@ -646,6 +663,9 @@ var Action = /** @class */ (function (_super) {
|
|
|
646
663
|
__decorate([
|
|
647
664
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
648
665
|
], Action.prototype, "action", void 0);
|
|
666
|
+
__decorate([
|
|
667
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
668
|
+
], Action.prototype, "onFocus", void 0);
|
|
649
669
|
__decorate([
|
|
650
670
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
651
671
|
], Action.prototype, "_component", void 0);
|
|
@@ -3783,7 +3803,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3783
3803
|
|
|
3784
3804
|
|
|
3785
3805
|
|
|
3786
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.11.
|
|
3806
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.11.6", "survey-react-ui");
|
|
3787
3807
|
|
|
3788
3808
|
|
|
3789
3809
|
/***/ }),
|
|
@@ -10397,7 +10417,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
10397
10417
|
JsonObject.prototype.toJsonObjectCore = function (obj, property, options) {
|
|
10398
10418
|
if (!obj || !obj.getType)
|
|
10399
10419
|
return obj;
|
|
10400
|
-
if (typeof obj.getData === "function")
|
|
10420
|
+
if (!obj.isSurvey && typeof obj.getData === "function")
|
|
10401
10421
|
return obj.getData();
|
|
10402
10422
|
var result = {};
|
|
10403
10423
|
if (property != null && !property.className) {
|
|
@@ -12515,7 +12535,7 @@ var SurveyActionBarItem = /** @class */ (function (_super) {
|
|
|
12515
12535
|
var title = this.item.tooltip || this.item.title;
|
|
12516
12536
|
var buttonContent = this.renderButtonContent();
|
|
12517
12537
|
var tabIndex = this.item.disableTabStop ? -1 : undefined;
|
|
12518
|
-
var button = Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_3__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled,
|
|
12538
|
+
var button = Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_3__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled, onMouseDown: function () { return _this.item.doMouseDown(); }, onFocus: function (args) { return _this.item.doFocus(args); }, onClick: function (args) { return _this.item.doAction(args); }, title: title, tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
|
|
12519
12539
|
return button;
|
|
12520
12540
|
};
|
|
12521
12541
|
return SurveyActionBarItem;
|
|
@@ -17755,7 +17775,7 @@ function attachKey2click(element, viewModel, options) {
|
|
|
17755
17775
|
return false;
|
|
17756
17776
|
},
|
|
17757
17777
|
onKeyDown: function (evt) { return Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickDown"])(evt, options); },
|
|
17758
|
-
onBlur: function (evt) { return Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickBlur"])(evt); }
|
|
17778
|
+
onBlur: function (evt) { return Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickBlur"])(evt); },
|
|
17759
17779
|
});
|
|
17760
17780
|
}
|
|
17761
17781
|
|
|
@@ -23329,6 +23349,42 @@ var SurveyElementCore = /** @class */ (function (_super) {
|
|
|
23329
23349
|
SurveyElementCore.prototype.createLocTitleProperty = function () {
|
|
23330
23350
|
return this.createLocalizableString("title", this, true);
|
|
23331
23351
|
};
|
|
23352
|
+
Object.defineProperty(SurveyElementCore.prototype, "isPage", {
|
|
23353
|
+
/**
|
|
23354
|
+
* Returns `true` if the survey element is a page.
|
|
23355
|
+
* @see Base.getType
|
|
23356
|
+
*/
|
|
23357
|
+
get: function () { return false; },
|
|
23358
|
+
enumerable: false,
|
|
23359
|
+
configurable: true
|
|
23360
|
+
});
|
|
23361
|
+
Object.defineProperty(SurveyElementCore.prototype, "isPanel", {
|
|
23362
|
+
/**
|
|
23363
|
+
* Returns `true` if the survey element is a panel.
|
|
23364
|
+
* @see Base.getType
|
|
23365
|
+
*/
|
|
23366
|
+
get: function () { return false; },
|
|
23367
|
+
enumerable: false,
|
|
23368
|
+
configurable: true
|
|
23369
|
+
});
|
|
23370
|
+
Object.defineProperty(SurveyElementCore.prototype, "isQuestion", {
|
|
23371
|
+
/**
|
|
23372
|
+
* Returns `true` if the survey element is a question.
|
|
23373
|
+
* @see Base.getType
|
|
23374
|
+
*/
|
|
23375
|
+
get: function () { return false; },
|
|
23376
|
+
enumerable: false,
|
|
23377
|
+
configurable: true
|
|
23378
|
+
});
|
|
23379
|
+
Object.defineProperty(SurveyElementCore.prototype, "isSurvey", {
|
|
23380
|
+
/**
|
|
23381
|
+
* Returns `true` if the element is a survey.
|
|
23382
|
+
* @see Base.getType
|
|
23383
|
+
*/
|
|
23384
|
+
get: function () { return false; },
|
|
23385
|
+
enumerable: false,
|
|
23386
|
+
configurable: true
|
|
23387
|
+
});
|
|
23332
23388
|
Object.defineProperty(SurveyElementCore.prototype, "title", {
|
|
23333
23389
|
/**
|
|
23334
23390
|
* A title for the survey element. If `title` is undefined, the `name` property value is displayed instead.
|
|
@@ -24160,39 +24216,6 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
24160
24216
|
SurveyElement.prototype.setVisibleIndex = function (index) {
|
|
24161
24217
|
return 0;
|
|
24162
24218
|
};
|
|
24163
|
-
Object.defineProperty(SurveyElement.prototype, "isPage", {
|
|
24164
|
-
/**
|
|
24165
|
-
* Returns `true` if the survey element is a page.
|
|
24166
|
-
* @see Base.getType
|
|
24167
|
-
*/
|
|
24168
|
-
get: function () {
|
|
24169
|
-
return false;
|
|
24170
|
-
},
|
|
24171
|
-
enumerable: false,
|
|
24172
|
-
configurable: true
|
|
24173
|
-
});
|
|
24174
|
-
Object.defineProperty(SurveyElement.prototype, "isPanel", {
|
|
24175
|
-
/**
|
|
24176
|
-
* Returns `true` if the survey element is a panel.
|
|
24177
|
-
* @see Base.getType
|
|
24178
|
-
*/
|
|
24179
|
-
get: function () {
|
|
24180
|
-
return false;
|
|
24181
|
-
},
|
|
24182
|
-
enumerable: false,
|
|
24183
|
-
configurable: true
|
|
24184
|
-
});
|
|
24185
|
-
Object.defineProperty(SurveyElement.prototype, "isQuestion", {
|
|
24186
|
-
/**
|
|
24187
|
-
* Returns `true` if the survey element is a question.
|
|
24188
|
-
* @see Base.getType
|
|
24189
|
-
*/
|
|
24190
|
-
get: function () {
|
|
24191
|
-
return false;
|
|
24192
|
-
},
|
|
24193
|
-
enumerable: false,
|
|
24194
|
-
configurable: true
|
|
24195
|
-
});
|
|
24196
24219
|
SurveyElement.prototype.delete = function (doDispose) { };
|
|
24197
24220
|
/**
|
|
24198
24221
|
* Returns the survey's [locale](https://surveyjs.io/form-library/documentation/surveymodel#locale).
|