survey-react-ui 3.0.0-beta.7 → 3.0.0-beta.8
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/fesm/survey-react-ui.mjs +26 -3
- package/fesm/survey-react-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-react-ui.js +29 -2
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -2
- package/typings/entries/react-ui-model.d.ts +1 -0
- package/typings/src/boolean-switch.d.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-react-ui",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "DevSoft Baltic OU <info@devsoftbaltic.com>",
|
|
6
6
|
"homepage": "https://surveyjs.io/",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"survey-core": "3.0.0-beta.
|
|
54
|
+
"survey-core": "3.0.0-beta.8",
|
|
55
55
|
"react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
|
|
56
56
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0"
|
|
57
57
|
}
|
package/survey-react-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v3.0.0-beta.
|
|
2
|
+
* surveyjs - Survey JavaScript library v3.0.0-beta.8
|
|
3
3
|
* Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -5176,6 +5176,32 @@
|
|
|
5176
5176
|
});
|
|
5177
5177
|
surveyCore.RendererFactory.Instance.registerRenderer("boolean", "radio", "sv-boolean-radio");
|
|
5178
5178
|
|
|
5179
|
+
var SurveyQuestionBooleanSwitch = /** @class */ (function (_super) {
|
|
5180
|
+
__extends(SurveyQuestionBooleanSwitch, _super);
|
|
5181
|
+
function SurveyQuestionBooleanSwitch(props) {
|
|
5182
|
+
return _super.call(this, props) || this;
|
|
5183
|
+
}
|
|
5184
|
+
SurveyQuestionBooleanSwitch.prototype.renderElement = function () {
|
|
5185
|
+
var _this = this;
|
|
5186
|
+
var cssClasses = this.question.cssClasses;
|
|
5187
|
+
var buttonClass = this.question.getSwitchButtonCss();
|
|
5188
|
+
var button = attachKey2click(React__namespace.createElement("div", { className: buttonClass, tabIndex: 0, role: "checkbox", "aria-checked": this.question.booleanValue || false, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage },
|
|
5189
|
+
React__namespace.createElement("div", { className: cssClasses.switchThumb },
|
|
5190
|
+
React__namespace.createElement("div", { className: cssClasses.switchThumbCircle + " " + cssClasses.switchThumbLeft })),
|
|
5191
|
+
React__namespace.createElement("div", { className: cssClasses.switchThumb },
|
|
5192
|
+
React__namespace.createElement("div", { className: cssClasses.switchThumbCircle + " " + cssClasses.switchThumbRight }))), this.question, { processEsc: false });
|
|
5193
|
+
return (React__namespace.createElement("div", { className: cssClasses.rootSwitch, onClick: function () { return _this.question.booleanValue = !_this.question.booleanValue; } },
|
|
5194
|
+
button,
|
|
5195
|
+
React__namespace.createElement("div", { className: cssClasses.switchCaption },
|
|
5196
|
+
React__namespace.createElement("div", { className: cssClasses.switchTitle, id: this.question.labelRenderedAriaID }, SurveyElementBase.renderLocString(this.question.locTitle)))));
|
|
5197
|
+
};
|
|
5198
|
+
return SurveyQuestionBooleanSwitch;
|
|
5199
|
+
}(SurveyQuestionBoolean));
|
|
5200
|
+
ReactQuestionFactory.Instance.registerQuestion("sv-boolean-switch", function (props) {
|
|
5201
|
+
return React__namespace.createElement(SurveyQuestionBooleanSwitch, props);
|
|
5202
|
+
});
|
|
5203
|
+
surveyCore.RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
5204
|
+
|
|
5179
5205
|
var SurveyQuestionEmpty = /** @class */ (function (_super) {
|
|
5180
5206
|
__extends(SurveyQuestionEmpty, _super);
|
|
5181
5207
|
function SurveyQuestionEmpty(props) {
|
|
@@ -7407,7 +7433,7 @@
|
|
|
7407
7433
|
return React__namespace.createElement(SurveyLocStringEditor, props);
|
|
7408
7434
|
});
|
|
7409
7435
|
|
|
7410
|
-
surveyCore.checkLibraryVersion("".concat("3.0.0-beta.
|
|
7436
|
+
surveyCore.checkLibraryVersion("".concat("3.0.0-beta.8"), "survey-react-ui");
|
|
7411
7437
|
|
|
7412
7438
|
Object.defineProperty(exports, "Model", {
|
|
7413
7439
|
enumerable: true,
|
|
@@ -7482,6 +7508,7 @@
|
|
|
7482
7508
|
exports.SurveyQuestionBoolean = SurveyQuestionBoolean;
|
|
7483
7509
|
exports.SurveyQuestionBooleanCheckbox = SurveyQuestionBooleanCheckbox;
|
|
7484
7510
|
exports.SurveyQuestionBooleanRadio = SurveyQuestionBooleanRadio;
|
|
7511
|
+
exports.SurveyQuestionBooleanSwitch = SurveyQuestionBooleanSwitch;
|
|
7485
7512
|
exports.SurveyQuestionButtonGroup = SurveyQuestionButtonGroup;
|
|
7486
7513
|
exports.SurveyQuestionButtonGroupDropdown = SurveyQuestionButtonGroupDropdown;
|
|
7487
7514
|
exports.SurveyQuestionCheckbox = SurveyQuestionCheckbox;
|