survey-react-ui 1.9.134 → 1.9.136

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.9.134",
3
+ "version": "1.9.136",
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",
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.134
2
+ * surveyjs - Survey JavaScript library v1.9.136
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
  */
@@ -2899,6 +2899,8 @@ var ConsoleWarnings = /** @class */ (function () {
2899
2899
  "use strict";
2900
2900
  __webpack_require__.r(__webpack_exports__);
2901
2901
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementHelper", function() { return ElementHelper; });
2902
+ /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
2903
+
2902
2904
  var ElementHelper = /** @class */ (function () {
2903
2905
  function ElementHelper() {
2904
2906
  }
@@ -2906,7 +2908,7 @@ var ElementHelper = /** @class */ (function () {
2906
2908
  element && element.focus();
2907
2909
  };
2908
2910
  ElementHelper.visibility = function (node) {
2909
- var style = window.getComputedStyle(node);
2911
+ var style = _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomDocumentHelper"].getComputedStyle(node);
2910
2912
  if (style.display === "none" || style.visibility === "hidden")
2911
2913
  return false;
2912
2914
  return node.parentElement ? this.visibility(node.parentElement) : true;
@@ -3585,7 +3587,7 @@ __webpack_require__.r(__webpack_exports__);
3585
3587
 
3586
3588
 
3587
3589
 
3588
- Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.134", "survey-react-ui");
3590
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.136", "survey-react-ui");
3589
3591
 
3590
3592
 
3591
3593
  /***/ }),
@@ -7782,6 +7784,148 @@ function substring_(params) {
7782
7784
  FunctionFactory.Instance.register("substring", substring_);
7783
7785
 
7784
7786
 
7787
+ /***/ }),
7788
+
7789
+ /***/ "./src/global_variables_utils.ts":
7790
+ /*!***************************************!*\
7791
+ !*** ./src/global_variables_utils.ts ***!
7792
+ \***************************************/
7793
+ /*! exports provided: DomWindowHelper, DomDocumentHelper */
7794
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
7795
+
7796
+ "use strict";
7797
+ __webpack_require__.r(__webpack_exports__);
7798
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DomWindowHelper", function() { return DomWindowHelper; });
7799
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DomDocumentHelper", function() { return DomDocumentHelper; });
7800
+ /* eslint-disable no-restricted-globals */
7801
+ var DomWindowHelper = /** @class */ (function () {
7802
+ function DomWindowHelper() {
7803
+ }
7804
+ DomWindowHelper.isAvailable = function () {
7805
+ return "undefined" !== typeof window;
7806
+ };
7807
+ DomWindowHelper.isFileReaderAvailable = function () {
7808
+ if (!DomWindowHelper.isAvailable())
7809
+ return false;
7810
+ return !!window["FileReader"];
7811
+ };
7812
+ DomWindowHelper.getLocation = function () {
7813
+ if (!DomWindowHelper.isAvailable())
7814
+ return;
7815
+ return window.location;
7816
+ };
7817
+ DomWindowHelper.getVisualViewport = function () {
7818
+ if (!DomWindowHelper.isAvailable())
7819
+ return null;
7820
+ return window.visualViewport;
7821
+ };
7822
+ DomWindowHelper.getInnerWidth = function () {
7823
+ if (!DomWindowHelper.isAvailable())
7824
+ return;
7825
+ return window.innerWidth;
7826
+ };
7827
+ DomWindowHelper.getInnerHeight = function () {
7828
+ if (!DomWindowHelper.isAvailable())
7829
+ return null;
7830
+ return window.innerHeight;
7831
+ };
7832
+ DomWindowHelper.getWindow = function () {
7833
+ if (!DomWindowHelper.isAvailable())
7834
+ return;
7835
+ return window;
7836
+ };
7837
+ DomWindowHelper.hasOwn = function (propertyName) {
7838
+ if (!DomWindowHelper.isAvailable())
7839
+ return;
7840
+ return propertyName in window;
7841
+ };
7842
+ DomWindowHelper.getSelection = function () {
7843
+ if (DomWindowHelper.isAvailable() && window.getSelection) {
7844
+ return window.getSelection();
7845
+ }
7846
+ };
7847
+ DomWindowHelper.requestAnimationFrame = function (callback) {
7848
+ if (DomWindowHelper.isAvailable()) {
7849
+ return window.requestAnimationFrame(callback);
7850
+ }
7851
+ };
7852
+ DomWindowHelper.addEventListener = function (type, listener) {
7853
+ if (!DomWindowHelper.isAvailable())
7854
+ return;
7855
+ window.addEventListener(type, listener);
7856
+ };
7857
+ DomWindowHelper.removeEventListener = function (type, listener) {
7858
+ if (!DomWindowHelper.isAvailable())
7859
+ return;
7860
+ window.removeEventListener(type, listener);
7861
+ };
7862
+ return DomWindowHelper;
7863
+ }());
7864
+
7865
+ var DomDocumentHelper = /** @class */ (function () {
7866
+ function DomDocumentHelper() {
7867
+ }
7868
+ DomDocumentHelper.isAvailable = function () {
7869
+ return "undefined" !== typeof document;
7870
+ };
7871
+ DomDocumentHelper.getBody = function () {
7872
+ if (!DomDocumentHelper.isAvailable())
7873
+ return;
7874
+ return document.body;
7875
+ };
7876
+ DomDocumentHelper.getDocumentElement = function () {
7877
+ if (!DomDocumentHelper.isAvailable())
7878
+ return;
7879
+ return document.documentElement;
7880
+ };
7881
+ DomDocumentHelper.getDocument = function () {
7882
+ if (!DomDocumentHelper.isAvailable())
7883
+ return;
7884
+ return document;
7885
+ };
7886
+ DomDocumentHelper.getCookie = function () {
7887
+ if (!DomDocumentHelper.isAvailable())
7888
+ return;
7889
+ return document.cookie;
7890
+ };
7891
+ DomDocumentHelper.setCookie = function (newCookie) {
7892
+ if (!DomDocumentHelper.isAvailable())
7893
+ return;
7894
+ document.cookie = newCookie;
7895
+ };
7896
+ DomDocumentHelper.activeElementBlur = function () {
7897
+ if (!DomDocumentHelper.isAvailable())
7898
+ return;
7899
+ var activeElement = document.activeElement;
7900
+ if (!!activeElement && !!activeElement.blur) {
7901
+ activeElement.blur();
7902
+ }
7903
+ };
7904
+ DomDocumentHelper.createElement = function (tagName) {
7905
+ if (!DomDocumentHelper.isAvailable())
7906
+ return;
7907
+ return document.createElement(tagName);
7908
+ };
7909
+ DomDocumentHelper.getComputedStyle = function (elt) {
7910
+ if (!DomDocumentHelper.isAvailable())
7911
+ return new CSSStyleDeclaration();
7912
+ return document.defaultView.getComputedStyle(elt);
7913
+ };
7914
+ DomDocumentHelper.addEventListener = function (type, listener) {
7915
+ if (!DomDocumentHelper.isAvailable())
7916
+ return;
7917
+ document.addEventListener(type, listener);
7918
+ };
7919
+ DomDocumentHelper.removeEventListener = function (type, listener) {
7920
+ if (!DomDocumentHelper.isAvailable())
7921
+ return;
7922
+ document.removeEventListener(type, listener);
7923
+ };
7924
+ return DomDocumentHelper;
7925
+ }());
7926
+
7927
+
7928
+
7785
7929
  /***/ }),
7786
7930
 
7787
7931
  /***/ "./src/helpers.ts":
@@ -9870,23 +10014,9 @@ var JsonError = /** @class */ (function () {
9870
10014
  var JsonUnknownPropertyError = /** @class */ (function (_super) {
9871
10015
  __extends(JsonUnknownPropertyError, _super);
9872
10016
  function JsonUnknownPropertyError(propertyName, className) {
9873
- var _this = _super.call(this, "unknownproperty", "The property '" +
9874
- propertyName +
9875
- "' in class '" +
9876
- className +
9877
- "' is unknown.") || this;
10017
+ var _this = _super.call(this, "unknownproperty", "Unknown property in class '" + className + "': '" + propertyName + "'.") || this;
9878
10018
  _this.propertyName = propertyName;
9879
10019
  _this.className = className;
9880
- var properties = Serializer.getProperties(className);
9881
- if (properties) {
9882
- _this.description = "The list of available properties are: ";
9883
- for (var i = 0; i < properties.length; i++) {
9884
- if (i > 0)
9885
- _this.description += ", ";
9886
- _this.description += properties[i].name;
9887
- }
9888
- _this.description += ".";
9889
- }
9890
10020
  return _this;
9891
10021
  }
9892
10022
  return JsonUnknownPropertyError;
@@ -9899,14 +10029,6 @@ var JsonMissingTypeErrorBase = /** @class */ (function (_super) {
9899
10029
  _this.baseClassName = baseClassName;
9900
10030
  _this.type = type;
9901
10031
  _this.message = message;
9902
- _this.description = "The following types are available: ";
9903
- var types = Serializer.getChildrenClasses(baseClassName, true);
9904
- for (var i = 0; i < types.length; i++) {
9905
- if (i > 0)
9906
- _this.description += ", ";
9907
- _this.description += "'" + types[i].name + "'";
9908
- }
9909
- _this.description += ".";
9910
10032
  return _this;
9911
10033
  }
9912
10034
  return JsonMissingTypeErrorBase;
@@ -10369,6 +10491,7 @@ var defaultListCss = {
10369
10491
  itemWithIcon: "sv-list__item--with-icon",
10370
10492
  itemDisabled: "sv-list__item--disabled",
10371
10493
  itemFocused: "sv-list__item--focused",
10494
+ itemTextWrap: "sv-list__item-text--wrap",
10372
10495
  itemIcon: "sv-list__item-icon",
10373
10496
  itemSeparator: "sv-list__item-separator",
10374
10497
  itemBody: "sv-list__item-body",
@@ -10422,6 +10545,7 @@ var ListModel = /** @class */ (function (_super) {
10422
10545
  .append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
10423
10546
  .append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
10424
10547
  .append(_this.cssClasses.itemSelected, _this.isItemSelected(itemValue))
10548
+ .append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
10425
10549
  .append(itemValue.css)
10426
10550
  .toString();
10427
10551
  };
@@ -10719,6 +10843,9 @@ var ListModel = /** @class */ (function (_super) {
10719
10843
  __decorate([
10720
10844
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
10721
10845
  ], ListModel.prototype, "renderElements", void 0);
10846
+ __decorate([
10847
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
10848
+ ], ListModel.prototype, "textWrapEnabled", void 0);
10722
10849
  return ListModel;
10723
10850
  }(_actions_container__WEBPACK_IMPORTED_MODULE_1__["ActionContainer"]));
10724
10851
 
@@ -11489,6 +11616,7 @@ __webpack_require__.r(__webpack_exports__);
11489
11616
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDialogOptions", function() { return createDialogOptions; });
11490
11617
  /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./src/base.ts");
11491
11618
  /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
11619
+ /* harmony import */ var _console_warnings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./console-warnings */ "./src/console-warnings.ts");
11492
11620
  var __extends = (undefined && undefined.__extends) || (function () {
11493
11621
  var extendStatics = function (d, b) {
11494
11622
  extendStatics = Object.setPrototypeOf ||
@@ -11512,6 +11640,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
11512
11640
  };
11513
11641
 
11514
11642
 
11643
+
11515
11644
  var PopupModel = /** @class */ (function (_super) {
11516
11645
  __extends(PopupModel, _super);
11517
11646
  function PopupModel(contentComponentName, contentComponentData, verticalPosition, horizontalPosition, showPointer, isModal, onCancel, onApply, onHide, onShow, cssClass, title, onDispose) {
@@ -11644,6 +11773,7 @@ function createDialogOptions(componentName, data, onApply, onCancel, onHide, onS
11644
11773
  if (onHide === void 0) { onHide = function () { }; }
11645
11774
  if (onShow === void 0) { onShow = function () { }; }
11646
11775
  if (displayMode === void 0) { displayMode = "popup"; }
11776
+ _console_warnings__WEBPACK_IMPORTED_MODULE_2__["ConsoleWarnings"].warn("The `showModal()` and `createDialogOptions()` methods are obsolete. Use the `showDialog()` method instead.");
11647
11777
  return {
11648
11778
  componentName: componentName,
11649
11779
  data: data,
@@ -16072,8 +16202,8 @@ var SurveyPanelBase = /** @class */ (function (_super) {
16072
16202
  _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
16073
16203
  if (!!prevProps.page &&
16074
16204
  !!this.survey &&
16075
- !!this.survey.currentPage &&
16076
- prevProps.page.id === this.survey.currentPage.id)
16205
+ !!this.survey.activePage &&
16206
+ prevProps.page.id === this.survey.activePage.id)
16077
16207
  return;
16078
16208
  this.doAfterRender();
16079
16209
  };
@@ -16425,7 +16555,11 @@ var SurveyProgressButtons = /** @class */ (function (_super) {
16425
16555
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsConnector }),
16426
16556
  this.state.canShowItemTitles ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
16427
16557
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsPageTitle, title: page.renderedNavigationTitle }, page.renderedNavigationTitle),
16428
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsPageDescription, title: page.navigationDescription }, page.navigationDescription)) : null));
16558
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsPageDescription, title: page.navigationDescription }, page.navigationDescription)) : null,
16559
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsButton },
16560
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsButtonBackground }),
16561
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.progressButtonsButtonContent }),
16562
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.model.getItemNumber(page)))));
16429
16563
  };
