survey-creator-core 1.11.5 → 1.11.7

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 (91) hide show
  1. package/fonts.fontless.css +1 -1
  2. package/fonts.fontless.min.css +1 -1
  3. package/i18n/arabic.js +1 -1
  4. package/i18n/arabic.min.js +1 -1
  5. package/i18n/bulgarian.js +1 -1
  6. package/i18n/bulgarian.min.js +1 -1
  7. package/i18n/croatian.js +1 -1
  8. package/i18n/croatian.min.js +1 -1
  9. package/i18n/czech.js +1 -1
  10. package/i18n/czech.min.js +1 -1
  11. package/i18n/danish.js +1 -1
  12. package/i18n/danish.min.js +1 -1
  13. package/i18n/dutch.js +1 -1
  14. package/i18n/dutch.min.js +1 -1
  15. package/i18n/english.js +7 -3
  16. package/i18n/english.js.map +1 -1
  17. package/i18n/english.min.js +2 -2
  18. package/i18n/finnish.js +1 -1
  19. package/i18n/finnish.min.js +1 -1
  20. package/i18n/french.js +1 -1
  21. package/i18n/french.min.js +1 -1
  22. package/i18n/german.js +1 -1
  23. package/i18n/german.min.js +1 -1
  24. package/i18n/hebrew.js +1 -1
  25. package/i18n/hebrew.min.js +1 -1
  26. package/i18n/hungarian.js +1 -1
  27. package/i18n/hungarian.min.js +1 -1
  28. package/i18n/index.js +1 -1
  29. package/i18n/index.min.js +1 -1
  30. package/i18n/indonesian.js +1 -1
  31. package/i18n/indonesian.min.js +1 -1
  32. package/i18n/italian.js +1 -1
  33. package/i18n/italian.min.js +1 -1
  34. package/i18n/japanese.js +1 -1
  35. package/i18n/japanese.min.js +1 -1
  36. package/i18n/korean.js +1 -1
  37. package/i18n/korean.min.js +1 -1
  38. package/i18n/malay.js +1 -1
  39. package/i18n/malay.min.js +1 -1
  40. package/i18n/mongolian.js +1 -1
  41. package/i18n/mongolian.min.js +1 -1
  42. package/i18n/norwegian.js +1 -1
  43. package/i18n/norwegian.min.js +1 -1
  44. package/i18n/persian.js +1 -1
  45. package/i18n/persian.min.js +1 -1
  46. package/i18n/polish.js +1 -1
  47. package/i18n/polish.min.js +1 -1
  48. package/i18n/portuguese.js +1 -1
  49. package/i18n/portuguese.min.js +1 -1
  50. package/i18n/russian.js +1 -1
  51. package/i18n/russian.min.js +1 -1
  52. package/i18n/simplified-chinese.js +1 -1
  53. package/i18n/simplified-chinese.min.js +1 -1
  54. package/i18n/slovak.js +1 -1
  55. package/i18n/slovak.min.js +1 -1
  56. package/i18n/spanish.js +1 -1
  57. package/i18n/spanish.min.js +1 -1
  58. package/i18n/swedish.js +1 -1
  59. package/i18n/swedish.min.js +1 -1
  60. package/i18n/tajik.js +1 -1
  61. package/i18n/tajik.min.js +1 -1
  62. package/i18n/traditional-chinese.js +1 -1
  63. package/i18n/traditional-chinese.min.js +1 -1
  64. package/i18n/turkish.js +1 -1
  65. package/i18n/turkish.min.js +1 -1
  66. package/package.json +2 -2
  67. package/survey-creator-core.css +247 -39
  68. package/survey-creator-core.fontless.css +246 -38
  69. package/survey-creator-core.fontless.css.map +1 -1
  70. package/survey-creator-core.fontless.min.css +10 -10
  71. package/survey-creator-core.i18n.js +1 -1
  72. package/survey-creator-core.i18n.min.js +1 -1
  73. package/survey-creator-core.js +653 -186
  74. package/survey-creator-core.js.map +1 -1
  75. package/survey-creator-core.min.css +11 -11
  76. package/survey-creator-core.min.js +4 -4
  77. package/typings/components/action-container-view-model.d.ts +9 -1
  78. package/typings/components/question.d.ts +4 -2
  79. package/typings/components/tabs/designer-plugin.d.ts +2 -0
  80. package/typings/components/tabs/designer-state-manager.d.ts +17 -0
  81. package/typings/components/tabs/theme-plugin.d.ts +2 -0
  82. package/typings/components/toolbox/toolbox-tool.d.ts +8 -4
  83. package/typings/creator-base.d.ts +30 -6
  84. package/typings/creator-events-api.d.ts +21 -20
  85. package/typings/creator-options.d.ts +12 -0
  86. package/typings/editorLocalization.d.ts +4 -0
  87. package/typings/localization/english.d.ts +4 -0
  88. package/typings/property-grid/index.d.ts +6 -0
  89. package/typings/questionconverter.d.ts +2 -1
  90. package/typings/survey-helper.d.ts +1 -0
  91. package/typings/toolbox.d.ts +133 -86
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v1.11.5
2
+ * SurveyJS Creator v1.11.7
3
3
  * (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -130,7 +130,7 @@ License: MIT
130
130
  /***/ (function(module, exports, __webpack_require__) {
131
131
 
132
132
  /*!
133
- * surveyjs - Survey JavaScript library v1.11.5
133
+ * surveyjs - Survey JavaScript library v1.11.7
134
134
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
135
135
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
136
136
  */
@@ -4704,9 +4704,12 @@ var SurveyElementActionContainer = /** @class */ (function (_super) {
4704
4704
  var SurveyElementAdornerBase = /** @class */ (function (_super) {
4705
4705
  Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SurveyElementAdornerBase, _super);
4706
4706
  function SurveyElementAdornerBase(creator, surveyElement) {
4707
+ var _a, _b, _c;
4707
4708
  var _this = _super.call(this) || this;
4708
4709
  _this.creator = creator;
4709
4710
  _this.surveyElement = surveyElement;
4711
+ _this.designerStateManager = (_a = creator.getPlugin("designer")) === null || _a === void 0 ? void 0 : _a.designerStateManager;
4712
+ (_b = _this.designerStateManager) === null || _b === void 0 ? void 0 : _b.initForElement(surveyElement);
4710
4713
  _this.selectedPropPageFunc = function (sender, options) {
4711
4714
  if (options.name === "isSelectedInDesigner") {
4712
4715
  _this.onElementSelectedChanged(options.newValue);
@@ -4720,6 +4723,17 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
4720
4723
  _this.actionContainer = new SurveyElementActionContainer();
4721
4724
  _this.actionContainer.dotsItem.iconSize = 16;
4722
4725
  _this.actionContainer.dotsItem.popupModel.horizontalPosition = "center";
4726
+ _this.topActionContainer = new survey_core__WEBPACK_IMPORTED_MODULE_1__["ActionContainer"]();
4727
+ _this.topActionContainer.sizeMode = "small";
4728
+ _this.topActionContainer.setItems([{
4729
+ id: "collapse",
4730
+ iconName: new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return _this.collapsed ? "icon-restore_16x16" : "icon-collapse-detail-light_16x16"; }),
4731
+ iconSize: 16,
4732
+ action: function () {
4733
+ _this.collapsed = !_this.collapsed;
4734
+ }
4735
+ }]);
4736
+ _this.collapsed = !!surveyElement && ((_c = _this.designerStateManager) === null || _c === void 0 ? void 0 : _c.getElementState(surveyElement).collapsed);
4723
4737
  _this.setSurveyElement(surveyElement);
4724
4738
  _this.creator.sidebar.onPropertyChanged.add(_this.sidebarFlyoutModeChangedFunc);
4725
4739
  _this.setShowAddQuestionButton(true);
@@ -4816,9 +4830,8 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
4816
4830
  title: this.creator.getLocString("survey.duplicate"),
4817
4831
  visibleIndex: 10,
4818
4832
  iconSize: 16,
4819
- action: function () {
4820
- _this.duplicate();
4821
- }
4833
+ action: function () { return _this.duplicate(); },
4834
+ onFocus: function (isMouse, event) { return _this.disableActionFocusing(isMouse, event); }
4822
4835
  }));
4823
4836
  items.push(new survey_core__WEBPACK_IMPORTED_MODULE_1__["Action"]({
4824
4837
  id: "settings",
@@ -4845,9 +4858,18 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
4845
4858
  iconSize: 16,
4846
4859
  action: function () {
4847
4860
  _this.delete();
4848
- }
4861
+ },
4862
+ onFocus: function (isMouse, event) { return _this.disableActionFocusing(isMouse, event); }
4849
4863
  }));
4850
4864
  };
4865
+ SurveyElementAdornerBase.prototype.disableActionFocusing = function (isMouse, event) {
4866
+ this.isDisableSelecting = isMouse;
4867
+ };
4868
+ SurveyElementAdornerBase.prototype.canSelectElement = function () {
4869
+ var res = !this.isDisableSelecting;
4870
+ this.isDisableSelecting = false;
4871
+ return res;
4872
+ };
4851
4873
  Object.defineProperty(SurveyElementAdornerBase.prototype, "allowEdit", {
4852
4874
  get: function () {
4853
4875
  return !!this.creator && !this.creator.readOnly && this.allowEditOption;
@@ -4872,6 +4894,23 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
4872
4894
  Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
4873
4895
  Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
4874
4896
  ], SurveyElementAdornerBase.prototype, "allowDragging", void 0);
4897
+ Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
4898
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])({
4899
+ onSet: function (val, target) {
4900
+ target.renderedCollapsed = val;
4901
+ if (target.designerStateManager && target.surveyElement) {
4902
+ target.designerStateManager.getElementState(target.surveyElement).collapsed = val;
4903
+ }
4904
+ setTimeout(function () {
4905
+ target.creator.survey.pages.forEach(function (p) { return p.ensureRowsVisibility(); });
4906
+ target.creator.survey.getAllPanels().forEach(function (p) { return p.ensureRowsVisibility(); });
4907
+ }, 50);
4908
+ }
4909
+ })
4910
+ ], SurveyElementAdornerBase.prototype, "collapsed", void 0);
4911
+ Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
4912
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])()
4913
+ ], SurveyElementAdornerBase.prototype, "renderedCollapsed", void 0);
4875
4914
  return SurveyElementAdornerBase;
4876
4915
  }(survey_core__WEBPACK_IMPORTED_MODULE_1__["Base"]));
4877
4916
 
@@ -7032,6 +7071,7 @@ __webpack_require__.r(__webpack_exports__);
7032
7071
  /* harmony import */ var _action_container_view_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./action-container-view-model */ "./src/components/action-container-view-model.ts");
7033
7072
  /* harmony import */ var _creator_settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../creator-settings */ "./src/creator-settings.ts");
7034
7073
  /* harmony import */ var _string_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./string-editor */ "./src/components/string-editor.ts");
7074
+ /* harmony import */ var _toolbox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../toolbox */ "./src/toolbox.ts");
7035
7075
 
7036
7076
 
7037
7077
 
@@ -7041,6 +7081,7 @@ __webpack_require__.r(__webpack_exports__);
7041
7081
  __webpack_require__(/*! ./question.scss */ "./src/components/question.scss");
7042
7082
 
7043
7083
 
