survey-react 1.9.116 → 1.9.117

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/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.116
2
+ * surveyjs - Survey JavaScript library v1.9.117
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
  */
@@ -4380,6 +4380,10 @@ var ConsoleWarnings = /** @class */ (function () {
4380
4380
  // eslint-disable-next-line no-console
4381
4381
  console.warn(text);
4382
4382
  };
4383
+ ConsoleWarnings.error = function (text) {
4384
+ // eslint-disable-next-line no-console
4385
+ console.error(text);
4386
+ };
4383
4387
  return ConsoleWarnings;
4384
4388
  }());
4385
4389
 
@@ -8086,13 +8090,20 @@ var DropdownListModel = /** @class */ (function (_super) {
8086
8090
  enumerable: false,
8087
8091
  configurable: true
8088
8092
  });
8089
- Object.defineProperty(DropdownListModel.prototype, "inputReadOnly", {
8093
+ Object.defineProperty(DropdownListModel.prototype, "noTabIndex", {
8090
8094
  get: function () {
8091
8095
  return this.question.isInputReadOnly || this.searchEnabled;
8092
8096
  },
8093
8097
  enumerable: false,
8094
8098
  configurable: true
8095
8099
  });
8100
+ Object.defineProperty(DropdownListModel.prototype, "filterReadOnly", {
8101
+ get: function () {
8102
+ return this.question.isInputReadOnly || !this.searchEnabled || !this.focused;
8103
+ },
8104
+ enumerable: false,
8105
+ configurable: true
8106
+ });
8096
8107
  Object.defineProperty(DropdownListModel.prototype, "filterStringEnabled", {
8097
8108
  get: function () {
8098
8109
  return !this.question.isInputReadOnly && this.searchEnabled;
@@ -8299,6 +8310,9 @@ var DropdownListModel = /** @class */ (function (_super) {
8299
8310
  DropdownListModel.prototype.scrollToFocusedItem = function () {
8300
8311
  this.listModel.scrollToFocusedItem();
8301
8312
  };
8313
+ __decorate([
8314
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
8315
+ ], DropdownListModel.prototype, "focused", void 0);
8302
8316
  __decorate([
8303
8317
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: true })
8304
8318
  ], DropdownListModel.prototype, "searchEnabled", void 0);
@@ -9370,8 +9384,8 @@ __webpack_require__.r(__webpack_exports__);
9370
9384
  //import "../../modern.scss";
9371
9385
  var Version;
9372
9386
  var ReleaseDate;
9373
- Version = "" + "1.9.116";
9374
- ReleaseDate = "" + "2023-11-07";
9387
+ Version = "" + "1.9.117";
9388
+ ReleaseDate = "" + "2023-11-14";
9375
9389
  function checkLibraryVersion(ver, libraryName) {
9376
9390
  if (Version != ver) {
9377
9391
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -9415,6 +9429,8 @@ function _slk(k, lh, rd) {
9415
9429
  var index = v.indexOf(";");
9416
9430
  if (index < 0)
9417
9431
  return;
9432
+ if (!checkPrefix(v.substring(0, index)))
9433
+ return;
9418
9434
  v = v.substring(index + 1);
9419
9435
  v.split(",").forEach(function (s) {
9420
9436
  var i = s.indexOf("=");
@@ -9423,6 +9439,27 @@ function _slk(k, lh, rd) {
9423
9439
  }
9424
9440
  });
9425
9441
  }
9442
+ function checkPrefix(prefix) {
9443
+ if (!prefix)
9444
+ return true;
9445
+ var s = "domains:";
9446
+ var index = prefix.indexOf(s);
9447
+ if (index < 0)
9448
+ return true;
9449
+ var ds = prefix.substring(index + s.length).toLowerCase().split(",");
9450
+ if (!Array.isArray(ds) || ds.length === 0)
9451
+ return true;
9452
+ if (typeof window !== "undefined" && !!window.location && !!window.location.hostname) {
9453
+ var hn = window.location.hostname.toLowerCase();
9454
+ ds.push("localhost");
9455
+ for (var i = 0; i < ds.length; i++) {
9456
+ if (hn.indexOf(ds[i]) > -1)
9457
+ return true;
9458
+ }
9459
+ return false;
9460
+ }
9461
+ return true;
9462
+ }
9426
9463
 
9427
9464
 
9428
9465
 
@@ -15631,8 +15668,8 @@ var OperandMaker = /** @class */ (function () {
15631
15668
  right = OperandMaker.convertValForDateCompare(right, left);
15632
15669
  return OperandMaker.isTwoValueEquals(left, right, strictCompare !== true);
15633
15670
  },
15634
- notequal: function (left, right) {
15635
- return !OperandMaker.binaryFunctions.equal(left, right);
15671
+ notequal: function (left, right, strictCompare) {
15672
+ return !OperandMaker.binaryFunctions.equal(left, right, strictCompare);
15636
15673
  },
15637
15674
  contains: function (left, right) {
15638
15675
  return OperandMaker.binaryFunctions.containsCore(left, right, true);
@@ -18514,6 +18551,10 @@ function property(options) {
18514
18551
  if (!options || !options.localizable) {
18515
18552
  Object.defineProperty(target, key, {
18516
18553
  get: function () {
18554
+ // const serializationProperty = Serializer.getProperty(target.getType(), key);
18555
+ // if(!!serializationProperty && options.defaultValue !== undefined) {
18556
+ // ConsoleWarnings.error("remove defaultValue from @property for class " + target.getType() + " property name is " + key);
18557
+ // }
18517
18558
  var defaultVal = null;
18518
18559
  if (!!options) {
18519
18560
  if (typeof options.getDefaultValue === "function") {
@@ -20921,9 +20962,6 @@ var LocalizableString = /** @class */ (function () {
20921
20962
  };
20922
20963
  LocalizableString.prototype.isLocaleTextEqualsWithDefault = function (loc, val) {
20923
20964
  var res = this.getLocaleTextCore(loc);
20924
- if (!res && this.onGetDefaultTextCallback) {
20925
- res = this.onGetDefaultTextCallback();
20926
- }
20927
20965
  if (res === val)
20928
20966
  return true;
20929
20967
  return this.isValueEmpty(res) && this.isValueEmpty(val);
@@ -28386,8 +28424,11 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
28386
28424
  enumerable: false,
28387
28425
  configurable: true
28388
28426
  });
28427
+ QuestionMatrixBaseModel.prototype.getCellAriaLabel = function (rowTitle, columnTitle) {
28428
+ return "row " + rowTitle + ", column " + columnTitle;
28429
+ };
28389
28430
  __decorate([
28390
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "middle" })
28431
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
28391
28432
  ], QuestionMatrixBaseModel.prototype, "verticalAlign", void 0);
28392
28433
  __decorate([
28393
28434
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
@@ -33694,7 +33735,9 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
33694
33735
  }
33695
33736
  currentElement = currentElement.parentElement;
33696
33737
  }
33697
- event.preventDefault();
33738
+ if (event.cancelable) {
33739
+ event.preventDefault();
33740
+ }
33698
33741
  };
33699
33742
  PopupBaseViewModel.SubscriptionId = 0;
33700
33743
  __decorate([
@@ -34014,10 +34057,6 @@ var Question = /** @class */ (function (_super) {
34014
34057
  _this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
34015
34058
  _this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
34016
34059
  _this.createLocalizableString("commentText", _this, true, "otherItemText");
34017
- _this.locTitle.onGetDefaultTextCallback = function () {
34018
- return _this.name;
34019
- };
34020
- _this.locTitle.storeDefaultText = true;
34021
34060
  _this.createLocalizableString("requiredErrorText", _this);
34022
34061
  _this.addTriggerInfo("resetValueIf", function () { return !_this.isEmpty(); }, function () {
34023
34062
  _this.clearValue();
@@ -34066,12 +34105,14 @@ var Question = /** @class */ (function (_super) {
34066
34105
  this.isMobile = val && (this.allowMobileInDesignMode() || !this.isDesignMode);
34067
34106
  };
34068
34107
  Question.prototype.themeChanged = function (theme) { };
34108
+ Question.prototype.getDefaultTitle = function () { return this.name; };
34069
34109
  Question.prototype.createLocTitleProperty = function () {
34070
34110
  var _this = this;
34071
34111
  var locTitleValue = _super.prototype.createLocTitleProperty.call(this);
34112
+ locTitleValue.storeDefaultText = true;
34072
34113
  locTitleValue.onGetTextCallback = function (text) {
34073
34114
  if (!text) {
34074
- text = _this.name;
34115
+ text = _this.getDefaultTitle();
34075
34116
  }
34076
34117
  if (!_this.survey)
34077
34118
  return text;
@@ -34951,6 +34992,16 @@ var Question = /** @class */ (function (_super) {
34951
34992
  this.updateCommentElements();
34952
34993
  }
34953
34994
  };
34995
+ Question.prototype.onCompositionUpdateComment = function (event) {
34996
+ var _this = this;
34997
+ if (this.isInputTextUpdate) {
34998
+ setTimeout(function () {
34999
+ if (event.target) {
35000
+ _this.comment = event.target.value;
35001
+ }
35002
+ }, 1);
35003
+ }
35004
+ };
34954
35005
  Question.prototype.onCommentChange = function (event) {
34955
35006
  this.comment = event.target.value;
34956
35007
  if (this.comment !== event.target.value) {
@@ -35547,6 +35598,9 @@ var Question = /** @class */ (function (_super) {
35547
35598
  Question.prototype.onReadOnlyChanged = function () {
35548
35599
  this.setPropertyValue("isInputReadOnly", this.isInputReadOnly);
35549
35600
  _super.prototype.onReadOnlyChanged.call(this);
35601
+ if (this.isReadOnly) {
35602
+ this.clearErrors();
35603
+ }
35550
35604
  this.updateQuestionCss();
35551
35605
  this.calcRenderedCommentPlaceholder();
35552
35606
  };
@@ -37463,6 +37517,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
37463
37517
  _this.isRunningChoices = false;
37464
37518
  _this.isFirstLoadChoicesFromUrl = true;
37465
37519
  _this.isUpdatingChoicesDependedQuestions = false;
37520
+ _this.headItemsCount = 0;
37521
+ _this.footItemsCount = 0;
37466
37522
  _this.prevIsOtherSelected = false;
37467
37523
  var noneItemText = _this.createLocalizableString("noneText", _this.noneItemValue, true, "noneItemText");
37468
37524
  _this.noneItemValue.locOwner = _this;
@@ -38442,22 +38498,51 @@ var QuestionSelectBase = /** @class */ (function (_super) {
38442
38498
  configurable: true
38443
38499
  });
38444
38500
  QuestionSelectBase.prototype.addToVisibleChoices = function (items, isAddAll) {
38445
- if (isAddAll) {
38446
- if (!this.newItemValue) {
38447
- this.newItemValue = this.createItemValue("newitem"); //TODO
38448
- this.newItemValue.isGhost = true;
38501
+ this.headItemsCount = 0;
38502
+ this.footItemsCount = 0;
38503
+ this.addNewItemToVisibleChoices(items, isAddAll);
38504
+ var dict = new Array();
38505
+ this.addNonChoicesItems(dict, isAddAll);
38506
+ dict.sort(function (a, b) {
38507
+ if (a.index === b.index)
38508
+ return 0;
38509
+ return a.index < b.index ? -1 : 1;
38510
+ });
38511
+ for (var i = 0; i < dict.length; i++) {
38512
+ var rec = dict[i];
38513
+ if (rec.index < 0) {
38514
+ items.splice(i, 0, rec.item);
38515
+ this.headItemsCount++;
38449
38516
  }
38450
- if (!this.isUsingCarryForward && this.canShowOptionItem(this.newItemValue, isAddAll, false)) {
38451
- items.push(this.newItemValue);
38517
+ else {
38518
+ items.push(rec.item);
38519
+ this.footItemsCount++;
38452
38520
  }
38453
38521
  }
38522
+ };
38523
+ QuestionSelectBase.prototype.addNewItemToVisibleChoices = function (items, isAddAll) {
38524
+ if (!isAddAll)
38525
+ return;
38526
+ if (!this.newItemValue) {
38527
+ this.newItemValue = this.createItemValue("newitem"); //TODO
38528
+ this.newItemValue.isGhost = true;
38529
+ }
38530
+ if (!this.isUsingCarryForward && this.canShowOptionItem(this.newItemValue, isAddAll, false)) {
38531
+ this.footItemsCount = 1;
38532
+ items.push(this.newItemValue);
38533
+ }
38534
+ };
38535
+ QuestionSelectBase.prototype.addNonChoicesItems = function (dict, isAddAll) {
38454
38536
  if (this.supportNone() && this.canShowOptionItem(this.noneItem, isAddAll, this.hasNone)) {
38455
- items.push(this.noneItem);
38537
+ this.addNonChoiceItem(dict, this.noneItem, _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].specialChoicesOrder.noneItem);
38456
38538
  }
38457
38539
  if (this.supportOther() && this.canShowOptionItem(this.otherItem, isAddAll, this.hasOther)) {
38458
- items.push(this.otherItem);
38540
+ this.addNonChoiceItem(dict, this.otherItem, _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].specialChoicesOrder.otherItem);
38459
38541
  }
38460
38542
  };
38543
+ QuestionSelectBase.prototype.addNonChoiceItem = function (dict, item, order) {
38544
+ order.forEach(function (val) { return dict.push({ index: val, item: item }); });
38545
+ };
38461
38546
  QuestionSelectBase.prototype.canShowOptionItem = function (item, isAddAll, hasItem) {
38462
38547
  var res = (isAddAll && (!!this.canShowOptionItemCallback ? this.canShowOptionItemCallback(item) : true)) || hasItem;
38463
38548
  if (this.canSurveyChangeItemVisibility()) {
@@ -38689,17 +38774,11 @@ var QuestionSelectBase = /** @class */ (function (_super) {
38689
38774
  enumerable: false,
38690
38775
  configurable: true
38691
38776
  });
38692
- QuestionSelectBase.prototype.isHeadChoice = function (item, question) {
38693
- return false;
38694
- };
38695
- QuestionSelectBase.prototype.isFootChoice = function (item, question) {
38777
+ QuestionSelectBase.prototype.isBuiltInChoice = function (item, question) {
38696
38778
  return (item === question.noneItem ||
38697
38779
  item === question.otherItem ||
38698
38780
  item === question.newItemValue);
38699
38781
  };
38700
- QuestionSelectBase.prototype.isBuiltInChoice = function (item, question) {
38701
- return this.isHeadChoice(item, question) || this.isFootChoice(item, question);
38702
- };
38703
38782
  QuestionSelectBase.prototype.getChoices = function () {
38704
38783
  return this.choices;
38705
38784
  };
@@ -38800,6 +38879,16 @@ var QuestionSelectBase = /** @class */ (function (_super) {
38800
38879
  this.updateCommentElements();
38801
38880
  }
38802
38881
  };
38882
+ QuestionSelectBase.prototype.onCompositionUpdateOtherValue = function (event) {
38883
+ var _this = this;
38884
+ if (this.isInputTextUpdate) {
38885
+ setTimeout(function () {
38886
+ if (event.target) {
38887
+ _this.otherValue = event.target.value;
38888
+ }
38889
+ }, 1);
38890
+ }
38891
+ };
38803
38892
  QuestionSelectBase.prototype.onOtherValueChange = function (event) {
38804
38893
  this.otherValue = event.target.value;
38805
38894
  if (this.otherValue !== event.target.value) {
@@ -39111,18 +39200,23 @@ var QuestionSelectBase = /** @class */ (function (_super) {
39111
39200
  };
39112
39201
  Object.defineProperty(QuestionSelectBase.prototype, "headItems", {
39113
39202
  get: function () {
39114
- var _this = this;
39115
- return (this.separateSpecialChoices || this.isDesignMode) ?
39116
- this.visibleChoices.filter(function (choice) { return _this.isHeadChoice(choice, _this); }) : [];
39203
+ var count = (this.separateSpecialChoices || this.isDesignMode) ? this.headItemsCount : 0;
39204
+ var res = [];
39205
+ for (var i = 0; i < count; i++)
39206
+ res.push(this.visibleChoices[i]);
39207
+ return res;
39117
39208
  },
39118
39209
  enumerable: false,
39119
39210
  configurable: true
39120
39211
  });
39121
39212
  Object.defineProperty(QuestionSelectBase.prototype, "footItems", {
39122
39213
  get: function () {
39123
- var _this = this;
39124
- return (this.separateSpecialChoices || this.isDesignMode) ?
39125
- this.visibleChoices.filter(function (choice) { return _this.isFootChoice(choice, _this); }) : [];
39214
+ var count = (this.separateSpecialChoices || this.isDesignMode) ? this.footItemsCount : 0;
39215
+ var res = [];
39216
+ var items = this.visibleChoices;
39217
+ for (var i = 0; i < count; i++)
39218
+ res.push(items[items.length - count + i]);
39219
+ return res;
39126
39220
  },
39127
39221
  enumerable: false,
39128
39222
  configurable: true
@@ -39367,7 +39461,7 @@ var QuestionCheckboxBase = /** @class */ (function (_super) {
39367
39461
  * @see separateSpecialChoices
39368
39462
  */
39369
39463
  get: function () {
39370
- return this.getPropertyValue("colCount", this.isFlowLayout ? 0 : 1);
39464
+ return this.getPropertyValue("colCount", this.isFlowLayout ? 0 : undefined);
39371
39465
  },
39372
39466
  set: function (value) {
39373
39467
  if (value < 0 || value > 5 || this.isFlowLayout)
@@ -40193,6 +40287,7 @@ __webpack_require__.r(__webpack_exports__);
40193
40287
  /* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
40194
40288
  /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
40195
40289
  /* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error */ "./src/error.ts");
40290
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
40196
40291
  var __extends = (undefined && undefined.__extends) || (function () {
40197
40292
  var extendStatics = function (d, b) {
40198
40293
  extendStatics = Object.setPrototypeOf ||
@@ -40215,6 +40310,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
40215
40310
 
40216
40311
 
40217
40312
 
40313
+
40218
40314
  /**
40219
40315
  * A class that describes the Checkboxes question type.
40220
40316
  *
@@ -40342,12 +40438,13 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
40342
40438
  if (this.isItemSelected(this.noneItem))
40343
40439
  return false;
40344
40440
  var allItemCount = this.visibleChoices.length;
40441
+ var order = _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].specialChoicesOrder;
40345
40442
  if (this.hasOther)
40346
- allItemCount--;
40443
+ allItemCount -= order.otherItem.length;
40347
40444
  if (this.hasNone)
40348
- allItemCount--;
40445
+ allItemCount -= order.noneItem.length;
40349
40446
  if (this.hasSelectAll)
40350
- allItemCount--;
40447
+ allItemCount -= order.selectAllItem.length;
40351
40448
  var selectedCount = val.length;
40352
40449
  if (this.isOtherSelected)
40353
40450
  selectedCount--;
@@ -40640,14 +40737,14 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
40640
40737
  QuestionCheckboxModel.prototype.supportSelectAll = function () {
40641
40738
  return this.isSupportProperty("showSelectAllItem");
40642
40739
  };
40643
- QuestionCheckboxModel.prototype.addToVisibleChoices = function (items, isAddAll) {
40740
+ QuestionCheckboxModel.prototype.addNonChoicesItems = function (dict, isAddAll) {
40741
+ _super.prototype.addNonChoicesItems.call(this, dict, isAddAll);
40644
40742
  if (this.supportSelectAll() && this.canShowOptionItem(this.selectAllItem, isAddAll, this.hasSelectAll)) {
40645
- items.unshift(this.selectAllItem);
40743
+ this.addNonChoiceItem(dict, this.selectAllItem, _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].specialChoicesOrder.selectAllItem);
40646
40744
  }
40647
- _super.prototype.addToVisibleChoices.call(this, items, isAddAll);
40648
40745
  };
40649
- QuestionCheckboxModel.prototype.isHeadChoice = function (item, question) {
40650
- return (item === question.selectAllItem);
40746
+ QuestionCheckboxModel.prototype.isBuiltInChoice = function (item, question) {
40747
+ return item === question.selectAllItem || _super.prototype.isBuiltInChoice.call(this, item, question);
40651
40748
  };
40652
40749
  QuestionCheckboxModel.prototype.isItemInList = function (item) {
40653
40750
  if (item == this.selectAllItem)
@@ -41270,6 +41367,15 @@ var ComponentCollection = /** @class */ (function () {
41270
41367
  this.onAddingJson(name, customQuestion.isComposite);
41271
41368
  this.customQuestionValues.push(customQuestion);
41272
41369
  };
41370
+ ComponentCollection.prototype.remove = function (componentName) {
41371
+ if (!componentName)
41372
+ return false;
41373
+ var index = this.getCustomQuestionIndex(componentName.toLowerCase());
41374
+ if (index < 0)
41375
+ return false;
41376
+ this.removeByIndex(index);
41377
+ return true;
41378
+ };
41273
41379
  Object.defineProperty(ComponentCollection.prototype, "items", {
41274
41380
  get: function () {
41275
41381
  return this.customQuestionValues;
@@ -41278,17 +41384,26 @@ var ComponentCollection = /** @class */ (function () {
41278
41384
  configurable: true
41279
41385
  });
41280
41386
  ComponentCollection.prototype.getCustomQuestionByName = function (name) {
41387
+ var index = this.getCustomQuestionIndex(name);
41388
+ return index >= 0 ? this.customQuestionValues[index] : undefined;
41389
+ };
41390
+ ComponentCollection.prototype.getCustomQuestionIndex = function (name) {
41281
41391
  for (var i = 0; i < this.customQuestionValues.length; i++) {
41282
- if (this.customQuestionValues[i].name == name)
41283
- return this.customQuestionValues[i];
41392
+ if (this.customQuestionValues[i].name === name)
41393
+ return i;
41284
41394
  }
41285
- return null;
41395
+ return -1;
41286
41396
  };
41287
- ComponentCollection.prototype.clear = function () {
41288
- for (var i = 0; i < this.customQuestionValues.length; i++) {
41289
- _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].removeClass(this.customQuestionValues[i].name);
41397
+ ComponentCollection.prototype.removeByIndex = function (index) {
41398
+ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].removeClass(this.customQuestionValues[index].name);
41399
+ this.customQuestionValues.splice(index, 1);
41400
+ };
41401
+ ComponentCollection.prototype.clear = function (includeInternal) {
41402
+ for (var i = this.customQuestionValues.length - 1; i >= 0; i--) {
41403
+ if (includeInternal || !this.customQuestionValues[i].json.internal) {
41404
+ this.removeByIndex(i);
41405
+ }
41290
41406
  }
41291
- this.customQuestionValues = [];
41292
41407
  };
41293
41408
  ComponentCollection.prototype.createQuestion = function (name, questionJSON) {
41294
41409
  if (!!questionJSON.isComposite)
@@ -41556,6 +41671,11 @@ var QuestionCustomModel = /** @class */ (function (_super) {
41556
41671
  QuestionCustomModel.prototype.getQuestionByName = function (name) {
41557
41672
  return this.contentQuestion;
41558
41673
  };
41674
+ QuestionCustomModel.prototype.getDefaultTitle = function () {
41675
+ if (this.hasJSONTitle && this.contentQuestion)
41676
+ return this.contentQuestion.title;
41677
+ return _super.prototype.getDefaultTitle.call(this);
41678
+ };
41559
41679
  QuestionCustomModel.prototype.setValue = function (name, newValue, locNotification, allowNotifyValueChanged) {
41560
41680
  if (this.isValueChanging(name, newValue))
41561
41681
  return;
@@ -41610,6 +41730,7 @@ var QuestionCustomModel = /** @class */ (function (_super) {
41610
41730
  var json = this.customQuestion.json;
41611
41731
  var res = null;
41612
41732
  if (!!json.questionJSON) {
41733
+ this.hasJSONTitle = !!json.questionJSON.title;
41613
41734
  var qType = json.questionJSON.type;
41614
41735
  if (!qType || !_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findClass(qType))
41615
41736
  throw "type attribute in questionJSON is empty or incorrect";
@@ -42465,7 +42586,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
42465
42586
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
42466
42587
  ], QuestionDropdownModel.prototype, "choicesLazyLoadEnabled", void 0);
42467
42588
  __decorate([
42468
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 25 })
42589
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
42469
42590
  ], QuestionDropdownModel.prototype, "choicesLazyLoadPageSize", void 0);
42470
42591
  __decorate([
42471
42592
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
@@ -42748,7 +42869,7 @@ var QuestionExpressionModel = /** @class */ (function (_super) {
42748
42869
  this.updateFormatedValue();
42749
42870
  };
42750
42871
  QuestionExpressionModel.prototype.getDisplayValueCore = function (keysAsText, value) {
42751
- var val = this.isValueEmpty(value) ? this.defaultValue : value;
42872
+ var val = value === undefined || value === null ? this.defaultValue : value;
42752
42873
  var res = "";
42753
42874
  if (!this.isValueEmpty(val)) {
42754
42875
  var str = this.getValueAsStr(val);
@@ -44455,7 +44576,16 @@ var QuestionHtmlModel = /** @class */ (function (_super) {
44455
44576
  return QuestionHtmlModel;
44456
44577
  }(_questionnonvalue__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]));
44457
44578
 
44458
- _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("html", [{ name: "html:html", serializationProperty: "locHtml" }], function () {
44579
+ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("html", [
44580
+ { name: "html:html", serializationProperty: "locHtml" },
44581
+ { name: "hideNumber", visible: false },
44582
+ { name: "state", visible: false },
44583
+ { name: "titleLocation", visible: false },
44584
+ { name: "descriptionLocation", visible: false },
44585
+ { name: "errorLocation", visible: false },
44586
+ { name: "indent", visible: false },
44587
+ { name: "width", visible: false },
44588
+ ], function () {
44459
44589
  return new QuestionHtmlModel("");
44460
44590
  }, "nonvalue");
44461
44591
  _questionfactory__WEBPACK_IMPORTED_MODULE_2__["QuestionFactory"].Instance.registerQuestion("html", function (name) {
@@ -45215,9 +45345,12 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
45215
45345
  enumerable: false,
45216
45346
  configurable: true
45217
45347
  });
45218
- QuestionImagePickerModel.prototype.isFootChoice = function (_item, _question) {
45348
+ QuestionImagePickerModel.prototype.isBuiltInChoice = function (item, question) {
45219
45349
  return false;
45220
45350
  };
45351
+ QuestionImagePickerModel.prototype.addToVisibleChoices = function (items, isAddAll) {
45352
+ this.addNewItemToVisibleChoices(items, isAddAll);
45353
+ };
45221
45354
  QuestionImagePickerModel.prototype.getSelectBaseRootCss = function () {
45222
45355
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(_super.prototype.getSelectBaseRootCss.call(this)).append(this.cssClasses.rootColumn, this.getCurrentColCount() == 1).toString();
45223
45356
  };
@@ -48371,6 +48504,8 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
48371
48504
  this.collectNestedQuestonsInRows(this.visibleRows, questions, visibleOnly);
48372
48505
  };
48373
48506
  QuestionMatrixDropdownModelBase.prototype.collectNestedQuestonsInRows = function (rows, questions, visibleOnly) {
48507
+ if (!Array.isArray(rows))
48508
+ return;
48374
48509
  rows.forEach(function (row) {
48375
48510
  row.questions.forEach(function (q) { return q.collectNestedQuestions(questions, visibleOnly); });
48376
48511
  });
@@ -52042,7 +52177,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
52042
52177
  var lastDelRow = this.lastDeletedRow;
52043
52178
  this.lastDeletedRow = undefined;
52044
52179
  var rows = this.generatedVisibleRows;
52045
- if (!Array.isArray(val) || Math.abs(rows.length - val.length) > 1)
52180
+ if (!Array.isArray(val) || Math.abs(rows.length - val.length) > 1 || rows.length === val.length)
52046
52181
  return false;
52047
52182
  var index = this.getInsertedDeletedIndex(rows, val);
52048
52183
  if (rows.length > val.length) {
@@ -57717,10 +57852,10 @@ var QuestionRatingModel = /** @class */ (function (_super) {
57717
57852
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
57718
57853
  ], QuestionRatingModel.prototype, "inputHasValue", void 0);
57719
57854
  __decorate([
57720
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: true })
57855
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
57721
57856
  ], QuestionRatingModel.prototype, "autoGenerate", void 0);
57722
57857
  __decorate([
57723
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: 5 })
57858
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
57724
57859
  ], QuestionRatingModel.prototype, "rateCount", void 0);
57725
57860
  __decorate([
57726
57861
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["propertyArray"])()
@@ -57732,11 +57867,10 @@ var QuestionRatingModel = /** @class */ (function (_super) {
57732
57867
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
57733
57868
  ], QuestionRatingModel.prototype, "hasMaxRateDescription", void 0);
57734
57869
  __decorate([
57735
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
57870
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
57736
57871
  ], QuestionRatingModel.prototype, "displayRateDescriptionsAsExtremeItems", void 0);
57737
57872
  __decorate([
57738
57873
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({
57739
- defaultValue: "auto",
57740
57874
  onSet: function (val, target) {
57741
57875
  if (!target.isDesignMode) {
57742
57876
  if (val === "dropdown") {
@@ -57750,13 +57884,13 @@ var QuestionRatingModel = /** @class */ (function (_super) {
57750
57884
  })
57751
57885
  ], QuestionRatingModel.prototype, "displayMode", void 0);
57752
57886
  __decorate([
57753
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "labels" })
57887
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
57754
57888
  ], QuestionRatingModel.prototype, "rateType", void 0);
57755
57889
  __decorate([
57756
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "monochrome" })
57890
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
57757
57891
  ], QuestionRatingModel.prototype, "scaleColorMode", void 0);
57758
57892
  __decorate([
57759
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "scale" })
57893
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
57760
57894
  ], QuestionRatingModel.prototype, "rateColorMode", void 0);
57761
57895
  return QuestionRatingModel;
57762
57896
  }(_question__WEBPACK_IMPORTED_MODULE_1__["Question"]));
@@ -58275,13 +58409,13 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
58275
58409
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
58276
58410
  ], QuestionSignaturePadModel.prototype, "isDrawingValue", void 0);
58277
58411
  __decorate([
58278
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
58412
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
58279
58413
  ], QuestionSignaturePadModel.prototype, "signatureAutoScaleEnabled", void 0);
58280
58414
  __decorate([
58281
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 0.5 })
58415
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
58282
58416
  ], QuestionSignaturePadModel.prototype, "penMinWidth", void 0);
58283
58417
  __decorate([
58284
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 2.5 })
58418
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
58285
58419
  ], QuestionSignaturePadModel.prototype, "penMaxWidth", void 0);
58286
58420
  __decorate([
58287
58421
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
@@ -58632,7 +58766,6 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
58632
58766
  ], QuestionTagboxModel.prototype, "allowClear", void 0);
58633
58767
  __decorate([
58634
58768
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
58635
- defaultValue: true,
58636
58769
  onSet: function (newValue, target) {
58637
58770
  if (!!target.dropdownListModel) {
58638
58771
  target.dropdownListModel.setSearchEnabled(newValue);
@@ -58653,7 +58786,7 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
58653
58786
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
58654
58787
  ], QuestionTagboxModel.prototype, "choicesLazyLoadEnabled", void 0);
58655
58788
  __decorate([
58656
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 25 })
58789
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
58657
58790
  ], QuestionTagboxModel.prototype, "choicesLazyLoadPageSize", void 0);
58658
58791
  __decorate([
58659
58792
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ getDefaultValue: function () { return _settings__WEBPACK_IMPORTED_MODULE_5__["settings"].tagboxCloseOnSelect; } })
@@ -59695,6 +59828,8 @@ __webpack_require__.r(__webpack_exports__);
59695
59828
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementFactory", function() { return ElementFactory; });
59696
59829
  /* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
59697
59830
  /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
59831
+ /* harmony import */ var _question_custom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_custom */ "./src/question_custom.ts");
59832
+
59698
59833
 
59699
59834
 
59700
59835
  var QuestionFactory = /** @class */ (function () {
@@ -59796,6 +59931,9 @@ var ElementFactory = /** @class */ (function () {
59796
59931
  var creator = this.creatorHash[elementType];
59797
59932
  if (!!creator)
59798
59933
  return creator(name);
59934
+ var compJSON = _question_custom__WEBPACK_IMPORTED_MODULE_2__["ComponentCollection"].Instance.getCustomQuestionByName(elementType);
59935
+ if (!!compJSON)
59936
+ return _question_custom__WEBPACK_IMPORTED_MODULE_2__["ComponentCollection"].Instance.createQuestion(name, compJSON);
59799
59937
  return null;
59800
59938
  };
59801
59939
  ElementFactory.Instance = new ElementFactory();
@@ -62695,7 +62833,7 @@ var SvgIcon = /** @class */ (function (_super) {
62695
62833
  className += " " + this.props.className;
62696
62834
  }
62697
62835
  return (this.props.iconName ?
62698
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { className: className, style: this.props.style, onClick: this.props.onClick, ref: this.svgIconRef, role: "img", "aria-label": this.props.title },
62836
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg", { className: className, style: this.props.style, onClick: this.props.onClick, ref: this.svgIconRef, role: "img" },
62699
62837
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("use", null))
62700
62838
  : null);
62701
62839
  };
@@ -63161,7 +63299,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
63161
63299
  dropdownListModel.inputStringRendered = e.target.value;
63162
63300
  }
63163
63301
  };
63164
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.inputReadOnly ? undefined : 0,
63302
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
63165
63303
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
63166
63304
  // @ts-ignore
63167
63305
  disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
@@ -63174,20 +63312,20 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
63174
63312
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
63175
63313
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringSuffix))) : null,
63176
63314
  valueElement,
63177
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: !dropdownListModel.searchEnabled ? true : undefined, tabIndex: dropdownListModel.inputReadOnly ? undefined : -1, disabled: this.question.isInputReadOnly, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
63315
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: dropdownListModel.filterReadOnly ? true : undefined, tabIndex: dropdownListModel.noTabIndex ? undefined : -1, disabled: this.question.isInputReadOnly, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
63178
63316
  this.createClearButton()));
63179
63317
  };
63180
63318
  SurveyQuestionDropdownBase.prototype.createClearButton = function () {
63181
63319
  if (!this.question.allowClear || !this.question.cssClasses.cleanButtonIconId)
63182
63320
  return null;
63183
63321
  var style = { display: !this.question.showClearButton ? "none" : "" };
63184
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.cleanButton, style: style, onClick: this.clear },
63322
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.cleanButton, style: style, onClick: this.clear, tabIndex: this.question.showClearButton ? 0 : -1 },
63185
63323
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: this.question.cssClasses.cleanButtonSvg, iconName: this.question.cssClasses.cleanButtonIconId, title: this.question.clearCaption, size: "auto" })));
63186
63324
  };
63187
63325
  SurveyQuestionDropdownBase.prototype.createChevronButton = function () {
63188
63326
  if (!this.question.cssClasses.chevronButtonIconId)
63189
63327
  return null;
63190
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.chevronButton, onPointerDown: this.chevronPointerDown },
63328
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.chevronButton, "aria-hidden": "true", onPointerDown: this.chevronPointerDown },
63191
63329
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: this.question.cssClasses.chevronButtonSvg, iconName: this.question.cssClasses.chevronButtonIconId, size: "auto" })));
63192
63330
  };
63193
63331
  SurveyQuestionDropdownBase.prototype.renderOther = function (cssClasses) {
@@ -66163,6 +66301,9 @@ var SurveyQuestionCommentItem = /** @class */ (function (_super) {
66163
66301
  SurveyQuestionCommentItem.prototype.onCommentInput = function (event) {
66164
66302
  this.props.question.onCommentInput(event);
66165
66303
  };
66304
+ SurveyQuestionCommentItem.prototype.onCommentCompositionUpdate = function (event) {
66305
+ this.props.question.onCompositionUpdateComment(event);
66306
+ };
66166
66307
  SurveyQuestionCommentItem.prototype.getComment = function () {
66167
66308
  return this.props.question.comment;
66168
66309
  };
@@ -66189,7 +66330,7 @@ var SurveyQuestionCommentItem = /** @class */ (function (_super) {
66189
66330
  if (question.isReadOnlyRenderDiv()) {
66190
66331
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, comment);
66191
66332
  }
66192
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.getId(), className: className, value: comment, disabled: this.isDisplayMode, maxLength: question.getOthersMaxLength(), placeholder: this.getPlaceholder(), onChange: handleOnChange, onBlur: function (e) { _this.onCommentChange(e); handleOnChange(e); }, onInput: function (e) { return _this.onCommentInput(e); }, "aria-required": question.isRequired || question.a11y_input_ariaRequired, "aria-label": question.ariaLabel || question.a11y_input_ariaLabel, style: { resize: question.resizeStyle } }));
66333
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.getId(), className: className, value: comment, disabled: this.isDisplayMode, maxLength: question.getOthersMaxLength(), placeholder: this.getPlaceholder(), onChange: handleOnChange, onBlur: function (e) { _this.onCommentChange(e); handleOnChange(e); }, onInput: function (e) { return _this.onCommentInput(e); }, onCompositionUpdate: function (e) { return _this.onCommentCompositionUpdate(e); }, "aria-required": question.isRequired || question.a11y_input_ariaRequired, "aria-label": question.ariaLabel || question.a11y_input_ariaLabel, style: { resize: question.resizeStyle } }));
66193
66334
  };
66194
66335
  return SurveyQuestionCommentItem;
66195
66336
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
@@ -66205,6 +66346,9 @@ var SurveyQuestionOtherValueItem = /** @class */ (function (_super) {
66205
66346
  SurveyQuestionOtherValueItem.prototype.onCommentInput = function (event) {
66206
66347
  this.props.question.onOtherValueInput(event);
66207
66348
  };
66349
+ SurveyQuestionOtherValueItem.prototype.onCommentCompositionUpdate = function (event) {
66350
+ this.props.question.onCompositionUpdateOtherValue(event);
66351
+ };
66208
66352
  SurveyQuestionOtherValueItem.prototype.getComment = function () {
66209
66353
  return this.props.question.otherValue;
66210
66354
  };
@@ -67263,7 +67407,7 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
67263
67407
  else {
67264
67408
  td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, "data-responsive-title": column.locText.renderedHtml, className: this.question.cssClasses.cell },
67265
67409
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
67266
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: row.fullName, value: column.value, disabled: this.isDisplayMode, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": column.locText.renderedHtml, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
67410
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: row.fullName, value: column.value, disabled: this.isDisplayMode, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": this.question.getCellAriaLabel(row.locText.renderedHtml, column.locText.renderedHtml), "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
67267
67411
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
67268
67412
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
67269
67413
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.itemSvgIcon })) :
@@ -68812,7 +68956,7 @@ var SurveyQuestionTagbox = /** @class */ (function (_super) {
68812
68956
  var _this = this;
68813
68957
  var dropdownMultiSelectListModel = dropdownListModel;
68814
68958
  var items = this.question.selectedChoices.map(function (choice, index) { return _this.renderItem("item" + index, choice); });
68815
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.inputReadOnly ? undefined : 0,
68959
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
68816
68960
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
68817
68961
  // @ts-ignore
68818
68962
  disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
@@ -69603,7 +69747,7 @@ var TagboxFilterString = /** @class */ (function (_super) {
69603
69747
  (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffix },
69604
69748
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, this.model.inputStringRendered),
69605
69749
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.model.hintStringSuffix))) : null,
69606
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: !this.model.searchEnabled ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-controls": this.model.listElementId, "aria-activedescendant": this.model.ariaActivedescendant, placeholder: this.model.filterStringPlaceholder, onKeyDown: function (e) { _this.keyhandler(e); }, onChange: function (e) { _this.onChange(e); }, onBlur: function (e) { _this.onBlur(e); }, onFocus: function (e) { _this.onFocus(e); } }))));
69750
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: this.model.filterReadOnly ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-controls": this.model.listElementId, "aria-activedescendant": this.model.ariaActivedescendant, placeholder: this.model.filterStringPlaceholder, onKeyDown: function (e) { _this.keyhandler(e); }, onChange: function (e) { _this.onChange(e); }, onBlur: function (e) { _this.onBlur(e); }, onFocus: function (e) { _this.onFocus(e); } }))));
69607
69751
  };
69608
69752
  return TagboxFilterString;
69609
69753
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
@@ -70297,6 +70441,11 @@ var settings = {
70297
70441
  * Default value: `"none"`
70298
70442
  */
70299
70443
  noneItemValue: "none",
70444
+ specialChoicesOrder: {
70445
+ selectAllItem: [-1],
70446
+ noneItem: [1],
70447
+ otherItem: [2]
70448
+ },
70300
70449
  /**
70301
70450
  * A list of supported validators by question type.
70302
70451
  */
@@ -75954,13 +76103,13 @@ var SurveyModel = /** @class */ (function (_super) {
75954
76103
  }
75955
76104
  this.setPropertyValue("completedStateText", text);
75956
76105
  if (this.state === "completed" && this.showCompletedPage && !!this.completedState) {
75957
- this.notify(this.completedStateText, this.completedState, true);
76106
+ this.notify(this.completedStateText, this.completedState, value === "error");
75958
76107
  }
75959
76108
  };
75960
76109
  SurveyModel.prototype.notify = function (message, type, showActions) {
75961
76110
  if (showActions === void 0) { showActions = false; }
75962
76111
  this.notifier.showActions = showActions;
75963
- this.notifier.notify(message, type, type === "error");
76112
+ this.notifier.notify(message, type, showActions);
75964
76113
  };
75965
76114
  /**
75966
76115
  * Resets the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) and, optionally, [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data). If `state` is `"completed"`, it becomes `"running"`.
@@ -76750,7 +76899,7 @@ var SurveyModel = /** @class */ (function (_super) {
76750
76899
  }
76751
76900
  else {
76752
76901
  if (this.runningPages) {
76753
- this.restoreOrigionalPages(this.runningPages);
76902
+ this.restoreOriginalPages(this.runningPages);
76754
76903
  }
76755
76904
  this.runningPages = undefined;
76756
76905
  }
@@ -76778,7 +76927,7 @@ var SurveyModel = /** @class */ (function (_super) {
76778
76927
  return;
76779
76928
  if (this.questionsOnPageMode == "standard" || this.isDesignMode) {
76780
76929
  if (this.origionalPages) {
76781
- this.restoreOrigionalPages(this.origionalPages);
76930
+ this.restoreOriginalPages(this.origionalPages);
76782
76931
  }
76783
76932
  this.origionalPages = undefined;
76784
76933
  }
@@ -76791,11 +76940,13 @@ var SurveyModel = /** @class */ (function (_super) {
76791
76940
  this.runConditions();
76792
76941
  this.updateVisibleIndexes();
76793
76942
  };
76794
- SurveyModel.prototype.restoreOrigionalPages = function (originalPages) {
76943
+ SurveyModel.prototype.restoreOriginalPages = function (originalPages) {
76795
76944
  this.questionHashesClear();
76796
76945
  this.pages.splice(0, this.pages.length);
76797
76946
  for (var i = 0; i < originalPages.length; i++) {
76798
- this.pages.push(originalPages[i]);
76947
+ var page = originalPages[i];
76948
+ page.setWasShown(false);
76949
+ this.pages.push(page);
76799
76950
  }
76800
76951
  };
76801
76952
  SurveyModel.prototype.getPageStartIndex = function () {