survey-react-ui 1.12.5 → 1.12.6
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.js +33 -11
- package/survey-react-ui.js.map +1 -1
- package/survey-react-ui.min.js +2 -2
- package/typings/packages/survey-react-ui/src/components/action-bar/action-bar-item-dropdown.d.ts +1 -0
- package/typings/packages/survey-react-ui/src/components/popup/popup.d.ts +1 -0
- package/typings/packages/survey-react-ui/src/components/text-area.d.ts +0 -1
- package/typings/packages/survey-react-ui/src/dropdown-item.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-react-ui",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.6",
|
|
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": "./typings/src/entries/react-ui.d.ts",
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"survey-core": "1.12.
|
|
24
|
+
"survey-core": "1.12.6",
|
|
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.12.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.6
|
|
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
|
*/
|
|
@@ -1423,6 +1423,12 @@ var popup_PopupContainer = /** @class */ (function (_super) {
|
|
|
1423
1423
|
_this.model.clickOutside(e);
|
|
1424
1424
|
}, onKeyDown: this.handleKeydown }, container));
|
|
1425
1425
|
};
|
|
1426
|
+
PopupContainer.prototype.componentDidMount = function () {
|
|
1427
|
+
_super.prototype.componentDidMount.call(this);
|
|
1428
|
+
if (this.model.isVisible) {
|
|
1429
|
+
this.model.updateOnShowing();
|
|
1430
|
+
}
|
|
1431
|
+
};
|
|
1426
1432
|
return PopupContainer;
|
|
1427
1433
|
}(reactquestion_element_SurveyElementBase));
|
|
1428
1434
|
|
|
@@ -1453,12 +1459,26 @@ function showDialog(dialogOptions, rootElement) {
|
|
|
1453
1459
|
var popupViewModel = Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["createPopupModalViewModel"])(dialogOptions, rootElement);
|
|
1454
1460
|
var onVisibilityChangedCallback = function (_, options) {
|
|
1455
1461
|
if (!options.isVisible) {
|
|
1456
|
-
external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.
|
|
1462
|
+
if (typeof external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.createRoot == "function") {
|
|
1463
|
+
if (!!root) {
|
|
1464
|
+
root.unmount();
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
else {
|
|
1468
|
+
external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.unmountComponentAtNode(popupViewModel.container);
|
|
1469
|
+
}
|
|
1457
1470
|
popupViewModel.dispose();
|
|
1458
1471
|
}
|
|
1459
1472
|
};
|
|
1460
1473
|
popupViewModel.onVisibilityChanged.add(onVisibilityChangedCallback);
|
|
1461
|
-
|
|
1474
|
+
var root;
|
|
1475
|
+
if (typeof external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.createRoot == "function") {
|
|
1476
|
+
root = external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.createRoot(popupViewModel.container);
|
|
1477
|
+
root.render(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(popup_PopupContainer, { model: popupViewModel }));
|
|
1478
|
+
}
|
|
1479
|
+
else {
|
|
1480
|
+
external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.render(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(popup_PopupContainer, { model: popupViewModel }), popupViewModel.container);
|
|
1481
|
+
}
|
|
1462
1482
|
popupViewModel.model.isVisible = true;
|
|
1463
1483
|
return popupViewModel;
|
|
1464
1484
|
}
|
|
@@ -1489,9 +1509,7 @@ var action_bar_item_dropdown_extends = (undefined && undefined.__extends) || (fu
|
|
|
1489
1509
|
var action_bar_item_dropdown_SurveyActionBarItemDropdown = /** @class */ (function (_super) {
|
|
1490
1510
|
action_bar_item_dropdown_extends(SurveyActionBarItemDropdown, _super);
|
|
1491
1511
|
function SurveyActionBarItemDropdown(props) {
|
|
1492
|
-
|
|
1493
|
-
_this.viewModel = new external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["ActionDropdownViewModel"](_this.item);
|
|
1494
|
-
return _this;
|
|
1512
|
+
return _super.call(this, props) || this;
|
|
1495
1513
|
}
|
|
1496
1514
|
SurveyActionBarItemDropdown.prototype.renderInnerButton = function () {
|
|
1497
1515
|
var button = _super.prototype.renderInnerButton.call(this);
|
|
@@ -1499,6 +1517,9 @@ var action_bar_item_dropdown_SurveyActionBarItemDropdown = /** @class */ (functi
|
|
|
1499
1517
|
button,
|
|
1500
1518
|
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(popup_Popup, { model: this.item.popupModel, getTarget: external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["getActionDropdownButtonTarget"] })));
|
|
1501
1519
|
};
|
|
1520
|
+
SurveyActionBarItemDropdown.prototype.componentDidMount = function () {
|
|
1521
|
+
this.viewModel = new external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["ActionDropdownViewModel"](this.item);
|
|
1522
|
+
};
|
|
1502
1523
|
SurveyActionBarItemDropdown.prototype.componentWillUnmount = function () {
|
|
1503
1524
|
_super.prototype.componentWillUnmount.call(this);
|
|
1504
1525
|
this.viewModel.dispose();
|
|
@@ -1889,9 +1910,6 @@ var text_area_TextAreaComponent = /** @class */ (function (_super) {
|
|
|
1889
1910
|
var _this = this;
|
|
1890
1911
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("textarea", { id: this.viewModel.id, className: this.viewModel.className, ref: function (textarea) { return (_this.viewModel.setElement(textarea)); }, disabled: this.viewModel.isDisabledAttr, readOnly: this.viewModel.isReadOnlyAttr, rows: this.viewModel.rows, cols: this.viewModel.cols, placeholder: this.viewModel.placeholder, maxLength: this.viewModel.maxLength, defaultValue: this.initialValue, onChange: function (event) { _this.viewModel.onTextAreaInput(event); }, onFocus: function (event) { _this.viewModel.onTextAreaFocus(event); }, onBlur: function (event) { _this.viewModel.onTextAreaBlur(event); }, onKeyDown: function (event) { _this.viewModel.onTextAreaKeyDown(event); }, "aria-required": this.viewModel.ariaRequired, "aria-label": this.viewModel.ariaLabel, "aria-labelledby": this.viewModel.ariaLabelledBy, "aria-describedby": this.viewModel.ariaDescribedBy, "aria-invalid": this.viewModel.ariaInvalid, "aria-errormessage": this.viewModel.ariaErrormessage, style: { resize: this.viewModel.question.resizeStyle } }));
|
|
1891
1912
|
};
|
|
1892
|
-
TextAreaComponent.prototype.componentWillUnmount = function () {
|
|
1893
|
-
this.viewModel.dispose();
|
|
1894
|
-
};
|
|
1895
1913
|
return TextAreaComponent;
|
|
1896
1914
|
}(reactquestion_element_SurveyElementBase));
|
|
1897
1915
|
|
|
@@ -2906,6 +2924,7 @@ var reactSurvey_Survey = /** @class */ (function (_super) {
|
|
|
2906
2924
|
if (!!el)
|
|
2907
2925
|
this.survey.afterRenderSurvey(el);
|
|
2908
2926
|
this.survey.startTimerFromUI();
|
|
2927
|
+
this.setSurveyEvents();
|
|
2909
2928
|
}
|
|
2910
2929
|
};
|
|
2911
2930
|
Survey.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
|
@@ -3062,7 +3081,6 @@ var reactSurvey_Survey = /** @class */ (function (_super) {
|
|
|
3062
3081
|
if (!!newProps.css) {
|
|
3063
3082
|
this.survey.css = this.css;
|
|
3064
3083
|
}
|
|
3065
|
-
this.setSurveyEvents();
|
|
3066
3084
|
};
|
|
3067
3085
|
Survey.prototype.isModelJSONChanged = function (newProps) {
|
|
3068
3086
|
if (!!newProps["model"]) {
|
|
@@ -4366,6 +4384,10 @@ var dropdown_item_SurveyQuestionOptionItem = /** @class */ (function (_super) {
|
|
|
4366
4384
|
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
|
4367
4385
|
this.setupModel();
|
|
4368
4386
|
};
|
|
4387
|
+
SurveyQuestionOptionItem.prototype.componentDidMount = function () {
|
|
4388
|
+
_super.prototype.componentDidMount.call(this);
|
|
4389
|
+
this.setupModel();
|
|
4390
|
+
};
|
|
4369
4391
|
SurveyQuestionOptionItem.prototype.componentWillUnmount = function () {
|
|
4370
4392
|
_super.prototype.componentWillUnmount.call(this);
|
|
4371
4393
|
if (!!this.item) {
|
|
@@ -9316,7 +9338,7 @@ ReactElementFactory.Instance.registerElement(external_root_Survey_commonjs2_surv
|
|
|
9316
9338
|
|
|
9317
9339
|
|
|
9318
9340
|
|
|
9319
|
-
Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["checkLibraryVersion"])("" + "1.12.
|
|
9341
|
+
Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["checkLibraryVersion"])("" + "1.12.6", "survey-react-ui");
|
|
9320
9342
|
|
|
9321
9343
|
|
|
9322
9344
|
/***/ }),
|