survey-react-ui 3.0.0-beta.6 → 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 +76 -64
- package/fesm/survey-react-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-react-ui.js +83 -69
- 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/typings/src/progress.d.ts +3 -0
- package/typings/src/progressButtons.d.ts +2 -10
- package/typings/src/reactquestion_text.d.ts +1 -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
|
*/
|
|
@@ -588,8 +588,8 @@
|
|
|
588
588
|
this.locStr.onStringChanged.remove(this.onChangedHandler);
|
|
589
589
|
};
|
|
590
590
|
SurveyLocStringViewer.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
591
|
-
if (!!prevProps.
|
|
592
|
-
prevProps.
|
|
591
|
+
if (!!prevProps.model) {
|
|
592
|
+
prevProps.model.onStringChanged.remove(this.onChangedHandler);
|
|
593
593
|
}
|
|
594
594
|
this.reactOnStrChanged();
|
|
595
595
|
};
|
|
@@ -1464,6 +1464,8 @@
|
|
|
1464
1464
|
|
|
1465
1465
|
var noimage_48x48 = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M30.4975 14.2475C28.7075 14.2475 27.2475 15.7075 27.2475 17.4975C27.2475 19.2875 28.7075 20.7475 30.4975 20.7475C32.2875 20.7475 33.7475 19.2875 33.7475 17.4975C33.7475 15.7075 32.2875 14.2475 30.4975 14.2475ZM30.4975 19.2475C29.5375 19.2475 28.7475 18.4575 28.7475 17.4975C28.7475 16.5375 29.5375 15.7475 30.4975 15.7475C31.4575 15.7475 32.2475 16.5375 32.2475 17.4975C32.2475 18.4575 31.4575 19.2475 30.4975 19.2475ZM13.5175 11.2175C13.4375 10.8075 13.7075 10.4175 14.1175 10.3375C14.4275 10.2775 14.7175 10.2475 14.9975 10.2475H32.9975C35.6175 10.2475 37.7475 12.3775 37.7475 14.9975V32.9975C37.7475 33.2775 37.7175 33.5675 37.6575 33.8775C37.5875 34.2375 37.2775 34.4875 36.9175 34.4875C36.8675 34.4875 36.8275 34.4875 36.7775 34.4775C36.3675 34.3975 36.1075 34.0075 36.1775 33.5975C36.2175 33.3775 36.2375 33.1775 36.2375 32.9975V14.9975C36.2375 13.2075 34.7775 11.7475 32.9875 11.7475H14.9975C14.8075 11.7475 14.6175 11.7675 14.3975 11.8075C13.9875 11.8875 13.5975 11.6175 13.5175 11.2075V11.2175ZM34.4775 36.7775C34.5575 37.1875 34.2875 37.5775 33.8775 37.6575C33.5675 37.7175 33.2775 37.7475 32.9975 37.7475H14.9975C12.3775 37.7475 10.2475 35.6175 10.2475 32.9975V14.9975C10.2475 14.7175 10.2775 14.4275 10.3375 14.1175C10.4175 13.7075 10.8075 13.4375 11.2175 13.5175C11.6275 13.5975 11.8875 13.9875 11.8175 14.3975C11.7775 14.6175 11.7575 14.8175 11.7575 14.9975V32.9975C11.7575 34.7875 13.2175 36.2475 15.0075 36.2475H33.0075C33.1975 36.2475 33.3875 36.2275 33.6075 36.1875C34.0075 36.1075 34.4075 36.3775 34.4875 36.7875L34.4775 36.7775ZM15.8275 31.7975C15.6975 31.9375 15.7575 32.0875 15.7775 32.1175C15.8175 32.1975 15.8675 32.2475 15.9375 32.2475H29.8175C30.2275 32.2475 30.5675 32.5875 30.5675 32.9975C30.5675 33.4075 30.2275 33.7475 29.8175 33.7475H15.9375C15.2675 33.7475 14.6775 33.3475 14.3975 32.7175C14.1075 32.0575 14.2375 31.2975 14.7275 30.7775L19.7275 25.2775C20.0475 24.9275 20.5075 24.7175 20.9875 24.7075C21.4875 24.7275 21.9375 24.8875 22.2675 25.2275L25.4675 28.4775C25.7575 28.7675 25.7575 29.2475 25.4675 29.5375C25.1675 29.8275 24.6975 29.8275 24.4075 29.5375L21.2075 26.2875C21.1475 26.2175 21.0675 26.1875 21.0275 26.2075C20.9875 26.2075 20.9075 26.2175 20.8475 26.2875L15.8375 31.7975H15.8275ZM38.5275 38.5275C38.3775 38.6775 38.1875 38.7475 37.9975 38.7475C37.8075 38.7475 37.6175 38.6775 37.4675 38.5275L9.4675 10.5275C9.1775 10.2375 9.1775 9.7575 9.4675 9.4675C9.7575 9.1775 10.2375 9.1775 10.5275 9.4675L38.5275 37.4675C38.8175 37.7575 38.8175 38.2375 38.5275 38.5275Z\"/></svg>";
|
|
1466
1466
|
|
|
1467
|
+
var radio_16x16 = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><circle cx=\"8\" cy=\"8\" r=\"4\"/></svg>";
|
|
1468
|
+
|
|
1467
1469
|
var ranking_arrows = "<svg viewBox=\"0 0 10 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10 5L5 0L0 5H4V9H6V5H10Z\"/><path d=\"M6 19V15H4V19H0L5 24L10 19H6Z\"/></svg>";
|
|
1468
1470
|
|
|
1469
1471
|
var rankingundefined_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.75 8C11.75 8.41 11.41 8.75 11 8.75H5C4.59 8.75 4.25 8.41 4.25 8C4.25 7.59 4.59 7.25 5 7.25H11C11.41 7.25 11.75 7.59 11.75 8Z\"/></svg>";
|
|
@@ -1547,6 +1549,7 @@
|
|
|
1547
1549
|
"more-24x24": more_24x24,
|
|
1548
1550
|
"navmenu-24x24": navmenu_24x24,
|
|
1549
1551
|
"noimage-48x48": noimage_48x48,
|
|
1552
|
+
"radio-16x16": radio_16x16,
|
|
1550
1553
|
"ranking-arrows": ranking_arrows,
|
|
1551
1554
|
"rankingundefined-16x16": rankingundefined_16x16,
|
|
1552
1555
|
"rating-star-2": rating_star_2,
|
|
@@ -1698,6 +1701,11 @@
|
|
|
1698
1701
|
var rootCss = this.survey.getRootCss();
|
|
1699
1702
|
var cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
|
|
1700
1703
|
return (React__namespace.createElement("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables, lang: this.survey.locale || "en", dir: this.survey.localeDir },
|
|
1704
|
+
this.survey.generateStylesheet ?
|
|
1705
|
+
React__namespace.createElement(React__namespace.Fragment, null,
|
|
1706
|
+
React__namespace.createElement("style", null, this.survey.themeStyle),
|
|
1707
|
+
React__namespace.createElement("style", null, this.survey.resetVariablesStyle))
|
|
1708
|
+
: null,
|
|
1701
1709
|
React__namespace.createElement(Scroll, { disabled: this.survey.rootScrollDisabled },
|
|
1702
1710
|
this.survey.needRenderIcons ? React__namespace.createElement(SvgBundleComponent, null) : null,
|
|
1703
1711
|
React__namespace.createElement(PopupModal, null),
|
|
@@ -5003,6 +5011,13 @@
|
|
|
5003
5011
|
}
|
|
5004
5012
|
return React__namespace.createElement("datalist", { id: this.question.dataListId }, options);
|
|
5005
5013
|
};
|
|
5014
|
+
SurveyQuestionText.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
5015
|
+
var _a;
|
|
5016
|
+
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
|
5017
|
+
if (this.question && this.question instanceof surveyCore.QuestionTextModel) {
|
|
5018
|
+
(_a = this.question) === null || _a === void 0 ? void 0 : _a.updateInputValueFromMask();
|
|
5019
|
+
}
|
|
5020
|
+
};
|
|
5006
5021
|
return SurveyQuestionText;
|
|
5007
5022
|
}(SurveyQuestionUncontrolledElement));
|
|
5008
5023
|
ReactQuestionFactory.Instance.registerQuestion("text", function (props) {
|
|
@@ -5129,11 +5144,13 @@
|
|
|
5129
5144
|
var _this = this;
|
|
5130
5145
|
var cssClasses = this.question.cssClasses;
|
|
5131
5146
|
var handleOnChange = function () {
|
|
5132
|
-
_this.question.
|
|
5147
|
+
if (!_this.question.isInputReadOnly) {
|
|
5148
|
+
_this.question.value = value;
|
|
5149
|
+
}
|
|
5133
5150
|
};
|
|
5134
5151
|
return (React__namespace.createElement("div", { role: "presentation", className: this.question.getRadioItemClass(cssClasses, value) },
|
|
5135
5152
|
React__namespace.createElement("label", { className: cssClasses.radioLabel },
|
|
5136
|
-
React__namespace.createElement("input", { type: "radio", name: this.question.
|
|
5153
|
+
React__namespace.createElement("input", { type: "radio", name: this.question.questionName, value: value, "aria-errormessage": this.question.ariaErrormessage, checked: value === this.question.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: cssClasses.itemRadioControl, onChange: handleOnChange }),
|
|
5137
5154
|
this.question.cssClasses.materialRadioDecorator ?
|
|
5138
5155
|
(React__namespace.createElement("span", { className: cssClasses.materialRadioDecorator }, this.question.itemSvgIcon ?
|
|
5139
5156
|
(React__namespace.createElement("svg", { className: cssClasses.itemRadioDecorator },
|
|
@@ -5142,7 +5159,7 @@
|
|
|
5142
5159
|
};
|
|
5143
5160
|
SurveyQuestionBooleanRadio.prototype.renderElement = function () {
|
|
5144
5161
|
var cssClasses = this.question.cssClasses;
|
|
5145
|
-
return (React__namespace.createElement("div", { className: cssClasses.rootRadio },
|
|
5162
|
+
return (React__namespace.createElement("div", { className: cssClasses.rootRadio, onKeyDown: this.handleOnKeyDown },
|
|
5146
5163
|
React__namespace.createElement("fieldset", { role: "presentation", className: cssClasses.radioFieldset }, !this.question.swapOrder ?
|
|
5147
5164
|
(React__namespace.createElement(React__namespace.Fragment, null,
|
|
5148
5165
|
this.renderRadioItem(this.question.getValueFalse(), this.question.locLabelFalse),
|
|
@@ -5159,6 +5176,32 @@
|
|
|
5159
5176
|
});
|
|
5160
5177
|
surveyCore.RendererFactory.Instance.registerRenderer("boolean", "radio", "sv-boolean-radio");
|
|
5161
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
|
+
|
|
5162
5205
|
var SurveyQuestionEmpty = /** @class */ (function (_super) {
|
|
5163
5206
|
__extends(SurveyQuestionEmpty, _super);
|
|
5164
5207
|
function SurveyQuestionEmpty(props) {
|
|
@@ -5907,23 +5950,33 @@
|
|
|
5907
5950
|
enumerable: false,
|
|
5908
5951
|
configurable: true
|
|
5909
5952
|
});
|
|
5953
|
+
Object.defineProperty(SurveyProgress.prototype, "model", {
|
|
5954
|
+
get: function () {
|
|
5955
|
+
return this.props.model;
|
|
5956
|
+
},
|
|
5957
|
+
enumerable: false,
|
|
5958
|
+
configurable: true
|
|
5959
|
+
});
|
|
5960
|
+
SurveyProgress.prototype.getStateElement = function () {
|
|
5961
|
+
return this.model;
|
|
5962
|
+
};
|
|
5910
5963
|
Object.defineProperty(SurveyProgress.prototype, "progress", {
|
|
5911
5964
|
get: function () {
|
|
5912
|
-
return this.
|
|
5965
|
+
return this.model.progressValue;
|
|
5913
5966
|
},
|
|
5914
5967
|
enumerable: false,
|
|
5915
5968
|
configurable: true
|
|
5916
5969
|
});
|
|
5917
5970
|
Object.defineProperty(SurveyProgress.prototype, "progressText", {
|
|
5918
5971
|
get: function () {
|
|
5919
|
-
return this.
|
|
5972
|
+
return this.model.progressText;
|
|
5920
5973
|
},
|
|
5921
5974
|
enumerable: false,
|
|
5922
5975
|
configurable: true
|
|
5923
5976
|
});
|
|
5924
5977
|
Object.defineProperty(SurveyProgress.prototype, "progressBarAriaLabel", {
|
|
5925
5978
|
get: function () {
|
|
5926
|
-
return this.
|
|
5979
|
+
return this.model.progressBarAriaLabel;
|
|
5927
5980
|
},
|
|
5928
5981
|
enumerable: false,
|
|
5929
5982
|
configurable: true
|
|
@@ -5932,10 +5985,10 @@
|
|
|
5932
5985
|
var progressStyle = {
|
|
5933
5986
|
width: this.progress + "%",
|
|
5934
5987
|
};
|
|
5935
|
-
return (React__namespace.createElement("div", { className: this.
|
|
5936
|
-
React__namespace.createElement("div", { style: progressStyle, className: this.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": this.progressBarAriaLabel },
|
|
5937
|
-
React__namespace.createElement("span", { className: surveyCore.SurveyProgressModel.getProgressTextInBarCss(this.css) }, this.progressText)),
|
|
5938
|
-
React__namespace.createElement("span", { className: surveyCore.SurveyProgressModel.getProgressTextUnderBarCss(this.css) }, this.progressText)));
|
|
5988
|
+
return (React__namespace.createElement("div", { className: this.model.getProgressCssClasses(this.props.container) },
|
|
5989
|
+
React__namespace.createElement("div", { style: progressStyle, className: this.model.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": this.progressBarAriaLabel },
|
|
5990
|
+
React__namespace.createElement("span", { className: surveyCore.SurveyProgressModel.getProgressTextInBarCss(this.model.css) }, this.progressText)),
|
|
5991
|
+
React__namespace.createElement("span", { className: surveyCore.SurveyProgressModel.getProgressTextUnderBarCss(this.model.css) }, this.progressText)));
|
|
5939
5992
|
};
|
|
5940
5993
|
return SurveyProgress;
|
|
5941
5994
|
}(SurveyNavigationBase));
|
|
@@ -5955,9 +6008,7 @@
|
|
|
5955
6008
|
var SurveyProgressButtons = /** @class */ (function (_super) {
|
|
5956
6009
|
__extends(SurveyProgressButtons, _super);
|
|
5957
6010
|
function SurveyProgressButtons(props) {
|
|
5958
|
-
|
|
5959
|
-
_this.listContainerRef = React__namespace.createRef();
|
|
5960
|
-
return _this;
|
|
6011
|
+
return _super.call(this, props) || this;
|
|
5961
6012
|
}
|
|
5962
6013
|
Object.defineProperty(SurveyProgressButtons.prototype, "model", {
|
|
5963
6014
|
get: function () {
|
|
@@ -5976,34 +6027,12 @@
|
|
|
5976
6027
|
SurveyProgressButtons.prototype.getStateElement = function () {
|
|
5977
6028
|
return this.model;
|
|
5978
6029
|
};
|
|
5979
|
-
SurveyProgressButtons.prototype.onResize = function (canShowItemTitles) {
|
|
5980
|
-
this.setState({ canShowItemTitles: canShowItemTitles });
|
|
5981
|
-
this.setState({ canShowHeader: !canShowItemTitles });
|
|
5982
|
-
};
|
|
5983
|
-
SurveyProgressButtons.prototype.onUpdateScroller = function (hasScroller) {
|
|
5984
|
-
this.setState({ hasScroller: hasScroller });
|
|
5985
|
-
};
|
|
5986
|
-
SurveyProgressButtons.prototype.onUpdateSettings = function () {
|
|
5987
|
-
this.setState({ canShowItemTitles: this.model.showItemTitles });
|
|
5988
|
-
this.setState({ canShowFooter: !this.model.showItemTitles });
|
|
5989
|
-
};
|
|
5990
6030
|
SurveyProgressButtons.prototype.render = function () {
|
|
5991
|
-
var _a;
|
|
5992
6031
|
var _this = this;
|
|
5993
|
-
return (React__namespace.createElement("div", { className: this.model.getRootCss(this.props.container), style:
|
|
5994
|
-
|
|
5995
|
-
React__namespace.createElement("div", { className: this.css.
|
|
5996
|
-
|
|
5997
|
-
React__namespace.createElement("div", { className: this.model.getScrollButtonCss(this.state.hasScroller, true), role: "button", onClick: function () {
|
|
5998
|
-
return _this.clickScrollButton(_this.listContainerRef.current, true);
|
|
5999
|
-
} }),
|
|
6000
|
-
React__namespace.createElement("div", { className: this.css.progressButtonsListContainer, ref: this.listContainerRef },
|
|
6001
|
-
React__namespace.createElement("ul", { className: this.css.progressButtonsList }, this.getListElements())),
|
|
6002
|
-
React__namespace.createElement("div", { className: this.model.getScrollButtonCss(this.state.hasScroller, false), role: "button", onClick: function () {
|
|
6003
|
-
return _this.clickScrollButton(_this.listContainerRef.current, false);
|
|
6004
|
-
} })),
|
|
6005
|
-
this.state.canShowFooter ? React__namespace.createElement("div", { className: this.css.progressButtonsFooter },
|
|
6006
|
-
React__namespace.createElement("div", { className: this.css.progressButtonsPageTitle, title: this.model.footerText }, this.model.footerText)) : null));
|
|
6032
|
+
return (React__namespace.createElement("div", { className: this.model.getRootCss(this.props.container), style: { "maxWidth": this.model.progressWidth }, role: "tablist", "aria-label": this.model.progressBarAriaLabel, onKeyDown: function (event) { return _this.model.onKeyDown(event.nativeEvent); } },
|
|
6033
|
+
React__namespace.createElement("div", { className: this.css.progressButtonsContainer, role: "presentation" },
|
|
6034
|
+
React__namespace.createElement("div", { className: this.css.progressButtonsListContainer, role: "presentation" },
|
|
6035
|
+
React__namespace.createElement("ul", { className: this.css.progressButtonsList, role: "presentation" }, this.getListElements())))));
|
|
6007
6036
|
};
|
|
6008
6037
|
SurveyProgressButtons.prototype.getListElements = function () {
|
|
6009
6038
|
var _this = this;
|
|
@@ -6016,32 +6045,16 @@
|
|
|
6016
6045
|
SurveyProgressButtons.prototype.renderListElement = function (page, index) {
|
|
6017
6046
|
var _this = this;
|
|
6018
6047
|
var text = SurveyElementBase.renderLocString(page.locNavigationTitle);
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
React__namespace.createElement("div", { className: this.css.
|
|
6023
|
-
this.
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
React__namespace.createElement("span", null, this.model.getItemNumber(page)))));
|
|
6030
|
-
};
|
|
6031
|
-
SurveyProgressButtons.prototype.clickScrollButton = function (listContainerElement, isLeftScroll) {
|
|
6032
|
-
if (!!listContainerElement) {
|
|
6033
|
-
listContainerElement.scrollLeft += (isLeftScroll ? -1 : 1) * 70;
|
|
6034
|
-
}
|
|
6035
|
-
};
|
|
6036
|
-
SurveyProgressButtons.prototype.componentDidMount = function () {
|
|
6037
|
-
_super.prototype.componentDidMount.call(this);
|
|
6038
|
-
this.respManager = new surveyCore.ProgressButtonsResponsivityManager(this.model, this.listContainerRef.current, this);
|
|
6039
|
-
};
|
|
6040
|
-
SurveyProgressButtons.prototype.componentWillUnmount = function () {
|
|
6041
|
-
if (!!this.respManager) {
|
|
6042
|
-
this.respManager.dispose();
|
|
6043
|
-
}
|
|
6044
|
-
_super.prototype.componentWillUnmount.call(this);
|
|
6048
|
+
var onClickHandler = this.model.isListElementClickable(index) ? function () { return _this.model.clickListElement(page); } : undefined;
|
|
6049
|
+
return (React__namespace.createElement("li", { key: page.uniqueId, className: this.model.getListElementCss(index), "data-page-number": this.model.getItemNumber(page), role: "presentation" },
|
|
6050
|
+
this.model.showItemTitles ? React__namespace.createElement("div", { className: this.css.progressButtonsPageTitle, title: page.renderedNavigationTitle, onClick: onClickHandler }, text) : null,
|
|
6051
|
+
this.model.showItemDescriptions ? React__namespace.createElement("div", { className: this.css.progressButtonsPageDescription, title: page.navigationDescription, onClick: onClickHandler }, page.navigationDescription) : null,
|
|
6052
|
+
React__namespace.createElement("button", { className: this.css.progressButtonsButton, onClick: onClickHandler, role: "tab", type: "button", "aria-selected": this.model.isPageSelected(index), "aria-label": this.model.getButtonAriaLabel(page), tabIndex: this.model.getTabIndex(index), "data-page-index": index }, this.model.showItemNumbers ?
|
|
6053
|
+
this.model.getItemNumber(page) :
|
|
6054
|
+
this.model.isListElementPassed(index) ?
|
|
6055
|
+
React__namespace.createElement("svg", { className: this.css.progressButtonsCheckIcon },
|
|
6056
|
+
React__namespace.createElement("use", { xlinkHref: "#icon-".concat(this.css.progressButtonsCheckIconId) })) :
|
|
6057
|
+
React__namespace.createElement("div", { className: this.css.progressButtonsDot }))));
|
|
6045
6058
|
};
|
|
6046
6059
|
return SurveyProgressButtons;
|
|
6047
6060
|
}(SurveyNavigationBase));
|
|
@@ -7420,7 +7433,7 @@
|
|
|
7420
7433
|
return React__namespace.createElement(SurveyLocStringEditor, props);
|
|
7421
7434
|
});
|
|
7422
7435
|
|
|
7423
|
-
surveyCore.checkLibraryVersion("".concat("3.0.0-beta.
|
|
7436
|
+
surveyCore.checkLibraryVersion("".concat("3.0.0-beta.8"), "survey-react-ui");
|
|
7424
7437
|
|
|
7425
7438
|
Object.defineProperty(exports, "Model", {
|
|
7426
7439
|
enumerable: true,
|
|
@@ -7495,6 +7508,7 @@
|
|
|
7495
7508
|
exports.SurveyQuestionBoolean = SurveyQuestionBoolean;
|
|
7496
7509
|
exports.SurveyQuestionBooleanCheckbox = SurveyQuestionBooleanCheckbox;
|
|
7497
7510
|
exports.SurveyQuestionBooleanRadio = SurveyQuestionBooleanRadio;
|
|
7511
|
+
exports.SurveyQuestionBooleanSwitch = SurveyQuestionBooleanSwitch;
|
|
7498
7512
|
exports.SurveyQuestionButtonGroup = SurveyQuestionButtonGroup;
|
|
7499
7513
|
exports.SurveyQuestionButtonGroupDropdown = SurveyQuestionButtonGroupDropdown;
|
|
7500
7514
|
exports.SurveyQuestionCheckbox = SurveyQuestionCheckbox;
|