survey-creator-core 2.3.13 → 2.3.14

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.
Files changed (147) hide show
  1. package/fesm/i18n/arabic.mjs +1 -1
  2. package/fesm/i18n/bulgarian.mjs +1 -1
  3. package/fesm/i18n/burmese.mjs +1 -1
  4. package/fesm/i18n/croatian.mjs +1 -1
  5. package/fesm/i18n/czech.mjs +1 -1
  6. package/fesm/i18n/danish.mjs +1 -1
  7. package/fesm/i18n/dutch.mjs +1 -1
  8. package/fesm/i18n/english.mjs +2 -1
  9. package/fesm/i18n/english.mjs.map +1 -1
  10. package/fesm/i18n/finnish.mjs +1 -1
  11. package/fesm/i18n/french.mjs +1 -1
  12. package/fesm/i18n/german.mjs +1 -1
  13. package/fesm/i18n/greek.mjs +1 -1
  14. package/fesm/i18n/haitian-creole.mjs +1 -1
  15. package/fesm/i18n/hebrew.mjs +1 -1
  16. package/fesm/i18n/hungarian.mjs +1 -1
  17. package/fesm/i18n/index.mjs +1 -1
  18. package/fesm/i18n/indonesian.mjs +1 -1
  19. package/fesm/i18n/italian.mjs +1 -1
  20. package/fesm/i18n/japanese.mjs +1 -1
  21. package/fesm/i18n/korean.mjs +1 -1
  22. package/fesm/i18n/malay.mjs +1 -1
  23. package/fesm/i18n/mongolian.mjs +1 -1
  24. package/fesm/i18n/norwegian.mjs +1 -1
  25. package/fesm/i18n/persian.mjs +1 -1
  26. package/fesm/i18n/polish.mjs +1 -1
  27. package/fesm/i18n/portuguese.mjs +1 -1
  28. package/fesm/i18n/romanian.mjs +1 -1
  29. package/fesm/i18n/russian.mjs +1 -1
  30. package/fesm/i18n/simplified-chinese.mjs +1 -1
  31. package/fesm/i18n/slovak.mjs +1 -1
  32. package/fesm/i18n/slovenian.mjs +1 -1
  33. package/fesm/i18n/spanish.mjs +1 -1
  34. package/fesm/i18n/swedish.mjs +1 -1
  35. package/fesm/i18n/tajik.mjs +1 -1
  36. package/fesm/i18n/thai.mjs +1 -1
  37. package/fesm/i18n/traditional-chinese.mjs +1 -1
  38. package/fesm/i18n/turkish.mjs +1 -1
  39. package/fesm/survey-creator-core.i18n.mjs +1 -1
  40. package/fesm/survey-creator-core.mjs +135 -188
  41. package/fesm/survey-creator-core.mjs.map +1 -1
  42. package/fesm/themes/index.mjs +1 -1
  43. package/fonts.fontless.css +1 -1
  44. package/fonts.fontless.min.css +1 -1
  45. package/i18n/arabic.js +1 -1
  46. package/i18n/arabic.min.js.LICENSE.txt +1 -1
  47. package/i18n/bulgarian.js +1 -1
  48. package/i18n/bulgarian.min.js.LICENSE.txt +1 -1
  49. package/i18n/burmese.js +1 -1
  50. package/i18n/burmese.min.js.LICENSE.txt +1 -1
  51. package/i18n/croatian.js +1 -1
  52. package/i18n/croatian.min.js.LICENSE.txt +1 -1
  53. package/i18n/czech.js +1 -1
  54. package/i18n/czech.min.js.LICENSE.txt +1 -1
  55. package/i18n/danish.js +1 -1
  56. package/i18n/danish.min.js.LICENSE.txt +1 -1
  57. package/i18n/dutch.js +1 -1
  58. package/i18n/dutch.min.js.LICENSE.txt +1 -1
  59. package/i18n/english.js +2 -1
  60. package/i18n/english.js.map +1 -1
  61. package/i18n/english.min.js +1 -1
  62. package/i18n/english.min.js.LICENSE.txt +1 -1
  63. package/i18n/finnish.js +1 -1
  64. package/i18n/finnish.min.js.LICENSE.txt +1 -1
  65. package/i18n/french.js +1 -1
  66. package/i18n/french.min.js.LICENSE.txt +1 -1
  67. package/i18n/german.js +1 -1
  68. package/i18n/german.min.js.LICENSE.txt +1 -1
  69. package/i18n/greek.js +1 -1
  70. package/i18n/greek.min.js.LICENSE.txt +1 -1
  71. package/i18n/haitian-creole.js +1 -1
  72. package/i18n/haitian-creole.min.js.LICENSE.txt +1 -1
  73. package/i18n/hebrew.js +1 -1
  74. package/i18n/hebrew.min.js.LICENSE.txt +1 -1
  75. package/i18n/hungarian.js +1 -1
  76. package/i18n/hungarian.min.js.LICENSE.txt +1 -1
  77. package/i18n/index.js +1 -1
  78. package/i18n/index.min.js.LICENSE.txt +1 -1
  79. package/i18n/indonesian.js +1 -1
  80. package/i18n/indonesian.min.js.LICENSE.txt +1 -1
  81. package/i18n/italian.js +1 -1
  82. package/i18n/italian.min.js.LICENSE.txt +1 -1
  83. package/i18n/japanese.js +1 -1
  84. package/i18n/japanese.min.js.LICENSE.txt +1 -1
  85. package/i18n/korean.js +1 -1
  86. package/i18n/korean.min.js.LICENSE.txt +1 -1
  87. package/i18n/malay.js +1 -1
  88. package/i18n/malay.min.js.LICENSE.txt +1 -1
  89. package/i18n/mongolian.js +1 -1
  90. package/i18n/mongolian.min.js.LICENSE.txt +1 -1
  91. package/i18n/norwegian.js +1 -1
  92. package/i18n/norwegian.min.js.LICENSE.txt +1 -1
  93. package/i18n/persian.js +1 -1
  94. package/i18n/persian.min.js.LICENSE.txt +1 -1
  95. package/i18n/polish.js +1 -1
  96. package/i18n/polish.min.js.LICENSE.txt +1 -1
  97. package/i18n/portuguese.js +1 -1
  98. package/i18n/portuguese.min.js.LICENSE.txt +1 -1
  99. package/i18n/romanian.js +1 -1
  100. package/i18n/romanian.min.js.LICENSE.txt +1 -1
  101. package/i18n/russian.js +1 -1
  102. package/i18n/russian.min.js.LICENSE.txt +1 -1
  103. package/i18n/simplified-chinese.js +1 -1
  104. package/i18n/simplified-chinese.min.js.LICENSE.txt +1 -1
  105. package/i18n/slovak.js +1 -1
  106. package/i18n/slovak.min.js.LICENSE.txt +1 -1
  107. package/i18n/slovenian.js +1 -1
  108. package/i18n/slovenian.min.js.LICENSE.txt +1 -1
  109. package/i18n/spanish.js +1 -1
  110. package/i18n/spanish.min.js.LICENSE.txt +1 -1
  111. package/i18n/swedish.js +1 -1
  112. package/i18n/swedish.min.js.LICENSE.txt +1 -1
  113. package/i18n/tajik.js +1 -1
  114. package/i18n/tajik.min.js.LICENSE.txt +1 -1
  115. package/i18n/thai.js +1 -1
  116. package/i18n/thai.min.js.LICENSE.txt +1 -1
  117. package/i18n/traditional-chinese.js +1 -1
  118. package/i18n/traditional-chinese.min.js.LICENSE.txt +1 -1
  119. package/i18n/turkish.js +1 -1
  120. package/i18n/turkish.min.js.LICENSE.txt +1 -1
  121. package/package.json +2 -2
  122. package/survey-creator-core.css +2 -2
  123. package/survey-creator-core.fontless.css +1 -1
  124. package/survey-creator-core.fontless.min.css +1 -1
  125. package/survey-creator-core.i18n.js +1 -1
  126. package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
  127. package/survey-creator-core.js +143 -188
  128. package/survey-creator-core.js.map +1 -1
  129. package/survey-creator-core.min.css +2 -2
  130. package/survey-creator-core.min.js +1 -1
  131. package/survey-creator-core.min.js.LICENSE.txt +1 -1
  132. package/themes/default-contrast.js +1 -1
  133. package/themes/default-contrast.min.js.LICENSE.txt +1 -1
  134. package/themes/default-dark.js +1 -1
  135. package/themes/default-dark.min.js.LICENSE.txt +1 -1
  136. package/themes/index.js +1 -1
  137. package/themes/index.min.js.LICENSE.txt +1 -1
  138. package/themes/sc2020.js +1 -1
  139. package/themes/sc2020.min.js.LICENSE.txt +1 -1
  140. package/typings/components/question-rating.d.ts +1 -1
  141. package/typings/creator-base.d.ts +5 -3
  142. package/typings/creator-events-api.d.ts +1 -1
  143. package/typings/creator-settings.d.ts +16 -34
  144. package/typings/editorLocalization.d.ts +1 -0
  145. package/typings/localization/english.d.ts +1 -0
  146. package/typings/survey-helper.d.ts +0 -1
  147. package/typings/toolbox.d.ts +3 -10
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v2.3.13
2
+ * SurveyJS Creator v2.3.14
3
3
  * (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -836,7 +836,7 @@ var ItemValueWrapperViewModel = /** @class */ (function (_super) {
836
836
  };
837
837
  Object.defineProperty(ItemValueWrapperViewModel.prototype, "allowRemove", {
838
838
  get: function () {
839
- var minChoices = this.creator.minimumChoicesCount;
839
+ var minChoices = this.creator.minChoices;
840
840
  if (minChoices > 0 && minChoices >= this.question.choices.length)
841
841
  return false;
842
842
  var isNew = !this.question.isItemInList(this.item);
@@ -2693,14 +2693,14 @@ var QuestionRatingAdornerViewModel = /** @class */ (function (_super) {
2693
2693
  }
2694
2694
  }
2695
2695
  };
2696
- QuestionRatingAdornerViewModel.allowAddForElement = function (element, maximumRateValues) {
2697
- if ((maximumRateValues < 1 || maximumRateValues > survey_core__WEBPACK_IMPORTED_MODULE_1__.settings.ratingMaximumRateValueCount) && !QuestionRatingAdornerViewModel.useRateValues(element))
2698
- maximumRateValues = survey_core__WEBPACK_IMPORTED_MODULE_1__.settings.ratingMaximumRateValueCount;
2699
- if (element.rateType == "smileys" && (maximumRateValues < 1 || maximumRateValues > 10))
2700
- maximumRateValues = 10;
2701
- if (maximumRateValues < 1)
2696
+ QuestionRatingAdornerViewModel.allowAddForElement = function (element, maxRateValues) {
2697
+ if ((maxRateValues < 1 || maxRateValues > survey_core__WEBPACK_IMPORTED_MODULE_1__.settings.ratingMaximumRateValueCount) && !QuestionRatingAdornerViewModel.useRateValues(element))
2698
+ maxRateValues = survey_core__WEBPACK_IMPORTED_MODULE_1__.settings.ratingMaximumRateValueCount;
2699
+ if (element.rateType == "smileys" && (maxRateValues < 1 || maxRateValues > 10))
2700
+ maxRateValues = 10;
2701
+ if (maxRateValues < 1)
2702
2702
  return true;
2703
- return element.rateCount < maximumRateValues;
2703
+ return element.rateCount < maxRateValues;
2704
2704
  };
2705
2705
  Object.defineProperty(QuestionRatingAdornerViewModel.prototype, "allowAdd", {
2706
2706
  get: function () {
@@ -2711,7 +2711,7 @@ var QuestionRatingAdornerViewModel = /** @class */ (function (_super) {
2711
2711
  });
2712
2712
  Object.defineProperty(QuestionRatingAdornerViewModel.prototype, "enableAdd", {
2713
2713
  get: function () {
2714
- return this.allowAdd && QuestionRatingAdornerViewModel.allowAddForElement(this.element, this.creator.maximumRateValues);
2714
+ return this.allowAdd && QuestionRatingAdornerViewModel.allowAddForElement(this.element, this.creator.maxRateValues);
2715
2715
  },
2716
2716
  enumerable: false,
2717
2717
  configurable: true
@@ -3108,8 +3108,7 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
3108
3108
  return false;
3109
3109
  if (item !== _this.surveyElement.newItem)
3110
3110
  return true;
3111
- return (_this.creator.maximumChoicesCount < 1 ||
3112
- surveyElement["choices"].length < _this.creator.maximumChoicesCount);
3111
+ return (_this.creator.maxChoices < 1 || surveyElement["choices"].length < _this.creator.maxChoices);
3113
3112
  });
3114
3113
  }
3115
3114
  if (this.surveyElement instanceof survey_core__WEBPACK_IMPORTED_MODULE_1__.QuestionHtmlModel) {
@@ -5185,14 +5184,14 @@ var StringItemsNavigatorBase = /** @class */ (function () {
5185
5184
  var _this = this;
5186
5185
  var newItems = items.slice();
5187
5186
  var createNewItem = function (text) {
5188
- var val = creator.inplaceEditForValues ? text : (0,_utils_creator_utils__WEBPACK_IMPORTED_MODULE_4__.getNextItemValue)(creator.getChoicesItemBaseTitle(), newItems);
5187
+ var val = creator.inplaceEditChoiceValues ? text : (0,_utils_creator_utils__WEBPACK_IMPORTED_MODULE_4__.getNextItemValue)(creator.getChoicesItemBaseTitle(), newItems);
5189
5188
  if (_this.question.createItemValue)
5190
5189
  return _this.question.createItemValue(val, text);
5191
5190
  return new survey_core__WEBPACK_IMPORTED_MODULE_1__.ItemValue(val, text);
5192
5191
  };
5193
5192
  newItems.splice(startIndex, 1);
5194
5193
  itemsToAdd.forEach(function (item, offset) {
5195
- if (creator.maximumChoicesCount <= 0 || newItems.length < creator.maximumChoicesCount) {
5194
+ if (creator.maxChoices <= 0 || newItems.length < creator.maxChoices) {
5196
5195
  newItems.splice(startIndex + offset, 0, createNewItem(item));
5197
5196
  }
5198
5197
  });
@@ -5293,7 +5292,7 @@ var StringItemsNavigatorSelectBase = /** @class */ (function (_super) {
5293
5292
  };
5294
5293
  StringItemsNavigatorSelectBase.prototype.addNewItem = function (creator, items, text) {
5295
5294
  if (text === void 0) { text = null; }
5296
- if (creator.maximumChoicesCount && items.length >= creator.maximumChoicesCount)
5295
+ if (creator.maxChoices && items.length >= creator.maxChoices)
5297
5296
  return;
5298
5297
  var itemValue = creator.createNewItemValue(this.question);
5299
5298
  if (!!text)
@@ -5344,7 +5343,7 @@ var StringItemsNavigatorMatrix = /** @class */ (function (_super) {
5344
5343
  var titleBase;
5345
5344
  var propertyName;
5346
5345
  if (items == this.question.columns) {
5347
- if (creator.maximumColumnsCount && items.length >= creator.maximumColumnsCount)
5346
+ if (creator.maxColumns && items.length >= creator.maxColumns)
5348
5347
  return;
5349
5348
  titleBase = "Column ";
5350
5349
  propertyName = "columns";
@@ -5380,7 +5379,7 @@ var StringItemsNavigatorMatrixDropdown = /** @class */ (function (_super) {
5380
5379
  StringItemsNavigatorMatrixDropdown.prototype.addNewItem = function (creator, items, text) {
5381
5380
  if (text === void 0) { text = null; }
5382
5381
  if (items == this.question.columns) {
5383
- if (creator.maximumColumnsCount && items.length >= creator.maximumColumnsCount)
5382
+ if (creator.maxColumns && items.length >= creator.maxColumns)
5384
5383
  return;
5385
5384
  var column = new survey_core__WEBPACK_IMPORTED_MODULE_1__.MatrixDropdownColumn(text || (0,_utils_creator_utils__WEBPACK_IMPORTED_MODULE_4__.getNextValue)("Column ", items.map(function (i) { return i.value; })));
5386
5385
  this.question.columns.push(column);
@@ -5673,9 +5672,9 @@ var StringEditorViewModelBase = /** @class */ (function (_super) {
5673
5672
  };
5674
5673
  Object.defineProperty(StringEditorViewModelBase.prototype, "isInplaceForEditValues", {
5675
5674
  get: function () {
5676
- return !!this.creator && this.creator.inplaceEditForValues &&
5675
+ return !!this.creator && this.creator.inplaceEditChoiceValues &&
5677
5676
  this.locString.owner instanceof survey_core__WEBPACK_IMPORTED_MODULE_1__.ItemValue &&
5678
- this.creator.inplaceEditForValues &&
5677
+ this.creator.inplaceEditChoiceValues &&
5679
5678
  ["noneText", "otherText", "selectAllText"].indexOf(this.locString.name) === -1;
5680
5679
  },
5681
5680
  enumerable: false,
@@ -6632,7 +6631,7 @@ var TabDesignerPlugin = /** @class */ (function () {
6632
6631
  this.designerStateManager = new _designer_state_manager__WEBPACK_IMPORTED_MODULE_5__.DesignerStateManager();
6633
6632
  this.designerStateManager.initForSurvey(this.creator.survey);
6634
6633
  this.creator.onSurveyInstanceCreated.add(function (s, o) {
6635
- if (o.reason == "designer") {
6634
+ if (o.area == "designer-tab") {
6636
6635
  _this.designerStateManager.initForSurvey(o.survey);
6637
6636
  }
6638
6637
  });
@@ -9689,7 +9688,7 @@ var LogicItemEditor = /** @class */ (function (_super) {
9689
9688
  return [];
9690
9689
  var elements = logicType.getSelectorChoices(this.survey, this.context);
9691
9690
  var res = [];
9692
- var showTitles = this.options.useElementTitles || this.options.showTitlesInExpressions;
9691
+ var showTitles = this.options.useElementTitles;
9693
9692
  for (var i = 0; i < elements.length; i++) {
9694
9693
  var namePrefix = "";
9695
9694
  var textPrefix = "";
@@ -10502,7 +10501,7 @@ var TabLogicPlugin = /** @class */ (function () {
10502
10501
  onShow: onActionTypesPopupShow
10503
10502
  });
10504
10503
  items.push(this.filterActionTypeAction);
10505
- if (this.creator.allowEditExpressionsInTextEditor) {
10504
+ if (this.creator.logicAllowTextEditExpressions) {
10506
10505
  this.fastEntryAction = new survey_core__WEBPACK_IMPORTED_MODULE_0__.Action({
10507
10506
  id: "svc-logic-fast-entry",
10508
10507
  iconName: "icon-fast-entry",
@@ -11011,7 +11010,7 @@ var SurveyLogicType = /** @class */ (function () {
11011
11010
  });
11012
11011
  Object.defineProperty(SurveyLogicType.prototype, "showTitlesInExpression", {
11013
11012
  get: function () {
11014
- return !!this.options && (this.options.useElementTitles || this.options.showTitlesInExpressions);
11013
+ return !!this.options && this.options.useElementTitles;
11015
11014
  },
11016
11015
  enumerable: false,
11017
11016
  configurable: true
@@ -15780,7 +15779,7 @@ var ThemeTabPlugin = /** @class */ (function () {
15780
15779
  _this.resetTheme.enabled = (0,_theme_model__WEBPACK_IMPORTED_MODULE_9__.getThemeFullName)(sender.defaultSessionTheme) !== (0,_theme_model__WEBPACK_IMPORTED_MODULE_9__.getThemeFullName)(options.theme);
15781
15780
  _this.saveThemeAction.enabled = true;
15782
15781
  _this.onThemeSelected.fire(_this, options);
15783
- if (_this.creator.isAutoSave) {
15782
+ if (_this.creator.autoSaveEnabled) {
15784
15783
  _this.processAutoSave();
15785
15784
  }
15786
15785
  _this.propertyGrid.survey.editingObj = undefined;
@@ -15800,7 +15799,7 @@ var ThemeTabPlugin = /** @class */ (function () {
15800
15799
  _this.resetTheme.enabled = true;
15801
15800
  _this.saveThemeAction.enabled = true;
15802
15801
  _this.onThemePropertyChanged.fire(_this, options);
15803
- if (_this.creator.isAutoSave) {
15802
+ if (_this.creator.autoSaveEnabled) {
15804
15803
  _this.processAutoSave();
15805
15804
  }
15806
15805
  });
@@ -19833,14 +19832,6 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
19833
19832
  * Default value: -1 (unlimited)
19834
19833
  */
19835
19834
  _this.logicMaxItemsInCondition = -1;
19836
- /**
19837
- * @deprecated Use the [`useElementTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#useElementTitles) property instead.
19838
- */
19839
- _this.showObjectTitles = false;
19840
- /**
19841
- * @deprecated Use the [`useElementTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#useElementTitles) property instead.
19842
- */
19843
- _this.showTitlesInExpressions = false;
19844
19835
  /**
19845
19836
  * Specifies whether Survey Creator UI elements display survey, page, and question titles instead of their names.
19846
19837
  *
@@ -20502,6 +20493,32 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
20502
20493
  enumerable: false,
20503
20494
  configurable: true
20504
20495
  });
20496
+ Object.defineProperty(SurveyCreatorModel.prototype, "showObjectTitles", {
20497
+ /**
20498
+ * @deprecated Use the [`useElementTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#useElementTitles) property instead.
20499
+ */
20500
+ get: function () {
20501
+ return this.useElementTitles;
20502
+ },
20503
+ set: function (val) {
20504
+ this.useElementTitles = val;
20505
+ },
20506
+ enumerable: false,
20507
+ configurable: true
20508
+ });
20509
+ Object.defineProperty(SurveyCreatorModel.prototype, "showTitlesInExpressions", {
20510
+ /**
20511
+ * @deprecated Use the [`useElementTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#useElementTitles) property instead.
20512
+ */
20513
+ get: function () {
20514
+ return this.useElementTitles;
20515
+ },
20516
+ set: function (val) {
20517
+ this.useElementTitles = val;
20518
+ },
20519
+ enumerable: false,
20520
+ configurable: true
20521
+ });
20505
20522
  Object.defineProperty(SurveyCreatorModel.prototype, "allowEditExpressionsInTextEditor", {
20506
20523
  /**
20507
20524
  * @deprecated Use the [`logicAllowTextEditExpressions`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#logicAllowTextEditExpressions) property instead.
@@ -21091,7 +21108,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
21091
21108
  };
21092
21109
  Object.defineProperty(SurveyCreatorModel.prototype, "showPropertyGrid", {
21093
21110
  /**
21094
- * @deprecated showPropertyGrid is deprecated, use showSidebar instead.
21111
+ * @deprecated Use the [`showSidebar`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#showSidebar) property instead.
21095
21112
  */
21096
21113
  get: function () {
21097
21114
  _survey_helper__WEBPACK_IMPORTED_MODULE_10__.SurveyHelper.warnNonSupported("showPropertyGrid", "showSidebar");
@@ -22004,7 +22021,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
22004
22021
  if (reason === void 0) { reason = undefined; }
22005
22022
  if (displayName === void 0) { displayName = undefined; }
22006
22023
  if (!displayName) {
22007
- displayName = _survey_helper__WEBPACK_IMPORTED_MODULE_10__.SurveyHelper.getObjectName(obj, this.useElementTitles || this.showObjectTitles);
22024
+ displayName = _survey_helper__WEBPACK_IMPORTED_MODULE_10__.SurveyHelper.getObjectName(obj, this.useElementTitles);
22008
22025
  }
22009
22026
  var options = { obj: obj, element: obj, displayName: displayName, area: area, reason: reason };
22010
22027
  this.onElementGetDisplayName.fire(this, options);
@@ -22121,7 +22138,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
22121
22138
  this.setState("modified");
22122
22139
  this.onModified.fire(this, options);
22123
22140
  this.doOnElementsChanged(options.type);
22124
- this.isAutoSave && this.doAutoSave();
22141
+ this.autoSaveEnabled && this.doAutoSave();
22125
22142
  };
22126
22143
  SurveyCreatorModel.prototype.notifySurveyPropertyChanged = function (options) {
22127
22144
  this.clearSurveyLogicForUpdate(options.target, options.name, options.newValue);
@@ -23493,7 +23510,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23493
23510
  },
23494
23511
  set: function (value) {
23495
23512
  this.saveSurveyFuncValue = value;
23496
- this.showSaveButton = value != null && !this.isAutoSave;
23513
+ this.showSaveButton = value != null && !this.autoSaveEnabled;
23497
23514
  },
23498
23515
  enumerable: false,
23499
23516
  configurable: true
@@ -23547,7 +23564,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23547
23564
  var availableToolboxItems = [];
23548
23565
  this.toolbox.items.forEach(function (item) { if (!item.showInToolboxOnly)
23549
23566
  availableToolboxItems.push(item); });
23550
- var elementNesting = !!element && isAddNew && (element.isPanel || _survey_helper__WEBPACK_IMPORTED_MODULE_10__.SurveyHelper.isPanelDynamic(element)) ? 1 : 0;
23567
+ var elementNesting = !!element && isAddNew && !!element.getPanelInDesignMode() ? 1 : 0;
23551
23568
  if (!this.isAllowedNestingLevel(element, elementNesting)) {
23552
23569
  for (var i = availableToolboxItems.length - 1; i >= 0; i--) {
23553
23570
  if (availableToolboxItems[i].isPanel || survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.isDescendantOf(availableToolboxItems[i].typeName, "paneldynamic")) {
@@ -23564,7 +23581,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23564
23581
  }
23565
23582
  if (!element)
23566
23583
  return availableToolboxItems;
23567
- if (element.isPanel || _survey_helper__WEBPACK_IMPORTED_MODULE_10__.SurveyHelper.isPanelDynamic(element)) {
23584
+ if (!!element.getPanelInDesignMode()) {
23568
23585
  availableToolboxItems = availableToolboxItems.filter(function (item) { return _this.isAllowedToAdd(item.typeName, element); });
23569
23586
  }
23570
23587
  else {
@@ -24620,15 +24637,14 @@ var settings = {
24620
24637
  var EmptySurveyCreatorOptions = /** @class */ (function () {
24621
24638
  function EmptySurveyCreatorOptions() {
24622
24639
  this.isMobileView = false;
24623
- this.allowEditExpressionsInTextEditor = true;
24624
- this.maximumColumnsCount = settings.propertyGrid.maximumColumnsCount;
24625
- this.minimumChoicesCount = settings.propertyGrid.minimumChoicesCount;
24626
- this.maximumChoicesCount = settings.propertyGrid.maximumChoicesCount;
24627
- this.maximumRowsCount = settings.propertyGrid.maximumRowsCount;
24628
- this.maximumRateValues = settings.propertyGrid.maximumRateValues;
24640
+ this.logicAllowTextEditExpressions = true;
24641
+ this.maxColumns = settings.propertyGrid.maxColumns;
24642
+ this.minChoices = settings.propertyGrid.minChoices;
24643
+ this.maxChoices = settings.propertyGrid.maxChoices;
24644
+ this.maxRows = settings.propertyGrid.maxRows;
24645
+ this.maxRateValues = settings.propertyGrid.maxRateValues;
24629
24646
  this.machineTranslationValue = false;
24630
- this.inplaceEditForValues = false;
24631
- this.maxNestedPanels = -1;
24647
+ this.inplaceEditChoiceValues = false;
24632
24648
  this.maxPanelNestingLevel = -1;
24633
24649
  this.translationLocalesOrder = [];
24634
24650
  }
@@ -26302,8 +26318,7 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
26302
26318
  }
26303
26319
  var dest = ((_a = _this.dragOverIndicatorElement) === null || _a === void 0 ? void 0 : _a.isPanel) ? _this.dragOverIndicatorElement : _this.dropTarget;
26304
26320
  if (_this.dragOverLocation === _drag_drop_enums__WEBPACK_IMPORTED_MODULE_5__.DropIndicatorPosition.Inside) {
26305
- if (_survey_helper__WEBPACK_IMPORTED_MODULE_3__.SurveyHelper.isPanelDynamic(dest))
26306
- dest = dest.template;
26321
+ dest = dest.getPanelInDesignMode() || dest;
26307
26322
  dest.insertElement(src);
26308
26323
  }
26309
26324
  else {
@@ -26465,12 +26480,6 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
26465
26480
  dragOverElement = question;
26466
26481
  }
26467
26482
  });
26468
- // drop to matrix detail panel
26469
- if ((dropTarget.getType() === "matrixdropdown" || dropTarget.getType() === "matrixdynamic") && dropTarget.detailPanelMode !== "none" && this.insideElement) {
26470
- dropTarget = dropTarget.detailPanel;
26471
- }
26472
- // drop to question
26473
- //question inside paneldymanic
26474
26483
  if (!dropTarget.page) {
26475
26484
  var nearestDropTargetPageElement = dropTargetNode.parentElement.closest("[data-sv-drop-target-page]");
26476
26485
  dataAttributeValue = nearestDropTargetPageElement.dataset.svDropTargetPage;
@@ -26490,9 +26499,9 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
26490
26499
  return false;
26491
26500
  if (dropTarget === this.draggedElement)
26492
26501
  return false;
26493
- if (_survey_helper__WEBPACK_IMPORTED_MODULE_3__.SurveyHelper.isPanelDynamic(this.draggedElement) && dropTarget === this.draggedElement.template) {
26502
+ var draggedPanel = this.draggedElement.getPanelInDesignMode();
26503
+ if (dropTarget === draggedPanel)
26494
26504
  return false;
26495
- }
26496
26505
  var container = !dropTarget.isPage && dragOverLocation === _drag_drop_enums__WEBPACK_IMPORTED_MODULE_5__.DropIndicatorPosition.Inside ? dropTarget : dropTarget.parent;
26497
26506
  if (container && !container.isInteractiveDesignElement) {
26498
26507
  container = container.parent || container.parentQuestion;
@@ -26500,26 +26509,22 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
26500
26509
  if (!this.isAllowedToAdd(this.draggedElement && this.draggedElement.getType && this.draggedElement.getType(), container || dropTarget)) {
26501
26510
  return false;
26502
26511
  }
26503
- if (this.maxPanelNestingLevel >= 0 && (this.draggedElement.isPanel || _survey_helper__WEBPACK_IMPORTED_MODULE_3__.SurveyHelper.isPanelDynamic(this.draggedElement))) {
26504
- var draggedPanel = this.draggedElement;
26505
- if (_survey_helper__WEBPACK_IMPORTED_MODULE_3__.SurveyHelper.isPanelDynamic(this.draggedElement)) {
26506
- draggedPanel = this.draggedElement.template;
26507
- }
26508
- var childPanelsMaxNesting = _survey_helper__WEBPACK_IMPORTED_MODULE_3__.SurveyHelper.getMaximumNestedPanelDepth(draggedPanel, 0);
26509
- var len = _survey_helper__WEBPACK_IMPORTED_MODULE_3__.SurveyHelper.getElementParentContainers(dropTarget, false).length;
26510
- if (dragOverLocation === _drag_drop_enums__WEBPACK_IMPORTED_MODULE_5__.DropIndicatorPosition.Inside && (dropTarget.isPanel || _survey_helper__WEBPACK_IMPORTED_MODULE_3__.SurveyHelper.isPanelDynamic(dropTarget)))
26511
- len++;
26512
- if (this.maxPanelNestingLevel < len + childPanelsMaxNesting)
26513
- return false;
26514
- }
26515
- else if (this.maxNestedPanels >= 0 && this.draggedElement.isPanel) {
26516
- var draggedPanel = this.draggedElement;
26512
+ if (!!draggedPanel) {
26517
26513
  var childPanelsMaxNesting = _survey_helper__WEBPACK_IMPORTED_MODULE_3__.SurveyHelper.getMaximumNestedPanelDepth(draggedPanel, 0);
26518
- var len = _survey_helper__WEBPACK_IMPORTED_MODULE_3__.SurveyHelper.getElementDeepLength(dropTarget);
26519
- if (dragOverLocation !== _drag_drop_enums__WEBPACK_IMPORTED_MODULE_5__.DropIndicatorPosition.Inside && dropTarget.isPanel)
26520
- len--;
26521
- if (this.maxNestedPanels < len + childPanelsMaxNesting)
26522
- return false;
26514
+ if (this.maxPanelNestingLevel >= 0) {
26515
+ var len = _survey_helper__WEBPACK_IMPORTED_MODULE_3__.SurveyHelper.getElementParentContainers(dropTarget, false).length;
26516
+ if (dragOverLocation === _drag_drop_enums__WEBPACK_IMPORTED_MODULE_5__.DropIndicatorPosition.Inside && !!dropTarget.getPanelInDesignMode())
26517
+ len++;
26518
+ if (this.maxPanelNestingLevel < len + childPanelsMaxNesting)
26519
+ return false;
26520
+ }
26521
+ else if (this.maxNestedPanels >= 0 && this.draggedElement.isPanel) {
26522
+ var len = _survey_helper__WEBPACK_IMPORTED_MODULE_3__.SurveyHelper.getElementDeepLength(dropTarget);
26523
+ if (dragOverLocation !== _drag_drop_enums__WEBPACK_IMPORTED_MODULE_5__.DropIndicatorPosition.Inside && dropTarget.isPanel)
26524
+ len--;
26525
+ if (this.maxNestedPanels < len + childPanelsMaxNesting)
26526
+ return false;
26527
+ }
26523
26528
  }
26524
26529
  if (DragDropSurveyElements.restrictDragQuestionBetweenPages &&
26525
26530
  this.shouldRestricDragQuestionBetweenPages(dropTarget)) {
@@ -26682,7 +26687,9 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
26682
26687
  var dropTargetRect = dropTargetNode.getBoundingClientRect();
26683
26688
  var calcDirection = !_creator_settings__WEBPACK_IMPORTED_MODULE_2__.settings.dragDrop.allowDragToTheSameLine || (!!this.draggedElement && this.draggedElement.isPage) ? "top-bottom" : null;
26684
26689
  var dragOverLocation = calculateDragOverLocation(event.clientX, event.clientY, dropTargetRect, calcDirection);
26685
- if (!this.draggedElement.isPage && dropTarget && ((dropTarget.isPanel || dropTarget.isPage) && dropTarget.elements.length === 0 || _survey_helper__WEBPACK_IMPORTED_MODULE_3__.SurveyHelper.isPanelDynamic(dropTarget) && dropTarget.template.elements.length == 0)) {
26690
+ var dropPanel = dropTarget.getPanelInDesignMode();
26691
+ var elPanels = dropPanel || (dropTarget.isPage ? dropTarget : undefined);
26692
+ if (!this.draggedElement.isPage && dropTarget && !!elPanels && elPanels.elements.length === 0) {
26686
26693
  if (dropTarget.isPage || this.insideElement) {
26687
26694
  dragOverLocation = _drag_drop_enums__WEBPACK_IMPORTED_MODULE_5__.DropIndicatorPosition.Inside;
26688
26695
  }
@@ -26690,7 +26697,7 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
26690
26697
  if (!this.draggedElement.isPage && dropTarget.isPage && dropTargetAdorner.collapsed) {
26691
26698
  dragOverLocation = _drag_drop_enums__WEBPACK_IMPORTED_MODULE_5__.DropIndicatorPosition.Inside;
26692
26699
  }
26693
- if ((dropTarget.isPanel || _survey_helper__WEBPACK_IMPORTED_MODULE_3__.SurveyHelper.isPanelDynamic(dropTarget)) && this.insideElement && dropTargetAdorner.collapsed) {
26700
+ if (!!dropPanel && this.insideElement && dropTargetAdorner.collapsed) {
26694
26701
  dragOverLocation = _drag_drop_enums__WEBPACK_IMPORTED_MODULE_5__.DropIndicatorPosition.Inside;
26695
26702
  }
26696
26703
  if (!this.draggedElement.isPage && dropTarget.isPage && dropTarget.elements.length !== 0 && !dropTargetAdorner.collapsed) {
@@ -26756,11 +26763,10 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
26756
26763
  _super.prototype.clear.call(this);
26757
26764
  };
26758
26765
  DragDropSurveyElements.prototype.getTargetParent = function (dropTarget) {
26759
- var targetParent = dropTarget.isPage || dropTarget.isPanel ? dropTarget : dropTarget.parent;
26760
- if (dropTarget.getType() === "paneldynamic") {
26761
- targetParent = dropTarget.templateValue;
26762
- }
26763
- return targetParent;
26766
+ var designPanel = dropTarget.getPanelInDesignMode();
26767
+ if (!!designPanel)
26768
+ return designPanel;
26769
+ return dropTarget.isPage ? dropTarget : dropTarget.parent;
26764
26770
  };
26765
26771
  DragDropSurveyElements.prototype.getTargetRow = function (dropTarget) {
26766
26772
  var targetParent = this.getTargetParent(dropTarget);
@@ -27578,7 +27584,7 @@ var ExpressionToDisplayText = /** @class */ (function () {
27578
27584
  if (!this.survey)
27579
27585
  return expression;
27580
27586
  this.showTitles =
27581
- !!this.options && (this.options.useElementTitles == true || this.options.showTitlesInExpressions == true);
27587
+ !!this.options && this.options.useElementTitles;
27582
27588
  var parser = new survey_core__WEBPACK_IMPORTED_MODULE_0__.ConditionsParser();
27583
27589
  var node = parser.parseExpression(expression);
27584
27590
  if (!node)
@@ -33781,6 +33787,7 @@ var enStrings = {
33781
33787
  showPreview: "Show preview area",
33782
33788
  storeDataAsText: "Store file content in JSON result as text",
33783
33789
  maxSize: "Maximum file size (in bytes)",
33790
+ maxFiles: "Maximum number of files",
33784
33791
  rowCount: "Row count",
33785
33792
  columnLayout: "Columns layout",
33786
33793
  addRowButtonLocation: "\"Add Row\" button alignment",
@@ -35432,7 +35439,7 @@ var UndoRedoController = /** @class */ (function (_super) {
35432
35439
  var options = { canUndo: canUndo, allow: canUndo };
35433
35440
  this.onBeforeUndo.fire(this.creator, options);
35434
35441
  this.creator.onBeforeUndo.fire(this.creator, options);
35435
- if (options.canUndo) {
35442
+ if (options.allow) {
35436
35443
  this.undoRedoManager.undo();
35437
35444
  this.selectElementAfterUndo();
35438
35445
  }
@@ -35445,7 +35452,7 @@ var UndoRedoController = /** @class */ (function (_super) {
35445
35452
  var options = { canRedo: canRedo, allow: canRedo };
35446
35453
  this.onBeforeRedo.fire(this.creator, options);
35447
35454
  this.creator.onBeforeRedo.fire(this.creator, options);
35448
- if (options.canRedo) {
35455
+ if (options.allow) {
35449
35456
  var item = this.undoRedoManager.redo();
35450
35457
  this.selectElementAfterUndo();
35451
35458
  }
@@ -37134,8 +37141,8 @@ var ConditionEditor = /** @class */ (function (_super) {
37134
37141
  _this.objectValue = object;
37135
37142
  _this.panelValue = (_this.editSurvey.getQuestionByName("panel"));
37136
37143
  _this.textEditorValue = (_this.editSurvey.getQuestionByName("textEditor"));
37137
- if (!!_this.options.maxLogicItemsInCondition) {
37138
- _this.panel.maxPanelCount = _this.options.maxLogicItemsInCondition;
37144
+ if (!!_this.options.logicMaxItemsInCondition) {
37145
+ _this.panel.maxPanelCount = _this.options.logicMaxItemsInCondition;
37139
37146
  }
37140
37147
  _this.allConditionQuestions = _this.createAllConditionQuestions();
37141
37148
  _this.editSurvey.onValueChanged.add(function (sender, options) {
@@ -37656,7 +37663,7 @@ var ConditionEditor = /** @class */ (function (_super) {
37656
37663
  for (var i = 0; i < res.length; i++) {
37657
37664
  res[i].value = res[i].name;
37658
37665
  var question = !!res[i].question ? res[i].question : res[i];
37659
- if (!(this.options.useElementTitles || this.options.showTitlesInExpressions)) {
37666
+ if (!this.options.useElementTitles) {
37660
37667
  var name_2 = res[i].name;
37661
37668
  var valueName = question.valueName;
37662
37669
  if (!!valueName && name_2.indexOf(valueName) == 0) {
@@ -38020,7 +38027,7 @@ var ConditionEditor = /** @class */ (function (_super) {
38020
38027
  };
38021
38028
  ConditionEditor.prototype.onValueChanged = function (options) {
38022
38029
  if (options.question.name === "panel" && options.value.length > 0) {
38023
- var maxLogicItems = this.options.maxLogicItemsInCondition > 0 ? this.options.maxLogicItemsInCondition : 100;
38030
+ var maxLogicItems = this.options.logicMaxItemsInCondition > 0 ? this.options.logicMaxItemsInCondition : 100;
38024
38031
  options.question.maxPanelCount = options.value.length === 1 && !options.value[0].questionName ? 1 : maxLogicItems;
38025
38032
  this.panel.panels.forEach(function (panel) {
38026
38033
  panel.getQuestionByName("removeAction").visible = options.value.length !== 1;
@@ -38157,10 +38164,10 @@ var PropertyGridEditorCondition = /** @class */ (function (_super) {
38157
38164
  };
38158
38165
  };
38159
38166
  PropertyGridEditorCondition.prototype.canClearPropertyValue = function (obj, prop, question, options) {
38160
- return options.allowEditExpressionsInTextEditor !== false;
38167
+ return options.logicAllowTextEditExpressions !== false;
38161
38168
  };
38162
38169
  PropertyGridEditorCondition.prototype.onSetup = function (obj, question, prop, options) {
38163
- if (options.allowEditExpressionsInTextEditor === false) {
38170
+ if (options.logicAllowTextEditExpressions === false) {
38164
38171
  question.onKeyDownPreprocess = function (event) {
38165
38172
  var allowed = ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End"];
38166
38173
  if (!event.ctrlKey && allowed.indexOf(event.key) < 0) {
@@ -38312,7 +38319,7 @@ var FastEntryEditorBase = /** @class */ (function (_super) {
38312
38319
  _this.editSurvey.onValidateQuestion.add(function (sender, options) {
38313
38320
  if (options.errors.length > 0)
38314
38321
  return;
38315
- var minChoiceCount = _this.options.minimumChoicesCount;
38322
+ var minChoiceCount = _this.options.minChoices;
38316
38323
  if (minChoiceCount > 0) {
38317
38324
  var choicesCount = _this.getChoicesCount();
38318
38325
  if (minChoiceCount > choicesCount) {
@@ -38321,7 +38328,7 @@ var FastEntryEditorBase = /** @class */ (function (_super) {
38321
38328
  }
38322
38329
  return;
38323
38330
  }
38324
- var maxChoicesCount = _this.options.maximumChoicesCount;
38331
+ var maxChoicesCount = _this.options.maxChoices;
38325
38332
  if (maxChoicesCount > 0) {
38326
38333
  var choicesCount = _this.getChoicesCount();
38327
38334
  if (maxChoicesCount < choicesCount) {
@@ -40677,7 +40684,7 @@ var PropertyGridEditorQuestion = /** @class */ (function (_super) {
40677
40684
  var questions = this.getQuestions(survey, obj);
40678
40685
  if (!questions)
40679
40686
  questions = [];
40680
- var showTitles = !!options && (options.useElementTitles || options.showTitlesInExpressions);
40687
+ var showTitles = !!options && options.useElementTitles;
40681
40688
  var qItems = questions.map(function (q) {
40682
40689
  var text = showTitles ? q.locTitle.renderedHtml : q.name;
40683
40690
  if (!!options)
@@ -41297,7 +41304,7 @@ var PropertyGridEditorMatrixItemValues = /** @class */ (function (_super) {
41297
41304
  return (prop.isArray && survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.isDescendantOf(prop.className, "itemvalue") && prop.name != "rateValues");
41298
41305
  };
41299
41306
  PropertyGridEditorMatrixItemValues.prototype.excludeTextPropertyName = function (propNames, options) {
41300
- var hideText = options === null || options === void 0 ? void 0 : options.inplaceEditForValues;
41307
+ var hideText = options === null || options === void 0 ? void 0 : options.inplaceEditChoiceValues;
41301
41308
  return !!hideText ? propNames.filter(function (p) { return p !== "text"; }) : propNames;
41302
41309
  };
41303
41310
  PropertyGridEditorMatrixItemValues.prototype.filterPropertyNames = function (propNames, options) {
@@ -41354,18 +41361,18 @@ var PropertyGridEditorMatrixItemValues = /** @class */ (function (_super) {
41354
41361
  };
41355
41362
  PropertyGridEditorMatrixItemValues.prototype.getMinimumRowCount = function (obj, prop, options) {
41356
41363
  if (prop.name === "choices")
41357
- return options.minimumChoicesCount;
41364
+ return options.minChoices;
41358
41365
  return _super.prototype.getMaximumRowCount.call(this, obj, prop, options);
41359
41366
  };
41360
41367
  PropertyGridEditorMatrixItemValues.prototype.getMaximumRowCount = function (obj, prop, options) {
41361
41368
  if (prop.name === "choices")
41362
- return options.maximumChoicesCount;
41369
+ return options.maxChoices;
41363
41370
  if (prop.name === "rows")
41364
- return options.maximumRowsCount;
41371
+ return options.maxRows;
41365
41372
  if (prop.name === "columns")
41366
- return options.maximumColumnsCount;
41373
+ return options.maxColumns;
41367
41374
  if (prop.name === "rateValues")
41368
- return options.maximumRateValues;
41375
+ return options.maxRateValues;
41369
41376
  return _super.prototype.getMaximumRowCount.call(this, obj, prop, options);
41370
41377
  };
41371
41378
  PropertyGridEditorMatrixItemValues.prototype.hasMultipleLanguage = function (items) {
@@ -41461,7 +41468,7 @@ var PropertyGridEditorMatrixColumns = /** @class */ (function (_super) {
41461
41468
  return "column";
41462
41469
  };
41463
41470
  PropertyGridEditorMatrixColumns.prototype.getMaximumRowCount = function (obj, prop, options) {
41464
- return options.maximumColumnsCount;
41471
+ return options.maxColumns;
41465
41472
  };
41466
41473
  PropertyGridEditorMatrixColumns.prototype.getAllowRowDragDrop = function (prop) { return true; };
41467
41474
  return PropertyGridEditorMatrixColumns;
@@ -42125,7 +42132,7 @@ var PropertyGridViewModel = /** @class */ (function (_super) {
42125
42132
  var obj = this.getSelectedObj();
42126
42133
  if (!obj)
42127
42134
  return "";
42128
- var displayName = _survey_helper__WEBPACK_IMPORTED_MODULE_2__.SurveyHelper.getObjectName(obj, this.propertyGridModel.options.useElementTitles || this.propertyGridModel.options.showObjectTitles);
42135
+ var displayName = _survey_helper__WEBPACK_IMPORTED_MODULE_2__.SurveyHelper.getObjectName(obj, this.propertyGridModel.options.useElementTitles);
42129
42136
  return this.propertyGridModel.options.getObjectDisplayName(obj, "property-grid-header:selected-element", "property-grid-title", displayName);
42130
42137
  };
42131
42138
  PropertyGridViewModel.prototype.getSelectedObj = function () {
@@ -43025,6 +43032,7 @@ var defaultProperties = {
43025
43032
  properties: [
43026
43033
  "sourceType",
43027
43034
  "allowMultiple",
43035
+ "maxFiles",
43028
43036
  { name: "showPreview" },
43029
43037
  "allowImagesPreview",
43030
43038
  "waitForUpload",
@@ -45216,9 +45224,6 @@ var SurveyHelper = /** @class */ (function () {
45216
45224
  }
45217
45225
  return containers;
45218
45226
  };
45219
- SurveyHelper.isPanelDynamic = function (element) {
45220
- return !!element && element.isDescendantOf("paneldynamic");
45221
- };
45222
45227
  return SurveyHelper;
45223
45228
  }());
45224
45229
 
@@ -45961,6 +45966,14 @@ var QuestionToolboxCategory = /** @class */ (function (_super) {
45961
45966
  return QuestionToolboxCategory;
45962
45967
  }(survey_core__WEBPACK_IMPORTED_MODULE_1__.Base));
45963
45968
 
45969
+ function getLocalizedToolboxItemName(str, item) {
45970
+ if (!!str)
45971
+ return str;
45972
+ if (item.propName) {
45973
+ return _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.getPropertyValueInEditor(item.propName, item.propValue);
45974
+ }
45975
+ return _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.getString("qt." + item.id);
45976
+ }
45964
45977
  /**
45965
45978
  * A toolbox item instance.
45966
45979
  *
@@ -45973,10 +45986,9 @@ var QuestionToolboxItem = /** @class */ (function (_super) {
45973
45986
  _this.item = item;
45974
45987
  _this.showInToolboxOnly = false;
45975
45988
  _this.needDefaultSubitem = undefined;
45976
- if (!_this.id) {
45977
- _this.id = _this.name;
45978
- }
45989
+ _this.locTitle.onGetTextCallback = function (str) { return getLocalizedToolboxItemName(str, _this); };
45979
45990
  _this.showInToolboxOnly = item.showInToolboxOnly === true;
45991
+ _this.locStrsChanged();
45980
45992
  var originalCss = _this.css;
45981
45993
  _this.css = new survey_core__WEBPACK_IMPORTED_MODULE_1__.ComputedUpdater(function () {
45982
45994
  var _a;
@@ -46013,6 +46025,9 @@ var QuestionToolboxItem = /** @class */ (function (_super) {
46013
46025
  enumerable: false,
46014
46026
  configurable: true
46015
46027
  });
46028
+ QuestionToolboxItem.prototype.getId = function () {
46029
+ return _super.prototype.getId.call(this) || this.name;
46030
+ };
46016
46031
  Object.defineProperty(QuestionToolboxItem.prototype, "enabled", {
46017
46032
  /**
46018
46033
  * Specifies whether users can interact with the toolbox item.
@@ -46354,6 +46369,11 @@ var QuestionToolbox = /** @class */ (function (_super) {
46354
46369
  (_a = _this.creator) === null || _a === void 0 ? void 0 : _a.onDragDropItemStart();
46355
46370
  _this.dragDropHelper.startDragToolboxItem(pointerDownEvent, json, itemModel);
46356
46371
  }, false);
46372
+ this.hiddenItemsListModel.registerPropertyChangedHandlers(["actions"], function () {
46373
+ _this.hiddenItemsListModel.actions.forEach(function (item) {
46374
+ item.locTitle.onGetTextCallback = function (str) { return getLocalizedToolboxItemName(str, item.innerItem); };
46375
+ });
46376
+ }, "actions");
46357
46377
  this.hiddenItemsListModel.onPointerDown = function (pointerDownEvent, item) {
46358
46378
  if (!_this.creator.readOnly && _this.enabled) {
46359
46379
  _this.dragOrClickHelper.onPointerDown(pointerDownEvent, item);
@@ -46554,11 +46574,13 @@ var QuestionToolbox = /** @class */ (function (_super) {
46554
46574
  };
46555
46575
  QuestionToolbox.prototype.getOrCreateToolboxItem = function (item) {
46556
46576
  if (item instanceof QuestionToolboxItem) {
46577
+ item.locTitle.owner = this.creator;
46557
46578
  return item;
46558
46579
  }
46559
46580
  else {
46560
46581
  item.iconName = item.iconName ? item.iconName : QuestionToolbox.defaultIconName;
46561
46582
  var newItem = new QuestionToolboxItem(item);
46583
+ newItem.locTitle.owner = this.creator;
46562
46584
  this.createSubTypes(newItem);
46563
46585
  return newItem;
46564
46586
  }
@@ -46574,20 +46596,19 @@ var QuestionToolbox = /** @class */ (function (_super) {
46574
46596
  var newJson = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, parentItem.json);
46575
46597
  newJson[propName] = ch;
46576
46598
  var newId = parentItem.id != ch ? ch : parentItem.id + "-default";
46577
- var innerItem = new QuestionToolboxItem({
46599
+ var item = new QuestionToolboxItem({
46578
46600
  id: newId,
46579
46601
  name: newId,
46580
- title: _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.getPropertyValueInEditor(propName, ch),
46581
46602
  className: QuestionToolboxItem.getItemClassNames() + " svc-toolbox__item-subtype",
46582
46603
  json: newJson,
46583
46604
  iconName: null,
46584
46605
  category: null,
46585
46606
  isCopied: false,
46586
- component: QuestionToolbox.defaultItemComponent
46607
+ component: QuestionToolbox.defaultItemComponent,
46608
+ propName: propName,
46609
+ propValue: ch
46587
46610
  });
46588
- innerItem.propName = propName;
46589
- innerItem.propValue = ch;
46590
- return innerItem;
46611
+ return item;
46591
46612
  });
46592
46613
  if (newItems) {
46593
46614
  parentItem.addSubitems(newItems);
@@ -46604,7 +46625,6 @@ var QuestionToolbox = /** @class */ (function (_super) {
46604
46625
  * @see items
46605
46626
  */
46606
46627
  QuestionToolbox.prototype.addItem = function (item, index) {
46607
- this.correctItem(item);
46608
46628
  var action = this.getOrCreateToolboxItem(item);
46609
46629
  if (index === undefined) {
46610
46630
  this.actions.push(action);
@@ -46614,15 +46634,6 @@ var QuestionToolbox = /** @class */ (function (_super) {
46614
46634
  }
46615
46635
  this.onItemsChanged();
46616
46636
  };
46617
- QuestionToolbox.prototype.correctItem = function (item) {
46618
- if (!item.id)
46619
- item.id = item.name;
46620
- this.updateActionTitle(item);
46621
- if (!item.title)
46622
- item.title = item.name;
46623
- if (!item.tooltip)
46624
- item.tooltip = item.title;
46625
- };
46626
46637
  Object.defineProperty(QuestionToolbox.prototype, "dragDropHelper", {
46627
46638
  get: function () {
46628
46639
  return this.creator.dragDropSurveyElements;
@@ -46636,7 +46647,6 @@ var QuestionToolbox = /** @class */ (function (_super) {
46636
46647
  * @see addItem
46637
46648
  */
46638
46649
  QuestionToolbox.prototype.replaceItem = function (item) {
46639
- this.correctItem(item);
46640
46650
  var index = this.indexOf(item.name);
46641
46651
  if (index < 0)
46642
46652
  return;
@@ -46753,7 +46763,7 @@ var QuestionToolbox = /** @class */ (function (_super) {
46753
46763
  QuestionToolbox.prototype.updateTitles = function () {
46754
46764
  var _this = this;
46755
46765
  this.actions.forEach(function (action) {
46756
- _this.updateToolboxItemTitle(action);
46766
+ action.locStrsChanged();
46757
46767
  });
46758
46768
  if (Array.isArray(this.categories)) {
46759
46769
  this.categories.forEach(function (category) {
@@ -46761,39 +46771,6 @@ var QuestionToolbox = /** @class */ (function (_super) {
46761
46771
  });
46762
46772
  }
46763
46773
  };
46764
- QuestionToolbox.prototype.updateToolboxItemTitle = function (item) {
46765
- this.updateActionTitle(item);
46766
- this.updateActionTitle(item.innerItem);
46767
- if (!Array.isArray(item.items))
46768
- return;
46769
- item.items.forEach(function (subItem) {
46770
- var propName = subItem.propName;
46771
- var propValue = subItem.propValue;
46772
- if (!!propName && !!propValue) {
46773
- subItem.title = _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.getPropertyValueInEditor(propName, propValue);
46774
- }
46775
- });
46776
- };
46777
- QuestionToolbox.prototype.updateActionTitle = function (action) {
46778
- var newTitle = "";
46779
- var titles = action["titles"];
46780
- if (!!titles) {
46781
- newTitle = titles[_editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.locale];
46782
- if (!newTitle) {
46783
- newTitle = titles["default"];
46784
- }
46785
- }
46786
- if (!newTitle) {
46787
- newTitle = _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.getString("qt." + action.id);
46788
- if (newTitle === action.id) {
46789
- newTitle = "";
46790
- }
46791
- }
46792
- if (!!newTitle) {
46793
- action.title = newTitle;
46794
- action.tooltip = newTitle;
46795
- }
46796
- };
46797
46774
  QuestionToolbox.prototype.updateCategoriesState = function () {
46798
46775
  var noActive = this.allowExpandMultipleCategories || this.keepAllCategoriesExpanded;
46799
46776
  if (noActive) {
@@ -47158,14 +47135,11 @@ var QuestionToolbox = /** @class */ (function (_super) {
47158
47135
  }
47159
47136
  var json = this.getQuestionJSON(question);
47160
47137
  delete json.name;
47161
- var title = _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.getString("qt." + name_1);
47162
47138
  var iconName = "icon-" + name_1;
47163
47139
  var item = {
47164
47140
  id: name_1,
47165
47141
  name: name_1,
47166
47142
  iconName: iconName,
47167
- title: title,
47168
- tooltip: title,
47169
47143
  className: QuestionToolboxItem.getItemClassNames(iconName),
47170
47144
  json: json,
47171
47145
  isCopied: false,
@@ -47227,13 +47201,7 @@ var QuestionToolbox = /** @class */ (function (_super) {
47227
47201
  if (json.showInToolbox === false || json.internal === true || !json.name)
47228
47202
  return undefined;
47229
47203
  var iconName = json.iconName ? json.iconName : QuestionToolbox.defaultIconName;
47230
- var title = _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.getString("qt." + json.name);
47231
- if (!title || title == json.name) {
47232
- title = this.getTitleFromJsonTitle(json.title, json.name);
47233
- }
47234
- if (!title) {
47235
- title = json.name;
47236
- }
47204
+ var title = typeof json.title === "string" ? json.title : undefined;
47237
47205
  var elementJson = json.defaultJSON ? JSON.parse(JSON.stringify(json.defaultJSON)) : {};
47238
47206
  if (!elementJson.type) {
47239
47207
  elementJson.type = json.name;
@@ -47241,6 +47209,9 @@ var QuestionToolbox = /** @class */ (function (_super) {
47241
47209
  delete elementJson.name;
47242
47210
  var category = json.category ? json.category : "";
47243
47211
  var titles = typeof json.title === "object" ? json.title : undefined;
47212
+ if (!!titles) {
47213
+ title = undefined;
47214
+ }
47244
47215
  var item = new survey_core__WEBPACK_IMPORTED_MODULE_1__.Action({
47245
47216
  id: json.name,
47246
47217
  name: json.name,
@@ -47254,24 +47225,8 @@ var QuestionToolbox = /** @class */ (function (_super) {
47254
47225
  category: category
47255
47226
  });
47256
47227
  var res = this.getOrCreateToolboxItem(item);
47257
- this.updateActionTitle(res);
47258
47228
  return res;
47259
47229
  };
47260
- QuestionToolbox.prototype.getTitleFromJsonTitle = function (title, name) {
47261
- if (!title)
47262
- return title;
47263
- if (typeof title === "string")
47264
- return title;
47265
- if (typeof title !== "object")
47266
- return title;
47267
- for (var key in title) {
47268
- var loc = _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.locales[key];
47269
- if (title[key] && loc && loc.qt) {
47270
- loc.qt[name] = title[key];
47271
- }
47272
- }
47273
- return _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.getString("qt." + name);
47274
- };
47275
47230
  QuestionToolbox.prototype.getQuestionJSON = function (question) {
47276
47231
  var json = new survey_core__WEBPACK_IMPORTED_MODULE_1__.JsonObject().toJsonObject(question);
47277
47232
  json.type = question.getType();
@@ -49216,7 +49171,7 @@ __webpack_require__.r(__webpack_exports__);
49216
49171
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! survey-core */ "survey-core");
49217
49172
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_116___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_116__);
49218
49173
  var Version;
49219
- Version = "".concat("2.3.13");
49174
+ Version = "".concat("2.3.14");
49220
49175
  //should be loaded before other styles for easier override
49221
49176
 
49222
49177
 
@@ -49338,7 +49293,7 @@ Version = "".concat("2.3.13");
49338
49293
 
49339
49294
 
49340
49295
 
49341
- (0,survey_core__WEBPACK_IMPORTED_MODULE_116__.checkLibraryVersion)("".concat("2.3.13"), "survey-creator-core");
49296
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_116__.checkLibraryVersion)("".concat("2.3.14"), "survey-creator-core");
49342
49297
 
49343
49298
  })();
49344
49299