survey-creator-core 2.3.3 → 2.3.5

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 (142) 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 +1 -1
  9. package/fesm/i18n/finnish.mjs +1 -1
  10. package/fesm/i18n/french.mjs +1 -1
  11. package/fesm/i18n/german.mjs +1 -1
  12. package/fesm/i18n/greek.mjs +1 -1
  13. package/fesm/i18n/haitian-creole.mjs +1 -1
  14. package/fesm/i18n/hebrew.mjs +1 -1
  15. package/fesm/i18n/hungarian.mjs +1 -1
  16. package/fesm/i18n/index.mjs +1 -1
  17. package/fesm/i18n/indonesian.mjs +1 -1
  18. package/fesm/i18n/italian.mjs +1 -1
  19. package/fesm/i18n/japanese.mjs +1 -1
  20. package/fesm/i18n/korean.mjs +1 -1
  21. package/fesm/i18n/malay.mjs +1 -1
  22. package/fesm/i18n/mongolian.mjs +1 -1
  23. package/fesm/i18n/norwegian.mjs +1 -1
  24. package/fesm/i18n/persian.mjs +1 -1
  25. package/fesm/i18n/polish.mjs +1 -1
  26. package/fesm/i18n/portuguese.mjs +1 -1
  27. package/fesm/i18n/romanian.mjs +1 -1
  28. package/fesm/i18n/russian.mjs +1 -1
  29. package/fesm/i18n/simplified-chinese.mjs +1 -1
  30. package/fesm/i18n/slovak.mjs +1 -1
  31. package/fesm/i18n/slovenian.mjs +1 -1
  32. package/fesm/i18n/spanish.mjs +1 -1
  33. package/fesm/i18n/swedish.mjs +1 -1
  34. package/fesm/i18n/tajik.mjs +1 -1
  35. package/fesm/i18n/thai.mjs +1 -1
  36. package/fesm/i18n/traditional-chinese.mjs +1 -1
  37. package/fesm/i18n/turkish.mjs +1 -1
  38. package/fesm/survey-creator-core.i18n.mjs +1 -1
  39. package/fesm/survey-creator-core.mjs +145 -36
  40. package/fesm/survey-creator-core.mjs.map +1 -1
  41. package/fesm/themes/index.mjs +1 -1
  42. package/fonts.fontless.css +1 -1
  43. package/fonts.fontless.min.css +1 -1
  44. package/i18n/arabic.js +1 -1
  45. package/i18n/arabic.min.js.LICENSE.txt +1 -1
  46. package/i18n/bulgarian.js +1 -1
  47. package/i18n/bulgarian.min.js.LICENSE.txt +1 -1
  48. package/i18n/burmese.js +1 -1
  49. package/i18n/burmese.min.js.LICENSE.txt +1 -1
  50. package/i18n/croatian.js +1 -1
  51. package/i18n/croatian.min.js.LICENSE.txt +1 -1
  52. package/i18n/czech.js +1 -1
  53. package/i18n/czech.min.js.LICENSE.txt +1 -1
  54. package/i18n/danish.js +1 -1
  55. package/i18n/danish.min.js.LICENSE.txt +1 -1
  56. package/i18n/dutch.js +1 -1
  57. package/i18n/dutch.min.js.LICENSE.txt +1 -1
  58. package/i18n/english.js +1 -1
  59. package/i18n/english.min.js.LICENSE.txt +1 -1
  60. package/i18n/finnish.js +1 -1
  61. package/i18n/finnish.min.js.LICENSE.txt +1 -1
  62. package/i18n/french.js +1 -1
  63. package/i18n/french.min.js.LICENSE.txt +1 -1
  64. package/i18n/german.js +1 -1
  65. package/i18n/german.min.js.LICENSE.txt +1 -1
  66. package/i18n/greek.js +1 -1
  67. package/i18n/greek.min.js.LICENSE.txt +1 -1
  68. package/i18n/haitian-creole.js +1 -1
  69. package/i18n/haitian-creole.min.js.LICENSE.txt +1 -1
  70. package/i18n/hebrew.js +1 -1
  71. package/i18n/hebrew.min.js.LICENSE.txt +1 -1
  72. package/i18n/hungarian.js +1 -1
  73. package/i18n/hungarian.min.js.LICENSE.txt +1 -1
  74. package/i18n/index.js +1 -1
  75. package/i18n/index.min.js.LICENSE.txt +1 -1
  76. package/i18n/indonesian.js +1 -1
  77. package/i18n/indonesian.min.js.LICENSE.txt +1 -1
  78. package/i18n/italian.js +1 -1
  79. package/i18n/italian.min.js.LICENSE.txt +1 -1
  80. package/i18n/japanese.js +1 -1
  81. package/i18n/japanese.min.js.LICENSE.txt +1 -1
  82. package/i18n/korean.js +1 -1
  83. package/i18n/korean.min.js.LICENSE.txt +1 -1
  84. package/i18n/malay.js +1 -1
  85. package/i18n/malay.min.js.LICENSE.txt +1 -1
  86. package/i18n/mongolian.js +1 -1
  87. package/i18n/mongolian.min.js.LICENSE.txt +1 -1
  88. package/i18n/norwegian.js +1 -1
  89. package/i18n/norwegian.min.js.LICENSE.txt +1 -1
  90. package/i18n/persian.js +1 -1
  91. package/i18n/persian.min.js.LICENSE.txt +1 -1
  92. package/i18n/polish.js +1 -1
  93. package/i18n/polish.min.js.LICENSE.txt +1 -1
  94. package/i18n/portuguese.js +1 -1
  95. package/i18n/portuguese.min.js.LICENSE.txt +1 -1
  96. package/i18n/romanian.js +1 -1
  97. package/i18n/romanian.min.js.LICENSE.txt +1 -1
  98. package/i18n/russian.js +1 -1
  99. package/i18n/russian.min.js.LICENSE.txt +1 -1
  100. package/i18n/simplified-chinese.js +1 -1
  101. package/i18n/simplified-chinese.min.js.LICENSE.txt +1 -1
  102. package/i18n/slovak.js +1 -1
  103. package/i18n/slovak.min.js.LICENSE.txt +1 -1
  104. package/i18n/slovenian.js +1 -1
  105. package/i18n/slovenian.min.js.LICENSE.txt +1 -1
  106. package/i18n/spanish.js +1 -1
  107. package/i18n/spanish.min.js.LICENSE.txt +1 -1
  108. package/i18n/swedish.js +1 -1
  109. package/i18n/swedish.min.js.LICENSE.txt +1 -1
  110. package/i18n/tajik.js +1 -1
  111. package/i18n/tajik.min.js.LICENSE.txt +1 -1
  112. package/i18n/thai.js +1 -1
  113. package/i18n/thai.min.js.LICENSE.txt +1 -1
  114. package/i18n/traditional-chinese.js +1 -1
  115. package/i18n/traditional-chinese.min.js.LICENSE.txt +1 -1
  116. package/i18n/turkish.js +1 -1
  117. package/i18n/turkish.min.js.LICENSE.txt +1 -1
  118. package/package.json +2 -2
  119. package/survey-creator-core.css +32 -26
  120. package/survey-creator-core.fontless.css +31 -25
  121. package/survey-creator-core.fontless.css.map +1 -1
  122. package/survey-creator-core.fontless.min.css +4 -4
  123. package/survey-creator-core.i18n.js +1 -1
  124. package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
  125. package/survey-creator-core.js +154 -37
  126. package/survey-creator-core.js.map +1 -1
  127. package/survey-creator-core.min.css +5 -5
  128. package/survey-creator-core.min.js +1 -1
  129. package/survey-creator-core.min.js.LICENSE.txt +1 -1
  130. package/themes/default-contrast.js +1 -1
  131. package/themes/default-contrast.min.js.LICENSE.txt +1 -1
  132. package/themes/default-dark.js +1 -1
  133. package/themes/default-dark.min.js.LICENSE.txt +1 -1
  134. package/themes/index.js +1 -1
  135. package/themes/index.min.js.LICENSE.txt +1 -1
  136. package/themes/sc2020.js +1 -1
  137. package/themes/sc2020.min.js.LICENSE.txt +1 -1
  138. package/typings/components/search-manager.d.ts +4 -0
  139. package/typings/components/tabs/logic-actions-model.d.ts +4 -1
  140. package/typings/editorLocalization.d.ts +1 -0
  141. package/typings/tabbed-menu.d.ts +1 -0
  142. package/typings/toolbox.d.ts +9 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v2.3.3