16430
16564
  SurveyProgressButtons.prototype.clickScrollButton = function (listContainerElement, isLeftScroll) {
16431
16565
  if (!!listContainerElement) {
@@ -20170,7 +20304,7 @@ var SurveyQuestionPanelDynamicItem = /** @class */ (function (_super) {
20170
20304
  var separator = this.question.showSeparator(this.index) ?
20171
20305
  (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("hr", { className: this.question.cssClasses.separator })) : null;
20172
20306
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
20173
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getPanelWrapperCss() },
20307
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getPanelWrapperCss(this.panel) },
20174
20308
  panel,
20175
20309
  removeButton),
20176
20310
  separator));
@@ -21759,23 +21893,25 @@ var SurveyQuestionTagboxItem = /** @class */ (function (_super) {
21759
21893
  "use strict";
21760
21894
  __webpack_require__.r(__webpack_exports__);
21761
21895
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; });
21762
- /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
21896
+ /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
21897
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
21898
+
21763
21899
 
21764
21900
  var document = typeof globalThis !== "undefined" ? globalThis.document : undefined.document;
21765
21901
  var defaultEnvironment = (!!document ? {
21766
21902
  root: document,
21767
- _rootElement: document.body,
21903
+ _rootElement: _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomDocumentHelper"].getBody(),
21768
21904
  get rootElement() {
21769
21905
  var _a;
21770
- return (_a = this._rootElement) !== null && _a !== void 0 ? _a : document.body;
21906
+ return (_a = this._rootElement) !== null && _a !== void 0 ? _a : _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomDocumentHelper"].getBody();
21771
21907
  },
21772
21908
  set rootElement(rootElement) {
21773
21909
  this._rootElement = rootElement;
21774
21910
  },
21775
- _popupMountContainer: document.body,
21911
+ _popupMountContainer: _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomDocumentHelper"].getBody(),
21776
21912
  get popupMountContainer() {
21777
21913
  var _a;
21778
- return (_a = this._popupMountContainer) !== null && _a !== void 0 ? _a : document.body;
21914
+ return (_a = this._popupMountContainer) !== null && _a !== void 0 ? _a : _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomDocumentHelper"].getBody();
21779
21915
  },
21780
21916
  set popupMountContainer(popupMountContainer) {
21781
21917
  this._popupMountContainer = popupMountContainer;
@@ -21824,7 +21960,7 @@ var settings = {
21824
21960
  * Nested properties:
21825
21961
  *
21826
21962
  * - `useLocalTimeZone`: `boolean`\
21827
- * Disable this property if you want internal SurveyJS functions to use methods that work with UTC date and time (`setUTCDate()` `setUTCHours()`, etc.) instead of methods that work with local date and time (`setYear`, `setHours()`, etc.). Default value: `true`.
21963
+ * Disable this property if you want internal SurveyJS functions to use methods that work with UTC date and time (`setUTCDate()` `setUTCHours()`, etc.) instead of methods that work with local date and time (`setYear()`, `setHours()`, etc.). Default value: `true`.
21828
21964
  *
21829
21965
  * - `defaultLocaleName`: `string`\
21830
21966
  * A property key that stores a translation for the default locale. Default value: `"default"`.
@@ -21970,7 +22106,8 @@ var settings = {
21970
22106
  * - `enabled`: `boolean`\
21971
22107
  * Specifies whether to add questions to the DOM only when they get into the viewport. Default value: `false`.
21972
22108
  *
21973
- * > Lazy rendering is an experimental feature that may not work as expected in all use cases.
22109
+ * [View Demo](https://surveyjs.io/form-library/examples/survey-lazy/ (linkStyle))
22110
+ * @see [SurveyModel.lazyRendering](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#lazyRendering)
21974
22111
  */
21975
22112
  lazyRender: {
21976
22113
  enabled: false,
@@ -22204,7 +22341,7 @@ var settings = {
22204
22341
  * @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
22205
22342
  */
22206
22343
  confirmActionAsync: function (message, callback, applyTitle, locale, rootElement) {
22207
- return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["showConfirmDialog"])(message, callback, applyTitle, locale, rootElement);
22344
+ return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["showConfirmDialog"])(message, callback, applyTitle, locale, rootElement);
22208
22345
  },
22209
22346
  /**
22210
22347
  * A minimum width value for all survey elements.
@@ -22445,6 +22582,20 @@ var settings = {
22445
22582
  ]
22446
22583
  },
22447
22584
  legacyProgressBarView: false,
22585
+ /**
22586
+ * An object with properties that configure input masks.
22587
+ *
22588
+ * Nested properties:
22589
+ *
22590
+ * - `patternPlaceholderChar`: `string`\
22591
+ * A symbol used as a placeholder for characters to be entered in [pattern masks](https://surveyjs.io/form-library/documentation/api-reference/inputmaskpattern). Default value: `"_"`.
22592
+ *
22593
+ * - `patternEscapeChar`: `string`\
22594
+ * A symbol used to insert literal representations of special characters in [pattern masks](https://surveyjs.io/form-library/documentation/api-reference/inputmaskpattern). Default value: `"\\"`.
22595
+ *
22596
+ * - `patternDefinitions`: `<{ [key: string]: RegExp }>`\
22597
+ * An object that maps placeholder symbols to regular expressions in [pattern masks](https://surveyjs.io/form-library/documentation/api-reference/inputmaskpattern). Default value: `{ "9": /[0-9]/, "a": /[a-zA-Z]/, "#": /[a-zA-Z0-9]/ }`.
22598
+ */
22448
22599
  maskSettings: {
22449
22600
  patternPlaceholderChar: "_",
22450
22601
  patternEscapeChar: "\\",
@@ -22478,6 +22629,7 @@ __webpack_require__.r(__webpack_exports__);
22478
22629
  /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
22479
22630
  /* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
22480
22631
  /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
22632
+ /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
22481
22633
  var __extends = (undefined && undefined.__extends) || (function () {
22482
22634
  var extendStatics = function (d, b) {
22483
22635
  extendStatics = Object.setPrototypeOf ||
@@ -22506,6 +22658,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
22506
22658
 
22507
22659
 
22508
22660
 
22661
+
22509
22662
  /**
22510
22663
  * A base class for the [`SurveyElement`](https://surveyjs.io/form-library/documentation/surveyelement) and [`SurveyModel`](https://surveyjs.io/form-library/documentation/surveymodel) classes.
22511
22664
  */
@@ -22735,11 +22888,11 @@ var SurveyElement = /** @class */ (function (_super) {
22735
22888
  elLeft = el.getBoundingClientRect().left;
22736
22889
  needScroll = elLeft < 0;
22737
22890
  }
22738
- if (!!window && !needScroll) {
22739
- var height = window.innerHeight;
22891
+ if (!needScroll && _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomWindowHelper"].isAvailable()) {
22892
+ var height = _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomWindowHelper"].getInnerHeight();
22740
22893
  needScroll = height > 0 && height < elTop;
22741
22894
  if (!needScroll && checkLeft) {
22742
- var width = window.innerWidth;
22895
+ var width = _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomWindowHelper"].getInnerWidth();
22743
22896
  needScroll = width > 0 && width < elLeft;
22744
22897
  }
22745
22898
  }
@@ -22767,7 +22920,7 @@ var SurveyElement = /** @class */ (function (_super) {
22767
22920
  return null;
22768
22921
  };
22769
22922
  SurveyElement.FocusElement = function (elementId) {
22770
- if (!elementId || typeof document === "undefined")
22923
+ if (!elementId || !_global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomDocumentHelper"].isAvailable())
22771
22924
  return false;
22772
22925
  var res = SurveyElement.focusElementCore(elementId);
22773
22926
  if (!res) {
@@ -23682,12 +23835,13 @@ var SurveyElement = /** @class */ (function (_super) {
23682
23835
  });
23683
23836
  SurveyElement.prototype.isContainsSelection = function (el) {
23684
23837
  var elementWithSelection = undefined;
23685
- if ((typeof document !== "undefined") && document["selection"]) {
23686
- elementWithSelection = document["selection"].createRange().parentElement();
23838
+ var _document = _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomDocumentHelper"].getDocument();
23839
+ if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomDocumentHelper"].isAvailable() && !!_document && _document["selection"]) {
23840
+ elementWithSelection = _document["selection"].createRange().parentElement();
23687
23841
  }
23688
23842
  else {
23689
- var selection = window.getSelection();
23690
- if (selection.rangeCount > 0) {
23843
+ var selection = _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomWindowHelper"].getSelection();
23844
+ if (!!selection && selection.rangeCount > 0) {
23691
23845
  var range = selection.getRangeAt(0);
23692
23846
  if (range.startOffset !== range.endOffset) {
23693
23847
  elementWithSelection = range.startContainer.parentNode;
@@ -23940,7 +24094,8 @@ var CssClassBuilder = /** @class */ (function () {
23940
24094
  __webpack_require__.r(__webpack_exports__);
23941
24095
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResponsivityManager", function() { return ResponsivityManager; });
23942
24096
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VerticalResponsivityManager", function() { return VerticalResponsivityManager; });
23943
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ "./src/utils/utils.ts");
24097
+ /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
24098
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./src/utils/utils.ts");
23944
24099
  var __extends = (undefined && undefined.__extends) || (function () {
23945
24100
  var extendStatics = function (d, b) {
23946
24101
  extendStatics = Object.setPrototypeOf ||
@@ -23957,6 +24112,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
23957
24112
  };
23958
24113
  })();
23959
24114
 
24115
+
23960
24116
  var ResponsivityManager = /** @class */ (function () {
23961
24117
  function ResponsivityManager(container, model, itemsSelector, dotsItemSize, delayedUpdateFunction) {
23962
24118
  var _this = this;
@@ -23974,7 +24130,9 @@ var ResponsivityManager = /** @class */ (function () {
23974
24130
  this.paddingSizeConst = 8;
23975
24131
  this.dotsSizeConst = 48;
23976
24132
  this.recalcMinDimensionConst = true;
23977
- this.getComputedStyle = window.getComputedStyle.bind(window);
24133
+ this.getComputedStyle = function (elt) {
24134
+ return _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomDocumentHelper"].getComputedStyle(elt);
24135
+ };
23978
24136
  this.model.updateCallback = function (isResetInitialized) {
23979
24137
  if (isResetInitialized)
23980
24138
  _this.isInitialized = false;
@@ -23982,7 +24140,7 @@ var ResponsivityManager = /** @class */ (function () {
23982
24140
  };
23983
24141
  if (typeof ResizeObserver !== "undefined") {
23984
24142
  this.resizeObserver = new ResizeObserver(function (entries) {
23985
- window.requestAnimationFrame(function () {
24143
+ _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
23986
24144
  _this.process();
23987
24145
  });
23988
24146
  });
@@ -24041,7 +24199,7 @@ var ResponsivityManager = /** @class */ (function () {
24041
24199
  };
24042
24200
  Object.defineProperty(ResponsivityManager.prototype, "isContainerVisible", {
24043
24201
  get: function () {
24044
- return Object(_utils__WEBPACK_IMPORTED_MODULE_0__["isContainerVisible"])(this.container);
24202
+ return Object(_utils__WEBPACK_IMPORTED_MODULE_1__["isContainerVisible"])(this.container);
24045
24203
  },
24046
24204
  enumerable: false,
24047
24205
  configurable: true
@@ -24181,6 +24339,8 @@ __webpack_require__.r(__webpack_exports__);
24181
24339
  /* harmony import */ var _localizablestring__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../localizablestring */ "./src/localizablestring.ts");
24182
24340
  /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../settings */ "./src/settings.ts");
24183
24341
  /* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../surveyStrings */ "./src/surveyStrings.ts");
24342
+ /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
24343
+
24184
24344
 
24185
24345
 
24186
24346
 
@@ -24216,18 +24376,14 @@ function confirmActionAsync(message, funcOnYes, funcOnNo, locale, rootElement) {
24216
24376
  callbackFunc(confirmAction(message));
24217
24377
  }
24218
24378
  function detectIEBrowser() {
24219
- if (typeof window === "undefined")
24220
- return false;
24221
- var ua = window.navigator.userAgent;
24379
+ var ua = navigator.userAgent;
24222
24380
  var oldIe = ua.indexOf("MSIE ");
24223
24381
  var elevenIe = ua.indexOf("Trident/");
24224
24382
  return oldIe > -1 || elevenIe > -1;
24225
24383
  }
24226
24384
  function detectIEOrEdge() {
24227
- if (typeof window === "undefined")
24228
- return false;
24229
24385
  if (typeof detectIEOrEdge.isIEOrEdge === "undefined") {
24230
- var ua = window.navigator.userAgent;
24386
+ var ua = navigator.userAgent;
24231
24387
  var msie = ua.indexOf("MSIE ");
24232
24388
  var trident = ua.indexOf("Trident/");
24233
24389
  var edge = ua.indexOf("Edge/");
@@ -24251,16 +24407,14 @@ function loadFileFromBase64(b64Data, fileName) {
24251
24407
  }
24252
24408
  // write the ArrayBuffer to a blob, and you're done
24253
24409
  var bb = new Blob([ab], { type: mimeString });
24254
- if (typeof window !== "undefined" &&
24255
- window.navigator &&
24256
- window.navigator["msSaveBlob"]) {
24257
- window.navigator["msSaveOrOpenBlob"](bb, fileName);
24410
+ if (!!navigator && navigator["msSaveBlob"]) {
24411
+ navigator["msSaveOrOpenBlob"](bb, fileName);
24258
24412
  }
24259
24413
  }
24260
24414
  catch (err) { }
24261
24415
  }
24262
24416
  function isMobile() {
24263
- return (typeof window !== "undefined" && typeof window.orientation !== "undefined");
24417
+ return (_global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomWindowHelper"].isAvailable() && _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomWindowHelper"].hasOwn("orientation"));
24264
24418
  }
24265
24419
  var isShadowDOM = function (rootElement) {
24266
24420
  return !!rootElement && !!("host" in rootElement && rootElement.host);
@@ -24279,7 +24433,7 @@ function isElementVisible(element, threshold) {
24279
24433
  ? root.host.clientHeight
24280
24434
  : root.documentElement.clientHeight;
24281
24435
  var elementRect = element.getBoundingClientRect();
24282
- var viewHeight = Math.max(clientHeight, window.innerHeight);
24436
+ var viewHeight = Math.max(clientHeight, _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomWindowHelper"].getInnerHeight());
24283
24437
  var topWin = -threshold;
24284
24438
  var bottomWin = viewHeight + threshold;
24285
24439
  var topEl = elementRect.top;
@@ -24321,9 +24475,10 @@ function scrollElementByChildId(id) {
24321
24475
  }
24322
24476
  }
24323
24477
  function navigateToUrl(url) {
24324
- if (!url || typeof window === "undefined" || !window.location)
24478
+ var location = _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomWindowHelper"].getLocation();
24479
+ if (!url || !location)
24325
24480
  return;
24326
- window.location.href = url;
24481
+ location.href = url;
24327
24482
  }
24328
24483
  function wrapUrlForBackgroundImage(url) {
24329
24484
  return !!url ? ["url(", url, ")"].join("") : "";
@@ -24353,7 +24508,7 @@ function createSvg(size, width, height, iconName, svgElem, title) {
24353
24508
  }
24354
24509
  else {
24355
24510
  if (!titleElement) {
24356
- titleElement = document.createElementNS("http://www.w3.org/2000/svg", "title");
24511
+ titleElement = _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomDocumentHelper"].getDocument().createElementNS("http://www.w3.org/2000/svg", "title");
24357
24512
  svgElem.appendChild(titleElement);
24358
24513
  }
24359
24514
  }
@@ -24460,7 +24615,7 @@ function increaseHeightByContent(element, getComputedStyle) {
24460
24615
  if (!element)
24461
24616
  return;
24462
24617
  if (!getComputedStyle)
24463
- getComputedStyle = function (elt) { return window.getComputedStyle(elt); };
24618
+ getComputedStyle = function (elt) { return _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomDocumentHelper"].getComputedStyle(elt); };
24464
24619
  var style = getComputedStyle(element);
24465
24620
  element.style.height = "auto";
24466
24621
  if (!!element.scrollHeight) {
@@ -24507,8 +24662,8 @@ function findParentByClassNames(element, classNames) {
24507
24662
  }
24508
24663
  function sanitizeEditableContent(element, cleanLineBreaks) {
24509
24664
  if (cleanLineBreaks === void 0) { cleanLineBreaks = true; }
24510
- if (window.getSelection && document.createRange && element.childNodes.length > 0) {
24511
- var selection = document.getSelection();
24665
+ if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomWindowHelper"].isAvailable() && _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomDocumentHelper"].isAvailable() && element.childNodes.length > 0) {
24666
+ var selection = _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomWindowHelper"].getSelection();
24512
24667
  if (selection.rangeCount == 0) {
24513
24668
  return;
24514
24669
  }
@@ -24526,14 +24681,19 @@ function sanitizeEditableContent(element, cleanLineBreaks) {
24526
24681
  }
24527
24682
  var tail_len = tail.length;
24528
24683
  element.innerText = innerText;
24529
- range = document.createRange();
24684
+ range = _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomDocumentHelper"].getDocument().createRange();
24530
24685
  range.setStart(element.firstChild, 0);
24531
24686
  range.setEnd(element.firstChild, 0);
24532
24687
  selection.removeAllRanges();
24533
24688
  selection.addRange(range);
24534
- for (var i = 0; i < innerText.length - tail_len; i++) {
24535
- selection.modify("move", "forward", "character");
24689
+ while (selection.toString().length < innerText.length - tail_len) {
24690
+ var selLen = selection.toString().length;
24691
+ selection.modify("extend", "forward", "character");
24692
+ if (selection.toString().length == selLen)
24693
+ break;
24536
24694
  }
24695
+ range = selection.getRangeAt(0);
24696
+ range.setStart(range.endContainer, range.endOffset);
24537
24697
  }
24538
24698
  }
24539
24699
  function mergeValues(src, dest) {
@@ -24602,11 +24762,11 @@ function configConfirmDialog(popupViewModel) {
24602
24762
  popupViewModel.width = "min-content";
24603
24763
  }
24604
24764
  function chooseFiles(input, callback) {
24605
- if (!window || !window["FileReader"])
24765
+ if (!_global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomWindowHelper"].isFileReaderAvailable())
24606
24766
  return;
24607
24767
  input.value = "";
24608
24768
  input.onchange = function (event) {
24609
- if (!window["FileReader"])
24769
+ if (!_global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomWindowHelper"].isFileReaderAvailable())
24610
24770
  return;
24611
24771
  if (!input || !input.files || input.files.length < 1)
24612
24772
  return;