survey-react-ui 1.9.77 → 1.9.78
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 +2 -2
- package/survey-react-ui.d.ts +1 -1
- package/survey-react-ui.js +30 -19
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-react-ui",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.78",
|
|
4
4
|
"description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"typings": "survey-react-ui.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"survey-core": "1.9.
|
|
24
|
+
"survey-core": "1.9.78",
|
|
25
25
|
"react": "^16.5.0 || ^17.0.1 || ^18.1.0",
|
|
26
26
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0"
|
|
27
27
|
}
|
package/survey-react-ui.d.ts
CHANGED
|
@@ -1144,6 +1144,7 @@ declare module "react/components/list/list" {
|
|
|
1144
1144
|
getStateElement(): ListModel<import("survey-core").Action>;
|
|
1145
1145
|
componentDidMount(): void;
|
|
1146
1146
|
renderElement(): JSX.Element;
|
|
1147
|
+
renderList(): JSX.Element | null;
|
|
1147
1148
|
renderItems(): JSX.Element[] | null;
|
|
1148
1149
|
searchElementContent(): JSX.Element | null;
|
|
1149
1150
|
emptyContent(): JSX.Element;
|
|
@@ -1237,7 +1238,6 @@ declare module "react/image" {
|
|
|
1237
1238
|
componentDidMount(): void;
|
|
1238
1239
|
componentWillUnmount(): void;
|
|
1239
1240
|
protected get question(): QuestionImageModel;
|
|
1240
|
-
protected canRender(): boolean;
|
|
1241
1241
|
protected renderElement(): JSX.Element;
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
package/survey-react-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.78
|
|
3
3
|
* Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -1183,7 +1183,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1183
1183
|
|
|
1184
1184
|
|
|
1185
1185
|
|
|
1186
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.
|
|
1186
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.78", "survey-react-ui");
|
|
1187
1187
|
|
|
1188
1188
|
|
|
1189
1189
|
/***/ }),
|
|
@@ -2133,14 +2133,19 @@ var List = /** @class */ (function (_super) {
|
|
|
2133
2133
|
}
|
|
2134
2134
|
};
|
|
2135
2135
|
List.prototype.renderElement = function () {
|
|
2136
|
-
var items = this.renderItems();
|
|
2137
|
-
var ulStyle = { display: this.model.isEmpty ? "none" : null };
|
|
2138
2136
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.root, ref: this.listContainerRef },
|
|
2139
2137
|
this.searchElementContent(),
|
|
2140
2138
|
this.emptyContent(),
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2139
|
+
this.renderList()));
|
|
2140
|
+
};
|
|
2141
|
+
List.prototype.renderList = function () {
|
|
2142
|
+
if (!this.model.renderElements)
|
|
2143
|
+
return null;
|
|
2144
|
+
var items = this.renderItems();
|
|
2145
|
+
var ulStyle = { display: this.model.isEmpty ? "none" : null };
|
|
2146
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("ul", { className: this.model.cssClasses.itemsContainer, style: ulStyle, role: "listbox", onMouseDown: function (e) {
|
|
2147
|
+
e.preventDefault();
|
|
2148
|
+
}, onKeyDown: this.handleKeydown, onMouseMove: this.handleMouseMove }, items));
|
|
2144
2149
|
};
|
|
2145
2150
|
List.prototype.renderItems = function () {
|
|
2146
2151
|
var _this = this;
|
|
@@ -4499,6 +4504,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4499
4504
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
4500
4505
|
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
|
|
4501
4506
|
/* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/react/reactquestion_factory.tsx");
|
|
4507
|
+
/* harmony import */ var _components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
|
|
4502
4508
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
4503
4509
|
var extendStatics = function (d, b) {
|
|
4504
4510
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -4517,6 +4523,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
4517
4523
|
|
|
4518
4524
|
|
|
4519
4525
|
|
|
4526
|
+
|
|
4520
4527
|
var SurveyQuestionImage = /** @class */ (function (_super) {
|
|
4521
4528
|
__extends(SurveyQuestionImage, _super);
|
|
4522
4529
|
function SurveyQuestionImage(props) {
|
|
@@ -4540,25 +4547,30 @@ var SurveyQuestionImage = /** @class */ (function (_super) {
|
|
|
4540
4547
|
enumerable: false,
|
|
4541
4548
|
configurable: true
|
|
4542
4549
|
});
|
|
4543
|
-
SurveyQuestionImage.prototype.canRender = function () {
|
|
4544
|
-
return _super.prototype.canRender.call(this) && !!this.question.imageLink;
|
|
4545
|
-
};
|
|
4546
4550
|
SurveyQuestionImage.prototype.renderElement = function () {
|
|
4551
|
+
var _this = this;
|
|
4547
4552
|
var cssClasses = this.question.getImageCss();
|
|
4548
4553
|
var style = { objectFit: this.question.imageFit };
|
|
4549
4554
|
var control = null;
|
|
4550
4555
|
if (this.question.renderedMode === "image") {
|
|
4551
4556
|
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("img", { className: cssClasses, src: this.question.locImageLink.renderedHtml, alt: this.question.altText || this.question.title, width: this.question.renderedWidth, height: this.question.renderedHeight,
|
|
4552
4557
|
//alt={item.text || item.value}
|
|
4553
|
-
style: style }));
|
|
4558
|
+
style: style, onLoad: function (event) { _this.question.onLoadHandler(); }, onError: function (event) { _this.question.onErrorHandler(); } }));
|
|
4554
4559
|
}
|
|
4555
4560
|
if (this.question.renderedMode === "video") {
|
|
4556
|
-
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("video", { controls: true, className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style }));
|
|
4561
|
+
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("video", { controls: true, className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, onLoadedMetadata: function (event) { _this.question.onLoadHandler(); }, onError: function (event) { _this.question.onErrorHandler(); } }));
|
|
4557
4562
|
}
|
|
4558
4563
|
if (this.question.renderedMode === "youtube") {
|
|
4559
4564
|
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("iframe", { className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style }));
|
|
4560
4565
|
}
|
|
4561
|
-
|
|
4566
|
+
var noImage = null;
|
|
4567
|
+
if (!this.question.imageLink || this.question.contentNotLoaded) {
|
|
4568
|
+
noImage = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.noImage },
|
|
4569
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: this.question.cssClasses.noImageSvgIconId, size: 48 })));
|
|
4570
|
+
}
|
|
4571
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.root },
|
|
4572
|
+
control,
|
|
4573
|
+
noImage);
|
|
4562
4574
|
};
|
|
4563
4575
|
return SurveyQuestionImage;
|
|
4564
4576
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["SurveyQuestionElementBase"]));
|
|
@@ -4741,20 +4753,19 @@ var SurveyQuestionImagePickerItem = /** @class */ (function (_super) {
|
|
|
4741
4753
|
var style = { objectFit: this.question.imageFit };
|
|
4742
4754
|
var control = null;
|
|
4743
4755
|
if (item.locImageLink.renderedHtml && this.question.contentMode === "image") {
|
|
4744
|
-
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("img", { className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, alt: item.locText.renderedHtml, style: style, onLoad: function (event) { _this.question["onContentLoaded"](item, event.nativeEvent); } }));
|
|
4756
|
+
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("img", { className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, alt: item.locText.renderedHtml, style: style, onLoad: function (event) { _this.question["onContentLoaded"](item, event.nativeEvent); }, onError: function (event) { item.onErrorHandler(item, event.nativeEvent); } }));
|
|
4745
4757
|
}
|
|
4746
4758
|
if (item.locImageLink.renderedHtml && this.question.contentMode === "video") {
|
|
4747
|
-
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("video", { controls: true, className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, style: style, onLoadedMetadata: function (event) { _this.question["onContentLoaded"](item, event.nativeEvent); } }));
|
|
4759
|
+
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("video", { controls: true, className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, style: style, onLoadedMetadata: function (event) { _this.question["onContentLoaded"](item, event.nativeEvent); }, onError: function (event) { item.onErrorHandler(item, event.nativeEvent); } }));
|
|
4748
4760
|
}
|
|
4749
|
-
if (!item.locImageLink.renderedHtml) {
|
|
4761
|
+
if (!item.locImageLink.renderedHtml || item.contentNotLoaded) {
|
|
4750
4762
|
var style_1 = {
|
|
4751
4763
|
width: this.question.renderedImageWidth,
|
|
4752
4764
|
height: this.question.renderedImageHeight,
|
|
4753
4765
|
objectFit: this.question.imageFit
|
|
4754
4766
|
};
|
|
4755
4767
|
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.itemNoImage, style: style_1 }, cssClasses.itemNoImageSvgIcon ?
|
|
4756
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("
|
|
4757
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: cssClasses.itemNoImageSvgIconId })) :
|
|
4768
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__["SvgIcon"], { className: cssClasses.itemNoImageSvgIcon, iconName: this.question.cssClasses.itemNoImageSvgIconId, size: 48 }) :
|
|
4758
4769
|
null));
|
|
4759
4770
|
}
|
|
4760
4771
|
var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass },
|
|
@@ -9519,7 +9530,7 @@ var SurveyQuestionText = /** @class */ (function (_super) {
|
|
|
9519
9530
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
|
|
9520
9531
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: this.question.inputId, disabled: this.isDisplayMode, className: inputClass, type: this.question.inputType,
|
|
9521
9532
|
//ref={this.controlRef}
|
|
9522
|
-
ref: function (input) { return (_this.setControl(input)); }, style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: this.question.onBlur, onChange: this.question.onChange, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: function (event) { return _this.question.onCompositionUpdate(event.nativeEvent); }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
|
|
9533
|
+
ref: function (input) { return (_this.setControl(input)); }, style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: this.question.onBlur, onFocus: this.question.onFocus, onChange: this.question.onChange, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: function (event) { return _this.question.onCompositionUpdate(event.nativeEvent); }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
|
|
9523
9534
|
counter));
|
|
9524
9535
|
};
|
|
9525
9536
|
SurveyQuestionText.prototype.renderElement = function () {
|