survey-creator-react 3.0.0-beta.2 → 3.0.0-beta.3
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-creator-react.mjs +54 -35
- package/fesm/survey-creator-react.mjs.map +1 -1
- package/fesm/ui-preset-editor/index.mjs +1 -1
- package/package.json +4 -4
- package/survey-creator-react.js +87 -37
- package/survey-creator-react.js.map +1 -1
- package/survey-creator-react.min.js +2 -2
- package/typings/custom-questions/ColorQuestion.d.ts +1 -2
- package/typings/custom-questions/FileEditQuestion.d.ts +10 -4
- package/typings/custom-questions/SpinEditor.d.ts +12 -2
- package/ui-preset-editor/index.js +1 -1
- package/ui-preset-editor/index.min.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-creator-react",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.3",
|
|
4
4
|
"description": "A white-label drag-and-drop form builder for React that lets you design complex, interactive forms and surveys without writing code. It generates JSON schemas used by the SurveyJS Form Library to render dynamic forms in your React app.",
|
|
5
5
|
"author": "DevSoft Baltic OU <info@devsoftbaltic.com>",
|
|
6
6
|
"homepage": "https://surveyjs.io/",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"ace-builds": "^1.4.12",
|
|
61
61
|
"react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
|
|
62
62
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
|
|
63
|
-
"survey-core": "3.0.0-beta.
|
|
64
|
-
"survey-react-ui": "3.0.0-beta.
|
|
65
|
-
"survey-creator-core": "3.0.0-beta.
|
|
63
|
+
"survey-core": "3.0.0-beta.3",
|
|
64
|
+
"survey-react-ui": "3.0.0-beta.3",
|
|
65
|
+
"survey-creator-core": "3.0.0-beta.3"
|
|
66
66
|
},
|
|
67
67
|
"peerDependenciesMeta": {
|
|
68
68
|
"ace-builds": {
|
package/survey-creator-react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v3.0.0-beta.
|
|
2
|
+
* SurveyJS Creator v3.0.0-beta.3
|
|
3
3
|
* (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -3539,15 +3539,49 @@
|
|
|
3539
3539
|
return this.question.renderedValue;
|
|
3540
3540
|
};
|
|
3541
3541
|
SurveyQuestionSpinEditor.prototype.renderButtons = function () {
|
|
3542
|
-
|
|
3543
|
-
return (React__namespace.createElement("span", { className: this.question.cssClasses.buttonsContainer },
|
|
3544
|
-
React__namespace.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); } },
|
|
3545
|
-
React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: this.question.cssClasses.decreaseButtonIcon, size: "auto" })),
|
|
3546
|
-
React__namespace.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); } },
|
|
3547
|
-
React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: this.question.cssClasses.increaseButtonIcon, size: "auto" }))));
|
|
3542
|
+
return React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.question.inputActionsContainer });
|
|
3548
3543
|
};
|
|
3549
3544
|
return SurveyQuestionSpinEditor;
|
|
3550
3545
|
}(surveyReactUi.SurveyQuestionText));
|
|
3546
|
+
var SurveySpinEditorButton = /** @class */ (function (_super) {
|
|
3547
|
+
__extends(SurveySpinEditorButton, _super);
|
|
3548
|
+
function SurveySpinEditorButton() {
|
|
3549
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3550
|
+
}
|
|
3551
|
+
Object.defineProperty(SurveySpinEditorButton.prototype, "item", {
|
|
3552
|
+
get: function () {
|
|
3553
|
+
return this.props.item;
|
|
3554
|
+
},
|
|
3555
|
+
enumerable: false,
|
|
3556
|
+
configurable: true
|
|
3557
|
+
});
|
|
3558
|
+
Object.defineProperty(SurveySpinEditorButton.prototype, "itemAction", {
|
|
3559
|
+
get: function () {
|
|
3560
|
+
return this.props.item;
|
|
3561
|
+
},
|
|
3562
|
+
enumerable: false,
|
|
3563
|
+
configurable: true
|
|
3564
|
+
});
|
|
3565
|
+
SurveySpinEditorButton.prototype.getStateElement = function () {
|
|
3566
|
+
return this.itemAction;
|
|
3567
|
+
};
|
|
3568
|
+
Object.defineProperty(SurveySpinEditorButton.prototype, "question", {
|
|
3569
|
+
get: function () {
|
|
3570
|
+
return this.item.data.question;
|
|
3571
|
+
},
|
|
3572
|
+
enumerable: false,
|
|
3573
|
+
configurable: true
|
|
3574
|
+
});
|
|
3575
|
+
SurveySpinEditorButton.prototype.renderElement = function () {
|
|
3576
|
+
var _this = this;
|
|
3577
|
+
return React__namespace.createElement("button", { tabIndex: -1, "aria-hidden": "true", className: this.itemAction.getActionBarItemCss(), disabled: this.itemAction.disabled, onClick: function () { return _this.item.action(); }, onMouseDown: this.item.data.onMouseDown, 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); } },
|
|
3578
|
+
React__namespace.createElement(surveyReactUi.SvgIcon, { className: this.itemAction.cssClasses.itemIcon, iconName: this.item.iconName, size: "auto" }));
|
|
3579
|
+
};
|
|
3580
|
+
return SurveySpinEditorButton;
|
|
3581
|
+
}(surveyReactUi.SurveyElementBase));
|
|
3582
|
+
surveyReactUi.ReactElementFactory.Instance.registerElement("sv-spinedit-button", function (props) {
|
|
3583
|
+
return React__namespace.createElement(SurveySpinEditorButton, props);
|
|
3584
|
+
});
|
|
3551
3585
|
surveyReactUi.ReactQuestionFactory.Instance.registerQuestion("spinedit", function (props) {
|
|
3552
3586
|
return React__namespace.createElement(SurveyQuestionSpinEditor, props);
|
|
3553
3587
|
});
|
|
@@ -3588,10 +3622,11 @@
|
|
|
3588
3622
|
};
|
|
3589
3623
|
SurveyQuestionColor.prototype.renderElement = function () {
|
|
3590
3624
|
var _this = this;
|
|
3591
|
-
return (React__namespace.createElement("div", { className: this.question.cssClasses.
|
|
3592
|
-
this.
|
|
3593
|
-
|
|
3594
|
-
|
|
3625
|
+
return (React__namespace.createElement("div", { className: this.question.cssClasses.rootWrapper },
|
|
3626
|
+
React__namespace.createElement("div", { className: this.question.cssClasses.root, onKeyDown: function (event) { return _this.question.onKeyDown(event.nativeEvent); } },
|
|
3627
|
+
this.renderColorSwatch(),
|
|
3628
|
+
this.renderInput(),
|
|
3629
|
+
this.renderButtons())));
|
|
3595
3630
|
};
|
|
3596
3631
|
SurveyQuestionColor.prototype.getValueCore = function () {
|
|
3597
3632
|
return this.question.renderedValue;
|
|
@@ -3602,13 +3637,8 @@
|
|
|
3602
3637
|
React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: this.question.cssClasses.swatchIcon, size: "auto" }),
|
|
3603
3638
|
React__namespace.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 }));
|
|
3604
3639
|
};
|
|
3605
|
-
SurveyQuestionColor.prototype.
|
|
3606
|
-
return
|
|
3607
|
-
React__namespace.createElement("div", { "aria-hidden": "true", className: this.question.cssClasses.choicesButtonWrapper }, surveyReactUi.ReactElementFactory.Instance.createElement("sv-action-bar-item", { item: this.question.dropdownAction })),
|
|
3608
|
-
this.renderPopup()));
|
|
3609
|
-
};
|
|
3610
|
-
SurveyQuestionColor.prototype.renderPopup = function () {
|
|
3611
|
-
return React__namespace.createElement(surveyReactUi.Popup, { model: this.question.dropdownAction.popupModel });
|
|
3640
|
+
SurveyQuestionColor.prototype.renderButtons = function () {
|
|
3641
|
+
return this.question.hasVisibleInputActions ? React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.question.inputActionsContainer }) : null;
|
|
3612
3642
|
};
|
|
3613
3643
|
return SurveyQuestionColor;
|
|
3614
3644
|
}(surveyReactUi.SurveyQuestionText));
|
|
@@ -3636,36 +3666,54 @@
|
|
|
3636
3666
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
3637
3667
|
React__namespace.createElement("input", { disabled: this.question.isTextInputReadOnly, className: this.questionFile.cssClasses.control, placeholder: this.questionFile.renderedPlaceholder, ref: function (input) { return (_this.setControl(input)); }, autoComplete: "off", type: "text", onBlur: function (event) { return _this.questionFile.onInputBlur(event.nativeEvent); }, onChange: function (event) { return _this.questionFile.onInputChange(event.nativeEvent); } })));
|
|
3638
3668
|
};
|
|
3639
|
-
SurveyQuestionFileEditor.prototype.renderFileInput = function () {
|
|
3640
|
-
var _this = this;
|
|
3641
|
-
return (React__namespace.createElement("input", { type: "file", disabled: this.isDisplayMode, className: this.questionFile.cssClasses.fileInput, id: this.questionFile.inputId, "aria-required": this.questionFile.ariaRequired, "aria-label": this.questionFile.ariaLabel, "aria-invalid": this.questionFile.ariaInvalid, "aria-describedby": this.questionFile.ariaDescribedBy, multiple: false, title: this.questionFile.inputTitle, accept: this.questionFile.acceptedTypes, tabIndex: -1, onChange: function (event) { return _this.questionFile.onFileInputChange(event.nativeEvent); } }));
|
|
3642
|
-
};
|
|
3643
3669
|
SurveyQuestionFileEditor.prototype.renderButtons = function () {
|
|
3644
|
-
return
|
|
3645
|
-
this.renderClearButton(),
|
|
3646
|
-
this.renderChooseButton()));
|
|
3647
|
-
};
|
|
3648
|
-
SurveyQuestionFileEditor.prototype.renderClearButton = function () {
|
|
3649
|
-
return surveyReactUi.attachKey2click((React__namespace.createElement("button", { className: this.questionFile.cssClasses.clearButton, title: this.questionFile.clearButtonCaption, disabled: this.questionFile.getIsClearButtonDisabled(), onClick: this.questionFile.doClean },
|
|
3650
|
-
React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: this.questionFile.cssClasses.clearButtonIcon, size: "auto" }))));
|
|
3651
|
-
};
|
|
3652
|
-
SurveyQuestionFileEditor.prototype.renderChooseButton = function () {
|
|
3653
|
-
var _this = this;
|
|
3654
|
-
return (surveyReactUi.attachKey2click(React__namespace.createElement("label", { onClick: function (event) { return _this.questionFile.chooseFiles(event.nativeEvent); }, className: this.questionFile.getChooseButtonCss(), htmlFor: this.questionFile.inputId, "aria-label": this.questionFile.chooseButtonCaption },
|
|
3655
|
-
React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: this.questionFile.cssClasses.chooseButtonIcon, size: "auto", title: this.questionFile.chooseButtonCaption }))));
|
|
3670
|
+
return this.question.hasVisibleInputActions ? React__namespace.createElement(surveyReactUi.SurveyActionBar, { model: this.questionFile.inputActionsContainer }) : null;
|
|
3656
3671
|
};
|
|
3657
3672
|
SurveyQuestionFileEditor.prototype.renderElement = function () {
|
|
3658
3673
|
var _this = this;
|
|
3659
3674
|
return (React__namespace.createElement("div", { className: this.questionFile.cssClasses.root, ref: function (el) { return _this.setContent(el); }, onDragEnter: this.questionFile.onDragEnter, onDragOver: this.questionFile.onDragOver, onDrop: this.questionFile.onDrop, onDragLeave: this.questionFile.onDragLeave, onKeyDown: function (event) { return _this.question.onKeyDown(event.nativeEvent); } },
|
|
3660
3675
|
this.renderInput(),
|
|
3661
|
-
this.renderFileInput(),
|
|
3662
3676
|
this.renderButtons()));
|
|
3663
3677
|
};
|
|
3664
3678
|
return SurveyQuestionFileEditor;
|
|
3665
3679
|
}(surveyReactUi.SurveyQuestionText));
|
|
3680
|
+
var SurveyQuestionFileEditorButton = /** @class */ (function (_super) {
|
|
3681
|
+
__extends(SurveyQuestionFileEditorButton, _super);
|
|
3682
|
+
function SurveyQuestionFileEditorButton() {
|
|
3683
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3684
|
+
}
|
|
3685
|
+
Object.defineProperty(SurveyQuestionFileEditorButton.prototype, "item", {
|
|
3686
|
+
get: function () {
|
|
3687
|
+
return this.props.item;
|
|
3688
|
+
},
|
|
3689
|
+
enumerable: false,
|
|
3690
|
+
configurable: true
|
|
3691
|
+
});
|
|
3692
|
+
Object.defineProperty(SurveyQuestionFileEditorButton.prototype, "question", {
|
|
3693
|
+
get: function () {
|
|
3694
|
+
return this.props.item.data.question;
|
|
3695
|
+
},
|
|
3696
|
+
enumerable: false,
|
|
3697
|
+
configurable: true
|
|
3698
|
+
});
|
|
3699
|
+
SurveyQuestionFileEditorButton.prototype.getStateElement = function () {
|
|
3700
|
+
return this.item;
|
|
3701
|
+
};
|
|
3702
|
+
SurveyQuestionFileEditorButton.prototype.renderElement = function () {
|
|
3703
|
+
var _this = this;
|
|
3704
|
+
return (React__namespace.createElement("div", null,
|
|
3705
|
+
surveyReactUi.attachKey2click(React__namespace.createElement("label", { onClick: function (event) { return _this.question.chooseFiles(event.nativeEvent); }, className: this.item.getActionBarItemCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonCaption },
|
|
3706
|
+
React__namespace.createElement(surveyReactUi.SvgIcon, { iconName: this.item.iconName, size: "auto", title: this.item.title, className: this.item.cssClasses.itemIcon }))),
|
|
3707
|
+
React__namespace.createElement("input", { type: "file", disabled: this.item.disabled, className: this.question.cssClasses.fileInput, id: this.question.inputId, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, multiple: false, title: this.question.inputTitle, accept: this.question.acceptedTypes, tabIndex: -1, onChange: function (event) { return _this.question.onFileInputChange(event.nativeEvent); } })));
|
|
3708
|
+
};
|
|
3709
|
+
return SurveyQuestionFileEditorButton;
|
|
3710
|
+
}(surveyReactUi.SurveyElementBase));
|
|
3666
3711
|
surveyReactUi.ReactQuestionFactory.Instance.registerQuestion("fileedit", function (props) {
|
|
3667
3712
|
return React__namespace.createElement(SurveyQuestionFileEditor, props);
|
|
3668
3713
|
});
|
|
3714
|
+
surveyReactUi.ReactElementFactory.Instance.registerElement("sv-fileedit-button", function (props) {
|
|
3715
|
+
return React__namespace.createElement(SurveyQuestionFileEditorButton, props);
|
|
3716
|
+
});
|
|
3669
3717
|
|
|
3670
3718
|
var SurveyQuestionBooleanSwitch = /** @class */ (function (_super) {
|
|
3671
3719
|
__extends(SurveyQuestionBooleanSwitch, _super);
|
|
@@ -3692,8 +3740,8 @@
|
|
|
3692
3740
|
surveyCore.RendererFactory.Instance.registerRenderer("boolean", "switch", "sv-boolean-switch");
|
|
3693
3741
|
|
|
3694
3742
|
exports.Version = void 0;
|
|
3695
|
-
exports.Version = "".concat("3.0.0-beta.
|
|
3696
|
-
surveyCore.checkLibraryVersion("".concat("3.0.0-beta.
|
|
3743
|
+
exports.Version = "".concat("3.0.0-beta.3");
|
|
3744
|
+
surveyCore.checkLibraryVersion("".concat("3.0.0-beta.3"), "survey-creator-react");
|
|
3697
3745
|
|
|
3698
3746
|
Object.defineProperty(exports, "PropertyGridEditorCollection", {
|
|
3699
3747
|
enumerable: true,
|
|
@@ -3773,11 +3821,13 @@
|
|
|
3773
3821
|
exports.SurveyQuestionBooleanSwitch = SurveyQuestionBooleanSwitch;
|
|
3774
3822
|
exports.SurveyQuestionColor = SurveyQuestionColor;
|
|
3775
3823
|
exports.SurveyQuestionFileEditor = SurveyQuestionFileEditor;
|
|
3824
|
+
exports.SurveyQuestionFileEditorButton = SurveyQuestionFileEditorButton;
|
|
3776
3825
|
exports.SurveyQuestionLinkValue = SurveyQuestionLinkValue;
|
|
3777
3826
|
exports.SurveyQuestionSpinEditor = SurveyQuestionSpinEditor;
|
|
3778
3827
|
exports.SurveyResults = SurveyResults;
|
|
3779
3828
|
exports.SurveyResultsByRow = SurveyResultsByRow;
|
|
3780
3829
|
exports.SurveySimulator = SurveySimulator;
|
|
3830
|
+
exports.SurveySpinEditorButton = SurveySpinEditorButton;
|
|
3781
3831
|
exports.SwitcherComponent = SwitcherComponent;
|
|
3782
3832
|
exports.TabButtonComponent = TabButtonComponent;
|
|
3783
3833
|
exports.TabDesignerComponent = TabDesignerComponent;
|