survey-react-ui 1.11.2 → 1.11.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-react-ui",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.4",
|
|
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
|
"peerDependencies": {
|
|
24
|
-
"survey-core": "1.11.
|
|
24
|
+
"survey-core": "1.11.4",
|
|
25
25
|
"react": "^16.5.0 || ^17.0.1 || ^18.2.0",
|
|
26
26
|
"react-dom": "^16.5.0 || ^17.0.1 || ^18.2.0"
|
|
27
27
|
}
|
package/survey-react-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.11.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.11.4
|
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -2344,7 +2344,8 @@ var Base = /** @class */ (function () {
|
|
|
2344
2344
|
configurable: true
|
|
2345
2345
|
});
|
|
2346
2346
|
Base.prototype.afterRerender = function () {
|
|
2347
|
-
|
|
2347
|
+
var _a;
|
|
2348
|
+
(_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, undefined);
|
|
2348
2349
|
};
|
|
2349
2350
|
Base.currentDependencis = undefined;
|
|
2350
2351
|
return Base;
|
|
@@ -3776,7 +3777,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3776
3777
|
|
|
3777
3778
|
|
|
3778
3779
|
|
|
3779
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.11.
|
|
3780
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.11.4", "survey-react-ui");
|
|
3780
3781
|
|
|
3781
3782
|
|
|
3782
3783
|
/***/ }),
|
|
@@ -8074,6 +8075,11 @@ var DomWindowHelper = /** @class */ (function () {
|
|
|
8074
8075
|
return;
|
|
8075
8076
|
window.removeEventListener(type, listener);
|
|
8076
8077
|
};
|
|
8078
|
+
DomWindowHelper.matchMedia = function (mediaQueryString) {
|
|
8079
|
+
if (!DomWindowHelper.isAvailable() || typeof window.matchMedia === "undefined")
|
|
8080
|
+
return null;
|
|
8081
|
+
return window.matchMedia(mediaQueryString);
|
|
8082
|
+
};
|
|
8077
8083
|
return DomWindowHelper;
|
|
8078
8084
|
}());
|
|
8079
8085
|
|
|
@@ -10743,13 +10749,13 @@ var ListModel = /** @class */ (function (_super) {
|
|
|
10743
10749
|
if (_this.allowSelection) {
|
|
10744
10750
|
_this.selectedItem = itemValue;
|
|
10745
10751
|
}
|
|
10752
|
+
if (!!_this.onSelectionChanged) {
|
|
10753
|
+
_this.onSelectionChanged(itemValue);
|
|
10754
|
+
}
|
|
10746
10755
|
var action = itemValue.action;
|
|
10747
10756
|
if (!!action) {
|
|
10748
10757
|
action(itemValue);
|
|
10749
10758
|
}
|
|
10750
|
-
if (!!_this.onSelectionChanged) {
|
|
10751
|
-
_this.onSelectionChanged(itemValue);
|
|
10752
|
-
}
|
|
10753
10759
|
};
|
|
10754
10760
|
_this.onItemHover = function (itemValue) {
|
|
10755
10761
|
_this.mouseOverHandler(itemValue);
|
|
@@ -11870,6 +11876,7 @@ var englishStrings = {
|
|
|
11870
11876
|
emptyMessage: "No data to display",
|
|
11871
11877
|
noEntriesText: "No entries yet.\nClick the button below to add a new entry.",
|
|
11872
11878
|
noEntriesReadonlyText: "No entries",
|
|
11879
|
+
tabTitlePlaceholder: "New Panel",
|
|
11873
11880
|
more: "More",
|
|
11874
11881
|
tagboxDoneButtonCaption: "OK",
|
|
11875
11882
|
selectToRankEmptyRankedAreaText: "All choices are selected for ranking",
|
|
@@ -12314,7 +12321,7 @@ var SurveyQuestionBoolean = /** @class */ (function (_super) {
|
|
|
12314
12321
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, _this.question.swapOrder); } },
|
|
12315
12322
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.getLabelCss(this.question.swapOrder) }, this.renderLocString(this.question.locLabelLeft))),
|
|
12316
12323
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.switch, onClick: this.handleOnSwitchClick },
|
|
12317
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.slider
|
|
12324
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.slider }, this.question.isDeterminated && cssClasses.sliderText ?
|
|
12318
12325
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.sliderText }, this.renderLocString(this.question.getCheckedLabel()))
|
|
12319
12326
|
: null)),
|
|
12320
12327
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, !_this.question.swapOrder); } },
|
|
@@ -12829,7 +12836,7 @@ var ComponentsContainer = /** @class */ (function (_super) {
|
|
|
12829
12836
|
return _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(component.component, { survey: _this.props.survey, model: component.data, container: _this.props.container, key: component.id });
|
|
12830
12837
|
}));
|
|
12831
12838
|
}
|
|
12832
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "sv-components-column" }, components.map(function (component) {
|
|
12839
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "sv-components-column" + " sv-components-container-" + this.props.container }, components.map(function (component) {
|
|
12833
12840
|
return _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(component.component, { survey: _this.props.survey, model: component.data, container: _this.props.container, key: component.id });
|
|
12834
12841
|
}));
|
|
12835
12842
|
};
|
|
@@ -15876,9 +15883,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15876
15883
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyElementHeader", function() { return SurveyElementHeader; });
|
|
15877
15884
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
15878
15885
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
15879
|
-
/* harmony import */ var
|
|
15880
|
-
/* harmony import */ var
|
|
15881
|
-
/* harmony import */ var
|
|
15886
|
+
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
15887
|
+
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
15888
|
+
/* harmony import */ var _components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/action-bar/action-bar */ "./src/react/components/action-bar/action-bar.tsx");
|
|
15889
|
+
/* harmony import */ var _components_title_title_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/title/title-element */ "./src/react/components/title/title-element.tsx");
|
|
15890
|
+
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
|
|
15882
15891
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
15883
15892
|
var extendStatics = function (d, b) {
|
|
15884
15893
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -15898,6 +15907,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
15898
15907
|
|
|
15899
15908
|
|
|
15900
15909
|
|
|
15910
|
+
|
|
15901
15911
|
var SurveyElementHeader = /** @class */ (function (_super) {
|
|
15902
15912
|
__extends(SurveyElementHeader, _super);
|
|
15903
15913
|
function SurveyElementHeader() {
|
|
@@ -15912,12 +15922,16 @@ var SurveyElementHeader = /** @class */ (function (_super) {
|
|
|
15912
15922
|
});
|
|
15913
15923
|
SurveyElementHeader.prototype.render = function () {
|
|
15914
15924
|
var element = this.element;
|
|
15915
|
-
var title = element.hasTitle ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(
|
|
15925
|
+
var title = element.hasTitle ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_title_title_element__WEBPACK_IMPORTED_MODULE_3__["TitleElement"], { element: element })) : null;
|
|
15916
15926
|
var description = element.hasDescriptionUnderTitle
|
|
15917
|
-
?
|
|
15927
|
+
? _reactquestion_element__WEBPACK_IMPORTED_MODULE_4__["SurveyElementBase"].renderQuestionDescription(this.element)
|
|
15918
15928
|
: null;
|
|
15919
|
-
var additionalTitleToolbarElement = element.hasAdditionalTitleToolbar ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(
|
|
15920
|
-
|
|
15929
|
+
var additionalTitleToolbarElement = element.hasAdditionalTitleToolbar ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_2__["SurveyActionBar"], { model: element.additionalTitleToolbar }) : null;
|
|
15930
|
+
var headerStyle = { width: undefined };
|
|
15931
|
+
if (element instanceof survey_core__WEBPACK_IMPORTED_MODULE_1__["Question"]) {
|
|
15932
|
+
headerStyle.width = element.titleWidth;
|
|
15933
|
+
}
|
|
15934
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: element.cssHeader, onClick: function (e) { return element.clickTitleFunction && element.clickTitleFunction(e.nativeEvent); }, style: headerStyle },
|
|
15921
15935
|
title,
|
|
15922
15936
|
description,
|
|
15923
15937
|
additionalTitleToolbarElement));
|
|
@@ -18147,11 +18161,14 @@ var SurveyQuestionAndErrorsCell = /** @class */ (function (_super) {
|
|
|
18147
18161
|
}
|
|
18148
18162
|
}
|
|
18149
18163
|
};
|
|
18164
|
+
SurveyQuestionAndErrorsCell.prototype.renderCellContent = function () {
|
|
18165
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.props.cell.cellQuestionWrapperClassName }, this.renderQuestion()));
|
|
18166
|
+
};
|
|
18150
18167
|
SurveyQuestionAndErrorsCell.prototype.renderElement = function () {
|
|
18151
18168
|
var style = this.getCellStyle();
|
|
18152
18169
|
var cell = this.props.cell;
|
|
18153
18170
|
var focusIn = function () { cell.focusIn(); };
|
|
18154
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { ref: this.cellRef, className: this.itemCss, colSpan: cell.colSpans,
|
|
18171
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { ref: this.cellRef, className: this.itemCss, colSpan: cell.colSpans, title: cell.getTitle(), style: style, onFocus: focusIn }, this.wrapCell(this.props.cell, this.renderCellContent())));
|
|
18155
18172
|
};
|
|
18156
18173
|
SurveyQuestionAndErrorsCell.prototype.getCellStyle = function () {
|
|
18157
18174
|
return null;
|
|
@@ -20126,7 +20143,7 @@ var SurveyQuestionMatrixTable = /** @class */ (function (_super) {
|
|
|
20126
20143
|
if (!!cell.minWidth)
|
|
20127
20144
|
cellStyle.minWidth = cell.minWidth;
|
|
20128
20145
|
}
|
|
20129
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { className: cell.className, key: key, style: cellStyle, colSpan: cell.colSpans,
|
|
20146
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { className: cell.className, key: key, style: cellStyle, colSpan: cell.colSpans, title: cell.getTitle() }, cellContent));
|
|
20130
20147
|
};
|
|
20131
20148
|
SurveyQuestionMatrixTable.prototype.renderCellContent = function (cell, reason, cssClasses) {
|
|
20132
20149
|
var cellContent = null;
|
|
@@ -20345,6 +20362,13 @@ var SurveyQuestionMatrixDropdownCell = /** @class */ (function (_super) {
|
|
|
20345
20362
|
SurveyQuestionMatrixDropdownCell.prototype.getHeaderText = function () {
|
|
20346
20363
|
return this.cell.headers;
|
|
20347
20364
|
};
|
|
20365
|
+
SurveyQuestionMatrixDropdownCell.prototype.renderCellContent = function () {
|
|
20366
|
+
var content = _super.prototype.renderCellContent.call(this);
|
|
20367
|
+
var responsiveTitle = this.cell.showResponsiveTitle ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cell.responsiveTitleCss }, this.renderLocString(this.cell.responsiveLocTitle))) : null;
|
|
20368
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
|
|
20369
|
+
responsiveTitle,
|
|
20370
|
+
content);
|
|
20371
|
+
};
|
|
20348
20372
|
SurveyQuestionMatrixDropdownCell.prototype.renderQuestion = function () {
|
|
20349
20373
|
if (!this.question.isVisible)
|
|
20350
20374
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null);
|
|
@@ -21332,7 +21356,7 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
|
|
|
21332
21356
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.dashSvgIcon })));
|
|
21333
21357
|
};
|
|
21334
21358
|
SurveyQuestionRankingItem.prototype.renderElement = function () {
|
|
21335
|
-
var
|
|
21359
|
+
var itemContent = _element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.createElement(this.question.itemComponent, { item: this.item, cssClasses: this.cssClasses });
|
|
21336
21360
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { tabIndex: this.itemTabIndex, className: this.itemClass, onKeyDown: this.handleKeydown, onPointerDown: this.handlePointerDown, onPointerUp: this.handlePointerUp, "data-sv-drop-target-ranking-item": this.index },
|
|
21337
21361
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { tabIndex: -1, style: { outline: "none" } },
|
|
21338
21362
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.itemGhostNode }),
|
|
@@ -21343,7 +21367,7 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
|
|
|
21343
21367
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.question.getIconFocusCss() },
|
|
21344
21368
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.arrowsSvgIcon }))),
|
|
21345
21369
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getItemIndexClasses(this.item) }, (!this.unrankedItem && this.indexText) ? this.indexText : this.renderEmptyIcon()),
|
|
21346
|
-
|
|
21370
|
+
itemContent))));
|
|
21347
21371
|
};
|
|
21348
21372
|
return SurveyQuestionRankingItem;
|
|
21349
21373
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
|
@@ -21373,7 +21397,7 @@ var SurveyQuestionRankingItemContent = /** @class */ (function (_super) {
|
|
|
21373
21397
|
return SurveyQuestionRankingItemContent;
|
|
21374
21398
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
|
21375
21399
|
|
|
21376
|
-
_element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.registerElement("sv-ranking-item
|
|
21400
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.registerElement("sv-ranking-item", function (props) {
|
|
21377
21401
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRankingItemContent, props);
|
|
21378
21402
|
});
|
|
21379
21403
|
_reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__["ReactQuestionFactory"].Instance.registerQuestion("ranking", function (props) {
|
|
@@ -22903,6 +22927,7 @@ var settings = {
|
|
|
22903
22927
|
* This setting applies to all TagBox questions on a page. You can use the [closeOnSelect](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model#closeOnSelect) property to specify the same setting for an individual TagBox question.
|
|
22904
22928
|
*/
|
|
22905
22929
|
tagboxCloseOnSelect: false,
|
|
22930
|
+
dropdownSearchDelay: 500,
|
|
22906
22931
|
/**
|
|
22907
22932
|
* A function that activates a browser confirm dialog.
|
|
22908
22933
|
*
|