survey-creator-react 2.0.3 → 2.0.4
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-creator-react",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Use SurveyJS Creator to create or edit JSON for SurveyJS Form Library.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"ace-builds": "^1.4.12",
|
|
38
38
|
"react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
|
|
39
39
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
|
|
40
|
-
"survey-core": "2.0.
|
|
41
|
-
"survey-react-ui": "2.0.
|
|
42
|
-
"survey-creator-core": "2.0.
|
|
40
|
+
"survey-core": "2.0.4",
|
|
41
|
+
"survey-react-ui": "2.0.4",
|
|
42
|
+
"survey-creator-core": "2.0.4"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"ace-builds": {
|
package/survey-creator-react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator React v2.0.
|
|
2
|
+
* SurveyJS Creator React v2.0.4
|
|
3
3
|
* (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -1643,7 +1643,7 @@ var TabbedMenuComponent = /** @class */ (function (_super) {
|
|
|
1643
1643
|
};
|
|
1644
1644
|
TabbedMenuComponent.prototype.renderElement = function () {
|
|
1645
1645
|
var items = this.model.renderedActions.map(function (item) { return react__WEBPACK_IMPORTED_MODULE_1__.createElement(TabbedMenuItemWrapper, { item: item, key: item.renderedId }); });
|
|
1646
|
-
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.rootRef, className: "svc-tabbed-menu" }, items));
|
|
1646
|
+
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { ref: this.rootRef, className: "svc-tabbed-menu", role: "tablist" }, items));
|
|
1647
1647
|
};
|
|
1648
1648
|
TabbedMenuComponent.prototype.componentDidMount = function () {
|
|
1649
1649
|
_super.prototype.componentDidMount.call(this);
|
|
@@ -2802,7 +2802,7 @@ var SurveyQuestionBooleanSwitch = /** @class */ (function (_super) {
|
|
|
2802
2802
|
}
|
|
2803
2803
|
SurveyQuestionBooleanSwitch.prototype.renderElement = function () {
|
|
2804
2804
|
var _this = this;
|
|
2805
|
-
var button = (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "spg-boolean-switch__button" + (this.questionBase.value ? " spg-boolean-switch__button--checked" : ""), tabIndex: 0, role: "checkbox", "aria-required": this.questionBase.
|
|
2805
|
+
var button = (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "spg-boolean-switch__button" + (this.questionBase.value ? " spg-boolean-switch__button--checked" : ""), tabIndex: 0, role: "checkbox", "aria-checked": this.questionBase.booleanValue || false, "aria-required": this.questionBase.a11y_input_ariaRequired, "aria-label": this.questionBase.a11y_input_ariaLabel, "aria-labelledby": this.questionBase.a11y_input_ariaLabelledBy, "aria-invalid": this.questionBase.a11y_input_ariaInvalid, "aria-errormessage": this.questionBase.a11y_input_ariaErrormessage },
|
|
2806
2806
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "spg-boolean-switch__thumb" },
|
|
2807
2807
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "spg-boolean-switch__thumb-circle spg-boolean-switch__thumb--left" })),
|
|
2808
2808
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "spg-boolean-switch__thumb" },
|
|
@@ -2810,7 +2810,7 @@ var SurveyQuestionBooleanSwitch = /** @class */ (function (_super) {
|
|
|
2810
2810
|
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "spg-boolean-switch", onClick: function () { return _this.questionBase.value = !_this.questionBase.value; } },
|
|
2811
2811
|
button,
|
|
2812
2812
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "spg-boolean-switch__caption" },
|
|
2813
|
-
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "spg-boolean-switch__title" }, survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SurveyElementBase.renderLocString(this.questionBase.locTitle)))));
|
|
2813
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "spg-boolean-switch__title", id: this.questionBase.labelRenderedAriaID }, survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SurveyElementBase.renderLocString(this.questionBase.locTitle)))));
|
|
2814
2814
|
};
|
|
2815
2815
|
return SurveyQuestionBooleanSwitch;
|
|
2816
2816
|
}(survey_react_ui__WEBPACK_IMPORTED_MODULE_3__.SurveyQuestionElementBase));
|
|
@@ -2891,7 +2891,7 @@ var SurveyQuestionColor = /** @class */ (function (_super) {
|
|
|
2891
2891
|
SurveyQuestionColor.prototype.renderInput = function () {
|
|
2892
2892
|
var _this = this;
|
|
2893
2893
|
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
|
|
2894
|
-
react__WEBPACK_IMPORTED_MODULE_1__.createElement("input", { id: this.question.inputId, disabled: this.isDisplayMode, className: this.question.cssClasses.control, ref: function (input) { return (_this.setControl(input)); }, placeholder: this.question.renderedPlaceholder, autoComplete: "off", onKeyUp: function (event) { return _this.question.onKeyUp(event.nativeEvent); }, onBlur: function (event) { return _this.question.onBlur(event.nativeEvent); }, onChange: this.question.onChange, onBeforeInput: function (event) { return _this.question.onBeforeInput(event.nativeEvent); }, "aria-required": this.question.
|
|
2894
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement("input", { id: this.question.inputId, disabled: this.isDisplayMode, className: this.question.cssClasses.control, ref: function (input) { return (_this.setControl(input)); }, placeholder: this.question.renderedPlaceholder, autoComplete: "off", onKeyUp: function (event) { return _this.question.onKeyUp(event.nativeEvent); }, onBlur: function (event) { return _this.question.onBlur(event.nativeEvent); }, onChange: this.question.onChange, onBeforeInput: function (event) { return _this.question.onBeforeInput(event.nativeEvent); }, "aria-required": this.question.a11y_input_ariaRequired, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-label": this.question.a11y_input_ariaLabel, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy })));
|
|
2895
2895
|
};
|
|
2896
2896
|
SurveyQuestionColor.prototype.renderElement = function () {
|
|
2897
2897
|
var _this = this;
|
|
@@ -2907,11 +2907,11 @@ var SurveyQuestionColor = /** @class */ (function (_super) {
|
|
|
2907
2907
|
var _this = this;
|
|
2908
2908
|
return react__WEBPACK_IMPORTED_MODULE_1__.createElement("label", { className: this.question.getSwatchCss(), style: this.question.getSwatchStyle() },
|
|
2909
2909
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { iconName: this.question.cssClasses.swatchIcon, size: "auto" }),
|
|
2910
|
-
react__WEBPACK_IMPORTED_MODULE_1__.createElement("input", { type: "color", disabled: this.isDisplayMode, value: this.question.renderedColorValue, className: this.question.cssClasses.colorInput, onChange: function (event) { return _this.question.onColorInputChange(event.nativeEvent); }, tabIndex: -1 }));
|
|
2910
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement("input", { type: "color", disabled: this.isDisplayMode, value: this.question.renderedColorValue, className: this.question.cssClasses.colorInput, onChange: function (event) { return _this.question.onColorInputChange(event.nativeEvent); }, tabIndex: -1, "aria-required": this.question.a11y_input_ariaRequired, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-label": this.question.a11y_input_ariaLabel, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy }));
|
|
2911
2911
|
};
|
|
2912
2912
|
SurveyQuestionColor.prototype.renderDropdownAction = function () {
|
|
2913
2913
|
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
|
|
2914
|
-
survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.createElement("sv-action-bar-item", { item: this.question.dropdownAction }),
|
|
2914
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { "aria-hidden": "true", className: this.question.cssClasses.choicesButtonWrapper }, survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.createElement("sv-action-bar-item", { item: this.question.dropdownAction })),
|
|
2915
2915
|
this.renderPopup()));
|
|
2916
2916
|
};
|
|
2917
2917
|
SurveyQuestionColor.prototype.renderPopup = function () {
|
|
@@ -2975,12 +2975,12 @@ var SurveyQuestionFileEditor = /** @class */ (function (_super) {
|
|
|
2975
2975
|
this.renderChooseButton()));
|
|
2976
2976
|
};
|
|
2977
2977
|
SurveyQuestionFileEditor.prototype.renderClearButton = function () {
|
|
2978
|
-
return (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.attachKey2click)((react__WEBPACK_IMPORTED_MODULE_1__.createElement("button", {
|
|
2979
|
-
react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { iconName: this.questionFile.cssClasses.clearButtonIcon, size: "auto"
|
|
2978
|
+
return (0,survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.attachKey2click)((react__WEBPACK_IMPORTED_MODULE_1__.createElement("button", { className: this.questionFile.cssClasses.clearButton, title: this.questionFile.clearButtonCaption, disabled: this.questionFile.getIsClearButtonDisabled(), onClick: this.questionFile.doClean },
|
|
2979
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { iconName: this.questionFile.cssClasses.clearButtonIcon, size: "auto" }))));
|
|
2980
2980
|
};
|
|
2981
2981
|
SurveyQuestionFileEditor.prototype.renderChooseButton = function () {
|
|
2982
2982
|
var _this = this;
|
|
2983
|
-
return ((0,survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("label", {
|
|
2983
|
+
return ((0,survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.attachKey2click)(react__WEBPACK_IMPORTED_MODULE_1__.createElement("label", { onClick: function (event) { return _this.questionFile.chooseFiles(event.nativeEvent); }, className: this.questionFile.getChooseButtonCss(), htmlFor: this.questionFile.inputId, "aria-label": this.questionFile.chooseButtonCaption },
|
|
2984
2984
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { iconName: this.questionFile.cssClasses.chooseButtonIcon, size: "auto", title: this.questionFile.chooseButtonCaption }))));
|
|
2985
2985
|
};
|
|
2986
2986
|
SurveyQuestionFileEditor.prototype.renderElement = function () {
|
|
@@ -3033,7 +3033,7 @@ var SurveyQuestionSpinEditor = /** @class */ (function (_super) {
|
|
|
3033
3033
|
SurveyQuestionSpinEditor.prototype.renderInput = function () {
|
|
3034
3034
|
var _this = this;
|
|
3035
3035
|
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,
|
|
3036
|
-
react__WEBPACK_IMPORTED_MODULE_1__.createElement("input", { id: this.question.inputId, disabled: this.isDisplayMode, className: this.question.cssClasses.control, ref: function (input) { return (_this.setControl(input)); }, placeholder: this.question.renderedPlaceholder, autoComplete: "off", onBlur: function (event) { return _this.question.onBlur(event.nativeEvent); }, onFocus: function (event) { return _this.question.onFocus(event.nativeEvent); }, onChange: this.question.onChange, onBeforeInput: function (event) { return _this.question.onBeforeInput(event.nativeEvent); }, onKeyUp: function (event) { return _this.question.onKeyUp(event.nativeEvent); }, onKeyDown: function (event) { return _this.question.onInputKeyDown(event.nativeEvent); }, "aria-required": this.question.
|
|
3036
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement("input", { role: "spinbutton", id: this.question.inputId, disabled: this.isDisplayMode, className: this.question.cssClasses.control, ref: function (input) { return (_this.setControl(input)); }, placeholder: this.question.renderedPlaceholder, autoComplete: "off", onBlur: function (event) { return _this.question.onBlur(event.nativeEvent); }, onFocus: function (event) { return _this.question.onFocus(event.nativeEvent); }, onChange: this.question.onChange, onBeforeInput: function (event) { return _this.question.onBeforeInput(event.nativeEvent); }, onKeyUp: function (event) { return _this.question.onKeyUp(event.nativeEvent); }, onKeyDown: function (event) { return _this.question.onInputKeyDown(event.nativeEvent); }, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage })));
|
|
3037
3037
|
};
|
|
3038
3038
|
SurveyQuestionSpinEditor.prototype.renderElement = function () {
|
|
3039
3039
|
var _this = this;
|
|
@@ -3047,9 +3047,9 @@ var SurveyQuestionSpinEditor = /** @class */ (function (_super) {
|
|
|
3047
3047
|
SurveyQuestionSpinEditor.prototype.renderButtons = function () {
|
|
3048
3048
|
var _this = this;
|
|
3049
3049
|
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("span", { className: this.question.cssClasses.buttonsContainer },
|
|
3050
|
-
react__WEBPACK_IMPORTED_MODULE_1__.createElement("button", { tabIndex: -1, className: this.question.cssClasses.arrowButton, disabled: this.isDisplayMode, onClick: this.question.onDownButtonClick, onMouseDown: this.question.onDownButtonMouseDown, onMouseUp: this.question.onButtonMouseUp, onMouseLeave: this.question.onButtonMouseLeave, onBlur: function (event) { return _this.question.onBlur(event.nativeEvent); }, onFocus: function (event) { return _this.question.onFocus(event.nativeEvent); } },
|
|
3050
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement("button", { tabIndex: -1, "aria-hidden": "true", className: this.question.cssClasses.arrowButton, disabled: this.isDisplayMode, onClick: this.question.onDownButtonClick, onMouseDown: this.question.onDownButtonMouseDown, onMouseUp: this.question.onButtonMouseUp, onMouseLeave: this.question.onButtonMouseLeave, onBlur: function (event) { return _this.question.onBlur(event.nativeEvent); }, onFocus: function (event) { return _this.question.onFocus(event.nativeEvent); } },
|
|
3051
3051
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { iconName: this.question.cssClasses.decreaseButtonIcon, size: "auto" })),
|
|
3052
|
-
react__WEBPACK_IMPORTED_MODULE_1__.createElement("button", { tabIndex: -1, className: this.question.cssClasses.arrowButton, disabled: this.isDisplayMode, onClick: this.question.onUpButtonClick, onMouseDown: this.question.onUpButtonMouseDown, onMouseUp: this.question.onButtonMouseUp, onMouseLeave: this.question.onButtonMouseLeave, onBlur: function (event) { return _this.question.onBlur(event.nativeEvent); }, onFocus: function (event) { return _this.question.onFocus(event.nativeEvent); } },
|
|
3052
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement("button", { tabIndex: -1, "aria-hidden": "true", className: this.question.cssClasses.arrowButton, disabled: this.isDisplayMode, onClick: this.question.onUpButtonClick, onMouseDown: this.question.onUpButtonMouseDown, onMouseUp: this.question.onButtonMouseUp, onMouseLeave: this.question.onButtonMouseLeave, onBlur: function (event) { return _this.question.onBlur(event.nativeEvent); }, onFocus: function (event) { return _this.question.onFocus(event.nativeEvent); } },
|
|
3053
3053
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { iconName: this.question.cssClasses.increaseButtonIcon, size: "auto" }))));
|
|
3054
3054
|
};
|
|
3055
3055
|
return SurveyQuestionSpinEditor;
|
|
@@ -4513,7 +4513,7 @@ var SurveyLogicOpertor = /** @class */ (function (_super) {
|
|
|
4513
4513
|
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { id: this.question.inputId, className: q.getControlClass(), tabIndex: this.question.isInputReadOnly ? undefined : 0,
|
|
4514
4514
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
4515
4515
|
// @ts-ignore
|
|
4516
|
-
disabled: this.question.isInputReadOnly, required: this.question.isRequired, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onKeyUp: this.keyhandler, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-
|
|
4516
|
+
disabled: this.question.isInputReadOnly, required: this.question.isRequired, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onKeyUp: this.keyhandler, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-labelledby": this.question.ariaLabelledBy, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded },
|
|
4517
4517
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: this.question.cssClasses.controlValue },
|
|
4518
4518
|
text,
|
|
4519
4519
|
react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", null, q.readOnlyText)),
|
|
@@ -4860,11 +4860,9 @@ var SurveyCreatorToolboxCategory = /** @class */ (function (_super) {
|
|
|
4860
4860
|
SurveyCreatorToolboxCategory.prototype.renderButton = function () {
|
|
4861
4861
|
if (!this.toolbox.canCollapseCategories)
|
|
4862
4862
|
return null;
|
|
4863
|
-
var iconName = this.category.
|
|
4864
|
-
var suffixName = this.category.collapsed ? "expand" : "collapse";
|
|
4865
|
-
var svgIconClassName = "svc-toolbox__category-header__button svc-string-editor__button--" + suffixName;
|
|
4863
|
+
var iconName = this.category.iconName;
|
|
4866
4864
|
return (react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", { className: "svc-toolbox__category-header__controls" },
|
|
4867
|
-
react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { className:
|
|
4865
|
+
react__WEBPACK_IMPORTED_MODULE_1__.createElement(survey_react_ui__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { className: this.category.iconClassName, iconName: iconName, size: "auto" })));
|
|
4868
4866
|
};
|
|
4869
4867
|
SurveyCreatorToolboxCategory.prototype.renderCategoryContent = function () {
|
|
4870
4868
|
return this.renderItems(this.category.items);
|
|
@@ -5480,7 +5478,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5480
5478
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
5481
5479
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_63___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_63__);
|
|
5482
5480
|
var Version;
|
|
5483
|
-
Version = "".concat("2.0.
|
|
5481
|
+
Version = "".concat("2.0.4");
|
|
5484
5482
|
// import "@survey/creator/survey-creator-core.css";
|
|
5485
5483
|
|
|
5486
5484
|
|
|
@@ -5552,7 +5550,7 @@ Version = "".concat("2.0.3");
|
|
|
5552
5550
|
|
|
5553
5551
|
|
|
5554
5552
|
|
|
5555
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.0.
|
|
5553
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_63__.checkLibraryVersion)("".concat("2.0.4"), "survey-creator-react");
|
|
5556
5554
|
|
|
5557
5555
|
})();
|
|
5558
5556
|
|