survey-react-ui 2.3.9 → 2.3.10
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 +117 -175
- package/fesm/survey-react-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-react-ui.js +326 -366
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +1 -1
- package/survey-react-ui.min.js.LICENSE.txt +1 -1
- package/typings/src/reactquestion_checkbox.d.ts +8 -30
- package/typings/src/reactquestion_radiogroup.d.ts +9 -26
- package/typings/src/reactquestion_selectbase.d.ts +42 -0
package/fesm/survey-react-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v2.3.
|
|
2
|
+
* surveyjs - Survey JavaScript library v2.3.10
|
|
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
|
*/
|
|
@@ -1074,7 +1074,7 @@ class PopupModal extends SurveyElementBase {
|
|
|
1074
1074
|
PopupModal.modalDescriptors = [];
|
|
1075
1075
|
|
|
1076
1076
|
/*!
|
|
1077
|
-
* surveyjs - Survey JavaScript library v2.3.
|
|
1077
|
+
* surveyjs - Survey JavaScript library v2.3.10
|
|
1078
1078
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1079
1079
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1080
1080
|
*/
|
|
@@ -1144,7 +1144,7 @@ var iconsV1 = {
|
|
|
1144
1144
|
};
|
|
1145
1145
|
|
|
1146
1146
|
/*!
|
|
1147
|
-
* surveyjs - Survey JavaScript library v2.3.
|
|
1147
|
+
* surveyjs - Survey JavaScript library v2.3.10
|
|
1148
1148
|
* Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
1149
1149
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
1150
1150
|
*/
|
|
@@ -2170,7 +2170,7 @@ class SurveyQuestion extends SurveyElementBase {
|
|
|
2170
2170
|
var descriptionUnderInput = question.hasDescriptionUnderInput
|
|
2171
2171
|
? this.renderDescription()
|
|
2172
2172
|
: null;
|
|
2173
|
-
return (React.createElement("div", { className: question.cssContent || undefined, style: contentStyle, "aria-hidden": question.contentAriaHidden, role: "presentation" },
|
|
2173
|
+
return (React.createElement("div", { className: question.cssContent || undefined, style: contentStyle, "aria-hidden": question.contentAriaHidden, role: "presentation", "data-sv-drop-target-matrix": this.question.dragDropMatrixAttribute, "data-sv-drop-target-matrix-row": this.question.dragDropMatrixAttribute },
|
|
2174
2174
|
questionRender,
|
|
2175
2175
|
comment,
|
|
2176
2176
|
descriptionUnderInput));
|
|
@@ -2646,7 +2646,7 @@ ReactElementFactory.Instance.registerElement("flowpanel", props => {
|
|
|
2646
2646
|
return React.createElement(SurveyFlowPanel, props);
|
|
2647
2647
|
});
|
|
2648
2648
|
|
|
2649
|
-
class
|
|
2649
|
+
class SurveyQuestionSelectbase extends SurveyQuestionElementBase {
|
|
2650
2650
|
constructor(props) {
|
|
2651
2651
|
super(props);
|
|
2652
2652
|
}
|
|
@@ -2656,29 +2656,29 @@ class SurveyQuestionCheckbox extends SurveyQuestionElementBase {
|
|
|
2656
2656
|
renderElement() {
|
|
2657
2657
|
var cssClasses = this.question.cssClasses;
|
|
2658
2658
|
return (React.createElement("fieldset", { className: this.question.getSelectBaseRootCss(), ref: (fieldset) => (this.setControl(fieldset)), role: this.question.a11y_input_ariaRole, "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 },
|
|
2659
|
-
|
|
2660
|
-
this.getHeader(),
|
|
2659
|
+
this.renderHeader(),
|
|
2661
2660
|
this.question.hasColumns
|
|
2662
2661
|
? this.getColumnedBody(cssClasses)
|
|
2663
2662
|
: this.getBody(cssClasses),
|
|
2664
2663
|
this.getFooter()));
|
|
2665
2664
|
}
|
|
2666
|
-
|
|
2667
|
-
if (this.question.hasHeadItems) {
|
|
2668
|
-
return this.question.headItems.map((item, ii) => this.renderItem(item, false, this.question.cssClasses));
|
|
2669
|
-
}
|
|
2670
|
-
}
|
|
2665
|
+
renderHeader() { return null; }
|
|
2671
2666
|
getFooter() {
|
|
2672
2667
|
if (this.question.hasFootItems) {
|
|
2673
|
-
|
|
2668
|
+
const items = this.question.footItems.map((item, ii) => this.renderItem(item, false, this.question.cssClasses));
|
|
2669
|
+
return React.createElement(React.Fragment, null, items);
|
|
2674
2670
|
}
|
|
2671
|
+
return null;
|
|
2675
2672
|
}
|
|
2673
|
+
getStateValue() { return undefined; }
|
|
2674
|
+
isItemChecked(item, value) { return false; }
|
|
2676
2675
|
getColumnedBody(cssClasses) {
|
|
2677
2676
|
return (React.createElement("div", { className: cssClasses.rootMultiColumn }, this.getColumns(cssClasses)));
|
|
2678
2677
|
}
|
|
2679
2678
|
getColumns(cssClasses) {
|
|
2679
|
+
const value = this.getStateValue();
|
|
2680
2680
|
return this.question.columns.map((column, ci) => {
|
|
2681
|
-
var items = column.map((item, ii) => this.renderItem(item, ci === 0 && ii === 0, cssClasses, "" + ci + ii));
|
|
2681
|
+
var items = column.map((item, ii) => this.renderItem(item, ci === 0 && ii === 0, cssClasses, "" + ci + ii, this.isItemChecked(item, value)));
|
|
2682
2682
|
return (React.createElement("div", { key: "column" + ci + this.question.getItemsColumnKey(column), className: this.question.getColumnClass(), role: "presentation" }, items));
|
|
2683
2683
|
});
|
|
2684
2684
|
}
|
|
@@ -2691,20 +2691,21 @@ class SurveyQuestionCheckbox extends SurveyQuestionElementBase {
|
|
|
2691
2691
|
}
|
|
2692
2692
|
}
|
|
2693
2693
|
getItems(cssClasses, choices) {
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2694
|
+
const items = [];
|
|
2695
|
+
const value = this.getStateValue();
|
|
2696
|
+
for (let i = 0; i < choices.length; i++) {
|
|
2697
|
+
const item = choices[i];
|
|
2698
|
+
const renderedItem = this.renderItem(item, i == 0, cssClasses, "" + i, this.isItemChecked(item, value));
|
|
2698
2699
|
if (!!renderedItem) {
|
|
2699
|
-
|
|
2700
|
+
items.push(renderedItem);
|
|
2700
2701
|
}
|
|
2701
2702
|
}
|
|
2702
|
-
return
|
|
2703
|
+
return items;
|
|
2703
2704
|
}
|
|
2704
2705
|
get textStyle() {
|
|
2705
2706
|
return null;
|
|
2706
2707
|
}
|
|
2707
|
-
renderItem(item, isFirst, cssClasses, index) {
|
|
2708
|
+
renderItem(item, isFirst, cssClasses, index, isChecked) {
|
|
2708
2709
|
const renderedItem = ReactElementFactory.Instance.createElement(this.question.itemComponent, {
|
|
2709
2710
|
key: item.value,
|
|
2710
2711
|
question: this.question,
|
|
@@ -2714,6 +2715,8 @@ class SurveyQuestionCheckbox extends SurveyQuestionElementBase {
|
|
|
2714
2715
|
textStyle: this.textStyle,
|
|
2715
2716
|
index: index,
|
|
2716
2717
|
isFirst: isFirst,
|
|
2718
|
+
isChecked: isChecked,
|
|
2719
|
+
creator: this.props.creator,
|
|
2717
2720
|
});
|
|
2718
2721
|
const survey = this.question.survey;
|
|
2719
2722
|
let wrappedItem = null;
|
|
@@ -2723,11 +2726,11 @@ class SurveyQuestionCheckbox extends SurveyQuestionElementBase {
|
|
|
2723
2726
|
return wrappedItem !== null && wrappedItem !== void 0 ? wrappedItem : renderedItem;
|
|
2724
2727
|
}
|
|
2725
2728
|
}
|
|
2726
|
-
class
|
|
2729
|
+
class SurveyQuestionSelectBaseItem extends ReactSurveyElement {
|
|
2727
2730
|
constructor(props) {
|
|
2728
2731
|
super(props);
|
|
2729
2732
|
this.handleOnChange = (event) => {
|
|
2730
|
-
this.
|
|
2733
|
+
this.doOnItemChange(event);
|
|
2731
2734
|
};
|
|
2732
2735
|
this.rootRef = React.createRef();
|
|
2733
2736
|
}
|
|
@@ -2774,15 +2777,19 @@ class SurveyQuestionCheckboxItem extends ReactSurveyElement {
|
|
|
2774
2777
|
!!this.question.customWidget.widgetJson.isDefaultRender ||
|
|
2775
2778
|
!!this.question.customWidget.widgetJson.render);
|
|
2776
2779
|
}
|
|
2780
|
+
doOnItemChange(event) { }
|
|
2777
2781
|
canRender() {
|
|
2778
2782
|
return !!this.item && !!this.question;
|
|
2779
2783
|
}
|
|
2780
2784
|
renderElement() {
|
|
2781
|
-
const isChecked = this.question.isItemSelected(this.item);
|
|
2782
2785
|
return React.createElement(React.Fragment, null,
|
|
2783
|
-
this.
|
|
2786
|
+
this.renderElementContent(),
|
|
2787
|
+
this.renderPanel(),
|
|
2784
2788
|
this.renderComment());
|
|
2785
2789
|
}
|
|
2790
|
+
renderElementContent() {
|
|
2791
|
+
return null;
|
|
2792
|
+
}
|
|
2786
2793
|
get inputStyle() {
|
|
2787
2794
|
return null; //{ marginRight: "3px" };
|
|
2788
2795
|
}
|
|
@@ -2792,7 +2799,61 @@ class SurveyQuestionCheckboxItem extends ReactSurveyElement {
|
|
|
2792
2799
|
return React.createElement("div", { className: this.question.getCommentAreaCss(true) },
|
|
2793
2800
|
React.createElement(SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
|
|
2794
2801
|
}
|
|
2795
|
-
|
|
2802
|
+
renderPanel() {
|
|
2803
|
+
if (this.item.isPanelShowing) {
|
|
2804
|
+
const panel = this.item.panel;
|
|
2805
|
+
return (React.createElement(SurveyPanel, { key: panel.id, element: panel, survey: this.question.survey, cssClasses: this.props.cssClasses, isDisplayMode: this.isDisplayMode, creator: this.props.creator }));
|
|
2806
|
+
}
|
|
2807
|
+
return null;
|
|
2808
|
+
}
|
|
2809
|
+
componentDidMount() {
|
|
2810
|
+
super.componentDidMount();
|
|
2811
|
+
if (!this.question.isDesignMode) {
|
|
2812
|
+
this.item.setRootElement(this.rootRef.current);
|
|
2813
|
+
}
|
|
2814
|
+
}
|
|
2815
|
+
componentWillUnmount() {
|
|
2816
|
+
super.componentWillUnmount();
|
|
2817
|
+
if (!this.question.isDesignMode) {
|
|
2818
|
+
this.item.setRootElement(undefined);
|
|
2819
|
+
}
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
class SurveyQuestionCheckbox extends SurveyQuestionSelectbase {
|
|
2824
|
+
constructor(props) {
|
|
2825
|
+
super(props);
|
|
2826
|
+
}
|
|
2827
|
+
get question() {
|
|
2828
|
+
return this.questionBase;
|
|
2829
|
+
}
|
|
2830
|
+
renderHeader() {
|
|
2831
|
+
return React.createElement(React.Fragment, null,
|
|
2832
|
+
React.createElement("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
|
|
2833
|
+
this.getHeader());
|
|
2834
|
+
}
|
|
2835
|
+
getHeader() {
|
|
2836
|
+
if (this.question.hasHeadItems) {
|
|
2837
|
+
return this.question.headItems.map((item, ii) => this.renderItem(item, false, this.question.cssClasses));
|
|
2838
|
+
}
|
|
2839
|
+
return null;
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
class SurveyQuestionCheckboxItem extends SurveyQuestionSelectBaseItem {
|
|
2843
|
+
constructor(props) {
|
|
2844
|
+
super(props);
|
|
2845
|
+
}
|
|
2846
|
+
doOnItemChange(event) {
|
|
2847
|
+
this.question.clickItemHandler(this.item, event.target.checked);
|
|
2848
|
+
}
|
|
2849
|
+
renderElementContent() {
|
|
2850
|
+
const isChecked = this.question.isItemSelected(this.item);
|
|
2851
|
+
return this.renderCheckbox(isChecked);
|
|
2852
|
+
}
|
|
2853
|
+
get inputStyle() {
|
|
2854
|
+
return null; //{ marginRight: "3px" };
|
|
2855
|
+
}
|
|
2856
|
+
renderCheckbox(isChecked) {
|
|
2796
2857
|
const id = this.question.getItemId(this.item);
|
|
2797
2858
|
const itemClass = this.question.getItemClass(this.item);
|
|
2798
2859
|
const labelClass = this.question.getLabelClass(this.item);
|
|
@@ -2806,20 +2867,7 @@ class SurveyQuestionCheckboxItem extends ReactSurveyElement {
|
|
|
2806
2867
|
React.createElement("use", { xlinkHref: this.question.itemSvgIcon })) :
|
|
2807
2868
|
null) :
|
|
2808
2869
|
null,
|
|
2809
|
-
itemLabel)
|
|
2810
|
-
otherItem));
|
|
2811
|
-
}
|
|
2812
|
-
componentDidMount() {
|
|
2813
|
-
super.componentDidMount();
|
|
2814
|
-
if (!this.question.isDesignMode) {
|
|
2815
|
-
this.item.setRootElement(this.rootRef.current);
|
|
2816
|
-
}
|
|
2817
|
-
}
|
|
2818
|
-
componentWillUnmount() {
|
|
2819
|
-
super.componentWillUnmount();
|
|
2820
|
-
if (!this.question.isDesignMode) {
|
|
2821
|
-
this.item.setRootElement(undefined);
|
|
2822
|
-
}
|
|
2870
|
+
itemLabel)));
|
|
2823
2871
|
}
|
|
2824
2872
|
}
|
|
2825
2873
|
ReactElementFactory.Instance.registerElement("survey-checkbox-item", (props) => {
|
|
@@ -3855,90 +3903,32 @@ ReactQuestionFactory.Instance.registerQuestion("multipletext", (props) => {
|
|
|
3855
3903
|
return React.createElement(SurveyQuestionMultipleText, props);
|
|
3856
3904
|
});
|
|
3857
3905
|
|
|
3858
|
-
class SurveyQuestionRadiogroup extends
|
|
3906
|
+
class SurveyQuestionRadiogroup extends SurveyQuestionSelectbase {
|
|
3859
3907
|
constructor(props) {
|
|
3860
3908
|
super(props);
|
|
3861
3909
|
}
|
|
3862
3910
|
get question() {
|
|
3863
3911
|
return this.questionBase;
|
|
3864
3912
|
}
|
|
3865
|
-
renderElement() {
|
|
3866
|
-
var cssClasses = this.question.cssClasses;
|
|
3867
|
-
var clearButton = null;
|
|
3868
|
-
if (this.question.showClearButtonInContent) {
|
|
3869
|
-
clearButton = (React.createElement("div", null,
|
|
3870
|
-
React.createElement("input", { type: "button", className: this.question.cssClasses.clearButton, onClick: () => this.question.clearValue(true), value: this.question.clearButtonCaption })));
|
|
3871
|
-
}
|
|
3872
|
-
return (React.createElement("fieldset", { className: this.question.getSelectBaseRootCss(), ref: (fieldset) => (this.setControl(fieldset)), role: this.question.a11y_input_ariaRole, "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 },
|
|
3873
|
-
this.question.hasColumns
|
|
3874
|
-
? this.getColumnedBody(cssClasses)
|
|
3875
|
-
: this.getBody(cssClasses),
|
|
3876
|
-
this.getFooter(),
|
|
3877
|
-
clearButton));
|
|
3878
|
-
}
|
|
3879
3913
|
getFooter() {
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
}
|
|
3884
|
-
getColumnedBody(cssClasses) {
|
|
3885
|
-
return (React.createElement("div", { className: cssClasses.rootMultiColumn }, this.getColumns(cssClasses)));
|
|
3886
|
-
}
|
|
3887
|
-
getColumns(cssClasses) {
|
|
3888
|
-
var value = this.getStateValue();
|
|
3889
|
-
return this.question.columns.map((column, ci) => {
|
|
3890
|
-
var items = column.map((item, ii) => this.renderItem(item, value, cssClasses, "" + ci + ii));
|
|
3891
|
-
return (React.createElement("div", { key: "column" + ci + this.question.getItemsColumnKey(column), className: this.question.getColumnClass(), role: "presentation" }, items));
|
|
3892
|
-
});
|
|
3893
|
-
}
|
|
3894
|
-
getBody(cssClasses) {
|
|
3895
|
-
if (this.question.blockedRow) {
|
|
3896
|
-
return React.createElement("div", { className: cssClasses.rootRow }, this.getItems(cssClasses, this.question.dataChoices));
|
|
3897
|
-
}
|
|
3898
|
-
else {
|
|
3899
|
-
return React.createElement(React.Fragment, null, this.getItems(cssClasses, this.question.bodyItems));
|
|
3900
|
-
}
|
|
3901
|
-
}
|
|
3902
|
-
getItems(cssClasses, choices) {
|
|
3903
|
-
var items = [];
|
|
3904
|
-
var value = this.getStateValue();
|
|
3905
|
-
for (var i = 0; i < choices.length; i++) {
|
|
3906
|
-
var item = choices[i];
|
|
3907
|
-
var renderedItem = this.renderItem(item, value, cssClasses, "" + i);
|
|
3908
|
-
items.push(renderedItem);
|
|
3909
|
-
}
|
|
3910
|
-
return items;
|
|
3911
|
-
}
|
|
3912
|
-
get textStyle() {
|
|
3913
|
-
return null; //{ display: "inline", position: "static" };
|
|
3914
|
+
return React.createElement(React.Fragment, null,
|
|
3915
|
+
super.getFooter(),
|
|
3916
|
+
this.renderClearButton());
|
|
3914
3917
|
}
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
isDisplayMode: this.isDisplayMode,
|
|
3921
|
-
item: item,
|
|
3922
|
-
textStyle: this.textStyle,
|
|
3923
|
-
index: index,
|
|
3924
|
-
isChecked: value === item.value,
|
|
3925
|
-
});
|
|
3926
|
-
const survey = this.question.survey;
|
|
3927
|
-
let wrappedItem = null;
|
|
3928
|
-
if (!!survey) {
|
|
3929
|
-
wrappedItem = ReactSurveyElementsWrapper.wrapItemValue(survey, renderedItem, this.question, item);
|
|
3930
|
-
}
|
|
3931
|
-
return wrappedItem !== null && wrappedItem !== void 0 ? wrappedItem : renderedItem;
|
|
3918
|
+
renderClearButton() {
|
|
3919
|
+
if (!this.question.showClearButtonInContent)
|
|
3920
|
+
return null;
|
|
3921
|
+
return (React.createElement("div", null,
|
|
3922
|
+
React.createElement("input", { type: "button", className: this.question.cssClasses.clearButton, onClick: () => this.question.clearValueFromUI(), value: this.question.clearButtonCaption })));
|
|
3932
3923
|
}
|
|
3933
3924
|
getStateValue() {
|
|
3934
3925
|
return !this.question.isEmpty() ? this.question.renderedValue : "";
|
|
3935
3926
|
}
|
|
3927
|
+
isItemChecked(item, value) { return item.value === value; }
|
|
3936
3928
|
}
|
|
3937
|
-
class SurveyQuestionRadioItem extends
|
|
3929
|
+
class SurveyQuestionRadioItem extends SurveyQuestionSelectBaseItem {
|
|
3938
3930
|
constructor(props) {
|
|
3939
3931
|
super(props);
|
|
3940
|
-
this.rootRef = React.createRef();
|
|
3941
|
-
this.handleOnChange = this.handleOnChange.bind(this);
|
|
3942
3932
|
this.handleOnMouseDown = this.handleOnMouseDown.bind(this);
|
|
3943
3933
|
}
|
|
3944
3934
|
getStateElement() {
|
|
@@ -3947,64 +3937,17 @@ class SurveyQuestionRadioItem extends ReactSurveyElement {
|
|
|
3947
3937
|
get question() {
|
|
3948
3938
|
return this.props.question;
|
|
3949
3939
|
}
|
|
3950
|
-
get item() {
|
|
3951
|
-
return this.props.item;
|
|
3952
|
-
}
|
|
3953
|
-
get textStyle() {
|
|
3954
|
-
return this.props.textStyle;
|
|
3955
|
-
}
|
|
3956
|
-
get index() {
|
|
3957
|
-
return this.props.index;
|
|
3958
|
-
}
|
|
3959
3940
|
get isChecked() {
|
|
3960
3941
|
return this.props.isChecked;
|
|
3961
3942
|
}
|
|
3962
|
-
|
|
3963
|
-
return this.props.hideCaption === true;
|
|
3964
|
-
}
|
|
3965
|
-
get ariaLabel() {
|
|
3966
|
-
return this.props.ariaLabel || null;
|
|
3967
|
-
}
|
|
3968
|
-
shouldComponentUpdate(nextProps, nextState) {
|
|
3969
|
-
if (!super.shouldComponentUpdate(nextProps, nextState))
|
|
3970
|
-
return false;
|
|
3971
|
-
if (!this.question)
|
|
3972
|
-
return false;
|
|
3973
|
-
return (!this.question.customWidget ||
|
|
3974
|
-
!!this.question.customWidgetData.isNeedRender ||
|
|
3975
|
-
!!this.question.customWidget.widgetJson.isDefaultRender ||
|
|
3976
|
-
!!this.question.customWidget.widgetJson.render);
|
|
3977
|
-
}
|
|
3978
|
-
handleOnChange(event) {
|
|
3943
|
+
doOnItemChange(event) {
|
|
3979
3944
|
this.question.clickItemHandler(this.item);
|
|
3980
3945
|
}
|
|
3981
3946
|
handleOnMouseDown(event) {
|
|
3982
3947
|
this.question.onMouseDown();
|
|
3983
3948
|
}
|
|
3984
|
-
|
|
3985
|
-
return
|
|
3986
|
-
}
|
|
3987
|
-
componentDidUpdate(prevProps, prevState) {
|
|
3988
|
-
super.componentDidUpdate(prevProps, prevState);
|
|
3989
|
-
if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
|
|
3990
|
-
if (this.props.item) {
|
|
3991
|
-
this.props.item.setRootElement(this.rootRef.current);
|
|
3992
|
-
}
|
|
3993
|
-
if (prevProps.item) {
|
|
3994
|
-
prevProps.item.setRootElement(undefined);
|
|
3995
|
-
}
|
|
3996
|
-
}
|
|
3997
|
-
}
|
|
3998
|
-
renderElement() {
|
|
3999
|
-
return React.createElement(React.Fragment, null,
|
|
4000
|
-
this.renderRadioButton(),
|
|
4001
|
-
this.renderComment());
|
|
4002
|
-
}
|
|
4003
|
-
renderComment() {
|
|
4004
|
-
if (!this.item.isCommentShowing)
|
|
4005
|
-
return null;
|
|
4006
|
-
return React.createElement("div", { className: this.question.getCommentAreaCss(true) },
|
|
4007
|
-
React.createElement(SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
|
|
3949
|
+
renderElementContent() {
|
|
3950
|
+
return this.renderRadioButton();
|
|
4008
3951
|
}
|
|
4009
3952
|
renderRadioButton() {
|
|
4010
3953
|
var itemClass = this.question.getItemClass(this.item);
|
|
@@ -4022,18 +3965,6 @@ class SurveyQuestionRadioItem extends ReactSurveyElement {
|
|
|
4022
3965
|
null,
|
|
4023
3966
|
itemLabel)));
|
|
4024
3967
|
}
|
|
4025
|
-
componentDidMount() {
|
|
4026
|
-
super.componentDidMount();
|
|
4027
|
-
if (!this.question.isDesignMode) {
|
|
4028
|
-
this.item.setRootElement(this.rootRef.current);
|
|
4029
|
-
}
|
|
4030
|
-
}
|
|
4031
|
-
componentWillUnmount() {
|
|
4032
|
-
super.componentWillUnmount();
|
|
4033
|
-
if (!this.question.isDesignMode) {
|
|
4034
|
-
this.item.setRootElement(undefined);
|
|
4035
|
-
}
|
|
4036
|
-
}
|
|
4037
3968
|
}
|
|
4038
3969
|
ReactElementFactory.Instance.registerElement("survey-radiogroup-item", (props) => {
|
|
4039
3970
|
return React.createElement(SurveyQuestionRadioItem, props);
|
|
@@ -4489,7 +4420,7 @@ class SurveyQuestionMatrixDropdownBase extends SurveyQuestionElementBase {
|
|
|
4489
4420
|
return this.renderTableDiv();
|
|
4490
4421
|
}
|
|
4491
4422
|
renderTableDiv() {
|
|
4492
|
-
return (React.createElement("div", { className: this.question.cssClasses.tableWrapper,
|
|
4423
|
+
return (React.createElement("div", { className: this.question.cssClasses.tableWrapper, ref: (root) => (this.setControl(root)) },
|
|
4493
4424
|
React.createElement(SurveyQuestionMatrixTable, { question: this.question, creator: this.creator, wrapCell: (cell, element, reason) => this.wrapCell(cell, element, reason) })));
|
|
4494
4425
|
}
|
|
4495
4426
|
}
|
|
@@ -5646,7 +5577,7 @@ class SurveyQuestionSignaturePad extends SurveyQuestionElementBase {
|
|
|
5646
5577
|
return null;
|
|
5647
5578
|
var cssClasses = this.question.cssClasses;
|
|
5648
5579
|
return React.createElement("div", { className: cssClasses.controls },
|
|
5649
|
-
React.createElement("button", { type: "button", className: cssClasses.clearButton, title: this.question.clearButtonCaption, onClick: () => this.question.
|
|
5580
|
+
React.createElement("button", { type: "button", className: cssClasses.clearButton, title: this.question.clearButtonCaption, onClick: () => this.question.clearValueFromUI() },
|
|
5650
5581
|
this.question.cssClasses.clearButtonIconId ? React.createElement(SvgIcon, { iconName: this.question.cssClasses.clearButtonIconId, size: "auto" }) : React.createElement("span", null, "\u2716"),
|
|
5651
5582
|
" "));
|
|
5652
5583
|
}
|
|
@@ -6093,9 +6024,20 @@ class SliderLabelItem extends SurveyElementBase {
|
|
|
6093
6024
|
renderElement() {
|
|
6094
6025
|
const { cssClasses, handleLabelPointerUp, getLabelCss, getPercent } = this.question;
|
|
6095
6026
|
const { value, locText } = this.item;
|
|
6027
|
+
let labelText = null;
|
|
6028
|
+
let labelTextSecondary = null;
|
|
6029
|
+
if (this.item.showValue) {
|
|
6030
|
+
labelText = React.createElement("div", { className: cssClasses.labelText }, this.item.value);
|
|
6031
|
+
labelTextSecondary = React.createElement("div", { className: cssClasses.labelTextSecondaryMode }, this.renderLocString(locText));
|
|
6032
|
+
}
|
|
6033
|
+
else {
|
|
6034
|
+
labelText = React.createElement("div", { className: cssClasses.labelText }, this.renderLocString(locText));
|
|
6035
|
+
}
|
|
6096
6036
|
return React.createElement("div", { key: this.item.id, className: getLabelCss(locText), style: { left: getPercent(value) + "%" }, onPointerUp: (e) => { handleLabelPointerUp(e.nativeEvent, value); } },
|
|
6097
6037
|
React.createElement("div", { className: cssClasses.labelTick }),
|
|
6098
|
-
React.createElement("div", { className: cssClasses.
|
|
6038
|
+
React.createElement("div", { className: cssClasses.labelTextContainer },
|
|
6039
|
+
labelText,
|
|
6040
|
+
labelTextSecondary));
|
|
6099
6041
|
}
|
|
6100
6042
|
}
|
|
6101
6043
|
ReactElementFactory.Instance.registerElement("sv-slider-label-item", (props) => {
|
|
@@ -6235,7 +6177,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
|
|
|
6235
6177
|
return React.createElement(SurveyLocStringEditor, props);
|
|
6236
6178
|
});
|
|
6237
6179
|
|
|
6238
|
-
checkLibraryVersion(`${"2.3.
|
|
6180
|
+
checkLibraryVersion(`${"2.3.10"}`, "survey-react-ui");
|
|
6239
6181
|
|
|
6240
6182
|
export { CharacterCounterComponent, ComponentsContainer, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, SliderLabelItem, Survey, SurveyActionBar, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFileItem, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyNavigationButton, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionButtonGroup, SurveyQuestionButtonGroupDropdown, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImagePicker, SurveyQuestionMatrix, SurveyQuestionMatrixCell, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixRow, SurveyQuestionMultipleText, SurveyQuestionOptionItem, SurveyQuestionPanelDynamic, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicProgressText, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionRadioItem, SurveyQuestionRadiogroup, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionSignaturePad, SurveyQuestionSlider, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyRow, SurveyTimerPanel, SurveyWindow, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click };
|
|
6241
6183
|
//# sourceMappingURL=survey-react-ui.mjs.map
|