7084
+
7044
7085
  var QuestionAdornerViewModel = /** @class */ (function (_super) {
7045
7086
  Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(QuestionAdornerViewModel, _super);
7046
7087
  function QuestionAdornerViewModel(creator, surveyElement, templateData) {
@@ -7077,10 +7118,12 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
7077
7118
  enumerable: false,
7078
7119
  configurable: true
7079
7120
  });
7121
+ QuestionAdornerViewModel.prototype.canSelectElement = function () {
7122
+ return _super.prototype.canSelectElement.call(this) && this.surveyElement.isInteractiveDesignElement;
7123
+ };
7080
7124
  QuestionAdornerViewModel.prototype.select = function (model, event) {
7081
- if (!model.surveyElement.isInteractiveDesignElement) {
7125
+ if (!model.canSelectElement())
7082
7126
  return;
7083
- }
7084
7127
  var creator = model.creator;
7085
7128
  var selEl = model.surveyElement;
7086
7129
  var el = document === null || document === void 0 ? void 0 : document.activeElement;
@@ -7093,7 +7136,11 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
7093
7136
  return true;
7094
7137
  };
7095
7138
  QuestionAdornerViewModel.prototype.rootCss = function () {
7096
- return this.surveyElement.isQuestion && !this.surveyElement.startWithNewLine ? " svc-question__adorner--start-with-new-line" : "";
7139
+ var isStartWithNewLine = this.surveyElement.isQuestion && !this.surveyElement.startWithNewLine;
7140
+ return new survey_core__WEBPACK_IMPORTED_MODULE_1__["CssClassBuilder"]()
7141
+ .append("svc-question__adorner--start-with-new-line", isStartWithNewLine)
7142
+ .append("svc-question__adorner--collapse-" + this.creator.expandCollapseButtonVisibility, true)
7143
+ .append("svc-question__adorner--collapsed", !!this.renderedCollapsed).toString();
7097
7144
  };
7098
7145
  QuestionAdornerViewModel.prototype.css = function () {
7099
7146
  if (!this.surveyElement.isInteractiveDesignElement)
@@ -7342,7 +7389,7 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
7342
7389
  QuestionAdornerViewModel.prototype.onPointerDown = function (pointerDownEvent) {
7343
7390
  this.dragOrClickHelper.onPointerDown(pointerDownEvent);
7344
7391
  };
7345
- QuestionAdornerViewModel.prototype.getConvertToTypesActions = function () {
7392
+ QuestionAdornerViewModel.prototype.getConvertToTypes = function () {
7346
7393
  var _this = this;
7347
7394
  var availableItems = this.creator.getAvailableToolboxItems(this.element, false);
7348
7395
  var itemNames = [];
@@ -7353,19 +7400,36 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
7353
7400
  });
7354
7401
  var convertClasses = _questionconverter__WEBPACK_IMPORTED_MODULE_3__["QuestionConverter"].getConvertToClasses(this.currentType, itemNames, true);
7355
7402
  var res = [];
7356
- var lastItem = null;
7357
7403
  convertClasses.forEach(function (className) {
7358
7404
  var items = _this.creator.toolbox.items.filter(function (item) { return item.name == className; });
7359
7405
  if (Array.isArray(items) && items.length > 0) {
7360
7406
  var item = items[0];
7361
- var needSeparator = lastItem && item.category != lastItem.category;
7362
- var action = _this.creator.createIActionBarItemByClass(item.name, item.title, item.iconName, needSeparator);
7363
- lastItem = item;
7364
- res.push(action);
7407
+ res.push(item);
7365
7408
  }
7366
7409
  });
7367
7410
  return res;
7368
7411
  };
7412
+ QuestionAdornerViewModel.prototype.getConvertToTypesActions = function (parentAction) {
7413
+ var _this = this;
7414
+ var availableItems = this.getConvertToTypes();
7415
+ var res = [];
7416
+ var lastItem = null;
7417
+ availableItems.forEach(function (item) {
7418
+ var needSeparator = lastItem && item.category != lastItem.category;
7419
+ var action = _this.creator.createIActionBarItemByClass(item, needSeparator, function (questionType, subtype) {
7420
+ if (_this.surveyElement.getType() !== questionType) {
7421
+ _this.creator.convertCurrentQuestion(questionType);
7422
+ }
7423
+ var propertyName = _toolbox__WEBPACK_IMPORTED_MODULE_8__["QuestionToolbox"].getSubTypePropertyName(questionType);
7424
+ if (!!propertyName && !!subtype)
7425
+ _this.creator.selectedElement.setPropertyValue(propertyName, subtype);
7426
+ parentAction === null || parentAction === void 0 ? void 0 : parentAction.hidePopup();
7427
+ });
7428
+ lastItem = item;
7429
+ res.push(action);
7430
+ });
7431
+ return res;
7432
+ };
7369
7433
  Object.defineProperty(QuestionAdornerViewModel.prototype, "currentType", {
7370
7434
  get: function () {
7371
7435
  return this.surveyElement.getType();
@@ -7387,46 +7451,62 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
7387
7451
  title: actionTitle,
7388
7452
  iconName: (_a = this.creator.toolbox.getItemByName(this.element.getType())) === null || _a === void 0 ? void 0 : _a.iconName
7389
7453
  };
7390
- var newAction = this.createDropdownModel(actionData, actions, function (listModel) {
7391
- var newItems = _this.getConvertToTypesActions();
7392
- listModel.setItems(newItems);
7393
- listModel.selectedItem = _this.getSelectedItem(newItems, _this.currentType);
7394
- }, function (item) {
7395
- _this.creator.convertCurrentQuestion(item.id);
7454
+ var newAction = this.createDropdownModel({
7455
+ actionData: actionData,
7456
+ items: actions,
7457
+ updateListModel: function (listModel) {
7458
+ var newItems = _this.getConvertToTypesActions(newAction);
7459
+ listModel.setItems(newItems);
7460
+ listModel.selectedItem = _this.getSelectedItem(newItems, _this.currentType);
7461
+ var propertyName = _toolbox__WEBPACK_IMPORTED_MODULE_8__["QuestionToolbox"].getSubTypePropertyName(_this.currentType);
7462
+ newItems.forEach(function (action) {
7463
+ var _a;
7464
+ if (((_a = action.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
7465
+ var selectedSubItem = action.items.filter(function (item) { return item.id === _this.element[propertyName]; })[0];
7466
+ if (selectedSubItem) {
7467
+ var _listModel = action.popupModel.contentComponentData.model;
7468
+ _listModel.selectedItem = selectedSubItem;
7469
+ }
7470
+ }
7471
+ });
7472
+ }
7396
7473
  });
7474
+ newAction.disableHide = true;
7397
7475
  return newAction;
7398
7476
  };
7399
7477
  QuestionAdornerViewModel.prototype.createConvertInputType = function () {
7400
7478
  var _this = this;
7401
- var prop = null;
7402
- if (this.surveyElement.getType() === "text")
7403
- prop = survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty("text", "inputType");
7404
- if (this.surveyElement.getType() === "rating")
7405
- prop = survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty("rating", "rateDisplayMode");
7406
- if (!prop || !Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["isPropertyVisible"])(this.surveyElement, prop.name))
7479
+ var questionType = this.surveyElement.getType();
7480
+ var toolboxItem = this.creator.toolbox.items.filter(function (item) { return item.id === questionType; })[0];
7481
+ if (!toolboxItem || !toolboxItem.items || toolboxItem.items.length < 1)
7407
7482
  return null;
7408
- var propName = prop.name;
7483
+ var propName = _toolbox__WEBPACK_IMPORTED_MODULE_8__["QuestionToolbox"].getSubTypePropertyName(questionType);
7409
7484
  var questionSubType = this.surveyElement.getPropertyValue(propName);
7410
- var items = prop.getChoices(this.surveyElement, function (chs) { });
7411
7485
  var getAvailableTypes = function () {
7412
- var availableTypes = [];
7413
- items.forEach(function (item) {
7414
- availableTypes.push({ id: item, title: _editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getPropertyValueInEditor(prop.name, item) });
7486
+ return toolboxItem.items.map(function (item) {
7487
+ return {
7488
+ id: item.id,
7489
+ title: item.title,
7490
+ action: function (item) {
7491
+ var newValue = _this.getUpdatedPropertyValue(propName, item.id);
7492
+ _this.surveyElement.setPropertyValue(propName, newValue);
7493
+ }
7494
+ };
7415
7495
  });
7416
- return availableTypes;
7417
7496
  };
7418
7497
  var actionData = {
7419
7498
  id: "convertInputType",
7420
7499
  visibleIndex: 1,
7421
- title: _editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getPropertyValueInEditor(prop.name, questionSubType),
7500
+ title: _editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getPropertyValueInEditor(propName, questionSubType),
7422
7501
  };
7423
- var newAction = this.createDropdownModel(actionData, getAvailableTypes(), function (listModel) {
7424
- var newItems = getAvailableTypes();
7425
- listModel.setItems(newItems);
7426
- listModel.selectedItem = _this.getSelectedItem(newItems, _this.surveyElement.getPropertyValue(propName));
7427
- }, function (item) {
7428
- var newValue = _this.getUpdatedPropertyValue(propName, item.id);
7429
- _this.surveyElement.setPropertyValue(propName, newValue);
7502
+ var newAction = this.createDropdownModel({
7503
+ actionData: actionData,
7504
+ items: getAvailableTypes(),
7505
+ updateListModel: function (listModel) {
7506
+ var newItems = getAvailableTypes();
7507
+ listModel.setItems(newItems);
7508
+ listModel.selectedItem = _this.getSelectedItem(newItems, _this.surveyElement.getPropertyValue(propName));
7509
+ }
7430
7510
  });
7431
7511
  newAction.disableShrink = true;
7432
7512
  this.surveyElement.registerFunctionOnPropertyValueChanged(propName, function () {
@@ -7445,27 +7525,26 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
7445
7525
  var selectedItems = actions.filter(function (item) { return item.id === id; });
7446
7526
  return selectedItems.length > 0 ? selectedItems[0] : undefined;
7447
7527
  };
7448
- QuestionAdornerViewModel.prototype.createDropdownModel = function (actionData, items, updateListModel, onSelectionChanged) {
7528
+ QuestionAdornerViewModel.prototype.createDropdownModel = function (options) {
7449
7529
  var newAction = Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["createDropdownActionModel"])({
7450
- id: actionData.id,
7530
+ id: options.actionData.id,
7451
7531
  css: "sv-action--convertTo sv-action-bar-item--secondary",
7452
- iconName: actionData.iconName,
7532
+ iconName: options.actionData.iconName,
7453
7533
  iconSize: 24,
7454
- title: actionData.title,
7455
- enabled: actionData.enabled,
7456
- visibleIndex: actionData.visibleIndex,
7534
+ title: options.actionData.title,
7535
+ enabled: options.actionData.enabled,
7536
+ visibleIndex: options.actionData.visibleIndex,
7457
7537
  disableShrink: false,
7458
7538
  location: "start",
7459
7539
  action: function (newType) {
7460
7540
  },
7461
7541
  }, {
7462
- items: items,
7463
- onSelectionChanged: onSelectionChanged,
7542
+ items: options.items,
7464
7543
  allowSelection: true,
7465
7544
  horizontalPosition: "center",
7466
7545
  onShow: function () {
7467
7546
  var listModel = newAction.popupModel.contentComponentData.model;
7468
- updateListModel(listModel);
7547
+ options.updateListModel(listModel);
7469
7548
  },
7470
7549
  });
7471
7550
  newAction.popupModel.displayMode = this.creator.isTouch ? "overlay" : "popup";
@@ -7525,8 +7604,7 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
7525
7604
  QuestionAdornerViewModel.prototype.duplicate = function () {
7526
7605
  var _this = this;
7527
7606
  setTimeout(function () {
7528
- var newElement = _this.creator.fastCopyQuestion(_this.surveyElement);
7529
- _this.creator.selectElement(newElement);
7607
+ _this.creator.fastCopyQuestion(_this.surveyElement, true);
7530
7608
  }, 1);
7531
7609
  };
7532
7610
  QuestionAdornerViewModel.prototype.addNewQuestion = function () {
@@ -8880,6 +8958,9 @@ var StringEditorViewModelBase = /** @class */ (function (_super) {
8880
8958
  if (this.creator) {
8881
8959
  this.creator.selectFromStringEditor = true;
8882
8960
  }
8961
+ if (this.locString.hasHtml && this.editAsText) {
8962
+ event.target.innerText = event.target.textContent = this.locString.calculatedText;
8963
+ }
8883
8964
  event.target.parentElement.click();
8884
8965
  event.target.spellcheck = true;
8885
8966
  event.target.setAttribute("tabindex", -1);
@@ -8986,7 +9067,7 @@ var StringEditorViewModelBase = /** @class */ (function (_super) {
8986
9067
  clearedText = mdText;
8987
9068
  }
8988
9069
  else {
8989
- var txt = this.locString.hasHtml ? html : text;
9070
+ var txt = this.locString.hasHtml && !this.editAsText ? html : text;
8990
9071
  if (!this.locString.allowLineBreaks)
8991
9072
  txt = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_3__["clearNewLines"])(txt);
8992
9073
  clearedText = txt;
@@ -9294,6 +9375,8 @@ __webpack_require__.r(__webpack_exports__);
9294
9375
  /* harmony import */ var _property_grid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../property-grid */ "./src/property-grid/index.ts");
9295
9376
  /* harmony import */ var _property_grid_property_grid_view_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../property-grid/property-grid-view-model */ "./src/property-grid/property-grid-view-model.ts");
9296
9377
  /* harmony import */ var _designer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./designer */ "./src/components/tabs/designer.ts");
9378
+ /* harmony import */ var _designer_state_manager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./designer-state-manager */ "./src/components/tabs/designer-state-manager.ts");
9379
+
9297
9380
 
9298
9381
 
9299
9382
 
@@ -9323,6 +9406,13 @@ var TabDesignerPlugin = /** @class */ (function () {
9323
9406
  return result;
9324
9407
  });
9325
9408
  this.toolboxTab = this.creator.sidebar.addTab("toolbox", "svc-toolbox", creator);
9409
+ this.designerStateManager = new _designer_state_manager__WEBPACK_IMPORTED_MODULE_5__["DesignerStateManager"]();
9410
+ this.designerStateManager.initForSurvey(this.creator.survey);
9411
+ this.creator.onSurveyInstanceCreated.add(function (s, o) {
9412
+ if (o.reason == "designer") {
9413
+ _this.designerStateManager.initForSurvey(o.survey);
9414
+ }
9415
+ });
9326
9416
  this.creator.onPropertyChanged.add(function (sender, options) {
9327
9417
  if (options.name === "toolboxLocation") {
9328
9418
  if (_this.toolboxTab.visible && options.newVal !== "sidebar") {
@@ -9485,6 +9575,71 @@ var TabDesignerPlugin = /** @class */ (function () {
9485
9575
 
9486
9576
 
9487
9577
 
9578
+ /***/ }),
9579
+
9580
+ /***/ "./src/components/tabs/designer-state-manager.ts":
9581
+ /*!*******************************************************!*\
9582
+ !*** ./src/components/tabs/designer-state-manager.ts ***!
9583
+ \*******************************************************/
9584
+ /*! exports provided: DesignerStateManager */
9585
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
9586
+
9587
+ "use strict";
9588
+ __webpack_require__.r(__webpack_exports__);
9589
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DesignerStateManager", function() { return DesignerStateManager; });
9590
+ var ElementState = /** @class */ (function () {
9591
+ function ElementState() {
9592
+ this.collapsed = false;
9593
+ }
9594
+ return ElementState;
9595
+ }());
9596
+ var DesignerStateManager = /** @class */ (function () {
9597
+ function DesignerStateManager() {
9598
+ var _this = this;
9599
+ this.elementState = {};
9600
+ this.pageState = {};
9601
+ this.onQuestionAddedHandler = function (sender, opts) {
9602
+ _this.elementState[opts.question.name] = new ElementState();
9603
+ };
9604
+ this.onPageAddedHandler = function (sender, opts) {
9605
+ _this.pageState[opts.page.name] = new ElementState();
9606
+ };
9607
+ this.onPanelAddedHandler = function (sender, opts) {
9608
+ _this.elementState[opts.panel.name] = new ElementState();
9609
+ };
9610
+ }
9611
+ DesignerStateManager.prototype.getStateMapForElement = function (element) {
9612
+ return (element && element.isPage) ? this.pageState : this.elementState;
9613
+ };
9614
+ DesignerStateManager.prototype.initForSurvey = function (survey) {
9615
+ survey.onQuestionAdded.add(this.onQuestionAddedHandler);
9616
+ survey.onPageAdded.add(this.onPageAddedHandler);
9617
+ survey.onPanelAdded.add(this.onPanelAddedHandler);
9618
+ };
9619
+ DesignerStateManager.prototype.initForElement = function (element) {
9620
+ if (!element)
9621
+ return;
9622
+ var stateMap = this.getStateMapForElement(element);
9623
+ element.registerFunctionOnPropertyValueChanged("name", function (newName) {
9624
+ delete stateMap[element.name];
9625
+ stateMap[newName] = new ElementState();
9626
+ }, "designerStateManager");
9627
+ };
9628
+ DesignerStateManager.prototype.getElementState = function (element) {
9629
+ var stateMap = this.getStateMapForElement(element);
9630
+ var name = element.name;
9631
+ var state = stateMap[name];
9632
+ if (state)
9633
+ return state;
9634
+ state = new ElementState();
9635
+ stateMap[name] = new ElementState();
9636
+ return state;
9637
+ };
9638
+ return DesignerStateManager;
9639
+ }());
9640
+
9641
+
9642
+
9488
9643
  /***/ }),
9489
9644
 
9490
9645
  /***/ "./src/components/tabs/designer.scss":
@@ -10196,7 +10351,7 @@ var TabJsonEditorAcePlugin = /** @class */ (function (_super) {
10196
10351
  return new AceJsonEditorModel(creator);
10197
10352
  };
10198
10353
  TabJsonEditorAcePlugin.hasAceEditor = function () {
10199
- return typeof window["ace"] !== "undefined";
10354
+ return typeof window !== "undefined" && typeof window["ace"] !== "undefined";
10200
10355
  };
10201
10356
  return TabJsonEditorAcePlugin;
10202
10357
  }(_json_editor_plugin__WEBPACK_IMPORTED_MODULE_3__["TabJsonEditorBasePlugin"]));
@@ -14630,10 +14785,10 @@ var PreviewViewModel = /** @class */ (function (_super) {
14630
14785
  this.survey["onNavigateToUrl"].add(function (sender, options) {
14631
14786
  var url = options.url;
14632
14787
  options.url = "";
14633
- if (!!url) {
14788
+ if (!!url && options.allow) {
14634
14789
  var message = Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("ed.navigateToMsg") + " '" + url + "'.";
14635
- if (!!this.surveyProvider) {
14636
- this.surveyProvider.notify(message);
14790
+ if (!!_this.surveyProvider) {
14791
+ _this.surveyProvider.notify(message);
14637
14792
  }
14638
14793
  else {
14639
14794
  alert(message);
@@ -17017,6 +17172,8 @@ __webpack_require__.r(__webpack_exports__);
17017
17172
  * const creator = new SurveyCreatorModel(creatorOptions);
17018
17173
  * creator.themeEditor.settingName = "value";
17019
17174
  * ```
17175
+ *
17176
+ * [Theme Editor Documentation](https://surveyjs.io/survey-creator/documentation/theme-editor (linkStyle))
17020
17177
  */
17021
17178
  var ThemeTabPlugin = /** @class */ (function () {
17022
17179
  function ThemeTabPlugin(creator) {
@@ -20194,18 +20351,20 @@ __webpack_require__.r(__webpack_exports__);
20194
20351
 
20195
20352
  var ToolboxToolViewModel = /** @class */ (function (_super) {
20196
20353
  Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ToolboxToolViewModel, _super);
20197
- function ToolboxToolViewModel(item, creator) {
20354
+ function ToolboxToolViewModel(item, creator, model) {
20198
20355
  var _this = _super.call(this) || this;
20199
20356
  _this.item = item;
20200
20357
  _this.creator = creator;
20358
+ _this.model = model;
20201
20359
  _this.click = function (event) {
20202
20360
  if (!_this.allowAdd)
20203
20361
  return;
20204
20362
  _this.creator.clickToolboxItem(_this.item.json);
20363
+ _this.hidePopup();
20205
20364
  };
20206
20365
  _this.onPointerUp = function (pointerUpEvent) {
20207
- _this._node.classList.remove("svc-toolbox__tool--pressed");
20208
- _this._node = null;
20366
+ _this.hidePopup();
20367
+ _this.toolboxItem.isPressed = false;
20209
20368
  document.removeEventListener("pointerup", _this.onPointerUp);
20210
20369
  };
20211
20370
  _this.startDragToolboxItem = function (pointerDownEvent, currentTarget) {
@@ -20216,6 +20375,13 @@ var ToolboxToolViewModel = /** @class */ (function (_super) {
20216
20375
  _this.dragOrClickHelper = new survey_core__WEBPACK_IMPORTED_MODULE_1__["DragOrClickHelper"](_this.startDragToolboxItem);
20217
20376
  return _this;
20218
20377
  }
20378
+ Object.defineProperty(ToolboxToolViewModel.prototype, "toolboxItem", {
20379
+ get: function () {
20380
+ return this.item;
20381
+ },
20382
+ enumerable: false,
20383
+ configurable: true
20384
+ });
20219
20385
  Object.defineProperty(ToolboxToolViewModel.prototype, "allowAdd", {
20220
20386
  get: function () {
20221
20387
  return !this.creator.readOnly;
@@ -20223,18 +20389,28 @@ var ToolboxToolViewModel = /** @class */ (function (_super) {
20223
20389
  enumerable: false,
20224
20390
  configurable: true
20225
20391
  });
20392
+ ToolboxToolViewModel.prototype.onMouseOver = function (itemValue, mouseoverEvent) {
20393
+ this.model.mouseOverHandler(itemValue);
20394
+ };
20395
+ ToolboxToolViewModel.prototype.onMouseLeave = function (itemValue, mouseoverEvent) {
20396
+ itemValue.hidePopupDelayed(this.creator.toolbox.subItemsHideDelay);
20397
+ };
20226
20398
  ToolboxToolViewModel.prototype.onPointerDown = function (pointerDownEvent) {
20227
20399
  var _a;
20400
+ pointerDownEvent.stopPropagation();
20228
20401
  if (!this.allowAdd)
20229
20402
  return;
20230
20403
  if (this.item.id.indexOf("dotsItem-id") === 0)
20231
20404
  return true; //toolbox responsive popup
20232
20405
  this.dragOrClickHelper.onPointerDown(pointerDownEvent);
20233
- this._node = pointerDownEvent.currentTarget;
20234
- this._node.classList.add("svc-toolbox__tool--pressed");
20406
+ this.toolboxItem.isPressed = true;
20235
20407
  document.addEventListener("pointerup", this.onPointerUp);
20236
20408
  (_a = this.creator) === null || _a === void 0 ? void 0 : _a.onDragDropItemStart();
20237
20409
  };
20410
+ ToolboxToolViewModel.prototype.hidePopup = function () {
20411
+ this.toolboxItem.hidePopup();
20412
+ this.toolboxItem.isHovered = false;
20413
+ };
20238
20414
  Object.defineProperty(ToolboxToolViewModel.prototype, "dragDropHelper", {
20239
20415
  get: function () {
20240
20416
  return this.creator.dragDropSurveyElements;
@@ -20596,6 +20772,10 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
20596
20772
  * [Customize Survey Elements on Creation](https://surveyjs.io/survey-creator/documentation/customize-survey-creation-process#customize-survey-elements-on-creation (linkStyle))
20597
20773
  */
20598
20774
  _this.onPageAdded = _this.addCreatorEvent();
20775
+ /**
20776
+ * An event that is raised when a [question's type is being changed](https://surveyjs.io/survey-creator/documentation/end-user-guide/user-interface#how-to-change-the-question-type).
20777
+ */
20778
+ _this.onQuestionConverting = _this.addCreatorEvent();
20599
20779
  /**
20600
20780
  * An event that is raised when Survey Creator renders action buttons under each page on the design surface. Use this event to add, remove, or modify the buttons.
20601
20781
  * @see onDefineElementMenuItems
@@ -20949,6 +21129,18 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
20949
21129
  button: "",
20950
21130
  shown: "svc-notifier--shown"
20951
21131
  });
21132
+ /**
21133
+ * Specifies where to add new questions when users click the "Add Question" button.
21134
+ *
21135
+ * Accepted values:
21136
+ *
21137
+ * - `true` (default)
21138
+ * New questions are added to the end of a survey page.
21139
+ *
21140
+ * - `false`
21141
+ * New questions are added after the currently selected question on the design surface.
21142
+ */
21143
+ _this.addNewQuestionLast = true;
20952
21144
  _this.onKeyDownHandler = function (event) {
20953
21145
  _this.findSuitableShortcuts(event).forEach(function (shortcut) {
20954
21146
  if ((event.keyCode < 48 || event.keyCode == 89 || event.keyCode == 90) && isTextInput(event.target))
@@ -22104,6 +22296,9 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
22104
22296
  _this.selectElement(options.draggedElement, undefined, false, editTitle);
22105
22297
  isDraggedFromToolbox = false;
22106
22298
  _this.onDragEnd.fire(_this, options);
22299
+ if (!options.fromElement) {
22300
+ _this.setModified({ type: "ADDED_FROM_TOOLBOX", question: options.draggedElement });
22301
+ }
22107
22302
  });
22108
22303
  };
22109
22304
  SurveyCreatorModel.prototype.initDragDropChoices = function () {
@@ -22275,12 +22470,31 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
22275
22470
  return "";
22276
22471
  var json = this.survey.toJSON();
22277
22472
  json = this.singlePageJSON(json);
22473
+ this.moveElementsToTheEnd(json);
22278
22474
  var indent = _creator_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].jsonEditor.indentation;
22279
22475
  if (this.generateValidJSON) {
22280
22476
  return JSON.stringify(json, null, indent);
22281
22477
  }
22282
22478
  return new _json5__WEBPACK_IMPORTED_MODULE_4__["SurveyJSON5"]().stringify(json, null, indent);
22283
22479
  };
22480
+ SurveyCreatorModel.prototype.moveElementsToTheEnd = function (json) {
22481
+ var _this = this;
22482
+ if (!json)
22483
+ return;
22484
+ if (Array.isArray(json)) {
22485
+ json.forEach(function (el) { return _this.moveElementsToTheEnd(el); });
22486
+ }
22487
+ else {
22488
+ if (typeof json === "object") {
22489
+ if (!!json["elements"]) {
22490
+ var els = json["elements"];
22491
+ delete json["elements"];
22492
+ json["elements"] = els;
22493
+ }
22494
+ Object.keys(json).forEach(function (key) { return _this.moveElementsToTheEnd(json[key]); });
22495
+ }
22496
+ }
22497
+ };
22284
22498
  SurveyCreatorModel.prototype.setTextValue = function (value) {
22285
22499
  if (!!this.setSurveyJSONTextCallback) {
22286
22500
  this.setSurveyJSONTextCallback(value);
@@ -22467,7 +22681,14 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
22467
22681
  }
22468
22682
  };
22469
22683
  SurveyCreatorModel.prototype.convertQuestion = function (obj, className) {
22470
- var newQuestion = _questionconverter__WEBPACK_IMPORTED_MODULE_5__["QuestionConverter"].convertObject(obj, className, this.getDefaultElementJSON(obj.getType()), this.getDefaultElementJSON(className));
22684
+ var objJSON = _questionconverter__WEBPACK_IMPORTED_MODULE_5__["QuestionConverter"].getObjJSON(obj, this.getDefaultElementJSON(obj.getType()));
22685
+ var options = {
22686
+ sourceQuestion: obj,
22687
+ targetType: className,
22688
+ json: objJSON
22689
+ };
22690
+ this.onQuestionConverting.fire(this, options);
22691
+ var newQuestion = _questionconverter__WEBPACK_IMPORTED_MODULE_5__["QuestionConverter"].convertObject(obj, className, options.json, this.getDefaultElementJSON(className));
22471
22692
  this.setModified({
22472
22693
  type: "QUESTION_CONVERTED",
22473
22694
  className: className,
@@ -22552,9 +22773,14 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
22552
22773
  }
22553
22774
  parent = selectedElement.parent;
22554
22775
  if (index < 0) {
22555
- index = parent.elements.indexOf(selectedElement);
22556
- if (index > -1)
22557
- index++;
22776
+ if (this.addNewQuestionLast && modifiedType === "ADDED_FROM_PAGEBUTTON") {
22777
+ index = parent.elements.length;
22778
+ }
22779
+ else {
22780
+ index = parent.elements.indexOf(selectedElement);
22781
+ if (index > -1)
22782
+ index++;
22783
+ }
22558
22784
  }
22559
22785
  }
22560
22786
  if (panel) {
@@ -22693,11 +22919,12 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
22693
22919
  return this.createNewElement(json);
22694
22920
  };
22695
22921
  /**
22696
- * Creates a copy of a specified question and inserts the copy next to this question.
22922
+ * Creates a copy of a specified question, inserts the copy next to this question, and (optionally) selects it on the design surface.
22697
22923
  * @param question A question to copy.
22924
+ * @param selectCopy *(Optional)* Pass `true` if you want to select the copy on the design surface. Default value: `false`.
22698
22925
  * @returns The instance of a new question.
22699
22926
  */
22700
- SurveyCreatorModel.prototype.fastCopyQuestion = function (question) {
22927
+ SurveyCreatorModel.prototype.fastCopyQuestion = function (question, selectCopy) {
22701
22928
  var newElement = this.copyElement(question);
22702
22929
  var index = !!question["parent"]
22703
22930
  ? question["parent"].elements.indexOf(question) + 1
@@ -22709,6 +22936,9 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
22709
22936
  }
22710
22937
  }
22711
22938
  this.doClickQuestionCore(newElement, "ELEMENT_COPIED", index, question["parent"]);
22939
+ if (selectCopy) {
22940
+ this.selectElement(newElement);
22941
+ }
22712
22942
  return newElement;
22713
22943
  };
22714
22944
  Object.defineProperty(SurveyCreatorModel.prototype, "selectedElement", {
@@ -23178,6 +23408,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23178
23408
  };
23179
23409
  SurveyCreatorModel.prototype.deletePanelOrQuestion = function (obj) {
23180
23410
  var _this = this;
23411
+ var changeSelection = obj === this.selectedElement;
23181
23412
  var parent = obj["parent"];
23182
23413
  var elements = parent.elements;
23183
23414
  var objIndex = elements.indexOf(obj);
@@ -23191,7 +23422,9 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23191
23422
  if (parent.isPage && (this.pageEditMode === "single" || elements.length === 0)) {
23192
23423
  parent = this.survey;
23193
23424
  }
23194
- this.selectElement(objIndex > -1 ? elements[objIndex] : parent);
23425
+ if (changeSelection) {
23426
+ this.selectElement(objIndex > -1 ? elements[objIndex] : parent);
23427
+ }
23195
23428
  };
23196
23429
  SurveyCreatorModel.prototype.onCanShowObjectProperty = function (object, property, showMode, parentObj, parentProperty) {
23197
23430
  if (this.hiddenProperties[property.id])
@@ -23647,9 +23880,14 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23647
23880
  SurveyCreatorModel.prototype.getQuestionTypeSelectorModel = function (beforeAdd, element) {
23648
23881
  var _this = this;
23649
23882
  var panel = !!element && element.isPanel ? element : null;
23883
+ var onSelectQuestionType = function (questionType, subtype) {
23884
+ _this.currentAddQuestionType = questionType;
23885
+ _this.addNewQuestionInPage(beforeAdd, panel, questionType, subtype);
23886
+ newAction.popupModel.hide();
23887
+ };
23650
23888
  var getActions = function () {
23651
23889
  var availableTypes = _this.getAvailableToolboxItems(element).map(function (item) {
23652
- return _this.createIActionBarItemByClass(item.name, item.title, item.iconName, item.needSeparator);
23890
+ return _this.createIActionBarItemByClass(item, item.needSeparator, onSelectQuestionType);
23653
23891
  });
23654
23892
  return availableTypes;
23655
23893
  };
@@ -23658,10 +23896,6 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23658
23896
  title: this.getLocString("ed.addNewQuestion"),
23659
23897
  }, {
23660
23898
  items: getActions(),
23661
- onSelectionChanged: function (item) {
23662
- _this.currentAddQuestionType = item.id;
23663
- _this.addNewQuestionInPage(beforeAdd, panel);
23664
- },
23665
23899
  onShow: function () {
23666
23900
  var listModel = newAction.popupModel.contentComponentData.model;
23667
23901
  listModel.setItems(getActions());
@@ -23682,9 +23916,10 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23682
23916
  this.onGetPageActions.fire(this, options);
23683
23917
  return options.actions;
23684
23918
  };
23685
- SurveyCreatorModel.prototype.addNewQuestionInPage = function (beforeAdd, panel, type) {
23919
+ SurveyCreatorModel.prototype.addNewQuestionInPage = function (beforeAdd, panel, type, subtype) {
23686
23920
  if (panel === void 0) { panel = null; }
23687
23921
  if (type === void 0) { type = null; }
23922
+ if (subtype === void 0) { subtype = null; }
23688
23923
  if (!type)
23689
23924
  type = this.currentAddQuestionType;
23690
23925
  if (!type)
@@ -23696,15 +23931,34 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23696
23931
  json = toolboxItem.json;
23697
23932
  }
23698
23933
  var newElement = this.createNewElement(json);
23934
+ var propertyName = _toolbox__WEBPACK_IMPORTED_MODULE_7__["QuestionToolbox"].getSubTypePropertyName(type);
23935
+ if (!!propertyName && !!subtype)
23936
+ newElement.setPropertyValue(propertyName, subtype);
23699
23937
  this.clickToolboxItem(newElement, panel, "ADDED_FROM_PAGEBUTTON");
23700
23938
  };
23701
- SurveyCreatorModel.prototype.createIActionBarItemByClass = function (className, title, iconName, needSeparator) {
23939
+ SurveyCreatorModel.prototype.createIActionBarItemByClass = function (item, needSeparator, onSelectQuestionType) {
23702
23940
  var action = new survey_core__WEBPACK_IMPORTED_MODULE_1__["Action"]({
23703
- title: title,
23704
- id: className,
23705
- iconName: iconName,
23941
+ title: item.title,
23942
+ id: item.name,
23943
+ iconName: item.iconName,
23944
+ visible: item.visible,
23945
+ enabled: item.enabled,
23946
+ needSeparator: needSeparator
23706
23947
  });
23707
- action.needSeparator = needSeparator;
23948
+ action.action = function () {
23949
+ onSelectQuestionType(item.typeName);
23950
+ };
23951
+ if (!!item.items && item.items.length > 0) {
23952
+ var innerItems = item.items.map(function (i) { return new survey_core__WEBPACK_IMPORTED_MODULE_1__["Action"]({
23953
+ id: i.id,
23954
+ title: i.title,
23955
+ action: function () {
23956
+ action.hidePopup();
23957
+ onSelectQuestionType(item.typeName, i.id);
23958
+ }
23959
+ }); });
23960
+ action.setSubItems({ items: innerItems });
23961
+ }
23708
23962
  return action;
23709
23963
  };
23710
23964
  SurveyCreatorModel.prototype.onElementMenuItemsChanged = function (element, items) {
@@ -23947,6 +24201,9 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23947
24201
  Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
23948
24202
  Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "right" })
23949
24203
  ], SurveyCreatorModel.prototype, "sidebarLocation", void 0);
24204
+ Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
24205
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "never" })
24206
+ ], SurveyCreatorModel.prototype, "expandCollapseButtonVisibility", void 0);
23950
24207
  Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
23951
24208
  Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])({
23952
24209
  defaultValue: false,
@@ -24489,7 +24746,7 @@ var settings = {
24489
24746
  allowCollapseSidebar: true
24490
24747
  },
24491
24748
  jsonEditor: {
24492
- indentation: 1,
24749
+ indentation: 2,
24493
24750
  exportFileName: "survey.json"
24494
24751
  }
24495
24752
  };
@@ -25894,7 +26151,7 @@ var __spreadArray = function (to, from) {
25894
26151
  /*!******************************!*\
25895
26152
  !*** ./src/entries/index.ts ***!
25896
26153
  \******************************/
25897
- /*! exports provided: Version, enStrings, editorLocalization, defaultStrings, localization, QuestionConvertMode, settings, EmptySurveyCreatorOptions, CreatorAction, TabbedMenuItem, TabbedMenuContainer, ToolbarActionContainer, CreatorEvent, SurveyCreatorModel, CreatorBase, StylesManager, initializeDesignTimeSurveyModel, editableStringRendererName, getElementWrapperComponentName, getQuestionContentWrapperComponentName, getElementWrapperComponentData, getItemValueWrapperComponentName, getItemValueWrapperComponentData, isStringEditable, isTextInput, registerAdorner, removeAdorners, CreatorResponsivityManager, AceJsonEditorModel, TabJsonEditorAcePlugin, JsonEditorBaseModel, TabJsonEditorBasePlugin, TextareaJsonEditorModel, TabJsonEditorTextareaPlugin, TestSurveyTabViewModel, TabTestPlugin, updatecoloralphaJSON, createColor, updateShadowEffectsJSON, createBoxShadow, createBoxShadowReset, parseBoxShadow, DefaultFonts, updateFontSettingsJSON, fontsettingsToCssVariable, fontsettingsFromCssVariable, updateBackgroundCornerRadiusJSON, backgroundCornerRadiusToCssVariable, backgroundCornerRadiusFromCssVariable, Themes, PredefinedThemes, PredefinedColors, ThemeTabViewModel, ThemeTabPlugin, themeModelPropertyGridDefinition, ThemeModelEditorDefinition, initLogicOperator, LogicEvent, SurveyLogic, TranslationItemBase, TranslationItemString, TranslationItem, TranslationGroup, Translation, TranslationForEditor, TranslationEditor, createImportCSVAction, createExportCSVAction, translationCss, TabTranslationPlugin, initialSettingsAllowShowEmptyTitleInDesignMode, TabDesignerViewModel, TabDesignerPlugin, SurveyLogicUI, TabLogicPlugin, logicCss, ToolboxToolViewModel, PageNavigatorViewModel, PageAdorner, RowViewModel, QuestionAdornerViewModel, QuestionDropdownAdornerViewModel, QuestionImageAdornerViewModel, QuestionRatingAdornerViewModel, ItemValueWrapperViewModel, ImageItemValueWrapperViewModel, MatrixCellWrapperEditSurvey, MatrixCellWrapperViewModel, SurveySimulatorModel, DEFAULT_MONITOR_DPI, simulatorDevices, SurveyResultsItemModel, SurveyResultsModel, LogoImageViewModel, StringItemsNavigatorBase, StringEditorConnector, StringEditorViewModelBase, QuestionEmbeddedSurveyModel, QuestionLinkValueModel, EditorLocalization, getLocString, SurveyJSON5, QuestionSpinEditorModel, QuestionColorModel, QuestionFileEditorModel, ResetValueAdorner, QuestionTextWithResetModel, QuestionCommentWithResetModel, setSurveyJSONForPropertyGrid, PropertyEditorSetupValue, PropertyGridEditorCollection, PropertyGridTitleActionsCreator, PropertyJSONGenerator, PropertyGridModel, PropertyGridEditor, PropertyGridEditorBoolean, PropertyGridEditorStringBase, PropertyGridEditorString, PropertyGridEditorDateTime, PropertyGridLinkEditor, PropertyGridEditorColor, PropertyGridEditorColorWithAlpha, PropertyGridEditorNumber, PropertyGridEditorSpinEdit, PropertyGridEditorImageSize, PropertyGridEditorText, PropertyGridEditorHtml, PropertyGridEditorStringArray, PropertyGridEditorDropdown, PropertyGridEditorSet, PropertyGridEditorPage, PropertyGridEditorQuestion, PropertyGridEditorQuestionSelectBase, PropertyGridEditorQuestionCarryForward, PropertyGridEditorQuestionValue, PropertyGridEditorExpression, PropertyGridEditorCondition, PropertyGridEditorMatrix, PropertyGridEditorMatrixItemValues, PropertyGridEditorMatrixRateValues, PropertyGridEditorMatrixColumns, PropertyGridEditorMatrixPages, PropertyGridEditorMatrixCalculatedValues, PropertyGridEditorMatrixHtmlConditions, PropertyGridEditorMatrixUrlConditions, PropertyGridEditorMatrixMutlipleTextItems, PropertyGridEditorMatrixMultipleTypes, PropertyGridEditorMatrixValidators, PropertyGridEditorMatrixTriggers, PropertyGridEditorBindings, PropertyGridViewModel, ObjectSelectorItem, ObjectSelector, ObjectSelectorModel, PropertyGridEditorQuestionRestfull, PropertyGridEditorFontSettings, PropertyGridEditorBackgroundCornerRadius, PropertyGridEditorShadowEffects, PropertyGridValueEditorBase, PropertyGridCellsEditor, PropertyGridValueEditor, PropertyGridRowValueEditor, PropertyGridPanelValueEditor, PropertyGridTriggerValueEditor, PropertyGridTriggerValueInLogicEditor, SearchManager, SearchManagerToolbox, SearchManagerPropertyGrid, PropertyGridEditorQuestionMaskSettings, PropertyGridEditorMaskType, PropertyGridEditorQuestionHeader, propertyGridCss, QuestionConverter, svgBundle, SurveyTextWorkerError, SurveyTextWorkerParserError, SurveyTextWorkerJsonError, SurveyTextWorker, JsonDuplicateNameError, QuestionToolboxCategory, QuestionToolboxItem, QuestionToolbox, SidebarModel, SidebarTabModel, Switcher, roundTo2Decimals, getNextItemValue, getNextItemText, getNextValue, findParentNode, focusFirstControl, getFirstNonTextElement, getNodesFromKoComponentInfo, propertyExists, isPropertyVisible, toggleHovered, clearNewLines, select, copyObject, copyCssClasses, assignDefaultV2Classes, wrapTextByCurlyBraces, capitalize, notShortCircuitAnd, imageMimeTypes, getAcceptedTypesByContentMode, getQuestionFromObj, scrollElementIntoView, ingectAlpha, convertRgbaToString, parseRgbaFromString, parseColor, HSBToRGB, RGBToHSB, trimEmptyFields, assign, ColorCalculator, saveToFileHandler, defaultPropertyGridDefinition, SurveyQuestionEditorDefinition, ObjType, SurveyHelper, ResizeManager, UndoRedoPlugin, undoRedoTransaction, ignoreUndoRedo, UndoRedoManager, Transaction, UndoRedoAction, UndoRedoArrayAction, PagesController */
26154
+ /*! exports provided: Version, enStrings, editorLocalization, defaultStrings, localization, QuestionConvertMode, settings, EmptySurveyCreatorOptions, CreatorAction, TabbedMenuItem, TabbedMenuContainer, ToolbarActionContainer, CreatorEvent, SurveyCreatorModel, CreatorBase, StylesManager, initializeDesignTimeSurveyModel, editableStringRendererName, getElementWrapperComponentName, getQuestionContentWrapperComponentName, getElementWrapperComponentData, getItemValueWrapperComponentName, getItemValueWrapperComponentData, isStringEditable, isTextInput, registerAdorner, removeAdorners, CreatorResponsivityManager, AceJsonEditorModel, TabJsonEditorAcePlugin, JsonEditorBaseModel, TabJsonEditorBasePlugin, TextareaJsonEditorModel, TabJsonEditorTextareaPlugin, TestSurveyTabViewModel, TabTestPlugin, updatecoloralphaJSON, createColor, updateShadowEffectsJSON, createBoxShadow, createBoxShadowReset, parseBoxShadow, DefaultFonts, updateFontSettingsJSON, fontsettingsToCssVariable, fontsettingsFromCssVariable, updateBackgroundCornerRadiusJSON, backgroundCornerRadiusToCssVariable, backgroundCornerRadiusFromCssVariable, Themes, PredefinedThemes, PredefinedColors, ThemeTabViewModel, ThemeTabPlugin, themeModelPropertyGridDefinition, ThemeModelEditorDefinition, initLogicOperator, LogicEvent, SurveyLogic, TranslationItemBase, TranslationItemString, TranslationItem, TranslationGroup, Translation, TranslationForEditor, TranslationEditor, createImportCSVAction, createExportCSVAction, translationCss, TabTranslationPlugin, initialSettingsAllowShowEmptyTitleInDesignMode, TabDesignerViewModel, TabDesignerPlugin, SurveyLogicUI, TabLogicPlugin, logicCss, ToolboxToolViewModel, PageNavigatorViewModel, PageAdorner, RowViewModel, QuestionAdornerViewModel, QuestionDropdownAdornerViewModel, QuestionImageAdornerViewModel, QuestionRatingAdornerViewModel, ItemValueWrapperViewModel, ImageItemValueWrapperViewModel, MatrixCellWrapperEditSurvey, MatrixCellWrapperViewModel, SurveySimulatorModel, DEFAULT_MONITOR_DPI, simulatorDevices, SurveyResultsItemModel, SurveyResultsModel, LogoImageViewModel, StringItemsNavigatorBase, StringEditorConnector, StringEditorViewModelBase, QuestionEmbeddedSurveyModel, QuestionLinkValueModel, EditorLocalization, getLocString, SurveyJSON5, QuestionSpinEditorModel, QuestionColorModel, QuestionFileEditorModel, ResetValueAdorner, QuestionTextWithResetModel, QuestionCommentWithResetModel, setSurveyJSONForPropertyGrid, PropertyEditorSetupValue, PropertyGridEditorCollection, PropertyGridTitleActionsCreator, PropertyJSONGenerator, PropertyGridModel, PropertyGridEditor, PropertyGridEditorBoolean, PropertyGridEditorUndefinedBoolean, PropertyGridEditorStringBase, PropertyGridEditorString, PropertyGridEditorDateTime, PropertyGridLinkEditor, PropertyGridEditorColor, PropertyGridEditorColorWithAlpha, PropertyGridEditorNumber, PropertyGridEditorSpinEdit, PropertyGridEditorImageSize, PropertyGridEditorText, PropertyGridEditorHtml, PropertyGridEditorStringArray, PropertyGridEditorDropdown, PropertyGridEditorSet, PropertyGridEditorPage, PropertyGridEditorQuestion, PropertyGridEditorQuestionSelectBase, PropertyGridEditorQuestionCarryForward, PropertyGridEditorQuestionValue, PropertyGridEditorExpression, PropertyGridEditorCondition, PropertyGridEditorMatrix, PropertyGridEditorMatrixItemValues, PropertyGridEditorMatrixRateValues, PropertyGridEditorMatrixColumns, PropertyGridEditorMatrixPages, PropertyGridEditorMatrixCalculatedValues, PropertyGridEditorMatrixHtmlConditions, PropertyGridEditorMatrixUrlConditions, PropertyGridEditorMatrixMutlipleTextItems, PropertyGridEditorMatrixMultipleTypes, PropertyGridEditorMatrixValidators, PropertyGridEditorMatrixTriggers, PropertyGridEditorBindings, PropertyGridViewModel, ObjectSelectorItem, ObjectSelector, ObjectSelectorModel, PropertyGridEditorQuestionRestfull, PropertyGridEditorFontSettings, PropertyGridEditorBackgroundCornerRadius, PropertyGridEditorShadowEffects, PropertyGridValueEditorBase, PropertyGridCellsEditor, PropertyGridValueEditor, PropertyGridRowValueEditor, PropertyGridPanelValueEditor, PropertyGridTriggerValueEditor, PropertyGridTriggerValueInLogicEditor, SearchManager, SearchManagerToolbox, SearchManagerPropertyGrid, PropertyGridEditorQuestionMaskSettings, PropertyGridEditorMaskType, PropertyGridEditorQuestionHeader, propertyGridCss, QuestionConverter, svgBundle, SurveyTextWorkerError, SurveyTextWorkerParserError, SurveyTextWorkerJsonError, SurveyTextWorker, JsonDuplicateNameError, QuestionToolboxCategory, QuestionToolboxItem, QuestionToolbox, SidebarModel, SidebarTabModel, Switcher, roundTo2Decimals, getNextItemValue, getNextItemText, getNextValue, findParentNode, focusFirstControl, getFirstNonTextElement, getNodesFromKoComponentInfo, propertyExists, isPropertyVisible, toggleHovered, clearNewLines, select, copyObject, copyCssClasses, assignDefaultV2Classes, wrapTextByCurlyBraces, capitalize, notShortCircuitAnd, imageMimeTypes, getAcceptedTypesByContentMode, getQuestionFromObj, scrollElementIntoView, ingectAlpha, convertRgbaToString, parseRgbaFromString, parseColor, HSBToRGB, RGBToHSB, trimEmptyFields, assign, ColorCalculator, saveToFileHandler, defaultPropertyGridDefinition, SurveyQuestionEditorDefinition, ObjType, SurveyHelper, ResizeManager, UndoRedoPlugin, undoRedoTransaction, ignoreUndoRedo, UndoRedoManager, Transaction, UndoRedoAction, UndoRedoArrayAction, PagesController */
25898
26155
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
25899
26156
 
25900
26157
  "use strict";
@@ -26181,6 +26438,8 @@ __webpack_require__.r(__webpack_exports__);
26181
26438
 
26182
26439
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PropertyGridEditorBoolean", function() { return _property_grid__WEBPACK_IMPORTED_MODULE_50__["PropertyGridEditorBoolean"]; });
26183
26440
 
26441
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PropertyGridEditorUndefinedBoolean", function() { return _property_grid__WEBPACK_IMPORTED_MODULE_50__["PropertyGridEditorUndefinedBoolean"]; });
26442
+
26184
26443
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PropertyGridEditorStringBase", function() { return _property_grid__WEBPACK_IMPORTED_MODULE_50__["PropertyGridEditorStringBase"]; });
26185
26444
 
26186
26445
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PropertyGridEditorString", function() { return _property_grid__WEBPACK_IMPORTED_MODULE_50__["PropertyGridEditorString"]; });
@@ -26441,7 +26700,7 @@ __webpack_require__.r(__webpack_exports__);
26441
26700
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! survey-core */ "survey-core");
26442
26701
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_78___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_78__);
26443
26702
  var Version;
26444
- Version = "" + "1.11.5";
26703
+ Version = "" + "1.11.7";
26445
26704
  //should be loaded before other styles for easier override
26446
26705
  __webpack_require__(/*! ../utils/context-button.scss */ "./src/utils/context-button.scss");
26447
26706
 
@@ -26538,7 +26797,7 @@ __webpack_require__(/*! ../utils/design.scss */ "./src/utils/design.scss");
26538
26797
  __webpack_require__(/*! ../utils/layout.scss */ "./src/utils/layout.scss");
26539
26798
 
26540
26799
  survey_core__WEBPACK_IMPORTED_MODULE_78__["settings"].supportCreatorV2 = true;
26541
- Object(survey_core__WEBPACK_IMPORTED_MODULE_78__["checkLibraryVersion"])("" + "1.11.5", "survey-creator-core");
26800
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_78__["checkLibraryVersion"])("" + "1.11.7", "survey-creator-core");
26542
26801
 
26543
26802
 
26544
26803
  /***/ }),
@@ -26796,6 +27055,7 @@ var map = {
26796
27055
  "./collapse-detail-light_16x16.svg": "./src/images/collapse-detail-light_16x16.svg",
26797
27056
  "./collapse-detail_16x16.svg": "./src/images/collapse-detail_16x16.svg",
26798
27057
  "./collapse-panel.svg": "./src/images/collapse-panel.svg",
27058
+ "./collapse-v_16x16.svg": "./src/images/collapse-v_16x16.svg",
26799
27059
  "./collapse_16x16.svg": "./src/images/collapse_16x16.svg",
26800
27060
  "./color-picker.svg": "./src/images/color-picker.svg",
26801
27061
  "./comment.svg": "./src/images/comment.svg",
@@ -26823,6 +27083,7 @@ var map = {
26823
27083
  "./expand-detail-light_16x16.svg": "./src/images/expand-detail-light_16x16.svg",
26824
27084
  "./expand-detail_16x16.svg": "./src/images/expand-detail_16x16.svg",
26825
27085
  "./expand-panel.svg": "./src/images/expand-panel.svg",
27086
+ "./expand-v_16x16.svg": "./src/images/expand-v_16x16.svg",
26826
27087
  "./expand_16x16.svg": "./src/images/expand_16x16.svg",
26827
27088
  "./export.svg": "./src/images/export.svg",
26828
27089
  "./expression.svg": "./src/images/expression.svg",
@@ -26856,6 +27117,7 @@ var map = {
26856
27117
  "./remove_16x16.svg": "./src/images/remove_16x16.svg",
26857
27118
  "./required.svg": "./src/images/required.svg",
26858
27119
  "./reset.svg": "./src/images/reset.svg",
27120
+ "./restore_16x16.svg": "./src/images/restore_16x16.svg",
26859
27121
  "./save.svg": "./src/images/save.svg",
26860
27122
  "./select-page.svg": "./src/images/select-page.svg",
26861
27123
  "./settings.svg": "./src/images/settings.svg",
@@ -27125,6 +27387,17 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
27125
27387
 
27126
27388
  /***/ }),
27127
27389
 
27390
+ /***/ "./src/images/collapse-v_16x16.svg":
27391
+ /*!*****************************************!*\
27392
+ !*** ./src/images/collapse-v_16x16.svg ***!
27393
+ \*****************************************/
27394
+ /*! no static exports found */
27395
+ /***/ (function(module, exports) {
27396
+
27397
+ module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><g id=\"Collapse V 16x16\"><path id=\"Vector\" d=\"M11.71 12.29C12.1 12.68 12.1 13.31 11.71 13.7C11.51 13.9 11.26 13.99 11 13.99C10.74 13.99 10.49 13.89 10.29 13.7L9.00002 12.41V15C9.00002 15.55 8.55002 16 8.00002 16C7.45002 16 7.00002 15.55 7.00002 15V12.41L5.71002 13.7C5.32002 14.09 4.69002 14.09 4.30002 13.7C3.91002 13.31 3.91002 12.68 4.30002 12.29L7.30002 9.29C7.69002 8.9 8.32002 8.9 8.71002 9.29L11.71 12.29ZM7.29002 6.71C7.49002 6.91 7.74002 7 8.00002 7C8.26002 7 8.51002 6.9 8.71002 6.71L11.71 3.71C12.1 3.32 12.1 2.69 11.71 2.3C11.32 1.91 10.69 1.91 10.3 2.3L9.01002 3.59V1C9.01002 0.45 8.56002 0 8.01002 0C7.46002 0 7.01002 0.45 7.01002 1V3.59L5.72002 2.3C5.33002 1.91 4.70002 1.91 4.31002 2.3C3.92002 2.69 3.90002 3.32 4.29002 3.71L7.29002 6.71Z\"></path></g></svg>"
27398
+
27399
+ /***/ }),
27400
+
27128
27401
  /***/ "./src/images/collapse_16x16.svg":
27129
27402
  /*!***************************************!*\
27130
27403
  !*** ./src/images/collapse_16x16.svg ***!
@@ -27422,6 +27695,17 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
27422
27695
 
27423
27696
  /***/ }),
27424
27697
 
27698
+ /***/ "./src/images/expand-v_16x16.svg":
27699
+ /*!***************************************!*\
27700
+ !*** ./src/images/expand-v_16x16.svg ***!
27701
+ \***************************************/
27702
+ /*! no static exports found */
27703
+ /***/ (function(module, exports) {
27704
+
27705
+ module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><g id=\"Expand V 16x16\" clip-path=\"url(#clip0_2625_3196)\"><path id=\"Vector\" d=\"M4.29006 4.71006C3.90006 4.32006 3.90006 3.69006 4.29006 3.30006L7.29006 0.290059C7.68006 -0.0999414 8.31006 -0.0999414 8.70006 0.290059L11.7001 3.29006C12.0901 3.68006 12.0901 4.31006 11.7001 4.70006C11.5001 4.90006 11.2501 4.99006 10.9901 4.99006C10.7301 4.99006 10.4801 4.89006 10.2801 4.70006L8.99006 3.41006V6.00006C8.99006 6.55006 8.54006 7.00006 7.99006 7.00006C7.44006 7.00006 6.99006 6.55006 6.99006 6.00006V3.41006L5.70006 4.70006C5.31006 5.09006 4.68006 5.09006 4.29006 4.70006V4.71006ZM10.2901 11.2901L9.00006 12.5801V9.99006C9.00006 9.44006 8.55006 8.99006 8.00006 8.99006C7.45006 8.99006 7.00006 9.44006 7.00006 9.99006V12.5801L5.71006 11.2901C5.32006 10.9001 4.69006 10.9001 4.30006 11.2901C3.91006 11.6801 3.91006 12.3101 4.30006 12.7001L7.30006 15.7001C7.50006 15.9001 7.75006 15.9901 8.01006 15.9901C8.27006 15.9901 8.52006 15.8901 8.72006 15.7001L11.7201 12.7001C12.1101 12.3101 12.1101 11.6801 11.7201 11.2901C11.3301 10.9001 10.7001 10.9001 10.3101 11.2901H10.2901Z\"></path></g><defs><clipPath id=\"clip0_2625_3196\"><rect width=\"16\" height=\"16\" fill=\"white\"></rect></clipPath></defs></svg>"
27706
+
27707
+ /***/ }),
27708
+
27425
27709
  /***/ "./src/images/expand_16x16.svg":
27426
27710
  /*!*************************************!*\
27427
27711
  !*** ./src/images/expand_16x16.svg ***!
@@ -27785,6 +28069,17 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
27785
28069
 
27786
28070
  /***/ }),
27787
28071
 
28072
+ /***/ "./src/images/restore_16x16.svg":
28073
+ /*!**************************************!*\
28074
+ !*** ./src/images/restore_16x16.svg ***!
28075
+ \**************************************/
28076
+ /*! no static exports found */
28077
+ /***/ (function(module, exports) {
28078
+
28079
+ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M12 13H4C2.9 13 2 12.1 2 11V5C2 3.9 2.9 3 4 3H12C13.1 3 14 3.9 14 5V11C14 12.1 13.1 13 12 13ZM4 5V11H12V5H4Z\"></path></svg>"
28080
+
28081
+ /***/ }),
28082
+
27788
28083
  /***/ "./src/images/save.svg":
27789
28084
  /*!*****************************!*\
27790
28085
  !*** ./src/images/save.svg ***!
@@ -29100,6 +29395,9 @@ var enStrings = {
29100
29395
  rateDescriptionLocation: "Label alignment",
29101
29396
  size: "Input field width (in characters)",
29102
29397
  cellErrorLocation: "Cell error message alignment",
29398
+ enabled: "Enabled",
29399
+ disabled: "Disabled",
29400
+ inherit: "Inherit",
29103
29401
  apply: "Apply",
29104
29402
  ok: "OK",
29105
29403
  save: "Save",
@@ -30064,8 +30362,8 @@ var enStrings = {
30064
30362
  locale: "Choose a language to begin creating your survey. To add a translation, switch to a new language and translate the original text here or in the Translations tab.",
30065
30363
  detailPanelMode: "Sets the location of a details section in relation to a row. Choose from: \"None\" - no expansion is added; \"Under the row\" - a row expansion is placed under each row of the matrix; \"Under the row, display one row expansion only\" - an expansion is displayed under a single row only, the remaining row expansions are collapsed.",
30066
30364
  imageFit: "Choose from: \"None\" - image maintains its original size; \"Contain\" - image is resized to fit while maintaining its aspect ratio; \"Cover\" - image fills the entire box while maintaining its aspect ratio; \"Fill\" - image is stretched to fill the box without maintaining its aspect ratio.",
30067
- autoGrow: "Gradually increases the height of the input field as data is being entered. Overrides the \"Input field height (in lines)\" setting.",
30068
- allowResize: "The resize handle (or grip) appears in the corner and can be dragged to alter the size of the input field.",
30365
+ autoGrow: "The \"Inherit\" option applies a survey-level setting (\"Disabled\" by default).",
30366
+ allowResize: "The \"Inherit\" option applies a survey-level setting (\"Enabled\" by default).",
30069
30367
  maxTimeToFinish: "A time interval in seconds after which the survey auto-advances to the \"Thank You\" page.",
30070
30368
  maxTimeToFinishPage: "A time interval in seconds after which the survey auto-advances to the next page. Hides the \"Previous\" navigation button.",
30071
30369
  page: {
@@ -30131,6 +30429,7 @@ var enStrings = {
30131
30429
  filePlaceholder: "Applies when \"File source type\" is \"Local file\" or when camera is unavailable",
30132
30430
  photoPlaceholder: "Applies when \"File source type\" is \"Camera\".",
30133
30431
  fileOrPhotoPlaceholder: "Applies when \"File source type\" is \"Local file or camera\".",
30432
+ colCount: "Arranges choice options in a multi-column layout. When set to 0, the options are displayed in a single line.",
30134
30433
  masksettings: {
30135
30434
  saveMaskedValue: "Select if you want to store the question value with an applied mask in survey results."
30136
30435
  },
@@ -32795,7 +33094,11 @@ var PropertyGridEditorExpression = /** @class */ (function (_super) {
32795
33094
  return prop.type == "expression";
32796
33095
  };
32797
33096
  PropertyGridEditorExpression.prototype.getJSON = function (obj, prop, options) {
32798
- return { type: "comment", showOptionsCaption: false };
33097
+ return {
33098
+ type: "comment",
33099
+ showOptionsCaption: false,
33100
+ rows: 2
33101
+ };
32799
33102
  };
32800
33103
  PropertyGridEditorExpression.prototype.clearPropertyValue = function (obj, prop, question, options) {
32801
33104
  question.clearValue();
@@ -32814,7 +33117,8 @@ var PropertyGridEditorCondition = /** @class */ (function (_super) {
32814
33117
  PropertyGridEditorCondition.prototype.getJSON = function (obj, prop, options) {
32815
33118
  return {
32816
33119
  type: "comment",
32817
- showOptionsCaption: false
33120
+ showOptionsCaption: false,
33121
+ rows: 2,
32818
33122
  };
32819
33123
  };
32820
33124
  PropertyGridEditorCondition.prototype.canClearPropertyValue = function (obj, prop, question, options) {
@@ -33263,7 +33567,7 @@ _index__WEBPACK_IMPORTED_MODULE_2__["PropertyGridEditorCollection"].register(new
33263
33567
  /*!************************************!*\
33264
33568
  !*** ./src/property-grid/index.ts ***!
33265
33569
  \************************************/
33266
- /*! exports provided: setSurveyJSONForPropertyGrid, PropertyEditorSetupValue, PropertyGridEditorCollection, PropertyGridTitleActionsCreator, PropertyJSONGenerator, PropertyGridModel, PropertyGridEditor, PropertyGridEditorBoolean, PropertyGridEditorStringBase, PropertyGridEditorString, PropertyGridEditorDateTime, PropertyGridLinkEditor, PropertyGridEditorColor, PropertyGridEditorColorWithAlpha, PropertyGridEditorNumber, PropertyGridEditorSpinEdit, PropertyGridEditorImageSize, PropertyGridEditorText, PropertyGridEditorHtml, PropertyGridEditorStringArray, PropertyGridEditorDropdown, PropertyGridEditorSet, PropertyGridEditorPage, PropertyGridEditorQuestion, PropertyGridEditorQuestionSelectBase, PropertyGridEditorQuestionCarryForward, PropertyGridEditorQuestionValue */
33570
+ /*! exports provided: setSurveyJSONForPropertyGrid, PropertyEditorSetupValue, PropertyGridEditorCollection, PropertyGridTitleActionsCreator, PropertyJSONGenerator, PropertyGridModel, PropertyGridEditor, PropertyGridEditorBoolean, PropertyGridEditorUndefinedBoolean, PropertyGridEditorStringBase, PropertyGridEditorString, PropertyGridEditorDateTime, PropertyGridLinkEditor, PropertyGridEditorColor, PropertyGridEditorColorWithAlpha, PropertyGridEditorNumber, PropertyGridEditorSpinEdit, PropertyGridEditorImageSize, PropertyGridEditorText, PropertyGridEditorHtml, PropertyGridEditorStringArray, PropertyGridEditorDropdown, PropertyGridEditorSet, PropertyGridEditorPage, PropertyGridEditorQuestion, PropertyGridEditorQuestionSelectBase, PropertyGridEditorQuestionCarryForward, PropertyGridEditorQuestionValue */
33267
33571
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
33268
33572
 
33269
33573
  "use strict";
@@ -33276,6 +33580,7 @@ __webpack_require__.r(__webpack_exports__);
33276
33580
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyGridModel", function() { return PropertyGridModel; });
33277
33581
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyGridEditor", function() { return PropertyGridEditor; });
33278
33582
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyGridEditorBoolean", function() { return PropertyGridEditorBoolean; });
33583
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyGridEditorUndefinedBoolean", function() { return PropertyGridEditorUndefinedBoolean; });
33279
33584
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyGridEditorStringBase", function() { return PropertyGridEditorStringBase; });
33280
33585
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyGridEditorString", function() { return PropertyGridEditorString; });
33281
33586
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropertyGridEditorDateTime", function() { return PropertyGridEditorDateTime; });
@@ -34166,7 +34471,7 @@ var PropertyGridModel = /** @class */ (function () {
34166
34471
  return this.options.createSurvey(json, this.surveyInstanceCreatedArea, this, callback);
34167
34472
  };
34168
34473
  PropertyGridModel.prototype.getSurveyJSON = function () {
34169
- var res = {};
34474
+ var res = { autoGrowComment: true, allowResizeComment: false };
34170
34475
  setSurveyJSONForPropertyGrid(res, true, false);
34171
34476
  return res;
34172
34477
  };
@@ -34490,6 +34795,43 @@ var PropertyGridEditorBoolean = /** @class */ (function (_super) {
34490
34795
  return PropertyGridEditorBoolean;
34491
34796
  }(PropertyGridEditor));
34492
34797
 
34798
+ var PropertyGridEditorUndefinedBoolean = /** @class */ (function (_super) {
34799
+ Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PropertyGridEditorUndefinedBoolean, _super);
34800
+ function PropertyGridEditorUndefinedBoolean() {
34801
+ return _super !== null && _super.apply(this, arguments) || this;
34802
+ }
34803
+ PropertyGridEditorUndefinedBoolean.prototype.fit = function (prop, context) {
34804
+ return prop.type == "boolean" && !!prop.defaultValueFunc && prop.defaultValueFunc(null) === undefined;
34805
+ };
34806
+ PropertyGridEditorUndefinedBoolean.prototype.getJSON = function (obj, prop, options) {
34807
+ var choices = [
34808
+ { value: "auto", text: _editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getString("pe.inherit") },
34809
+ { value: "false", text: _editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getString("pe.disabled") },
34810
+ { value: "true", text: _editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getString("pe.enabled") },
34811
+ ];
34812
+ var res = {
34813
+ type: "buttongroup",
34814
+ choices: choices,
34815
+ showOptionsCaption: false
34816
+ };
34817
+ return res;
34818
+ };
34819
+ PropertyGridEditorUndefinedBoolean.prototype.onCreated = function (obj, question, prop, options, propGridDefinition) {
34820
+ question.valueFromDataCallback = function (val) { return val === undefined ? "auto" : val.toString(); };
34821
+ question.valueToDataCallback = function (val) { return val === "auto" ? undefined : val === "true"; };
34822
+ };
34823
+ PropertyGridEditorUndefinedBoolean.prototype.onSetup = function (obj, question, prop, options) {
34824
+ var objValue = obj.getPropertyValue(prop.name);
34825
+ if (objValue === undefined) {
34826
+ question.value = "auto";
34827
+ }
34828
+ else {
34829
+ question.value = objValue === "true";
34830
+ }
34831
+ };
34832
+ return PropertyGridEditorUndefinedBoolean;
34833
+ }(PropertyGridEditor));
34834
+
34493
34835
  var PropertyGridEditorStringBase = /** @class */ (function (_super) {
34494
34836
  Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(PropertyGridEditorStringBase, _super);
34495
34837
  function PropertyGridEditorStringBase() {
@@ -34744,7 +35086,8 @@ var PropertyGridEditorText = /** @class */ (function (_super) {
34744
35086
  };
34745
35087
  PropertyGridEditorText.prototype.getJSON = function (obj, prop, options) {
34746
35088
  return this.updateType(prop, obj, this.updateMaxLength(prop, {
34747
- type: "comment"
35089
+ type: "comment",
35090
+ rows: 2
34748
35091
  }));
34749
35092
  };
34750
35093
  return PropertyGridEditorText;
@@ -34760,7 +35103,9 @@ var PropertyGridEditorHtml = /** @class */ (function (_super) {
34760
35103
  };
34761
35104
  PropertyGridEditorHtml.prototype.getJSON = function (obj, prop, options) {
34762
35105
  return this.updateMaxLength(prop, {
34763
- type: "comment"
35106
+ type: "comment",
35107
+ "allowResize": true,
35108
+ "autoGrow": false,
34764
35109
  });
34765
35110
  };
34766
35111
  return PropertyGridEditorHtml;
@@ -34775,7 +35120,10 @@ var PropertyGridEditorStringArray = /** @class */ (function (_super) {
34775
35120
  return prop.type == "string[]";
34776
35121
  };
34777
35122
  PropertyGridEditorStringArray.prototype.getJSON = function (obj, prop, options) {
34778
- return { type: "comment" };
35123
+ return {
35124
+ type: "comment",
35125
+ rows: 2
35126
+ };
34779
35127
  };
34780
35128
  PropertyGridEditorStringArray.prototype.onCreated = function (obj, question, prop) {
34781
35129
  question.valueFromDataCallback = function (val) {
@@ -35104,6 +35452,7 @@ PropertyGridEditorCollection.register(new PropertyGridEditorImageSize());
35104
35452
  PropertyGridEditorCollection.register(new PropertyGridEditorColor());
35105
35453
  PropertyGridEditorCollection.register(new PropertyGridEditorColorWithAlpha());
35106
35454
  PropertyGridEditorCollection.register(new PropertyGridEditorDateTime());
35455
+ PropertyGridEditorCollection.register(new PropertyGridEditorUndefinedBoolean());
35107
35456
  survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFactory"].Instance.registerQuestion("buttongroup", function (name) {
35108
35457
  return new survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionButtonGroupModel"](name);
35109
35458
  }, false);
@@ -37027,6 +37376,7 @@ var DefaultMatrixRowValueEditor = /** @class */ (function (_super) {
37027
37376
  json.minRowCount = 1;
37028
37377
  json.maxRowCount = 1;
37029
37378
  json.columnsLocation = "vertical";
37379
+ delete json.defaultValue;
37030
37380
  return json;
37031
37381
  };
37032
37382
  return DefaultMatrixRowValueEditor;
@@ -37666,12 +38016,15 @@ var defaultProperties = {
37666
38016
  { name: "totalDisplayStyle", tab: "totals" },
37667
38017
  { name: "totalCurrency", tab: "totals" },
37668
38018
  { name: "totalFormat", tab: "totals" },
37669
- { name: "totalExpression", tab: "totals" }
38019
+ { name: "totalExpression", tab: "totals" },
38020
+ { name: "validators", tab: "validation" },
38021
+ { name: "requiredErrorText", tab: "validation" }
37670
38022
  ],
37671
38023
  tabs: [
37672
38024
  { name: "general", index: 5 },
37673
38025
  { name: "logic", index: 20 },
37674
- { name: "totals", index: 40 }
38026
+ { name: "totals", index: 40 },
38027
+ { name: "validation", index: 60 }
37675
38028
  ]
37676
38029
  },
37677
38030
  "matrixdropdowncolumn@checkbox": {
@@ -37682,6 +38035,7 @@ var defaultProperties = {
37682
38035
  { name: "choiceTextsFromQuestion", tab: "choices" },
37683
38036
  { name: "showOtherItem", tab: "choices" },
37684
38037
  { name: "otherText", tab: "choices" },
38038
+ { name: "otherPlaceholder", tab: "choices" },
37685
38039
  { name: "choicesOrder", tab: "choices" },
37686
38040
  { name: "colCount", tab: "choices" },
37687
38041
  { name: "showSelectAllItem", tab: "choices" },
@@ -37710,6 +38064,7 @@ var defaultProperties = {
37710
38064
  { name: "choiceTextsFromQuestion", tab: "choices" },
37711
38065
  { name: "showOtherItem", tab: "choices" },
37712
38066
  { name: "otherText", tab: "choices" },
38067
+ { name: "otherPlaceholder", tab: "choices" },
37713
38068
  { name: "choicesOrder", tab: "choices" },
37714
38069
  { name: "colCount", tab: "choices" },
37715
38070
  { name: "showNoneItem", tab: "choices" },
@@ -37728,12 +38083,14 @@ var defaultProperties = {
37728
38083
  },
37729
38084
  "matrixdropdowncolumn@dropdown": {
37730
38085
  properties: [
38086
+ "placeholder",
37731
38087
  { name: "choicesFromQuestion", tab: "choices" },
37732
38088
  { name: "choicesFromQuestionMode", tab: "choices" },
37733
38089
  { name: "choiceValuesFromQuestion", tab: "choices" },
37734
38090
  { name: "choiceTextsFromQuestion", tab: "choices" },
37735
38091
  { name: "showOtherItem", tab: "choices" },
37736
38092
  { name: "otherText", tab: "choices" },
38093
+ { name: "otherPlaceholder", tab: "choices" },
37737
38094
  { name: "choicesOrder", tab: "choices" },
37738
38095
  { name: "optionsCaption", tab: "choices" },
37739
38096
  { name: "showNoneItem", tab: "choices" },
@@ -37755,12 +38112,14 @@ var defaultProperties = {
37755
38112
  },
37756
38113
  "matrixdropdowncolumn@tagbox": {
37757
38114
  properties: [
38115
+ "placeholder",
37758
38116
  { name: "choicesFromQuestion", tab: "choices" },
37759
38117
  { name: "choicesFromQuestionMode", tab: "choices" },
37760
38118
  { name: "choiceValuesFromQuestion", tab: "choices" },
37761
38119
  { name: "choiceTextsFromQuestion", tab: "choices" },
37762
38120
  { name: "showOtherItem", tab: "choices" },
37763
38121
  { name: "otherText", tab: "choices" },
38122
+ { name: "otherPlaceholder", tab: "choices" },
37764
38123
  { name: "choicesOrder", tab: "choices" },
37765
38124
  { name: "optionsCaption", tab: "choices" },
37766
38125
  { name: "showNoneItem", tab: "choices" },
@@ -38633,8 +38992,18 @@ var QuestionConverter = /** @class */ (function () {
38633
38992
  }
38634
38993
  return !!res ? res : [];
38635
38994
  };
38636
- QuestionConverter.convertObject = function (obj, convertToClass, defaultObjJSON, defaultJSON) {
38637
- if (defaultObjJSON === void 0) { defaultObjJSON = null; }
38995
+ QuestionConverter.getObjJSON = function (obj, defaultObjJSON) {
38996
+ var res = obj.toJSON();
38997
+ if (defaultObjJSON) {
38998
+ for (var key in defaultObjJSON) {
38999
+ if (res[key] && survey_core__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(res[key], defaultObjJSON[key])) {
39000
+ delete res[key];
39001
+ }
39002
+ }
39003
+ }
39004
+ return res;
39005
+ };
39006
+ QuestionConverter.convertObject = function (obj, convertToClass, objJSON, defaultJSON) {
38638
39007
  if (defaultJSON === void 0) { defaultJSON = null; }
38639
39008
  if (!obj || !obj.parent || convertToClass == obj.getType())
38640
39009
  return null;
@@ -38644,14 +39013,8 @@ var QuestionConverter = /** @class */ (function () {
38644
39013
  }
38645
39014
  newQuestion.name = obj.name;
38646
39015
  var json = defaultJSON ? survey_core__WEBPACK_IMPORTED_MODULE_0__["Helpers"].createCopy(defaultJSON) : newQuestion.toJSON();
38647
- var qJson = obj.toJSON();
38648
- if (defaultObjJSON) {
38649
- for (var key in defaultObjJSON) {
38650
- if (qJson[key] && survey_core__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(qJson[key], defaultObjJSON[key])) {
38651
- delete qJson[key];
38652
- }
38653
- }
38654
- }
39016
+ //const qJson = QuestionConverter.getObjJSON(obj, objJSON);
39017
+ var qJson = objJSON || {};
38655
39018
  for (var key in qJson) {
38656
39019
  json[key] = qJson[key];
38657
39020
  }
@@ -39027,21 +39390,25 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
39027
39390
  var textSpan = document.createElement("span");
39028
39391
  textSpan.className = "svc-dragged-element-shortcut__text";
39029
39392
  textSpan.innerText = text;
39030
- draggedElementShortcut.appendChild(this.createDraggedElementIcon());
39393
+ if (this.draggedElement.toolboxItemIconName) {
39394
+ draggedElementShortcut.appendChild(this.createDraggedElementIcon());
39395
+ }
39031
39396
  draggedElementShortcut.appendChild(textSpan);
39032
39397
  draggedElementShortcut.className = this.getDraggedElementClass();
39033
39398
  return draggedElementShortcut;
39034
39399
  };
39035
39400
  DragDropSurveyElements.prototype.createDraggedElementIcon = function () {
39036
39401
  var span = document.createElement("span");
39402
+ span.className = "svc-dragged-element-shortcut__icon";
39037
39403
  var iconName = this.draggedElement.toolboxItemIconName;
39038
39404
  var svgString = "<svg class=\"sv-svg-icon\" role=\"img\" style=\"width: 24px; height: 24px;\"><use xlink:href=\"#" + iconName + "\"></use></svg>";
39039
- span.className = "svc-dragged-element-shortcut__icon";
39040
39405
  span.innerHTML = svgString;
39041
39406
  return span;
39042
39407
  };
39043
39408
  DragDropSurveyElements.prototype.getDraggedElementClass = function () {
39044
39409
  var result = "svc-dragged-element-shortcut";
39410
+ if (!!this.draggedElement.toolboxItemIconName)
39411
+ result += " svc-dragged-element-shortcut--has-icon";
39045
39412
  if (this.isDraggedElementSelected)
39046
39413
  result += " svc-dragged-element-shortcut--selected";
39047
39414
  return result;
@@ -39195,7 +39562,7 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
39195
39562
  target: dropTarget,
39196
39563
  insertAfter: undefined,
39197
39564
  insertBefore: undefined,
39198
- allowMultipleElementsInRow: true
39565
+ allowDropNextToAnother: true
39199
39566
  };
39200
39567
  if (dragOverLocation === survey_core__WEBPACK_IMPORTED_MODULE_1__["DragTypeOverMeEnum"].Bottom || dragOverLocation === survey_core__WEBPACK_IMPORTED_MODULE_1__["DragTypeOverMeEnum"].Right) {
39201
39568
  allowOptions.insertAfter = dropTarget;
@@ -39204,7 +39571,7 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
39204
39571
  allowOptions.insertBefore = dropTarget;
39205
39572
  }
39206
39573
  this.survey.onDragDropAllow.fire(this.survey, allowOptions);
39207
- if (!allowOptions.allowMultipleElementsInRow) {
39574
+ if (!allowOptions.allowDropNextToAnother) {
39208
39575
  if (dragOverLocation === survey_core__WEBPACK_IMPORTED_MODULE_1__["DragTypeOverMeEnum"].Left) {
39209
39576
  this.dragOverLocation = survey_core__WEBPACK_IMPORTED_MODULE_1__["DragTypeOverMeEnum"].Top;
39210
39577
  }
@@ -39623,10 +39990,18 @@ var SurveyHelper = /** @class */ (function () {
39623
39990
  delete json["minWidth"];
39624
39991
  delete json["maxWidth"];
39625
39992
  };
39993
+ SurveyHelper.deleteRandomProperties = function (json) {
39994
+ ["choicesOrder", "rowsOrder"].forEach(function (prop) {
39995
+ if (json[prop] === "random") {
39996
+ delete json[prop];
39997
+ }
39998
+ });
39999
+ };
39626
40000
  SurveyHelper.updateQuestionJson = function (questionJson) {
39627
40001
  questionJson.storeOthersAsComment = false;
39628
40002
  delete questionJson.valuePropertyName;
39629
40003
  SurveyHelper.deleteConditionProperties(questionJson);
40004
+ SurveyHelper.deleteRandomProperties(questionJson);
39630
40005
  SurveyHelper.deleteConditionPropertiesFromArray(questionJson.choices);
39631
40006
  SurveyHelper.deleteConditionPropertiesFromArray(questionJson.rows);
39632
40007
  SurveyHelper.deleteConditionPropertiesFromArray(questionJson.columns);
@@ -40251,6 +40626,19 @@ var QuestionToolboxItem = /** @class */ (function (_super) {
40251
40626
  if (!_this.id) {
40252
40627
  _this.id = _this.name;
40253
40628
  }
40629
+ var originalCss = _this.css;
40630
+ _this.css = new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () {
40631
+ return new survey_core__WEBPACK_IMPORTED_MODULE_1__["CssClassBuilder"]()
40632
+ .append("svc-toolbox__tool")
40633
+ .append("svc-toolbox__tool--action")
40634
+ .append(originalCss)
40635
+ .append("svc-toolbox__tool--hovered", _this.isHovered)
40636
+ .append("svc-toolbox__tool--pressed", _this.isPressed)
40637
+ .append("svc-toolbox__tool--has-icon", !!_this.iconName)
40638
+ .append("svc-toolbox__tool--disabled", _this.enabled === false)
40639
+ .append("sv-action--hidden", !_this.isVisible)
40640
+ .toString();
40641
+ });
40254
40642
  return _this;
40255
40643
  }
40256
40644
  QuestionToolboxItem.prototype.toJSON = function () {
@@ -40273,6 +40661,9 @@ var QuestionToolboxItem = /** @class */ (function (_super) {
40273
40661
  enumerable: false,
40274
40662
  configurable: true
40275
40663
  });
40664
+ QuestionToolboxItem.prototype.getArea = function (target) {
40665
+ return target.closest("#scrollableDiv-designer");
40666
+ };
40276
40667
  QuestionToolboxItem.prototype.hasText = function (text) {
40277
40668
  if (!text)
40278
40669
  return;
@@ -40283,7 +40674,22 @@ var QuestionToolboxItem = /** @class */ (function (_super) {
40283
40674
  }(survey_core__WEBPACK_IMPORTED_MODULE_1__["Action"]));
40284
40675
 
40285
40676
  /**
40286
- * The list of Toolbox items.
40677
+ * An object that enables you to modify Survey Creator's Toolbox. To access this object, use the [`toolbox`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#toolbox) property on a Survey Creator instance:
40678
+ *
40679
+ * ```js
40680
+ * const creatorOptions = { ... };
40681
+ * const creator = new SurveyCreator.SurveyCreator(creatorOptions);
40682
+ * creator.toolbox.settingName = "value";
40683
+ *
40684
+ * // In modular applications:
40685
+ * import { SurveyCreatorModel } from "survey-creator-core";
40686
+ *
40687
+ * const creatorOptions = { ... };
40688
+ * const creator = new SurveyCreatorModel(creatorOptions);
40689
+ * creator.toolbox.settingName = "value";
40690
+ * ```
40691
+ *
40692
+ * [Toolbox Customization](https://surveyjs.io/survey-creator/documentation/toolbox-customization (linkStyle))
40287
40693
  */
40288
40694
  var QuestionToolbox = /** @class */ (function (_super) {
40289
40695
  Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(QuestionToolbox, _super);
@@ -40301,9 +40707,6 @@ var QuestionToolbox = /** @class */ (function (_super) {
40301
40707
  "matrix", "matrixdropdown", "matrixdynamic",
40302
40708
  "html", "expression", "image", "signaturepad"
40303
40709
  ];
40304
- /**
40305
- * The maximum number of copied toolbox items. If an user adding copiedItemMaxCount + 1 item, the first added item will be removed.
40306
- */
40307
40710
  _this.copiedItemMaxCount = 3;
40308
40711
  _this.allowExpandMultipleCategoriesValue = false;
40309
40712
  _this.keepAllCategoriesExpandedValue = false;
@@ -40314,7 +40717,7 @@ var QuestionToolbox = /** @class */ (function (_super) {
40314
40717
  _this.searchManager.toolbox = _this;
40315
40718
  _this.searchItem = new survey_core__WEBPACK_IMPORTED_MODULE_1__["Action"]({
40316
40719
  id: "searchItem-id",
40317
- css: "svc-toolbox__search-button",
40720
+ css: "svc-toolbox__tool svc-toolbox__search-button",
40318
40721
  innerCss: "sv-dots__item",
40319
40722
  iconName: "icon-search",
40320
40723
  component: "sv-action-bar-item",
@@ -40331,7 +40734,7 @@ var QuestionToolbox = /** @class */ (function (_super) {
40331
40734
  }
40332
40735
  Object.defineProperty(QuestionToolbox.prototype, "itemSelector", {
40333
40736
  get: function () {
40334
- return ".svc-toolbox__tool:not(.svc-toolbox__search-button):not(.sv-dots)";
40737
+ return ".svc-toolbox__category>.svc-toolbox__tool--action";
40335
40738
  },
40336
40739
  enumerable: false,
40337
40740
  configurable: true
@@ -40348,10 +40751,15 @@ var QuestionToolbox = /** @class */ (function (_super) {
40348
40751
  return undefined;
40349
40752
  return _creator_settings__WEBPACK_IMPORTED_MODULE_3__["settings"].toolbox.defaultJSON[questionType];
40350
40753
  };
40754
+ QuestionToolbox.getSubTypePropertyName = function (questionType) {
40755
+ var propertyName = "";
40756
+ if (questionType === "text")
40757
+ propertyName = "inputType";
40758
+ if (questionType === "rating")
40759
+ propertyName = "rateType";
40760
+ return propertyName;
40761
+ };
40351
40762
  Object.defineProperty(QuestionToolbox.prototype, "orderedQuestions", {
40352
- /**
40353
- * Modify this array to change the toolbox items order.
40354
- */
40355
40763
  get: function () {
40356
40764
  return this._orderedQuestions;
40357
40765
  },
@@ -40388,6 +40796,14 @@ var QuestionToolbox = /** @class */ (function (_super) {
40388
40796
  };
40389
40797
  QuestionToolbox.prototype.initDotsItem = function () {
40390
40798
  var _this = this;
40799
+ var originalCss = this.dotsItem.css;
40800
+ this.dotsItem.css = new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () {
40801
+ return new survey_core__WEBPACK_IMPORTED_MODULE_1__["CssClassBuilder"]()
40802
+ .append("svc-toolbox__tool")
40803
+ .append(originalCss)
40804
+ .append("sv-action--hidden", !_this.dotsItem.isVisible)
40805
+ .toString();
40806
+ });
40391
40807
  this.dotsItem.popupModel.horizontalPosition = "right";
40392
40808
  this.dotsItem.popupModel.verticalPosition = "top";
40393
40809
  this.dragOrClickHelper = new survey_core__WEBPACK_IMPORTED_MODULE_1__["DragOrClickHelper"](function (pointerDownEvent, currentTarget, itemModel) {
@@ -40492,9 +40908,6 @@ var QuestionToolbox = /** @class */ (function (_super) {
40492
40908
  }
40493
40909
  };
40494
40910
  Object.defineProperty(QuestionToolbox.prototype, "jsonText", {
40495
- /**
40496
- * The Array of Toolbox items as Text JSON.
40497
- */
40498
40911
  get: function () {
40499
40912
  return JSON.stringify(this.actions);
40500
40913
  },
@@ -40506,9 +40919,6 @@ var QuestionToolbox = /** @class */ (function (_super) {
40506
40919
  configurable: true
40507
40920
  });
40508
40921
  Object.defineProperty(QuestionToolbox.prototype, "copiedJsonText", {
40509
- /**
40510
- * The Array of copied Toolbox items as Text JSON.
40511
- */
40512
40922
  get: function () {
40513
40923
  return JSON.stringify(this.copiedItems);
40514
40924
  },
@@ -40525,7 +40935,10 @@ var QuestionToolbox = /** @class */ (function (_super) {
40525
40935
  });
40526
40936
  Object.defineProperty(QuestionToolbox.prototype, "items", {
40527
40937
  /**
40528
- * The Array of Toolbox items.
40938
+ * An array of toolbox items.
40939
+ * @see getItemByName
40940
+ * @see addItem
40941
+ * @see removeItem
40529
40942
  */
40530
40943
  get: function () {
40531
40944
  return this.actions;
@@ -40545,9 +40958,6 @@ var QuestionToolbox = /** @class */ (function (_super) {
40545
40958
  configurable: true
40546
40959
  });
40547
40960
  Object.defineProperty(QuestionToolbox.prototype, "copiedItems", {
40548
- /**
40549
- * The Array of copied Toolbox items
40550
- */
40551
40961
  get: function () {
40552
40962
  var result = [];
40553
40963
  for (var i = 0; i < this.actions.length; i++) {
@@ -40559,11 +40969,6 @@ var QuestionToolbox = /** @class */ (function (_super) {
40559
40969
  enumerable: false,
40560
40970
  configurable: true
40561
40971
  });
40562
- /**
40563
- * Add toolbox items into the Toolbox
40564
- * @param items the list of new items
40565
- * @param clearAll set it to true to clear all previous items.
40566
- */
40567
40972
  QuestionToolbox.prototype.addItems = function (items, clearAll) {
40568
40973
  if (clearAll === void 0) { clearAll = false; }
40569
40974
  if (clearAll) {
@@ -40574,11 +40979,6 @@ var QuestionToolbox = /** @class */ (function (_super) {
40574
40979
  }
40575
40980
  this.onItemsChanged();
40576
40981
  };
40577
- /**
40578
- * Add a copied Question into Toolbox
40579
- * @param question a copied Survey.Question
40580
- * @param options a json object that allows you to override question properties. Attributes are: name, title, tooltip, isCopied, iconName, json and category.
40581
- */
40582
40982
  QuestionToolbox.prototype.addCopiedItem = function (question, options) {
40583
40983
  if (options === void 0) { options = null; }
40584
40984
  if (!options)
@@ -40592,7 +40992,7 @@ var QuestionToolbox = /** @class */ (function (_super) {
40592
40992
  name: name,
40593
40993
  title: title,
40594
40994
  tooltip: tooltip,
40595
- className: "svc-toolbox__item svc-toolbox__item--" + iconName,
40995
+ className: this.getItemClassNames(iconName),
40596
40996
  isCopied: options.isCopied !== false,
40597
40997
  iconName: iconName,
40598
40998
  json: !!options.json ? options.json : this.getQuestionJSON(question),
@@ -40605,21 +41005,58 @@ var QuestionToolbox = /** @class */ (function (_super) {
40605
41005
  this.removeItem(copied[this.copiedItemMaxCount - 1].name);
40606
41006
  this.addItem(item);
40607
41007
  };
40608
- /**
40609
- * Add a toolbox item
40610
- * @param item the toolbox item description
40611
- * @param index the toolbox index to place the item, the item is added to the end if index not passed
40612
- * @see IQuestionToolboxItem
40613
- */
40614
41008
  QuestionToolbox.prototype.getActionByItem = function (item) {
40615
41009
  if (item instanceof QuestionToolboxItem) {
40616
41010
  return item;
40617
41011
  }
40618
41012
  else {
40619
41013
  item.iconName = item.iconName ? item.iconName : QuestionToolbox.defaultIconName;
40620
- return new QuestionToolboxItem(item);
41014
+ var newItem = new QuestionToolboxItem(item);
41015
+ this.addSubTypes(newItem);
41016
+ return newItem;
40621
41017
  }
40622
41018
  };
41019
+ QuestionToolbox.prototype.addSubTypes = function (parentItem) {
41020
+ var _this = this;
41021
+ var property = null;
41022
+ var propName = QuestionToolbox.getSubTypePropertyName(parentItem.id);
41023
+ if (propName)
41024
+ property = survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty(parentItem.id, propName);
41025
+ if (!property || !property.visible)
41026
+ return;
41027
+ var newItems = property.choices.map(function (ch) {
41028
+ var newJson = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, parentItem.json);
41029
+ newJson[propName] = ch;
41030
+ var innerItem = new QuestionToolboxItem({
41031
+ id: ch,
41032
+ name: ch,
41033
+ title: _editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getPropertyValueInEditor(propName, ch),
41034
+ className: _this.getItemClassNames() + " svc-toolbox__item-subtype",
41035
+ json: newJson,
41036
+ iconName: null,
41037
+ category: null,
41038
+ isCopied: false,
41039
+ component: "svc-toolbox-item"
41040
+ });
41041
+ return innerItem;
41042
+ });
41043
+ parentItem.setSubItems({ items: newItems });
41044
+ parentItem.component = "svc-toolbox-item-group";
41045
+ parentItem.popupModel.cssClass += " toolbox-subtypes";
41046
+ parentItem.popupModel.isFocusedContainer = false;
41047
+ var popup = parentItem.popupModel;
41048
+ popup.contentComponentName = "svc-toolbox-list";
41049
+ popup.contentComponentData["toolbox"] = this;
41050
+ popup.isFocusedContent = false;
41051
+ };
41052
+ /**
41053
+ * Adds a new item to the Toolbox.
41054
+ * @param item A [toolbox item configuration](https://surveyjs.io/survey-creator/documentation/api-reference/iquestiontoolboxitem).
41055
+ * @param index *(Optional)* A zero-based index at which to insert the item. If you do not specify this parameter, the item is added to the end.
41056
+ * @see removeItem
41057
+ * @see replaceItem
41058
+ * @see items
41059
+ */
40623
41060
  QuestionToolbox.prototype.addItem = function (item, index) {
40624
41061
  this.correctItem(item);
40625
41062
  var action = this.getActionByItem(item);
@@ -40645,9 +41082,9 @@ var QuestionToolbox = /** @class */ (function (_super) {
40645
41082
  configurable: true
40646
41083
  });
40647
41084
  /**
40648
- * Add a new toolbox item, add delete the old item with the same name
40649
- * @param item the toolbox item description
40650
- * @see IQuestionToolboxItem
41085
+ * Adds a new toolbox item and deletes an existing item with the same name (if there is any).
41086
+ * @param item A [toolbox item configuration](https://surveyjs.io/survey-creator/documentation/api-reference/iquestiontoolboxitem).
41087
+ * @see addItem
40651
41088
  */
40652
41089
  QuestionToolbox.prototype.replaceItem = function (item) {
40653
41090
  this.correctItem(item);
@@ -40659,9 +41096,12 @@ var QuestionToolbox = /** @class */ (function (_super) {
40659
41096
  return true;
40660
41097
  };
40661
41098
  /**
40662
- * Remove a toolbox item by its name
40663
- * @param name toolbox item name
40664
- * @see IQuestionToolboxItem
41099
+ * Removes a [toolbox item](https://surveyjs.io/survey-creator/documentation/api-reference/iquestiontoolboxitem) with a specified name.
41100
+ * @param name A toolbox item's [`name`](https://surveyjs.io/survey-creator/documentation/api-reference/iquestiontoolboxitem#name).
41101
+ * @returns `true` if the item is successfully deleted or `false` otherwise.
41102
+ * @see clearItems
41103
+ * @see addItem
41104
+ * @see items
40665
41105
  */
40666
41106
  QuestionToolbox.prototype.removeItem = function (name) {
40667
41107
  var index = this.indexOf(name);
@@ -40672,15 +41112,15 @@ var QuestionToolbox = /** @class */ (function (_super) {
40672
41112
  return true;
40673
41113
  };
40674
41114
  /**
40675
- * Remove all toolbox items.
41115
+ * Removes all items from the Toolbox.
41116
+ * @see removeItem
41117
+ * @see addItem
41118
+ * @see items
40676
41119
  */
40677
41120
  QuestionToolbox.prototype.clearItems = function () {
40678
41121
  this.actions = [];
40679
41122
  this.onItemsChanged();
40680
41123
  };
40681
- /**
40682
- * Remove all copied toolbox items.
40683
- */
40684
41124
  QuestionToolbox.prototype.clearCopiedItems = function () {
40685
41125
  var removedItems = this.copiedItems;
40686
41126
  for (var i = 0; i < removedItems.length; i++) {
@@ -40688,8 +41128,9 @@ var QuestionToolbox = /** @class */ (function (_super) {
40688
41128
  }
40689
41129
  };
40690
41130
  /**
40691
- * Returns toolbox item by its name. Returns null if there is no toolbox item with this name
40692
- * @param name
41131
+ * Returns a [toolbox item](https://surveyjs.io/survey-creator/documentation/api-reference/iquestiontoolboxitem) with a specified name.
41132
+ * @param name A toolbox item's [`name`](https://surveyjs.io/survey-creator/documentation/api-reference/iquestiontoolboxitem#name).
41133
+ * @returns A toolbox item or `null` if a toolbox item with the specified name isn't found.
40693
41134
  */
40694
41135
  QuestionToolbox.prototype.getItemByName = function (name) {
40695
41136
  if (!name)
@@ -40699,8 +41140,12 @@ var QuestionToolbox = /** @class */ (function (_super) {
40699
41140
  };
40700
41141
  Object.defineProperty(QuestionToolbox.prototype, "allowExpandMultipleCategories", {
40701
41142
  /**
40702
- * Set it to true, to allow end-user to expand more than one category. There will no active category in this case
40703
- * @see activeCategory
41143
+ * Specifies whether more than one category can be in the expanded state at a time. Applies only if [`showCategoryTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox#showCategoryTitles) is `true`.
41144
+ *
41145
+ * If this property is `false`, the currently expanded category collapses when a user expands another category.
41146
+ *
41147
+ * Default value: `false`
41148
+ * @see keepAllCategoriesExpanded
40704
41149
  */
40705
41150
  get: function () {
40706
41151
  return this.allowExpandMultipleCategoriesValue;
@@ -40714,7 +41159,8 @@ var QuestionToolbox = /** @class */ (function (_super) {
40714
41159
  });
40715
41160
  Object.defineProperty(QuestionToolbox.prototype, "keepAllCategoriesExpanded", {
40716
41161
  /**
40717
- * Set it to true to expand all categories and hide expand/collapse category buttons
41162
+ * Specifies whether to expand all categories without the capability to collapse any of them. Applies only if [`showCategoryTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox#showCategoryTitles) is `true`.
41163
+ * @see allowExpandMultipleCategories
40718
41164
  */
40719
41165
  get: function () {
40720
41166
  return this.keepAllCategoriesExpandedValue || !this.showCategoryTitlesValue;
@@ -40731,8 +41177,11 @@ var QuestionToolbox = /** @class */ (function (_super) {
40731
41177
  /**
40732
41178
  * Specifies whether to display category titles in the Toolbox.
40733
41179
  *
40734
- * If you disable this property, the Toolbox hides the titles but continues to display horizontal lines that divide categories. To remove these lines as well, call the `removeCategories()` method.
40735
- * @see removeCategories
41180
+ * Default value: `false`
41181
+ *
41182
+ * If this property is disabled, the Toolbox hides the titles but continues to display horizontal lines that divide categories. To remove these lines as well, call the [`removeCategories()`](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox#removeCategories) method.
41183
+ * @see allowExpandMultipleCategories
41184
+ * @see keepAllCategoriesExpanded
40736
41185
  */
40737
41186
  get: function () {
40738
41187
  return this.showCategoryTitlesValue;
@@ -40778,20 +41227,22 @@ var QuestionToolbox = /** @class */ (function (_super) {
40778
41227
  }
40779
41228
  };
40780
41229
  /**
40781
- * Change the category of the toolbox item
40782
- * @param name the toolbox item name
40783
- * @param category new category name
41230
+ * Changes the category of a toolbox item.
41231
+ * @param itemName A toolbox item's [`name`](https://surveyjs.io/survey-creator/documentation/api-reference/iquestiontoolboxitem#name).
41232
+ * @param categoryName A new category name. Out-of-the-box category names include `"general"`, `"choice"`, `"text"`, `"containers"`, `"matrix"`, and `"misc"`.
41233
+ * @see defineCategories
40784
41234
  */
40785
- QuestionToolbox.prototype.changeCategory = function (name, category) {
40786
- this.changeCategories([{ name: name, category: category }]);
41235
+ QuestionToolbox.prototype.changeCategory = function (itemName, categoryName) {
41236
+ this.changeCategories([{ name: itemName, category: categoryName }]);
40787
41237
  };
40788
41238
  /**
40789
- * Change categories for several toolbox items.
40790
- * @param changedItems the array of objects {name: "your toolbox item name", category: "new category name"}
41239
+ * Changes the categories of multiple toolbox items.
41240
+ * @param items An array of objects with the following structure: `{ name: "toolboxItemName", category: "newCategoryName" }`.
41241
+ * @see defineCategories
40791
41242
  */
40792
- QuestionToolbox.prototype.changeCategories = function (changedItems) {
40793
- for (var i = 0; i < changedItems.length; i++) {
40794
- var item = changedItems[i];
41243
+ QuestionToolbox.prototype.changeCategories = function (items) {
41244
+ for (var i = 0; i < items.length; i++) {
41245
+ var item = items[i];
40795
41246
  var toolboxItem = this.getItemByName(item.name);
40796
41247
  if (toolboxItem) {
40797
41248
  toolboxItem.category = item.category;
@@ -40877,7 +41328,7 @@ var QuestionToolbox = /** @class */ (function (_super) {
40877
41328
  this.onItemsChanged(false);
40878
41329
  };
40879
41330
  /**
40880
- * Removes categories from the Toolbox.
41331
+ * Removes all categories from the Toolbox.
40881
41332
  */
40882
41333
  QuestionToolbox.prototype.removeCategories = function () {
40883
41334
  var allTypes = survey_core__WEBPACK_IMPORTED_MODULE_1__["ElementFactory"].Instance.getAllToolboxTypes();
@@ -40898,9 +41349,10 @@ var QuestionToolbox = /** @class */ (function (_super) {
40898
41349
  }
40899
41350
  };
40900
41351
  /**
40901
- * Expand a category by its name. If allowExpandMultipleCategories is false (default value), all other categories become collapsed
40902
- * @param categoryName the category name
40903
- * @see allowExpandMultipleCategories
41352
+ * Expands a category with a specified name. Applies only if [`showCategoryTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox#showCategoryTitles) is `true`.
41353
+ *
41354
+ * If [`allowExpandMultipleCategories`](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox#allowExpandMultipleCategories) is `false`, all other categories become collapsed.
41355
+ * @param categoryName A category name. Out-of-the-box category names include `"general"`, `"choice"`, `"text"`, `"containers"`, `"matrix"`, and `"misc"`.
40904
41356
  * @see collapseCategory
40905
41357
  */
40906
41358
  QuestionToolbox.prototype.expandCategory = function (categoryName) {
@@ -40917,9 +41369,9 @@ var QuestionToolbox = /** @class */ (function (_super) {
40917
41369
  }
40918
41370
  };
40919
41371
  /**
40920
- * Collapse a category by its name. If allowExpandMultipleCategories is false (default value) this function does nothing
40921
- * @param categoryName the category name
40922
- * @see allowExpandMultipleCategories
41372
+ * Collapses a category with a specified name. Applies only if [`showCategoryTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox#showCategoryTitles) and [`allowExpandMultipleCategories`](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox#allowExpandMultipleCategories) are `true`.
41373
+ * @param categoryName A category name. Out-of-the-box category names include `"general"`, `"choice"`, `"text"`, `"containers"`, `"matrix"`, and `"misc"`.
41374
+ * @see expandCategory
40923
41375
  */
40924
41376
  QuestionToolbox.prototype.collapseCategory = function (categoryName) {
40925
41377
  if (!this.allowExpandMultipleCategories)
@@ -40930,15 +41382,15 @@ var QuestionToolbox = /** @class */ (function (_super) {
40930
41382
  }
40931
41383
  };
40932
41384
  /**
40933
- * Expand all categories. If allowExpandMultipleCategories is false (default value) this function does nothing
40934
- * @see allowExpandMultipleCategories
41385
+ * Expands all categories. Applies only if [`showCategoryTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox#showCategoryTitles) and [`allowExpandMultipleCategories`](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox#allowExpandMultipleCategories) are `true`.
41386
+ * @see collapseAllCategories
40935
41387
  */
40936
41388
  QuestionToolbox.prototype.expandAllCategories = function () {
40937
41389
  this.expandCollapseAllCategories(false);
40938
41390
  };
40939
41391
  /**
40940
- * Collapse all categories. If allowExpandMultipleCategories is false (default value) this function does nothing
40941
- * @see allowExpandMultipleCategories
41392
+ * Collapses all categories. Applies only if [`showCategoryTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox#showCategoryTitles) and [`allowExpandMultipleCategories`](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox#allowExpandMultipleCategories) are `true`.
41393
+ * @see expandAllCategories
40942
41394
  */
40943
41395
  QuestionToolbox.prototype.collapseAllCategories = function () {
40944
41396
  this.expandCollapseAllCategories(true);
@@ -41072,7 +41524,7 @@ var QuestionToolbox = /** @class */ (function (_super) {
41072
41524
  iconName: iconName,
41073
41525
  title: title,
41074
41526
  tooltip: title,
41075
- className: "svc-toolbox__item svc-toolbox__item--" + iconName,
41527
+ className: this.getItemClassNames(iconName),
41076
41528
  json: json,
41077
41529
  isCopied: false,
41078
41530
  category: (defaultCategories[name_1] || "")
@@ -41110,6 +41562,13 @@ var QuestionToolbox = /** @class */ (function (_super) {
41110
41562
  var items = instanceOwner.Instance["items"];
41111
41563
  return !!items ? items : [];
41112
41564
  };
41565
+ QuestionToolbox.prototype.getItemClassNames = function (iconName) {
41566
+ return new survey_core__WEBPACK_IMPORTED_MODULE_1__["CssClassBuilder"]()
41567
+ .append("svc-toolbox__item")
41568
+ .append("svc-toolbox__item--has-icon", !!iconName)
41569
+ .append("svc-toolbox__item--" + iconName, !!iconName)
41570
+ .toString();
41571
+ };
41113
41572
  QuestionToolbox.prototype.addItemFromJSON = function (json) {
41114
41573
  if (json.showInToolbox === false)
41115
41574
  return;
@@ -41133,7 +41592,7 @@ var QuestionToolbox = /** @class */ (function (_super) {
41133
41592
  iconName: iconName,
41134
41593
  title: title,
41135
41594
  tooltip: title,
41136
- className: "svc-toolbox__item svc-toolbox__item--" + iconName,
41595
+ className: this.getItemClassNames(iconName),
41137
41596
  json: elementJson,
41138
41597
  isCopied: false,
41139
41598
  category: category
@@ -41187,6 +41646,14 @@ var QuestionToolbox = /** @class */ (function (_super) {
41187
41646
  }
41188
41647
  return questions;
41189
41648
  };
41649
+ QuestionToolbox.prototype.hideAllInnerPopups = function () {
41650
+ this.actions.forEach(function (action) {
41651
+ action.hidePopup();
41652
+ });
41653
+ };
41654
+ QuestionToolbox.prototype.onScroll = function (model, event) {
41655
+ this.hideAllInnerPopups();
41656
+ };
41190
41657
  QuestionToolbox.MINELEMENTCOUNT = 10;
41191
41658
  QuestionToolbox.defaultIconName = "icon-default";
41192
41659
  QuestionToolbox.defaultCategories = {