2
+ * SurveyJS Creator v2.3.5
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v2.3.3
2
+ * SurveyJS Creator v2.3.5
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
@@ -3220,14 +3220,8 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
3220
3220
  (defaultJsons[type] || []).forEach(function (djson) {
3221
3221
  if (_this.jsonIsCorresponded(djson)) {
3222
3222
  newJson = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, json);
3223
- var objJson_1 = _this.element.toJSON();
3224
- var cleanJson_1 = _this.cleanDefaultsFromJson(type, djson);
3225
3223
  Object.keys(djson).forEach(function (p) {
3226
- if (p != "type" && !newJson[p])
3227
- newJson[p] = undefined;
3228
- });
3229
- Object.keys(json || {}).forEach(function (p) {
3230
- if (p != "type" && !(!objJson_1[p] || cleanJson_1[p]))
3224
+ if (p != "type" && !newJson.hasOwnProperty(p))
3231
3225
  newJson[p] = undefined;
3232
3226
  });
3233
3227
  }
@@ -3899,6 +3893,7 @@ var SearchManager = /** @class */ (function (_super) {
3899
3893
  function SearchManager() {
3900
3894
  var _this = _super.call(this) || this;
3901
3895
  _this.searchActionBar = new survey_core__WEBPACK_IMPORTED_MODULE_1__.ActionContainer();
3896
+ _this._enabled = true;
3902
3897
  _this.initActionBar();
3903
3898
  return _this;
3904
3899
  }
@@ -3930,6 +3925,19 @@ var SearchManager = /** @class */ (function (_super) {
3930
3925
  SearchManager.prototype.clearFilterString = function () {
3931
3926
  this.filterString = "";
3932
3927
  };
3928
+ Object.defineProperty(SearchManager.prototype, "enabled", {
3929
+ get: function () {
3930
+ return this._enabled;
3931
+ },
3932
+ set: function (value) {
3933
+ this._enabled = value;
3934
+ },
3935
+ enumerable: false,
3936
+ configurable: true
3937
+ });
3938
+ SearchManager.prototype.getTabIndex = function () {
3939
+ return this.enabled ? 0 : -1;
3940
+ };
3933
3941
  SearchManager.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
3934
3942
  _super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
3935
3943
  if (name === "filterString") {
@@ -8521,6 +8529,17 @@ var LogicActionModelBase = /** @class */ (function () {
8521
8529
  question.value = !!action && action.logicType == this.logicType ? action.elementName : undefined;
8522
8530
  }
8523
8531
  };
8532
+ LogicActionModelBase.prototype.getDPQuestion = function () {
8533
+ return this.panel.survey.getQuestionByName("panel");
8534
+ };
8535
+ LogicActionModelBase.prototype.updateParentQuestions = function () {
8536
+ var dp = this.getDPQuestion();
8537
+ this.panel.questions.forEach(function (q) {
8538
+ if (!q.parentQuestion) {
8539
+ q.setParentQuestion(dp);
8540
+ }
8541
+ });
8542
+ };
8524
8543
  return LogicActionModelBase;
8525
8544
  }());
8526
8545
 
@@ -8545,9 +8564,8 @@ var LogicActionModel = /** @class */ (function (_super) {
8545
8564
  LogicActionModel.prototype.updateCurrentLogicAction = function (survey) {
8546
8565
  var selectedElement = this.getElementBySelectorName(this.panel);
8547
8566
  var createNewAction = !this.initialLogicAction || this.initialLogicAction.logicType != this.logicType || (!!selectedElement && this.initialLogicAction.element != selectedElement);
8548
- if (!createNewAction) {
8567
+ if (!createNewAction)
8549
8568
  return false;
8550
- }
8551
8569
  this.currentLogicAction = new _logic_items__WEBPACK_IMPORTED_MODULE_4__.SurveyLogicAction(this.logicType, selectedElement, survey);
8552
8570
  return true;
8553
8571
  };
@@ -8587,6 +8605,14 @@ var LogicActionSetValueModel = /** @class */ (function (_super) {
8587
8605
  selectedElement.setValueExpression = this.panel.getQuestionByName("setValueExpression").value;
8588
8606
  }
8589
8607
  };
8608
+ LogicActionSetValueModel.prototype.updateCurrentLogicAction = function (survey) {
8609
+ var selectedElement = this.getElementBySelectorName(this.panel);
8610
+ if (selectedElement && !!selectedElement.setValueExpression) {
8611
+ this.afterUpdateInitialLogicAction();
8612
+ return false;
8613
+ }
8614
+ return _super.prototype.updateCurrentLogicAction.call(this, survey);
8615
+ };
8590
8616
  LogicActionSetValueModel.prototype.setValueExpressionValue = function () {
8591
8617
  var selectedElement = this.getElementBySelectorName(this.panel);
8592
8618
  if (!!selectedElement) {
@@ -8634,6 +8660,7 @@ var LogicActionTriggerModel = /** @class */ (function (_super) {
8634
8660
  this.updateSetValueQuestion(newQuestion);
8635
8661
  }
8636
8662
  }
8663
+ this.updateParentQuestions();
8637
8664
  this.updateVisibilityPanel(triggerEditorPanel);
8638
8665
  tempPanel.dispose();
8639
8666
  };
@@ -8797,10 +8824,15 @@ var LogicActionTriggerModel = /** @class */ (function (_super) {
8797
8824
  });
8798
8825
  }
8799
8826
  triggerEditorPanel.getElementByName(this.logicType.propertyName).visible = false;
8800
- this.updateVisibilityPanel(triggerQuestionsPanel);
8801
- this.updatePanelQuestionsValue(triggerQuestionsPanel);
8802
- this.updateVisibilityPanel(triggerEditorPanel);
8803
- this.updatePanelQuestionsValue(triggerEditorPanel);
8827
+ [triggerQuestionsPanel, triggerEditorPanel].forEach(function (panel) {
8828
+ _this.updateVisibilityPanel(panel);
8829
+ _this.updatePanelQuestionsValue(panel);
8830
+ });
8831
+ this.updateParentQuestions();
8832
+ var setValueQ = triggerEditorPanel.getQuestionByName("setValue");
8833
+ if (!!setValueQ) {
8834
+ this.updateSetValueQuestion(setValueQ);
8835
+ }
8804
8836
  var questions = this.getQuestions();
8805
8837
  if (!!questions && !!selectedElement) {
8806
8838
  questions.forEach(function (question) {
@@ -9030,7 +9062,7 @@ var LogicItemEditor = /** @class */ (function (_super) {
9030
9062
  if (!_this.options) {
9031
9063
  _this.options = new _creator_settings__WEBPACK_IMPORTED_MODULE_2__.EmptySurveyCreatorOptions();
9032
9064
  }
9033
- _this.editSurvey.onDynamicPanelItemValueChanged.add(function (sender, options) {
9065
+ _this.editSurvey.onDynamicPanelValueChanged.add(function (sender, options) {
9034
9066
  if (options.name == "logicTypeName") {
9035
9067
  _this.onLogicTypeChanged(options.panel);
9036
9068
  }
@@ -9074,7 +9106,7 @@ var LogicItemEditor = /** @class */ (function (_super) {
9074
9106
  _this.editSurvey.onValueChanged.add(function (sender, options) {
9075
9107
  _this.onValueChanged(options);
9076
9108
  });
9077
- _this.editSurvey.onDynamicPanelItemValueChanged.add(function (sender, options) {
9109
+ _this.editSurvey.onDynamicPanelValueChanged.add(function (sender, options) {
9078
9110
  var _a;
9079
9111
  var q = options.panel.getQuestionByName(options.name);
9080
9112
  if (!!q && ((_a = q.parent) === null || _a === void 0 ? void 0 : _a.name) === "triggerEditorPanel") {
@@ -17154,6 +17186,9 @@ var TranslationItem = /** @class */ (function (_super) {
17154
17186
  return placeholderText;
17155
17187
  };
17156
17188
  TranslationItem.prototype.getTextForExport = function (loc) {
17189
+ var val = this.hashValues[loc];
17190
+ if (!!val && !!val.text)
17191
+ return val.text;
17157
17192
  var res = this.locString.getLocaleText(loc);
17158
17193
  if (!!res)
17159
17194
  return res;
@@ -18861,6 +18896,8 @@ var ToolboxToolViewModel = /** @class */ (function (_super) {
18861
18896
  _this.click = function (event) {
18862
18897
  if (!_this.allowAdd)
18863
18898
  return;
18899
+ if (!_this.toolboxItem.enabled)
18900
+ return;
18864
18901
  _this.creator.clickToolboxItem(_this.item.json);
18865
18902
  _this.hidePopup();
18866
18903
  };
@@ -18870,6 +18907,8 @@ var ToolboxToolViewModel = /** @class */ (function (_super) {
18870
18907
  document.removeEventListener("pointerup", _this.onPointerUp);
18871
18908
  };
18872
18909
  _this.startDragToolboxItem = function (pointerDownEvent) {
18910
+ if (!_this.toolboxItem.enabled)
18911
+ return;
18873
18912
  var json = _this.creator.getJSONForNewElement(_this.item.json);
18874
18913
  _this.dragDropHelper.startDragToolboxItem(pointerDownEvent, json, _this.item);
18875
18914
  return true;
@@ -18889,6 +18928,9 @@ var ToolboxToolViewModel = /** @class */ (function (_super) {
18889
18928
  popup.isFocusedContent = false;
18890
18929
  }
18891
18930
  }
18931
+ if (typeof item.enabled === "undefined") {
18932
+ item.enabled = true;
18933
+ }
18892
18934
  return _this;
18893
18935
  }
18894
18936
  Object.defineProperty(ToolboxToolViewModel.prototype, "toolboxItem", {
@@ -26706,6 +26748,11 @@ var EditorLocalization = /** @class */ (function () {
26706
26748
  enumerable: false,
26707
26749
  configurable: true
26708
26750
  });
26751
+ Object.defineProperty(EditorLocalization.prototype, "locale", {
26752
+ get: function () { return this.currentLocale || this.defaultLocale; },
26753
+ enumerable: false,
26754
+ configurable: true
26755
+ });
26709
26756
  Object.defineProperty(EditorLocalization.prototype, "presetStrings", {
26710
26757
  get: function () { return this.presetStringsValues; },
26711
26758
  set: function (val) {
@@ -26967,12 +27014,9 @@ var EditorLocalization = /** @class */ (function () {
26967
27014
  return this.convertToCamelCase(propName);
26968
27015
  };
26969
27016
  EditorLocalization.prototype.getPropertyValueInEditor = function (propName, value) {
26970
- var loc = this.getLocale();
26971
- if (!!loc && !!loc.pv && !!loc.pv[propName]) {
26972
- var res = loc.pv[propName][value];
26973
- if (!!res)
26974
- return res;
26975
- }
27017
+ var res = this.getStringByPath(["pv", propName, value]);
27018
+ if (!!res && res !== value)
27019
+ return res;
26976
27020
  return this.getPropertyValue(value);
26977
27021
  };
26978
27022
  EditorLocalization.prototype.getPropertyValue = function (value, locale) {
@@ -36802,7 +36846,7 @@ var ConditionEditor = /** @class */ (function (_super) {
36802
36846
  if (_this.panel.panelCount > 0)
36803
36847
  _this.panel.panels[0].getQuestionByName("questionName").titleLocation = "left";
36804
36848
  });
36805
- _this.editSurvey.onDynamicPanelItemValueChanged.add(function (sender, options) {
36849
+ _this.editSurvey.onDynamicPanelValueChanged.add(function (sender, options) {
36806
36850
  _this.onPanelValueChanged(options.panel, options.name);
36807
36851
  });
36808
36852
  _this.editSurvey.css = _components_tabs_logic_theme__WEBPACK_IMPORTED_MODULE_7__.logicCss;
@@ -38994,9 +39038,13 @@ var PropertyJSONGenerator = /** @class */ (function () {
38994
39038
  if (!!this.parentProperty) {
38995
39039
  titleClass += "@" + this.parentProperty.name;
38996
39040
  }
38997
- if (this.obj.getType() === "matrixdropdowncolumn" && this.obj.getDynamicType() !== "question") {
38998
- if (!survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.findProperty(this.obj.getType(), prop.name)) {
38999
- titleClass = this.obj.getDynamicType();
39041
+ var dynamicFunc = this.obj.getDynamicType;
39042
+ var isDynamicFunc = !!dynamicFunc && typeof dynamicFunc === "function";
39043
+ if (isDynamicFunc) {
39044
+ var dType = this.obj.getDynamicType();
39045
+ if (dType !== "question" && !survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.findProperty(this.obj.getType(), prop.name) &&
39046
+ survey_core__WEBPACK_IMPORTED_MODULE_1__.Serializer.findProperty(dType, prop.name)) {
39047
+ titleClass = dType;
39000
39048
  }
39001
39049
  }
39002
39050
  return _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.getPropertyNameInEditor(titleClass, prop.name);
@@ -43201,6 +43249,28 @@ var defaultProperties = {
43201
43249
  ],
43202
43250
  tabs: [{ name: "rateValues", index: 5 }]
43203
43251
  },
43252
+ "matrixdropdowncolumn@slider": {
43253
+ properties: [
43254
+ { name: "sliderType", tab: "sliderSettings" },
43255
+ { name: "min", tab: "sliderSettings" },
43256
+ { name: "max", tab: "sliderSettings" },
43257
+ { name: "step", tab: "sliderSettings" },
43258
+ { name: "minRangeLength", tab: "sliderSettings" },
43259
+ { name: "maxRangeLength", tab: "sliderSettings" },
43260
+ { name: "showLabels", tab: "sliderSettings" },
43261
+ { name: "autoGenerate", tab: "sliderSettings" },
43262
+ { name: "labelCount", tab: "sliderSettings" },
43263
+ { name: "customLabels", tab: "sliderSettings" },
43264
+ { name: "labelFormat", tab: "sliderSettings" },
43265
+ { name: "tooltipVisibilityPG", tab: "sliderSettings" },
43266
+ { name: "tooltipFormat", tab: "sliderSettings" },
43267
+ { name: "allowSwap", tab: "sliderSettings" },
43268
+ { name: "allowClear", tab: "sliderSettings" },
43269
+ { name: "minValueExpression", tab: "logic", index: 410 },
43270
+ { name: "maxValueExpression", tab: "logic", index: 420 },
43271
+ ],
43272
+ tabs: [{ name: "sliderSettings", index: 10 }]
43273
+ },
43204
43274
  multipletextitem: {
43205
43275
  properties: [
43206
43276
  "name",
@@ -44888,7 +44958,9 @@ __webpack_require__.r(__webpack_exports__);
44888
44958
  var TabbedMenuItem = /** @class */ (function (_super) {
44889
44959
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(TabbedMenuItem, _super);
44890
44960
  function TabbedMenuItem(item) {
44891
- return _super.call(this, item) || this;
44961
+ var _this = _super.call(this, item) || this;
44962
+ _this.enabled = true;
44963
+ return _this;
44892
44964
  }
44893
44965
  TabbedMenuItem.prototype.getRootCss = function () {
44894
44966
  return new survey_core__WEBPACK_IMPORTED_MODULE_1__.CssClassBuilder()
@@ -44920,6 +44992,12 @@ var TabbedMenuItem = /** @class */ (function (_super) {
44920
44992
  enumerable: false,
44921
44993
  configurable: true
44922
44994
  });
44995
+ TabbedMenuItem.prototype.doAction = function () {
44996
+ if (!this.enabled)
44997
+ return false;
44998
+ this.action();
44999
+ return true;
45000
+ };
44923
45001
  return TabbedMenuItem;
44924
45002
  }(survey_core__WEBPACK_IMPORTED_MODULE_1__.Action));
44925
45003
 
@@ -44938,9 +45016,11 @@ var TabbedMenuContainer = /** @class */ (function (_super) {
44938
45016
  return _this;
44939
45017
  }
44940
45018
  TabbedMenuContainer.prototype.addTab = function (name, plugin, title, iconName, componentName, index) {
44941
- var _this = this;
44942
45019
  var tabName = name === "test" ? "preview" : name;
44943
45020
  var locStrName = !title ? "tabs." + tabName : (title.indexOf("ed.") == 0 ? title : "");
45021
+ var actionHandler = function (name) {
45022
+ this.creator.switchTab(name);
45023
+ };
44944
45024
  var tab = new TabbedMenuItem({
44945
45025
  id: name,
44946
45026
  locTitleName: locStrName,
@@ -44948,7 +45028,7 @@ var TabbedMenuContainer = /** @class */ (function (_super) {
44948
45028
  componentContent: componentName ? componentName : "svc-tab-" + name,
44949
45029
  data: plugin,
44950
45030
  iconName: iconName || "icon-undefined-24x24",
44951
- action: function () { _this.creator.switchTab(name); },
45031
+ action: actionHandler.bind(this, name),
44952
45032
  active: this.creator.viewType === name,
44953
45033
  disableHide: this.creator.viewType === name
44954
45034
  });
@@ -45805,9 +45885,12 @@ var QuestionToolbox = /** @class */ (function (_super) {
45805
45885
  title: survey_core__WEBPACK_IMPORTED_MODULE_1__.surveyLocalization.getString("ed.toolboxSearch"),
45806
45886
  showTitle: false,
45807
45887
  action: function () {
45888
+ if (!_this.enabled)
45889
+ return;
45808
45890
  _this.rootElement.querySelector("input").focus();
45809
45891
  _this.isFocused = true;
45810
- }
45892
+ },
45893
+ enabled: _this.enabled
45811
45894
  });
45812
45895
  _this.updateResponsiveness(_this.isCompact, _this.overflowBehavior);
45813
45896
  _this.createDefaultItems(supportedQuestions, useDefaultCategories);
@@ -45918,13 +46001,15 @@ var QuestionToolbox = /** @class */ (function (_super) {
45918
46001
  this.dotsItem.popupModel.verticalPosition = "top";
45919
46002
  this.dragOrClickHelper = new survey_core__WEBPACK_IMPORTED_MODULE_1__.DragOrClickHelper(function (pointerDownEvent, _targets, itemModel) {
45920
46003
  var _a;
46004
+ if (!_this.enabled)
46005
+ return;
45921
46006
  var json = _this.creator.getJSONForNewElement(itemModel.json);
45922
46007
  _this.dotsItem.popupModel.hide();
45923
46008
  (_a = _this.creator) === null || _a === void 0 ? void 0 : _a.onDragDropItemStart();
45924
46009
  _this.dragDropHelper.startDragToolboxItem(pointerDownEvent, json, itemModel);
45925
46010
  }, false);
45926
46011
  this.hiddenItemsListModel.onPointerDown = function (pointerDownEvent, item) {
45927
- if (!_this.creator.readOnly) {
46012
+ if (!_this.creator.readOnly && _this.enabled) {
45928
46013
  _this.dragOrClickHelper.onPointerDown(pointerDownEvent, item);
45929
46014
  }
45930
46015
  };
@@ -46007,7 +46092,9 @@ var QuestionToolbox = /** @class */ (function (_super) {
46007
46092
  .append("svc-toolbox--flyout-to-compact-running", this.isFlyoutToCompactRunning)
46008
46093
  .append("svc-toolbox--compact", this.isCompactRendered)
46009
46094
  .append("svc-toolbox--flyout", this.isCompact && this.isFocused)
46010
- .append("svc-toolbox--scrollable", this.overflowBehavior == "scroll").toString();
46095
+ .append("svc-toolbox--scrollable", this.overflowBehavior == "scroll")
46096
+ .append("svc-toolbox--disabled", !this.enabled)
46097
+ .toString();
46011
46098
  },
46012
46099
  enumerable: false,
46013
46100
  configurable: true
@@ -46182,6 +46269,9 @@ var QuestionToolbox = /** @class */ (function (_super) {
46182
46269
  this.onItemsChanged();
46183
46270
  };
46184
46271
  QuestionToolbox.prototype.correctItem = function (item) {
46272
+ if (!item.id)
46273
+ item.id = item.name;
46274
+ this.updateActionTitle(item);
46185
46275
  if (!item.title)
46186
46276
  item.title = item.name;
46187
46277
  if (!item.tooltip)
@@ -46339,8 +46429,21 @@ var QuestionToolbox = /** @class */ (function (_super) {
46339
46429
  });
46340
46430
  };
46341
46431
  QuestionToolbox.prototype.updateActionTitle = function (action) {
46342
- var newTitle = _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.getString("qt." + action.id);
46343
- if (!!newTitle && newTitle !== action.id) {
46432
+ var newTitle = "";
46433
+ var titles = action["titles"];
46434
+ if (!!titles) {
46435
+ newTitle = titles[_editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.locale];
46436
+ if (!newTitle) {
46437
+ newTitle = titles["default"];
46438
+ }
46439
+ }
46440
+ if (!newTitle) {
46441
+ newTitle = _editorLocalization__WEBPACK_IMPORTED_MODULE_2__.editorLocalization.getString("qt." + action.id);
46442
+ if (newTitle === action.id) {
46443
+ newTitle = "";
46444
+ }
46445
+ }
46446
+ if (!!newTitle) {
46344
46447
  action.title = newTitle;
46345
46448
  action.tooltip = newTitle;
46346
46449
  }
@@ -46776,10 +46879,12 @@ var QuestionToolbox = /** @class */ (function (_super) {
46776
46879
  }
46777
46880
  delete elementJson.name;
46778
46881
  var category = json.category ? json.category : "";
46882
+ var titles = typeof json.title === "object" ? json.title : undefined;
46779
46883
  var item = new survey_core__WEBPACK_IMPORTED_MODULE_1__.Action({
46780
46884
  id: json.name,
46781
46885
  name: json.name,
46782
46886
  iconName: iconName,
46887
+ titles: titles,
46783
46888
  title: title,
46784
46889
  tooltip: title,
46785
46890
  className: QuestionToolboxItem.getItemClassNames(iconName),
@@ -46787,7 +46892,9 @@ var QuestionToolbox = /** @class */ (function (_super) {
46787
46892
  isCopied: false,
46788
46893
  category: category
46789
46894
  });
46790
- return this.getOrCreateToolboxItem(item);
46895
+ var res = this.getOrCreateToolboxItem(item);
46896
+ this.updateActionTitle(res);
46897
+ return res;
46791
46898
  };
46792
46899
  QuestionToolbox.prototype.getTitleFromJsonTitle = function (title, name) {
46793
46900
  if (!title)
@@ -46933,6 +47040,16 @@ var QuestionToolbox = /** @class */ (function (_super) {
46933
47040
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
46934
47041
  (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.property)({ defaultValue: true })
46935
47042
  ], QuestionToolbox.prototype, "showSeparators", void 0);
47043
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
47044
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.property)({
47045
+ defaultValue: true,
47046
+ onSet: function (val, target) {
47047
+ target.items.forEach(function (i) { return i.enabled = val; });
47048
+ target.searchManager.enabled = val;
47049
+ target.searchItem.enabled = val;
47050
+ }
47051
+ })
47052
+ ], QuestionToolbox.prototype, "enabled", void 0);
46936
47053
  return QuestionToolbox;
46937
47054
  }(survey_core__WEBPACK_IMPORTED_MODULE_1__.AdaptiveActionContainer));
46938
47055
 
@@ -48736,7 +48853,7 @@ __webpack_require__.r(__webpack_exports__);
48736
48853
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! survey-core */ "survey-core");
48737
48854
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_116___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_116__);
48738
48855
  var Version;
48739
- Version = "".concat("2.3.3");
48856
+ Version = "".concat("2.3.5");
48740
48857
  //should be loaded before other styles for easier override
48741
48858
 
48742
48859
 
@@ -48858,7 +48975,7 @@ Version = "".concat("2.3.3");
48858
48975
 
48859
48976
 
48860
48977
 
48861
- (0,survey_core__WEBPACK_IMPORTED_MODULE_116__.checkLibraryVersion)("".concat("2.3.3"), "survey-creator-core");
48978
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_116__.checkLibraryVersion)("".concat("2.3.5"), "survey-creator-core");
48862
48979
 
48863
48980
  })();
48864
48981