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
@@ -605,6 +605,7 @@ var enStrings = {
605
605
  showPreview: "Show preview area",
606
606
  storeDataAsText: "Store file content in JSON result as text",
607
607
  maxSize: "Maximum file size (in bytes)",
608
+ maxFiles: "Maximum number of files",
608
609
  rowCount: "Row count",
609
610
  columnLayout: "Columns layout",
610
611
  addRowButtonLocation: "\"Add Row\" button alignment",
@@ -2544,15 +2545,14 @@ var settings = {
2544
2545
  class EmptySurveyCreatorOptions {
2545
2546
  constructor() {
2546
2547
  this.isMobileView = false;
2547
- this.allowEditExpressionsInTextEditor = true;
2548
- this.maximumColumnsCount = settings.propertyGrid.maximumColumnsCount;
2549
- this.minimumChoicesCount = settings.propertyGrid.minimumChoicesCount;
2550
- this.maximumChoicesCount = settings.propertyGrid.maximumChoicesCount;
2551
- this.maximumRowsCount = settings.propertyGrid.maximumRowsCount;
2552
- this.maximumRateValues = settings.propertyGrid.maximumRateValues;
2548
+ this.logicAllowTextEditExpressions = true;
2549
+ this.maxColumns = settings.propertyGrid.maxColumns;
2550
+ this.minChoices = settings.propertyGrid.minChoices;
2551
+ this.maxChoices = settings.propertyGrid.maxChoices;
2552
+ this.maxRows = settings.propertyGrid.maxRows;
2553
+ this.maxRateValues = settings.propertyGrid.maxRateValues;
2553
2554
  this.machineTranslationValue = false;
2554
- this.inplaceEditForValues = false;
2555
- this.maxNestedPanels = -1;
2555
+ this.inplaceEditChoiceValues = false;
2556
2556
  this.maxPanelNestingLevel = -1;
2557
2557
  this.translationLocalesOrder = [];
2558
2558
  }
@@ -4094,9 +4094,6 @@ class SurveyHelper {
4094
4094
  }
4095
4095
  return containers;
4096
4096
  }
4097
- static isPanelDynamic(element) {
4098
- return !!element && element.isDescendantOf("paneldynamic");
4099
- }
4100
4097
  }
4101
4098
 
4102
4099
  class SurveyForTextWorker extends SurveyModel {
@@ -4567,6 +4564,14 @@ __decorate([
4567
4564
  __decorate([
4568
4565
  property()
4569
4566
  ], QuestionToolboxCategory.prototype, "empty", void 0);
4567
+ function getLocalizedToolboxItemName(str, item) {
4568
+ if (!!str)
4569
+ return str;
4570
+ if (item.propName) {
4571
+ return editorLocalization.getPropertyValueInEditor(item.propName, item.propValue);
4572
+ }
4573
+ return editorLocalization.getString("qt." + item.id);
4574
+ }
4570
4575
  /**
4571
4576
  * A toolbox item instance.
4572
4577
  *
@@ -4585,10 +4590,9 @@ class QuestionToolboxItem extends Action {
4585
4590
  this.item = item;
4586
4591
  this.showInToolboxOnly = false;
4587
4592
  this.needDefaultSubitem = undefined;
4588
- if (!this.id) {
4589
- this.id = this.name;
4590
- }
4593
+ this.locTitle.onGetTextCallback = (str) => getLocalizedToolboxItemName(str, this);
4591
4594
  this.showInToolboxOnly = item.showInToolboxOnly === true;
4595
+ this.locStrsChanged();
4592
4596
  const originalCss = this.css;
4593
4597
  this.css = new ComputedUpdater(() => {
4594
4598
  var _a;
@@ -4613,6 +4617,9 @@ class QuestionToolboxItem extends Action {
4613
4617
  set title(val) {
4614
4618
  this.setTitle(val);
4615
4619
  }
4620
+ getId() {
4621
+ return super.getId() || this.name;
4622
+ }
4616
4623
  /**
4617
4624
  * Specifies whether users can interact with the toolbox item.
4618
4625
  *
@@ -4908,6 +4915,11 @@ class QuestionToolbox extends AdaptiveActionContainer {
4908
4915
  (_a = this.creator) === null || _a === void 0 ? void 0 : _a.onDragDropItemStart();
4909
4916
  this.dragDropHelper.startDragToolboxItem(pointerDownEvent, json, itemModel);
4910
4917
  }, false);
4918
+ this.hiddenItemsListModel.registerPropertyChangedHandlers(["actions"], () => {
4919
+ this.hiddenItemsListModel.actions.forEach((item) => {
4920
+ item.locTitle.onGetTextCallback = (str) => getLocalizedToolboxItemName(str, item.innerItem);
4921
+ });
4922
+ }, "actions");
4911
4923
  this.hiddenItemsListModel.onPointerDown = (pointerDownEvent, item) => {
4912
4924
  if (!this.creator.readOnly && this.enabled) {
4913
4925
  this.dragOrClickHelper.onPointerDown(pointerDownEvent, item);
@@ -5065,11 +5077,13 @@ class QuestionToolbox extends AdaptiveActionContainer {
5065
5077
  }
5066
5078
  getOrCreateToolboxItem(item) {
5067
5079
  if (item instanceof QuestionToolboxItem) {
5080
+ item.locTitle.owner = this.creator;
5068
5081
  return item;
5069
5082
  }
5070
5083
  else {
5071
5084
  item.iconName = item.iconName ? item.iconName : QuestionToolbox.defaultIconName;
5072
5085
  const newItem = new QuestionToolboxItem(item);
5086
+ newItem.locTitle.owner = this.creator;
5073
5087
  this.createSubTypes(newItem);
5074
5088
  return newItem;
5075
5089
  }
@@ -5085,20 +5099,19 @@ class QuestionToolbox extends AdaptiveActionContainer {
5085
5099
  const newJson = Object.assign({}, parentItem.json);
5086
5100
  newJson[propName] = ch;
5087
5101
  const newId = parentItem.id != ch ? ch : parentItem.id + "-default";
5088
- const innerItem = new QuestionToolboxItem({
5102
+ const item = new QuestionToolboxItem({
5089
5103
  id: newId,
5090
5104
  name: newId,
5091
- title: editorLocalization.getPropertyValueInEditor(propName, ch),
5092
5105
  className: QuestionToolboxItem.getItemClassNames() + " svc-toolbox__item-subtype",
5093
5106
  json: newJson,
5094
5107
  iconName: null,
5095
5108
  category: null,
5096
5109
  isCopied: false,
5097
- component: QuestionToolbox.defaultItemComponent
5110
+ component: QuestionToolbox.defaultItemComponent,
5111
+ propName: propName,
5112
+ propValue: ch
5098
5113
  });
5099
- innerItem.propName = propName;
5100
- innerItem.propValue = ch;
5101
- return innerItem;
5114
+ return item;
5102
5115
  });
5103
5116
  if (newItems) {
5104
5117
  parentItem.addSubitems(newItems);
@@ -5115,7 +5128,6 @@ class QuestionToolbox extends AdaptiveActionContainer {
5115
5128
  * @see items
5116
5129
  */
5117
5130
  addItem(item, index) {
5118
- this.correctItem(item);
5119
5131
  const action = this.getOrCreateToolboxItem(item);
5120
5132
  if (index === undefined) {
5121
5133
  this.actions.push(action);
@@ -5125,15 +5137,6 @@ class QuestionToolbox extends AdaptiveActionContainer {
5125
5137
  }
5126
5138
  this.onItemsChanged();
5127
5139
  }
5128
- correctItem(item) {
5129
- if (!item.id)
5130
- item.id = item.name;
5131
- this.updateActionTitle(item);
5132
- if (!item.title)
5133
- item.title = item.name;
5134
- if (!item.tooltip)
5135
- item.tooltip = item.title;
5136
- }
5137
5140
  get dragDropHelper() {
5138
5141
  return this.creator.dragDropSurveyElements;
5139
5142
  }
@@ -5143,7 +5146,6 @@ class QuestionToolbox extends AdaptiveActionContainer {
5143
5146
  * @see addItem
5144
5147
  */
5145
5148
  replaceItem(item) {
5146
- this.correctItem(item);
5147
5149
  const index = this.indexOf(item.name);
5148
5150
  if (index < 0)
5149
5151
  return;
@@ -5247,7 +5249,7 @@ class QuestionToolbox extends AdaptiveActionContainer {
5247
5249
  }
5248
5250
  updateTitles() {
5249
5251
  this.actions.forEach(action => {
5250
- this.updateToolboxItemTitle(action);
5252
+ action.locStrsChanged();
5251
5253
  });
5252
5254
  if (Array.isArray(this.categories)) {
5253
5255
  this.categories.forEach(category => {
@@ -5255,39 +5257,6 @@ class QuestionToolbox extends AdaptiveActionContainer {
5255
5257
  });
5256
5258
  }
5257
5259
  }
5258
- updateToolboxItemTitle(item) {
5259
- this.updateActionTitle(item);
5260
- this.updateActionTitle(item.innerItem);
5261
- if (!Array.isArray(item.items))
5262
- return;
5263
- item.items.forEach(subItem => {
5264
- const propName = subItem.propName;
5265
- const propValue = subItem.propValue;
5266
- if (!!propName && !!propValue) {
5267
- subItem.title = editorLocalization.getPropertyValueInEditor(propName, propValue);
5268
- }
5269
- });
5270
- }
5271
- updateActionTitle(action) {
5272
- let newTitle = "";
5273
- const titles = action["titles"];
5274
- if (!!titles) {
5275
- newTitle = titles[editorLocalization.locale];
5276
- if (!newTitle) {
5277
- newTitle = titles["default"];
5278
- }
5279
- }
5280
- if (!newTitle) {
5281
- newTitle = editorLocalization.getString("qt." + action.id);
5282
- if (newTitle === action.id) {
5283
- newTitle = "";
5284
- }
5285
- }
5286
- if (!!newTitle) {
5287
- action.title = newTitle;
5288
- action.tooltip = newTitle;
5289
- }
5290
- }
5291
5260
  updateCategoriesState() {
5292
5261
  var noActive = this.allowExpandMultipleCategories || this.keepAllCategoriesExpanded;
5293
5262
  if (noActive) {
@@ -5642,14 +5611,11 @@ class QuestionToolbox extends AdaptiveActionContainer {
5642
5611
  }
5643
5612
  const json = this.getQuestionJSON(question);
5644
5613
  delete json.name;
5645
- const title = editorLocalization.getString("qt." + name);
5646
5614
  const iconName = "icon-" + name;
5647
5615
  const item = {
5648
5616
  id: name,
5649
5617
  name: name,
5650
5618
  iconName: iconName,
5651
- title: title,
5652
- tooltip: title,
5653
5619
  className: QuestionToolboxItem.getItemClassNames(iconName),
5654
5620
  json: json,
5655
5621
  isCopied: false,
@@ -5709,13 +5675,7 @@ class QuestionToolbox extends AdaptiveActionContainer {
5709
5675
  if (json.showInToolbox === false || json.internal === true || !json.name)
5710
5676
  return undefined;
5711
5677
  const iconName = json.iconName ? json.iconName : QuestionToolbox.defaultIconName;
5712
- let title = editorLocalization.getString("qt." + json.name);
5713
- if (!title || title == json.name) {
5714
- title = this.getTitleFromJsonTitle(json.title, json.name);
5715
- }
5716
- if (!title) {
5717
- title = json.name;
5718
- }
5678
+ let title = typeof json.title === "string" ? json.title : undefined;
5719
5679
  var elementJson = json.defaultJSON ? JSON.parse(JSON.stringify(json.defaultJSON)) : {};
5720
5680
  if (!elementJson.type) {
5721
5681
  elementJson.type = json.name;
@@ -5723,6 +5683,9 @@ class QuestionToolbox extends AdaptiveActionContainer {
5723
5683
  delete elementJson.name;
5724
5684
  var category = json.category ? json.category : "";
5725
5685
  const titles = typeof json.title === "object" ? json.title : undefined;
5686
+ if (!!titles) {
5687
+ title = undefined;
5688
+ }
5726
5689
  const item = new Action({
5727
5690
  id: json.name,
5728
5691
  name: json.name,
@@ -5736,24 +5699,8 @@ class QuestionToolbox extends AdaptiveActionContainer {
5736
5699
  category: category
5737
5700
  });
5738
5701
  const res = this.getOrCreateToolboxItem(item);
5739
- this.updateActionTitle(res);
5740
5702
  return res;
5741
5703
  }
5742
- getTitleFromJsonTitle(title, name) {
5743
- if (!title)
5744
- return title;
5745
- if (typeof title === "string")
5746
- return title;
5747
- if (typeof title !== "object")
5748
- return title;
5749
- for (let key in title) {
5750
- const loc = editorLocalization.locales[key];
5751
- if (title[key] && loc && loc.qt) {
5752
- loc.qt[name] = title[key];
5753
- }
5754
- }
5755
- return editorLocalization.getString("qt." + name);
5756
- }
5757
5704
  getQuestionJSON(question) {
5758
5705
  var json = new JsonObject().toJsonObject(question);
5759
5706
  json.type = question.getType();
@@ -9963,7 +9910,7 @@ class ExpressionToDisplayText {
9963
9910
  if (!this.survey)
9964
9911
  return expression;
9965
9912
  this.showTitles =
9966
- !!this.options && (this.options.useElementTitles == true || this.options.showTitlesInExpressions == true);
9913
+ !!this.options && this.options.useElementTitles;
9967
9914
  var parser = new Survey.ConditionsParser();
9968
9915
  var node = parser.parseExpression(expression);
9969
9916
  if (!node)
@@ -10332,7 +10279,7 @@ class SurveyLogicType {
10332
10279
  return true;
10333
10280
  }
10334
10281
  get showTitlesInExpression() {
10335
- return !!this.options && (this.options.useElementTitles || this.options.showTitlesInExpressions);
10282
+ return !!this.options && this.options.useElementTitles;
10336
10283
  }
10337
10284
  createNewObj(srcObj) {
10338
10285
  const obj = Serializer.createClass(this.baseClass);
@@ -12326,6 +12273,7 @@ const defaultProperties = {
12326
12273
  properties: [
12327
12274
  "sourceType",
12328
12275
  "allowMultiple",
12276
+ "maxFiles",
12329
12277
  { name: "showPreview" },
12330
12278
  "allowImagesPreview",
12331
12279
  "waitForUpload",
@@ -15537,7 +15485,7 @@ class PropertyGridEditorQuestion extends PropertyGridEditor {
15537
15485
  var questions = this.getQuestions(survey, obj);
15538
15486
  if (!questions)
15539
15487
  questions = [];
15540
- var showTitles = !!options && (options.useElementTitles || options.showTitlesInExpressions);
15488
+ var showTitles = !!options && options.useElementTitles;
15541
15489
  var qItems = questions.map((q) => {
15542
15490
  let text = showTitles ? q.locTitle.renderedHtml : q.name;
15543
15491
  if (!!options)
@@ -18679,8 +18627,8 @@ class ConditionEditor extends PropertyEditorSetupValue {
18679
18627
  this.objectValue = object;
18680
18628
  this.panelValue = (this.editSurvey.getQuestionByName("panel"));
18681
18629
  this.textEditorValue = (this.editSurvey.getQuestionByName("textEditor"));
18682
- if (!!this.options.maxLogicItemsInCondition) {
18683
- this.panel.maxPanelCount = this.options.maxLogicItemsInCondition;
18630
+ if (!!this.options.logicMaxItemsInCondition) {
18631
+ this.panel.maxPanelCount = this.options.logicMaxItemsInCondition;
18684
18632
  }
18685
18633
  this.allConditionQuestions = this.createAllConditionQuestions();
18686
18634
  this.editSurvey.onValueChanged.add((sender, options) => {
@@ -19120,7 +19068,7 @@ class ConditionEditor extends PropertyEditorSetupValue {
19120
19068
  for (let i = 0; i < res.length; i++) {
19121
19069
  res[i].value = res[i].name;
19122
19070
  let question = !!res[i].question ? res[i].question : res[i];
19123
- if (!(this.options.useElementTitles || this.options.showTitlesInExpressions)) {
19071
+ if (!this.options.useElementTitles) {
19124
19072
  let name = res[i].name;
19125
19073
  let valueName = question.valueName;
19126
19074
  if (!!valueName && name.indexOf(valueName) == 0) {
@@ -19480,7 +19428,7 @@ class ConditionEditor extends PropertyEditorSetupValue {
19480
19428
  }
19481
19429
  onValueChanged(options) {
19482
19430
  if (options.question.name === "panel" && options.value.length > 0) {
19483
- const maxLogicItems = this.options.maxLogicItemsInCondition > 0 ? this.options.maxLogicItemsInCondition : 100;
19431
+ const maxLogicItems = this.options.logicMaxItemsInCondition > 0 ? this.options.logicMaxItemsInCondition : 100;
19484
19432
  options.question.maxPanelCount = options.value.length === 1 && !options.value[0].questionName ? 1 : maxLogicItems;
19485
19433
  this.panel.panels.forEach(panel => {
19486
19434
  panel.getQuestionByName("removeAction").visible = options.value.length !== 1;
@@ -20328,7 +20276,7 @@ class LogicItemEditor extends PropertyEditorSetupValue {
20328
20276
  return [];
20329
20277
  const elements = logicType.getSelectorChoices(this.survey, this.context);
20330
20278
  const res = [];
20331
- const showTitles = this.options.useElementTitles || this.options.showTitlesInExpressions;
20279
+ const showTitles = this.options.useElementTitles;
20332
20280
  for (let i = 0; i < elements.length; i++) {
20333
20281
  let namePrefix = "";
20334
20282
  let textPrefix = "";
@@ -20997,7 +20945,7 @@ class TabLogicPlugin {
20997
20945
  onShow: onActionTypesPopupShow
20998
20946
  });
20999
20947
  items.push(this.filterActionTypeAction);
21000
- if (this.creator.allowEditExpressionsInTextEditor) {
20948
+ if (this.creator.logicAllowTextEditExpressions) {
21001
20949
  this.fastEntryAction = new Action({
21002
20950
  id: "svc-logic-fast-entry",
21003
20951
  iconName: "icon-fast-entry",
@@ -21139,7 +21087,7 @@ class UndoRedoController extends Base {
21139
21087
  var options = { canUndo: canUndo, allow: canUndo };
21140
21088
  this.onBeforeUndo.fire(this.creator, options);
21141
21089
  this.creator.onBeforeUndo.fire(this.creator, options);
21142
- if (options.canUndo) {
21090
+ if (options.allow) {
21143
21091
  this.undoRedoManager.undo();
21144
21092
  this.selectElementAfterUndo();
21145
21093
  }
@@ -21152,7 +21100,7 @@ class UndoRedoController extends Base {
21152
21100
  const options = { canRedo: canRedo, allow: canRedo };
21153
21101
  this.onBeforeRedo.fire(this.creator, options);
21154
21102
  this.creator.onBeforeRedo.fire(this.creator, options);
21155
- if (options.canRedo) {
21103
+ if (options.allow) {
21156
21104
  this.undoRedoManager.redo();
21157
21105
  this.selectElementAfterUndo();
21158
21106
  }
@@ -21656,7 +21604,7 @@ class PropertyGridViewModel extends Base {
21656
21604
  var obj = this.getSelectedObj();
21657
21605
  if (!obj)
21658
21606
  return "";
21659
- var displayName = SurveyHelper.getObjectName(obj, this.propertyGridModel.options.useElementTitles || this.propertyGridModel.options.showObjectTitles);
21607
+ var displayName = SurveyHelper.getObjectName(obj, this.propertyGridModel.options.useElementTitles);
21660
21608
  return this.propertyGridModel.options.getObjectDisplayName(obj, "property-grid-header:selected-element", "property-grid-title", displayName);
21661
21609
  }
21662
21610
  getSelectedObj() {
@@ -22579,8 +22527,7 @@ class DragDropSurveyElements extends DragDropCore {
22579
22527
  }
22580
22528
  let dest = ((_a = this.dragOverIndicatorElement) === null || _a === void 0 ? void 0 : _a.isPanel) ? this.dragOverIndicatorElement : this.dropTarget;
22581
22529
  if (this.dragOverLocation === DropIndicatorPosition.Inside) {
22582
- if (SurveyHelper.isPanelDynamic(dest))
22583
- dest = dest.template;
22530
+ dest = dest.getPanelInDesignMode() || dest;
22584
22531
  dest.insertElement(src);
22585
22532
  }
22586
22533
  else {
@@ -22717,12 +22664,6 @@ class DragDropSurveyElements extends DragDropCore {
22717
22664
  dragOverElement = question;
22718
22665
  }
22719
22666
  });
22720
- // drop to matrix detail panel
22721
- if ((dropTarget.getType() === "matrixdropdown" || dropTarget.getType() === "matrixdynamic") && dropTarget.detailPanelMode !== "none" && this.insideElement) {
22722
- dropTarget = dropTarget.detailPanel;
22723
- }
22724
- // drop to question
22725
- //question inside paneldymanic
22726
22667
  if (!dropTarget.page) {
22727
22668
  const nearestDropTargetPageElement = dropTargetNode.parentElement.closest("[data-sv-drop-target-page]");
22728
22669
  dataAttributeValue = nearestDropTargetPageElement.dataset.svDropTargetPage;
@@ -22741,9 +22682,9 @@ class DragDropSurveyElements extends DragDropCore {
22741
22682
  return false;
22742
22683
  if (dropTarget === this.draggedElement)
22743
22684
  return false;
22744
- if (SurveyHelper.isPanelDynamic(this.draggedElement) && dropTarget === this.draggedElement.template) {
22685
+ const draggedPanel = this.draggedElement.getPanelInDesignMode();
22686
+ if (dropTarget === draggedPanel)
22745
22687
  return false;
22746
- }
22747
22688
  let container = !dropTarget.isPage && dragOverLocation === DropIndicatorPosition.Inside ? dropTarget : dropTarget.parent;
22748
22689
  if (container && !container.isInteractiveDesignElement) {
22749
22690
  container = container.parent || container.parentQuestion;
@@ -22751,26 +22692,22 @@ class DragDropSurveyElements extends DragDropCore {
22751
22692
  if (!this.isAllowedToAdd(this.draggedElement && this.draggedElement.getType && this.draggedElement.getType(), container || dropTarget)) {
22752
22693
  return false;
22753
22694
  }
22754
- if (this.maxPanelNestingLevel >= 0 && (this.draggedElement.isPanel || SurveyHelper.isPanelDynamic(this.draggedElement))) {
22755
- let draggedPanel = this.draggedElement;
22756
- if (SurveyHelper.isPanelDynamic(this.draggedElement)) {
22757
- draggedPanel = this.draggedElement.template;
22758
- }
22695
+ if (!!draggedPanel) {
22759
22696
  const childPanelsMaxNesting = SurveyHelper.getMaximumNestedPanelDepth(draggedPanel, 0);
22760
- let len = SurveyHelper.getElementParentContainers(dropTarget, false).length;
22761
- if (dragOverLocation === DropIndicatorPosition.Inside && (dropTarget.isPanel || SurveyHelper.isPanelDynamic(dropTarget)))
22762
- len++;
22763
- if (this.maxPanelNestingLevel < len + childPanelsMaxNesting)
22764
- return false;
22765
- }
22766
- else if (this.maxNestedPanels >= 0 && this.draggedElement.isPanel) {
22767
- const draggedPanel = this.draggedElement;
22768
- const childPanelsMaxNesting = SurveyHelper.getMaximumNestedPanelDepth(draggedPanel, 0);
22769
- let len = SurveyHelper.getElementDeepLength(dropTarget);
22770
- if (dragOverLocation !== DropIndicatorPosition.Inside && dropTarget.isPanel)
22771
- len--;
22772
- if (this.maxNestedPanels < len + childPanelsMaxNesting)
22773
- return false;
22697
+ if (this.maxPanelNestingLevel >= 0) {
22698
+ let len = SurveyHelper.getElementParentContainers(dropTarget, false).length;
22699
+ if (dragOverLocation === DropIndicatorPosition.Inside && !!dropTarget.getPanelInDesignMode())
22700
+ len++;
22701
+ if (this.maxPanelNestingLevel < len + childPanelsMaxNesting)
22702
+ return false;
22703
+ }
22704
+ else if (this.maxNestedPanels >= 0 && this.draggedElement.isPanel) {
22705
+ let len = SurveyHelper.getElementDeepLength(dropTarget);
22706
+ if (dragOverLocation !== DropIndicatorPosition.Inside && dropTarget.isPanel)
22707
+ len--;
22708
+ if (this.maxNestedPanels < len + childPanelsMaxNesting)
22709
+ return false;
22710
+ }
22774
22711
  }
22775
22712
  if (DragDropSurveyElements.restrictDragQuestionBetweenPages &&
22776
22713
  this.shouldRestricDragQuestionBetweenPages(dropTarget)) {
@@ -22933,7 +22870,9 @@ class DragDropSurveyElements extends DragDropCore {
22933
22870
  const dropTargetRect = dropTargetNode.getBoundingClientRect();
22934
22871
  const calcDirection = !settings.dragDrop.allowDragToTheSameLine || (!!this.draggedElement && this.draggedElement.isPage) ? "top-bottom" : null;
22935
22872
  let dragOverLocation = calculateDragOverLocation(event.clientX, event.clientY, dropTargetRect, calcDirection);
22936
- if (!this.draggedElement.isPage && dropTarget && ((dropTarget.isPanel || dropTarget.isPage) && dropTarget.elements.length === 0 || SurveyHelper.isPanelDynamic(dropTarget) && dropTarget.template.elements.length == 0)) {
22873
+ const dropPanel = dropTarget.getPanelInDesignMode();
22874
+ const elPanels = dropPanel || (dropTarget.isPage ? dropTarget : undefined);
22875
+ if (!this.draggedElement.isPage && dropTarget && !!elPanels && elPanels.elements.length === 0) {
22937
22876
  if (dropTarget.isPage || this.insideElement) {
22938
22877
  dragOverLocation = DropIndicatorPosition.Inside;
22939
22878
  }
@@ -22941,7 +22880,7 @@ class DragDropSurveyElements extends DragDropCore {
22941
22880
  if (!this.draggedElement.isPage && dropTarget.isPage && dropTargetAdorner.collapsed) {
22942
22881
  dragOverLocation = DropIndicatorPosition.Inside;
22943
22882
  }
22944
- if ((dropTarget.isPanel || SurveyHelper.isPanelDynamic(dropTarget)) && this.insideElement && dropTargetAdorner.collapsed) {
22883
+ if (!!dropPanel && this.insideElement && dropTargetAdorner.collapsed) {
22945
22884
  dragOverLocation = DropIndicatorPosition.Inside;
22946
22885
  }
22947
22886
  if (!this.draggedElement.isPage && dropTarget.isPage && dropTarget.elements.length !== 0 && !dropTargetAdorner.collapsed) {
@@ -23007,11 +22946,10 @@ class DragDropSurveyElements extends DragDropCore {
23007
22946
  super.clear();
23008
22947
  }
23009
22948
  getTargetParent(dropTarget) {
23010
- let targetParent = dropTarget.isPage || dropTarget.isPanel ? dropTarget : dropTarget.parent;
23011
- if (dropTarget.getType() === "paneldynamic") {
23012
- targetParent = dropTarget.templateValue;
23013
- }
23014
- return targetParent;
22949
+ const designPanel = dropTarget.getPanelInDesignMode();
22950
+ if (!!designPanel)
22951
+ return designPanel;
22952
+ return dropTarget.isPage ? dropTarget : dropTarget.parent;
23015
22953
  }
23016
22954
  getTargetRow(dropTarget) {
23017
22955
  const targetParent = this.getTargetParent(dropTarget);
@@ -24295,7 +24233,7 @@ class TabDesignerPlugin {
24295
24233
  this.designerStateManager = new DesignerStateManager();
24296
24234
  this.designerStateManager.initForSurvey(this.creator.survey);
24297
24235
  this.creator.onSurveyInstanceCreated.add((s, o) => {
24298
- if (o.reason == "designer") {
24236
+ if (o.area == "designer-tab") {
24299
24237
  this.designerStateManager.initForSurvey(o.survey);
24300
24238
  }
24301
24239
  });
@@ -25229,14 +25167,14 @@ class StringItemsNavigatorBase {
25229
25167
  addNewItems(creator, items, startIndex, itemsToAdd) {
25230
25168
  let newItems = items.slice();
25231
25169
  const createNewItem = (text) => {
25232
- const val = creator.inplaceEditForValues ? text : getNextItemValue(creator.getChoicesItemBaseTitle(), newItems);
25170
+ const val = creator.inplaceEditChoiceValues ? text : getNextItemValue(creator.getChoicesItemBaseTitle(), newItems);
25233
25171
  if (this.question.createItemValue)
25234
25172
  return this.question.createItemValue(val, text);
25235
25173
  return new ItemValue(val, text);
25236
25174
  };
25237
25175
  newItems.splice(startIndex, 1);
25238
25176
  itemsToAdd.forEach((item, offset) => {
25239
- if (creator.maximumChoicesCount <= 0 || newItems.length < creator.maximumChoicesCount) {
25177
+ if (creator.maxChoices <= 0 || newItems.length < creator.maxChoices) {
25240
25178
  newItems.splice(startIndex + offset, 0, createNewItem(item));
25241
25179
  }
25242
25180
  });
@@ -25329,7 +25267,7 @@ class StringItemsNavigatorSelectBase extends StringItemsNavigatorBase {
25329
25267
  return [this.question.choices];
25330
25268
  }
25331
25269
  addNewItem(creator, items, text = null) {
25332
- if (creator.maximumChoicesCount && items.length >= creator.maximumChoicesCount)
25270
+ if (creator.maxChoices && items.length >= creator.maxChoices)
25333
25271
  return;
25334
25272
  const itemValue = creator.createNewItemValue(this.question);
25335
25273
  if (!!text)
@@ -25368,7 +25306,7 @@ class StringItemsNavigatorMatrix extends StringItemsNavigatorBase {
25368
25306
  let titleBase;
25369
25307
  let propertyName;
25370
25308
  if (items == this.question.columns) {
25371
- if (creator.maximumColumnsCount && items.length >= creator.maximumColumnsCount)
25309
+ if (creator.maxColumns && items.length >= creator.maxColumns)
25372
25310
  return;
25373
25311
  titleBase = "Column ";
25374
25312
  propertyName = "columns";
@@ -25398,7 +25336,7 @@ class StringItemsNavigatorMatrixDropdown extends StringItemsNavigatorMatrix {
25398
25336
  }
25399
25337
  addNewItem(creator, items, text = null) {
25400
25338
  if (items == this.question.columns) {
25401
- if (creator.maximumColumnsCount && items.length >= creator.maximumColumnsCount)
25339
+ if (creator.maxColumns && items.length >= creator.maxColumns)
25402
25340
  return;
25403
25341
  var column = new MatrixDropdownColumn(text || getNextValue("Column ", items.map(i => i.value)));
25404
25342
  this.question.columns.push(column);
@@ -25680,9 +25618,9 @@ class StringEditorViewModelBase extends Base {
25680
25618
  return "";
25681
25619
  }
25682
25620
  get isInplaceForEditValues() {
25683
- return !!this.creator && this.creator.inplaceEditForValues &&
25621
+ return !!this.creator && this.creator.inplaceEditChoiceValues &&
25684
25622
  this.locString.owner instanceof ItemValue &&
25685
- this.creator.inplaceEditForValues &&
25623
+ this.creator.inplaceEditChoiceValues &&
25686
25624
  ["noneText", "otherText", "selectAllText"].indexOf(this.locString.name) === -1;
25687
25625
  }
25688
25626
  setValueIntoLocStr(clearedText, target) {
@@ -26385,7 +26323,7 @@ class ThemeTabPlugin {
26385
26323
  this.resetTheme.enabled = getThemeFullName(sender.defaultSessionTheme) !== getThemeFullName(options.theme);
26386
26324
  this.saveThemeAction.enabled = true;
26387
26325
  this.onThemeSelected.fire(this, options);
26388
- if (this.creator.isAutoSave) {
26326
+ if (this.creator.autoSaveEnabled) {
26389
26327
  this.processAutoSave();
26390
26328
  }
26391
26329
  this.propertyGrid.survey.editingObj = undefined;
@@ -26405,7 +26343,7 @@ class ThemeTabPlugin {
26405
26343
  this.resetTheme.enabled = true;
26406
26344
  this.saveThemeAction.enabled = true;
26407
26345
  this.onThemePropertyChanged.fire(this, options);
26408
- if (this.creator.isAutoSave) {
26346
+ if (this.creator.autoSaveEnabled) {
26409
26347
  this.processAutoSave();
26410
26348
  }
26411
26349
  });
@@ -27945,6 +27883,24 @@ class SurveyCreatorModel extends Base {
27945
27883
  set maxLogicItemsInCondition(val) {
27946
27884
  this.logicMaxItemsInCondition = val;
27947
27885
  }
27886
+ /**
27887
+ * @deprecated Use the [`useElementTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#useElementTitles) property instead.
27888
+ */
27889
+ get showObjectTitles() {
27890
+ return this.useElementTitles;
27891
+ }
27892
+ set showObjectTitles(val) {
27893
+ this.useElementTitles = val;
27894
+ }
27895
+ /**
27896
+ * @deprecated Use the [`useElementTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#useElementTitles) property instead.
27897
+ */
27898
+ get showTitlesInExpressions() {
27899
+ return this.useElementTitles;
27900
+ }
27901
+ set showTitlesInExpressions(val) {
27902
+ this.useElementTitles = val;
27903
+ }
27948
27904
  /**
27949
27905
  * @deprecated Use the [`logicAllowTextEditExpressions`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#logicAllowTextEditExpressions) property instead.
27950
27906
  */
@@ -28817,14 +28773,6 @@ class SurveyCreatorModel extends Base {
28817
28773
  * Default value: -1 (unlimited)
28818
28774
  */
28819
28775
  this.logicMaxItemsInCondition = -1;
28820
- /**
28821
- * @deprecated Use the [`useElementTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#useElementTitles) property instead.
28822
- */
28823
- this.showObjectTitles = false;
28824
- /**
28825
- * @deprecated Use the [`useElementTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#useElementTitles) property instead.
28826
- */
28827
- this.showTitlesInExpressions = false;
28828
28776
  /**
28829
28777
  * Specifies whether Survey Creator UI elements display survey, page, and question titles instead of their names.
28830
28778
  *
@@ -29195,7 +29143,7 @@ class SurveyCreatorModel extends Base {
29195
29143
  }
29196
29144
  }
29197
29145
  /**
29198
- * @deprecated showPropertyGrid is deprecated, use showSidebar instead.
29146
+ * @deprecated Use the [`showSidebar`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#showSidebar) property instead.
29199
29147
  */
29200
29148
  get showPropertyGrid() {
29201
29149
  SurveyHelper.warnNonSupported("showPropertyGrid", "showSidebar");
@@ -30053,7 +30001,7 @@ class SurveyCreatorModel extends Base {
30053
30001
  }
30054
30002
  getObjectDisplayName(obj, area, reason = undefined, displayName = undefined) {
30055
30003
  if (!displayName) {
30056
- displayName = SurveyHelper.getObjectName(obj, this.useElementTitles || this.showObjectTitles);
30004
+ displayName = SurveyHelper.getObjectName(obj, this.useElementTitles);
30057
30005
  }
30058
30006
  var options = { obj: obj, element: obj, displayName: displayName, area: area, reason: reason };
30059
30007
  this.onElementGetDisplayName.fire(this, options);
@@ -30163,7 +30111,7 @@ class SurveyCreatorModel extends Base {
30163
30111
  this.setState("modified");
30164
30112
  this.onModified.fire(this, options);
30165
30113
  this.doOnElementsChanged(options.type);
30166
- this.isAutoSave && this.doAutoSave();
30114
+ this.autoSaveEnabled && this.doAutoSave();
30167
30115
  }
30168
30116
  notifySurveyPropertyChanged(options) {
30169
30117
  this.clearSurveyLogicForUpdate(options.target, options.name, options.newValue);
@@ -31474,7 +31422,7 @@ class SurveyCreatorModel extends Base {
31474
31422
  }
31475
31423
  set saveSurveyFunc(value) {
31476
31424
  this.saveSurveyFuncValue = value;
31477
- this.showSaveButton = value != null && !this.isAutoSave;
31425
+ this.showSaveButton = value != null && !this.autoSaveEnabled;
31478
31426
  }
31479
31427
  convertCurrentQuestion(newType, defaultJSON = null) {
31480
31428
  var el = this.selectedElement;
@@ -31515,7 +31463,7 @@ class SurveyCreatorModel extends Base {
31515
31463
  let availableToolboxItems = [];
31516
31464
  this.toolbox.items.forEach((item) => { if (!item.showInToolboxOnly)
31517
31465
  availableToolboxItems.push(item); });
31518
- const elementNesting = !!element && isAddNew && (element.isPanel || SurveyHelper.isPanelDynamic(element)) ? 1 : 0;
31466
+ const elementNesting = !!element && isAddNew && !!element.getPanelInDesignMode() ? 1 : 0;
31519
31467
  if (!this.isAllowedNestingLevel(element, elementNesting)) {
31520
31468
  for (let i = availableToolboxItems.length - 1; i >= 0; i--) {
31521
31469
  if (availableToolboxItems[i].isPanel || Serializer.isDescendantOf(availableToolboxItems[i].typeName, "paneldynamic")) {
@@ -31532,7 +31480,7 @@ class SurveyCreatorModel extends Base {
31532
31480
  }
31533
31481
  if (!element)
31534
31482
  return availableToolboxItems;
31535
- if (element.isPanel || SurveyHelper.isPanelDynamic(element)) {
31483
+ if (!!element.getPanelInDesignMode()) {
31536
31484
  availableToolboxItems = availableToolboxItems.filter((item) => this.isAllowedToAdd(item.typeName, element));
31537
31485
  }
31538
31486
  else {
@@ -33244,8 +33192,7 @@ class QuestionAdornerViewModel extends SurveyElementAdornerBase {
33244
33192
  return false;
33245
33193
  if (item !== this.surveyElement.newItem)
33246
33194
  return true;
33247
- return (this.creator.maximumChoicesCount < 1 ||
33248
- surveyElement["choices"].length < this.creator.maximumChoicesCount);
33195
+ return (this.creator.maxChoices < 1 || surveyElement["choices"].length < this.creator.maxChoices);
33249
33196
  });
33250
33197
  }
33251
33198
  if (this.surveyElement instanceof QuestionHtmlModel) {
@@ -33986,20 +33933,20 @@ class QuestionRatingAdornerViewModel extends Base {
33986
33933
  }
33987
33934
  }
33988
33935
  }
33989
- static allowAddForElement(element, maximumRateValues) {
33990
- if ((maximumRateValues < 1 || maximumRateValues > settings$1.ratingMaximumRateValueCount) && !QuestionRatingAdornerViewModel.useRateValues(element))
33991
- maximumRateValues = settings$1.ratingMaximumRateValueCount;
33992
- if (element.rateType == "smileys" && (maximumRateValues < 1 || maximumRateValues > 10))
33993
- maximumRateValues = 10;
33994
- if (maximumRateValues < 1)
33936
+ static allowAddForElement(element, maxRateValues) {
33937
+ if ((maxRateValues < 1 || maxRateValues > settings$1.ratingMaximumRateValueCount) && !QuestionRatingAdornerViewModel.useRateValues(element))
33938
+ maxRateValues = settings$1.ratingMaximumRateValueCount;
33939
+ if (element.rateType == "smileys" && (maxRateValues < 1 || maxRateValues > 10))
33940
+ maxRateValues = 10;
33941
+ if (maxRateValues < 1)
33995
33942
  return true;
33996
- return element.rateCount < maximumRateValues;
33943
+ return element.rateCount < maxRateValues;
33997
33944
  }
33998
33945
  get allowAdd() {
33999
33946
  return this.canAddOrRemove();
34000
33947
  }
34001
33948
  get enableAdd() {
34002
- return this.allowAdd && QuestionRatingAdornerViewModel.allowAddForElement(this.element, this.creator.maximumRateValues);
33949
+ return this.allowAdd && QuestionRatingAdornerViewModel.allowAddForElement(this.element, this.creator.maxRateValues);
34003
33950
  }
34004
33951
  get addClassNames() {
34005
33952
  return new CssClassBuilder()
@@ -34248,7 +34195,7 @@ class ItemValueWrapperViewModel extends Base {
34248
34195
  }
34249
34196
  }
34250
34197
  get allowRemove() {
34251
- const minChoices = this.creator.minimumChoicesCount;
34198
+ const minChoices = this.creator.minChoices;
34252
34199
  if (minChoices > 0 && minChoices >= this.question.choices.length)
34253
34200
  return false;
34254
34201
  const isNew = !this.question.isItemInList(this.item);
@@ -35582,10 +35529,10 @@ class PropertyGridEditorCondition extends PropertyGridEditorExpression {
35582
35529
  };
35583
35530
  }
35584
35531
  canClearPropertyValue(obj, prop, question, options) {
35585
- return options.allowEditExpressionsInTextEditor !== false;
35532
+ return options.logicAllowTextEditExpressions !== false;
35586
35533
  }
35587
35534
  onSetup(obj, question, prop, options) {
35588
- if (options.allowEditExpressionsInTextEditor === false) {
35535
+ if (options.logicAllowTextEditExpressions === false) {
35589
35536
  question.onKeyDownPreprocess = (event) => {
35590
35537
  const allowed = ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End"];
35591
35538
  if (!event.ctrlKey && allowed.indexOf(event.key) < 0) {
@@ -35617,7 +35564,7 @@ class FastEntryEditorBase extends PropertyEditorSetupValue {
35617
35564
  this.editSurvey.onValidateQuestion.add((sender, options) => {
35618
35565
  if (options.errors.length > 0)
35619
35566
  return;
35620
- const minChoiceCount = this.options.minimumChoicesCount;
35567
+ const minChoiceCount = this.options.minChoices;
35621
35568
  if (minChoiceCount > 0) {
35622
35569
  const choicesCount = this.getChoicesCount();
35623
35570
  if (minChoiceCount > choicesCount) {
@@ -35626,7 +35573,7 @@ class FastEntryEditorBase extends PropertyEditorSetupValue {
35626
35573
  }
35627
35574
  return;
35628
35575
  }
35629
- const maxChoicesCount = this.options.maximumChoicesCount;
35576
+ const maxChoicesCount = this.options.maxChoices;
35630
35577
  if (maxChoicesCount > 0) {
35631
35578
  const choicesCount = this.getChoicesCount();
35632
35579
  if (maxChoicesCount < choicesCount) {
@@ -36183,7 +36130,7 @@ class PropertyGridEditorMatrixItemValues extends PropertyGridEditorMatrix {
36183
36130
  return (prop.isArray && Serializer.isDescendantOf(prop.className, "itemvalue") && prop.name != "rateValues");
36184
36131
  }
36185
36132
  excludeTextPropertyName(propNames, options) {
36186
- const hideText = options === null || options === void 0 ? void 0 : options.inplaceEditForValues;
36133
+ const hideText = options === null || options === void 0 ? void 0 : options.inplaceEditChoiceValues;
36187
36134
  return !!hideText ? propNames.filter(p => p !== "text") : propNames;
36188
36135
  }
36189
36136
  filterPropertyNames(propNames, options) {
@@ -36240,18 +36187,18 @@ class PropertyGridEditorMatrixItemValues extends PropertyGridEditorMatrix {
36240
36187
  }
36241
36188
  getMinimumRowCount(obj, prop, options) {
36242
36189
  if (prop.name === "choices")
36243
- return options.minimumChoicesCount;
36190
+ return options.minChoices;
36244
36191
  return super.getMaximumRowCount(obj, prop, options);
36245
36192
  }
36246
36193
  getMaximumRowCount(obj, prop, options) {
36247
36194
  if (prop.name === "choices")
36248
- return options.maximumChoicesCount;
36195
+ return options.maxChoices;
36249
36196
  if (prop.name === "rows")
36250
- return options.maximumRowsCount;
36197
+ return options.maxRows;
36251
36198
  if (prop.name === "columns")
36252
- return options.maximumColumnsCount;
36199
+ return options.maxColumns;
36253
36200
  if (prop.name === "rateValues")
36254
- return options.maximumRateValues;
36201
+ return options.maxRateValues;
36255
36202
  return super.getMaximumRowCount(obj, prop, options);
36256
36203
  }
36257
36204
  hasMultipleLanguage(items) {
@@ -36334,7 +36281,7 @@ class PropertyGridEditorMatrixColumns extends PropertyGridEditorMatrix {
36334
36281
  return "column";
36335
36282
  }
36336
36283
  getMaximumRowCount(obj, prop, options) {
36337
- return options.maximumColumnsCount;
36284
+ return options.maxColumns;
36338
36285
  }
36339
36286
  getAllowRowDragDrop(prop) { return true; }
36340
36287
  }
@@ -37341,8 +37288,8 @@ class CreatorPreset extends CreatorPresetBase {
37341
37288
  }
37342
37289
 
37343
37290
  let Version;
37344
- Version = `${"2.3.13"}`;
37345
- checkLibraryVersion(`${"2.3.13"}`, "survey-creator-core");
37291
+ Version = `${"2.3.14"}`;
37292
+ checkLibraryVersion(`${"2.3.14"}`, "survey-creator-core");
37346
37293
 
37347
37294
  export { AceJsonEditorModel, ColorCalculator, CreatorAction, CreatorBase, CreatorEvent, CreatorPreset, CreatorPresetBase, CreatorPresetPropertyGrid, CreatorPresetPropertyGridDefinition, CreatorPresetTabs, CreatorPresetToolbox, CreatorPresetToolboxConfigurator, CreatorPresetToolboxDefinition, CreatorResponsivityManager, CreatorThemeModel, CreatorThemes, DEFAULT_MONITOR_DPI, DefaultFonts, DragDropSurveyElements, EditorLocalization, EmptySurveyCreatorOptions, FooterToolbarActionContainer, HEXToRGB, HSBToRGB, HueColorCalculator, ImageItemValueWrapperViewModel, ItemValueWrapperViewModel, JsonDuplicateNameError, JsonEditorBaseModel, LogicEvent, LogoImageViewModel, MatrixCellWrapperEditSurvey, MatrixCellWrapperViewModel, MenuButton, ObjType, ObjectSelector, ObjectSelectorItem, ObjectSelectorModel, PageAdorner, PageNavigatorViewModel, PagesController, PredefinedBackgroundColors, PredefinedColors, PredefinedCreatorThemes, PredefinedThemes, PropertyEditorSetupValue, PropertyGridCellsEditor, PropertyGridEditor, PropertyGridEditorBackgroundCornerRadius, PropertyGridEditorBindings, PropertyGridEditorBoolean, PropertyGridEditorCollection, PropertyGridEditorColor, PropertyGridEditorColorWithAlpha, PropertyGridEditorCondition, PropertyGridEditorDateTime, PropertyGridEditorDropdown, PropertyGridEditorExpression, PropertyGridEditorFontSettings, PropertyGridEditorHtml, PropertyGridEditorImageSize, PropertyGridEditorMatrix, PropertyGridEditorMatrixCalculatedValues, PropertyGridEditorMatrixColumns, PropertyGridEditorMatrixHtmlConditions, PropertyGridEditorMatrixItemValues, PropertyGridEditorMatrixLayoutColumns, PropertyGridEditorMatrixMultipleTypes, PropertyGridEditorMatrixMutlipleTextItems, PropertyGridEditorMatrixPages, PropertyGridEditorMatrixRateValues, PropertyGridEditorMatrixTriggers, PropertyGridEditorMatrixUrlConditions, PropertyGridEditorMatrixValidators, PropertyGridEditorNumber, PropertyGridEditorPage, PropertyGridEditorQuestion, PropertyGridEditorQuestionCarryForward, PropertyGridEditorQuestionHeader, PropertyGridEditorQuestionMaskSettings, PropertyGridEditorQuestionRestfull, PropertyGridEditorQuestionSelectBase, PropertyGridEditorQuestionValue, PropertyGridEditorSet, PropertyGridEditorShadowEffects, PropertyGridEditorSpinEdit, PropertyGridEditorString, PropertyGridEditorStringArray, PropertyGridEditorStringBase, PropertyGridEditorSwitchToggle, PropertyGridEditorText, PropertyGridEditorUndefinedBoolean, PropertyGridLinkEditor, PropertyGridModel, PropertyGridPanelValueEditor, PropertyGridRowValueEditor, PropertyGridTitleActionsCreator, PropertyGridTriggerValueEditor, PropertyGridTriggerValueInLogicEditor, PropertyGridValueEditor, PropertyGridValueEditorBase, PropertyGridViewModel, PropertyJSONGenerator, QuestionAdornerViewModel, QuestionColorModel, QuestionCommentWithResetModel, QuestionConvertMode, QuestionConverter, QuestionDropdownAdornerViewModel, QuestionEmbeddedSurveyModel, QuestionFileEditorModel, QuestionImageAdornerViewModel, QuestionLinkValueModel, QuestionRatingAdornerViewModel, QuestionSpinEditorModel, QuestionTextWithResetModel, QuestionToolbox, QuestionToolboxCategory, QuestionToolboxItem, RGBToHSB, ResetValueAdorner, ResizeManager, RowViewModel, SearchManager, SearchManagerPropertyGrid, SearchManagerToolbox, SidebarHeaderModel, SidebarModel, SidebarPageModel, StringEditorConnector, StringEditorViewModelBase, StringItemsNavigatorBase, SurveyCreatorModel, SurveyHelper, SurveyJSON5, SurveyLogic, SurveyLogicUI, SurveyQuestionEditorDefinition, SurveyQuestionEditorPropertyDefinition, SurveyQuestionEditorTabDefinition, SurveyQuestionProperties, SurveyResultsItemModel, SurveyResultsModel, SurveySimulatorModel, SurveyTextWorker, SurveyTextWorkerError, SurveyTextWorkerJsonError, SurveyTextWorkerParserError, Switcher, TabControlModel, TabDesignerPlugin, TabDesignerViewModel, TabJsonEditorAcePlugin, TabJsonEditorBasePlugin, TabJsonEditorTextareaPlugin, TabLogicPlugin, TabTestPlugin, TabTranslationPlugin, TabbedMenuContainer, TabbedMenuItem, TabbedMenuMode, TestSurveyTabViewModel, TextareaJsonEditorModel, ThemeModelEditorDefinition, ThemeTabPlugin, ThemeTabViewModel, Themes, ToolbarActionContainer, ToolboxToolViewModel, Transaction, Translation, TranslationEditor, TranslationForEditor, TranslationGroup, TranslationItem, TranslationItemBase, TranslationItemString, UndoRedoAction, UndoRedoArrayAction, UndoRedoManager, UndoRedoPlugin, Version, assign, assignDefaultClasses, backgroundCornerRadiusFromCssVariable, backgroundCornerRadiusToCssVariable, calculateDragOverLocation, calculateIsEdge, calculateIsSide, capitalize, clearNewLines, colorsAreEqual, convertRgbaToString, copyCssClasses, copyObject, createBoxShadow, createBoxShadowReset, createColor, createExportCSVAction, createImportCSVAction, creatorThemeModelEditorDefinition, creatorThemeModelPropertyGridDefinition, defaultCreatorThemesOrder, defaultPropertyGridDefinition, defaultStrings, defaultThemesOrder, editableStringRendererName, editorLocalization, enStrings, findParentNode, focusFirstControl, fontsettingsFromCssVariable, fontsettingsToCssVariable, getAcceptedTypesByContentMode, getElementWrapperComponentData, getElementWrapperComponentName, getFirstNonTextElement, getItemValueSeparator, getItemValueWrapperComponentData, getItemValueWrapperComponentName, getLocString, getLocaleStrings, getNextItemText, getNextItemValue, getNextValue, getNodesFromKoComponentInfo, getOS, getPredefinedBackgoundColorsChoices, getPredefinedColorsItemValues, getQuestionContentWrapperComponentName, getQuestionFromObj, getRGBaChannelValues, getRowWrapperComponentData, getRowWrapperComponentName, iconsV1, iconsV2, ignoreUndoRedo, imageMimeTypes, ingectAlpha, initLogicOperator, initialSettingsAllowShowEmptyTitleInDesignMode, initializeDesignTimeSurveyModel, isStringEditable, isTextInput, listComponentCss, editorLocalization as localization, logicCss, notShortCircuitAnd, parseBoxShadow, parseColor, parseRgbaFromString, propertyGridCss, registerAdorner, registerCreatorTheme, registerSurveyTheme, removeAdorners, roundTo2Decimals, saveToFileHandler, scrollElementIntoView, select, setSurveyJSONForPropertyGrid, settings, setupLocale, simulatorDevices, svgBundle, themeModelPropertyGridDefinition, toggleHovered, translationCss, trimBoxShadowValue, trimEmptyFields, undoRedoTransaction, updateBackgroundCornerRadiusJSON, updateFontSettingsJSON, updateShadowEffectsJSON, updateThemeEditorsDefaultFontFamily, updatecoloralphaJSON, wrapTextByCurlyBraces };
37348
37295
  //# sourceMappingURL=survey-creator-core.mjs.map