survey-creator-core 1.9.119 → 1.9.121

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 (83) 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 +2 -1
  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/hungarian.js +1 -1
  25. package/i18n/hungarian.min.js +1 -1
  26. package/i18n/index.js +1 -1
  27. package/i18n/index.min.js +1 -1
  28. package/i18n/indonesian.js +1 -1
  29. package/i18n/indonesian.min.js +1 -1
  30. package/i18n/italian.js +1 -1
  31. package/i18n/italian.min.js +1 -1
  32. package/i18n/japanese.js +1 -1
  33. package/i18n/japanese.min.js +1 -1
  34. package/i18n/korean.js +1 -1
  35. package/i18n/korean.min.js +1 -1
  36. package/i18n/malay.js +1 -1
  37. package/i18n/malay.min.js +1 -1
  38. package/i18n/mongolian.js +1 -1
  39. package/i18n/mongolian.min.js +1 -1
  40. package/i18n/norwegian.js +1 -1
  41. package/i18n/norwegian.min.js +1 -1
  42. package/i18n/persian.js +1 -1
  43. package/i18n/persian.min.js +1 -1
  44. package/i18n/polish.js +1 -1
  45. package/i18n/polish.min.js +1 -1
  46. package/i18n/portuguese.js +1 -1
  47. package/i18n/portuguese.min.js +1 -1
  48. package/i18n/russian.js +1 -1
  49. package/i18n/russian.min.js +1 -1
  50. package/i18n/simplified-chinese.js +1 -1
  51. package/i18n/simplified-chinese.min.js +1 -1
  52. package/i18n/slovak.js +1 -1
  53. package/i18n/slovak.min.js +1 -1
  54. package/i18n/spanish.js +1 -1
  55. package/i18n/spanish.min.js +1 -1
  56. package/i18n/swedish.js +1 -1
  57. package/i18n/swedish.min.js +1 -1
  58. package/i18n/tajik.js +1 -1
  59. package/i18n/tajik.min.js +1 -1
  60. package/i18n/traditional-chinese.js +1 -1
  61. package/i18n/traditional-chinese.min.js +1 -1
  62. package/i18n/turkish.js +1 -1
  63. package/i18n/turkish.min.js +1 -1
  64. package/package.json +2 -2
  65. package/survey-creator-core.css +37 -7
  66. package/survey-creator-core.fontless.css +36 -6
  67. package/survey-creator-core.fontless.css.map +1 -1
  68. package/survey-creator-core.fontless.min.css +5 -5
  69. package/survey-creator-core.i18n.js +1 -1
  70. package/survey-creator-core.i18n.min.js +1 -1
  71. package/survey-creator-core.js +170 -48
  72. package/survey-creator-core.js.map +1 -1
  73. package/survey-creator-core.min.css +6 -6
  74. package/survey-creator-core.min.js +5 -5
  75. package/typings/components/action-container-view-model.d.ts +2 -2
  76. package/typings/components/item-value.d.ts +1 -0
  77. package/typings/components/question.d.ts +1 -0
  78. package/typings/components/results.d.ts +4 -2
  79. package/typings/components/tabs/theme-builder.d.ts +3 -0
  80. package/typings/editorLocalization.d.ts +1 -0
  81. package/typings/localization/english.d.ts +1 -0
  82. package/typings/property-grid/index.d.ts +4 -0
  83. package/typings/property-grid/search-manager.d.ts +2 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v1.9.119
2
+ * SurveyJS Creator v1.9.121
3
3
  * (c) 2015-2023 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.9.119
133
+ * surveyjs - Survey JavaScript library v1.9.121
134
134
  * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
135
135
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
136
136
  */
@@ -4549,20 +4549,37 @@ var SurveyElementActionContainer = /** @class */ (function (_super) {
4549
4549
  function SurveyElementActionContainer() {
4550
4550
  return _super !== null && _super.apply(this, arguments) || this;
4551
4551
  }
4552
- SurveyElementActionContainer.prototype.setModeForActions = function (modes, defaultMode) {
4553
- this.visibleActions.forEach(function (action) {
4554
- action.mode = modes[action.id] || defaultMode;
4555
- });
4552
+ SurveyElementActionContainer.prototype.needToShrink = function (item, shrinkStart, shrinkEnd) {
4553
+ return (item.innerItem.location == "start" && shrinkStart || item.innerItem.location != "start" && shrinkEnd);
4556
4554
  };
4557
- SurveyElementActionContainer.prototype.skipInputType = function (item, dimension) {
4558
- return item.id != "convertInputType" ? dimension : 0;
4555
+ SurveyElementActionContainer.prototype.setModeForActions = function (shrinkStart, shrinkEnd, exclude) {
4556
+ var _this = this;
4557
+ if (exclude === void 0) { exclude = []; }
4558
+ this.visibleActions.forEach(function (item) {
4559
+ if (exclude.indexOf(item.id) != -1) {
4560
+ item.mode = "removed";
4561
+ return;
4562
+ }
4563
+ if (_this.needToShrink(item, shrinkStart, shrinkEnd)) {
4564
+ item.mode = item.innerItem.iconName ? "small" : "removed";
4565
+ return;
4566
+ }
4567
+ item.mode = "large";
4568
+ });
4559
4569
  };
4560
- SurveyElementActionContainer.prototype.skipQuestionType = function (item, dimension) {
4561
- return item.id != "convertInputType" && item.id != "convertTo" ? dimension : 0;
4570
+ SurveyElementActionContainer.prototype.calcItemSize = function (item, shrinkStart, shrinkEnd, exclude) {
4571
+ if (exclude === void 0) { exclude = []; }
4572
+ if (exclude.indexOf(item.id) != -1)
4573
+ return 0;
4574
+ if (this.needToShrink(item, shrinkStart, shrinkEnd)) {
4575
+ if (!item.innerItem.iconName)
4576
+ return 0;
4577
+ return item.minDimension;
4578
+ }
4579
+ return item.maxDimension;
4562
4580
  };
4563
4581
  SurveyElementActionContainer.prototype.fit = function (dimension, dotsItemSize) {
4564
4582
  var _this = this;
4565
- var _a;
4566
4583
  if (dimension <= 0)
4567
4584
  return;
4568
4585
  this.dotsItem.visible = false;
@@ -4571,19 +4588,33 @@ var SurveyElementActionContainer = /** @class */ (function (_super) {
4571
4588
  items.forEach(function (i) { return i.mode = "large"; });
4572
4589
  return;
4573
4590
  }
4574
- if (dimension >= items.reduce(function (sum, i) { return sum += _this.skipInputType(i, i.maxDimension); }, 0)) {
4575
- this.setModeForActions({ "convertInputType": "removed" }, "large");
4591
+ // if (dimension >= items.reduce((sum, i) => sum += this.skipInputType(i, i.maxDimension), 0)) {
4592
+ // this.setModeForActions({ "convertInputType": "removed" }, "large");
4593
+ // return;
4594
+ // }
4595
+ if (dimension >= items.reduce(function (sum, i) { return sum += _this.calcItemSize(i, false, true); }, 0)) {
4596
+ this.setModeForActions(false, true);
4576
4597
  return;
4577
4598
  }
4578
- if (dimension >= items.reduce(function (sum, i) { return sum += _this.skipQuestionType(i, i.minDimension); }, (_a = this.getActionById("convertTo")) === null || _a === void 0 ? void 0 : _a.maxDimension)) {
4579
- this.setModeForActions({ "convertInputType": "removed", "convertTo": "large" }, "small");
4599
+ if (dimension >= items.reduce(function (sum, i) { return sum += _this.calcItemSize(i, false, true, ["convertInputType"]); }, 0)) {
4600
+ this.setModeForActions(false, true, ["convertInputType"]);
4580
4601
  return;
4581
4602
  }
4582
- if (dimension >= items.reduce(function (sum, i) { return sum += _this.skipInputType(i, i.minDimension); }, 0)) {
4583
- this.setModeForActions({ "convertInputType": "removed", "convertTo": "small" }, "small");
4603
+ if (dimension >= items.reduce(function (sum, i) { return sum += _this.calcItemSize(i, true, true); }, 0)) {
4604
+ this.setModeForActions(true, true);
4584
4605
  return;
4585
4606
  }
4586
- this.setModeForActions({ "convertInputType": "removed", "convertTo": "small" }, "popup");
4607
+ this.visibleActions.forEach(function (item) {
4608
+ if (item.id == "convertTo") {
4609
+ item.mode = "small";
4610
+ return;
4611
+ }
4612
+ if (item.id == "convertInputType") {
4613
+ item.mode = "removed";
4614
+ return;
4615
+ }
4616
+ item.mode = "popup";
4617
+ });
4587
4618
  this.dotsItem.visible = true;
4588
4619
  this.hiddenItemsListModel.setItems(items.filter(function (i) { return i.mode == "popup"; }).map(function (i) { return i.innerItem; }));
4589
4620
  };
@@ -5010,8 +5041,10 @@ var ImageItemValueWrapperViewModel = /** @class */ (function (_super) {
5010
5041
  var fileInput = model.itemsRoot.getElementsByClassName("svc-choose-file-input")[0];
5011
5042
  model.creator.chooseFiles(fileInput, function (files) {
5012
5043
  model.isUploading = true;
5013
- model.creator.uploadFiles(files, model.question, function (_, link) {
5014
- model.item.imageLink = link;
5044
+ model.creator.uploadFiles(files, model.question, function (status, link) {
5045
+ if (status === "success") {
5046
+ model.item.imageLink = link;
5047
+ }
5015
5048
  model.isUploading = false;
5016
5049
  });
5017
5050
  }, { element: model.question, item: model.item });
@@ -5019,10 +5052,12 @@ var ImageItemValueWrapperViewModel = /** @class */ (function (_super) {
5019
5052
  ImageItemValueWrapperViewModel.prototype.uploadFiles = function (files) {
5020
5053
  var _this = this;
5021
5054
  this.isUploading = true;
5022
- this.creator.uploadFiles(files, this.question, function (_, link) {
5023
- _this.creator.createNewItemValue(_this.question, _this.isChoosingNewFile, function (res) {
5024
- res.imageLink = link;
5025
- });
5055
+ this.creator.uploadFiles(files, this.question, function (status, link) {
5056
+ if (status === "success") {
5057
+ _this.creator.createNewItemValue(_this.question, _this.isChoosingNewFile, function (res) {
5058
+ res.imageLink = link;
5059
+ });
5060
+ }
5026
5061
  _this.isChoosingNewFile = false;
5027
5062
  _this.isUploading = false;
5028
5063
  });
@@ -5338,7 +5373,7 @@ var ItemValueWrapperViewModel = /** @class */ (function (_super) {
5338
5373
  }, 100);
5339
5374
  };
5340
5375
  ItemValueWrapperViewModel.prototype.updateIsNew = function (question, item) {
5341
- this.isNew = !question.isItemInList(item);
5376
+ this.isNew = !question.isItemInList(item) && !this.isAutoGeneratedItem(item);
5342
5377
  };
5343
5378
  Object.defineProperty(ItemValueWrapperViewModel.prototype, "allowRemove", {
5344
5379
  get: function () {
@@ -5346,7 +5381,8 @@ var ItemValueWrapperViewModel = /** @class */ (function (_super) {
5346
5381
  if (minChoices > 0 && minChoices >= this.question.choices.length)
5347
5382
  return false;
5348
5383
  var isNew = !this.question.isItemInList(this.item);
5349
- return !this.creator.readOnly && this.canTouchItems && (this.allowItemOperations.allowDelete) && !isNew;
5384
+ var isAutoGenerated = this.isAutoGeneratedItem(this.item);
5385
+ return !this.creator.readOnly && this.canTouchItems && (this.allowItemOperations.allowDelete) && !isNew && !isAutoGenerated;
5350
5386
  },
5351
5387
  enumerable: false,
5352
5388
  configurable: true
@@ -5368,7 +5404,8 @@ var ItemValueWrapperViewModel = /** @class */ (function (_super) {
5368
5404
  Object.defineProperty(ItemValueWrapperViewModel.prototype, "allowAdd", {
5369
5405
  get: function () {
5370
5406
  var isNew = !this.question.isItemInList(this.item);
5371
- return !this.creator.readOnly && this.canTouchItems && (this.allowItemOperations.allowAdd) && isNew;
5407
+ var isAutoGenerated = this.isAutoGeneratedItem(this.item);
5408
+ return !this.creator.readOnly && this.canTouchItems && (this.allowItemOperations.allowAdd) && isNew && !isAutoGenerated;
5372
5409
  },
5373
5410
  enumerable: false,
5374
5411
  configurable: true
@@ -5379,6 +5416,16 @@ var ItemValueWrapperViewModel = /** @class */ (function (_super) {
5379
5416
  model.creator.selectElement(model.question, "choices", false);
5380
5417
  event && event.stopPropagation();
5381
5418
  };
5419
+ ItemValueWrapperViewModel.prototype.isAutoGeneratedItem = function (item) {
5420
+ var val = item.value;
5421
+ if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isNumber(val))
5422
+ return false;
5423
+ var min = this.question.choicesMin;
5424
+ var max = this.question.choicesMax;
5425
+ if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isNumber(min) || !survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isNumber(max))
5426
+ return false;
5427
+ return val >= min && val <= max;
5428
+ };
5382
5429
  Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
5383
5430
  Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
5384
5431
  ], ItemValueWrapperViewModel.prototype, "isNew", void 0);
@@ -6997,6 +7044,19 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
6997
7044
  //this.updateActionsProperties();
6998
7045
  Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["toggleHovered"])(event, element);
6999
7046
  };
7047
+ QuestionAdornerViewModel.prototype.updateActionsProperties = function () {
7048
+ if (this.isDisposed)
7049
+ return;
7050
+ _super.prototype.updateActionsProperties.call(this);
7051
+ var actions = this.actionContainer.visibleActions;
7052
+ var switchToStartLocation = false;
7053
+ for (var i = actions.length - 1; i >= 0; i--) {
7054
+ if (actions[i].id === "convertTo")
7055
+ switchToStartLocation = true;
7056
+ if (!actions[i].innerItem.location)
7057
+ actions[i].innerItem.location = switchToStartLocation ? "start" : "end";
7058
+ }
7059
+ };
7000
7060
  QuestionAdornerViewModel.prototype.updateElementAllowOptions = function (options, operationsAllow) {
7001
7061
  _super.prototype.updateElementAllowOptions.call(this, options, operationsAllow);
7002
7062
  this.updateActionVisibility("convertTo", operationsAllow && options.allowChangeType);
@@ -7143,12 +7203,13 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
7143
7203
  var newAction = Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["createDropdownActionModel"])({
7144
7204
  id: id,
7145
7205
  css: "sv-action--convertTo sv-action-bar-item--secondary",
7146
- iconName: (_a = this.creator.toolbox.getItemByName(this.element.getType())) === null || _a === void 0 ? void 0 : _a.iconName,
7206
+ iconName: id == "convertTo" ? (_a = this.creator.toolbox.getItemByName(this.element.getType())) === null || _a === void 0 ? void 0 : _a.iconName : undefined,
7147
7207
  iconSize: 24,
7148
7208
  title: actionTitle,
7149
7209
  enabled: enabled,
7150
7210
  visibleIndex: index,
7151
7211
  disableShrink: false,
7212
+ location: "start",
7152
7213
  action: function (newType) {
7153
7214
  },
7154
7215
  }, {
@@ -7276,15 +7337,17 @@ __webpack_require__.r(__webpack_exports__);
7276
7337
  __webpack_require__(/*! ./results.scss */ "./src/components/results.scss");
7277
7338
  var SurveyResultsItemModel = /** @class */ (function (_super) {
7278
7339
  Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(SurveyResultsItemModel, _super);
7279
- function SurveyResultsItemModel(_data, _lvl) {
7340
+ function SurveyResultsItemModel(survey, _data, _lvl) {
7280
7341
  var _this = _super.call(this) || this;
7342
+ _this.survey = survey;
7281
7343
  _this._data = _data;
7282
7344
  _this._lvl = _lvl;
7283
7345
  _this.toggle = function () {
7284
7346
  _this.collapsed = !_this.collapsed;
7285
7347
  };
7286
7348
  _this.markerWidth = 16;
7287
- _this.items = addCollapsed(_data.data, _lvl + 1);
7349
+ _this.question = survey.getQuestionByName(_this.name);
7350
+ _this.items = addCollapsed(survey, _data.data, _lvl + 1);
7288
7351
  _this.lvl = _lvl;
7289
7352
  return _this;
7290
7353
  }
@@ -7359,10 +7422,10 @@ var SurveyResultsItemModel = /** @class */ (function (_super) {
7359
7422
  return SurveyResultsItemModel;
7360
7423
  }(survey_core__WEBPACK_IMPORTED_MODULE_2__["Base"]));
7361
7424
 
7362
- function addCollapsed(items, initLvl) {
7425
+ function addCollapsed(survey, items, initLvl) {
7363
7426
  if (items === void 0) { items = []; }
7364
7427
  return items.filter(function (item) { return !!item; }).map(function (item) {
7365
- return new SurveyResultsItemModel(item, initLvl);
7428
+ return new SurveyResultsItemModel(survey, item, initLvl);
7366
7429
  });
7367
7430
  }
7368
7431
  var SurveyResultsModel = /** @class */ (function (_super) {
@@ -7378,7 +7441,7 @@ var SurveyResultsModel = /** @class */ (function (_super) {
7378
7441
  };
7379
7442
  _this.resultText = JSON.stringify(survey.data, null, 4);
7380
7443
  var plainData = survey.getPlainData({ includeEmpty: false, includeValues: true });
7381
- _this.resultData = addCollapsed(plainData, 0);
7444
+ _this.resultData = addCollapsed(survey, plainData, 0);
7382
7445
  return _this;
7383
7446
  }
7384
7447
  SurveyResultsModel.prototype.getLocString = function (name) {
@@ -14501,6 +14564,7 @@ var ThemeBuilder = /** @class */ (function (_super) {
14501
14564
  _this.onThemeSelected = new survey_core__WEBPACK_IMPORTED_MODULE_2__["EventBase"]();
14502
14565
  _this.onThemePropertyChanged = new survey_core__WEBPACK_IMPORTED_MODULE_2__["EventBase"]();
14503
14566
  _this.onAllowModifyTheme = new survey_core__WEBPACK_IMPORTED_MODULE_2__["EventBase"]();
14567
+ _this._defaultSessionTheme = ThemeBuilder.DefaultTheme;
14504
14568
  _this.creatorPropertyChanged = function (sender, options) {
14505
14569
  if (options.name === "isMobileView") {
14506
14570
  _this.updateVisibilityOfPropertyGridGroups();
@@ -14630,8 +14694,18 @@ var ThemeBuilder = /** @class */ (function (_super) {
14630
14694
  this.blockThemeChangedNotifications -= 1;
14631
14695
  }
14632
14696
  };
14697
+ Object.defineProperty(ThemeBuilder.prototype, "defaultSessionTheme", {
14698
+ get: function () {
14699
+ return this._defaultSessionTheme;
14700
+ },
14701
+ set: function (theme) {
14702
+ this._defaultSessionTheme = theme;
14703
+ },
14704
+ enumerable: false,
14705
+ configurable: true
14706
+ });
14633
14707
  ThemeBuilder.prototype.resetTheme = function () {
14634
- this.setTheme({});
14708
+ this.setTheme({ themeName: this.defaultSessionTheme.themeName, isPanelless: this.defaultSessionTheme.isPanelless, colorPalette: this.defaultSessionTheme.colorPalette });
14635
14709
  };
14636
14710
  ThemeBuilder.prototype.setTheme = function (theme) {
14637
14711
  this.themeCssVariablesChanges = {};
@@ -14644,7 +14718,7 @@ var ThemeBuilder = /** @class */ (function (_super) {
14644
14718
  };
14645
14719
  ThemeBuilder.prototype.selectTheme = function (themeName, themePalette, themeMode) {
14646
14720
  if (themePalette === void 0) { themePalette = "light"; }
14647
- if (themeMode === void 0) { themeMode = "panelless"; }
14721
+ if (themeMode === void 0) { themeMode = "panels"; }
14648
14722
  this.themeName = themeName;
14649
14723
  this.themePalette = themePalette;
14650
14724
  this.themeMode = themeMode;
@@ -16747,16 +16821,19 @@ var ThemeTabPlugin = /** @class */ (function () {
16747
16821
  }
16748
16822
  });
16749
16823
  this.model.onThemeSelected.add(function (sender, options) {
16824
+ _this.resetTheme.enabled = Object(_themes__WEBPACK_IMPORTED_MODULE_4__["getThemeFullName"])(sender.defaultSessionTheme) !== Object(_themes__WEBPACK_IMPORTED_MODULE_4__["getThemeFullName"])(options.theme);
16750
16825
  _this.saveThemeAction.enabled = true;
16751
16826
  _this.onThemeSelected.fire(_this, options);
16752
16827
  });
16753
16828
  this.model.onThemePropertyChanged.add(function (sender, options) {
16829
+ _this.resetTheme.enabled = true;
16754
16830
  _this.saveThemeAction.enabled = true;
16755
16831
  _this.onThemePropertyChanged.fire(_this, options);
16756
16832
  });
16757
16833
  this.model.onAllowModifyTheme.add(function (sender, options) {
16758
16834
  _this.onAllowModifyTheme.fire(_this, options);
16759
16835
  });
16836
+ this.resetTheme.enabled = Object(_themes__WEBPACK_IMPORTED_MODULE_4__["getThemeFullName"])(this.model.defaultSessionTheme) !== Object(_themes__WEBPACK_IMPORTED_MODULE_4__["getThemeFullName"])(this.creator.theme) || this.isModified;
16760
16837
  };
16761
16838
  ThemeTabPlugin.prototype.deactivate = function () {
16762
16839
  if (this.model) {
@@ -16871,7 +16948,7 @@ var ThemeTabPlugin = /** @class */ (function () {
16871
16948
  });
16872
16949
  items.push(this.saveThemeAction);
16873
16950
  this.resetTheme = new survey_core__WEBPACK_IMPORTED_MODULE_0__["Action"]({
16874
- id: "resetTheme",
16951
+ id: "svc-reset-theme",
16875
16952
  iconName: "icon-reset",
16876
16953
  locTitleName: "ed.themeResetButton",
16877
16954
  locTooltipName: "ed.themeResetButton",
@@ -25674,7 +25751,7 @@ __webpack_require__.r(__webpack_exports__);
25674
25751
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! survey-core */ "survey-core");
25675
25752
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_72___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_72__);
25676
25753
  var Version;
25677
- Version = "" + "1.9.119";
25754
+ Version = "" + "1.9.121";
25678
25755
  //should be loaded before other styles for easier override
25679
25756
  __webpack_require__(/*! ../utils/context-button.scss */ "./src/utils/context-button.scss");
25680
25757
 
@@ -25765,7 +25842,7 @@ __webpack_require__(/*! ../utils/design.scss */ "./src/utils/design.scss");
25765
25842
  __webpack_require__(/*! ../utils/layout.scss */ "./src/utils/layout.scss");
25766
25843
 
25767
25844
  survey_core__WEBPACK_IMPORTED_MODULE_72__["settings"].supportCreatorV2 = true;
25768
- Object(survey_core__WEBPACK_IMPORTED_MODULE_72__["checkLibraryVersion"])("" + "1.9.119", "survey-creator-core");
25845
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_72__["checkLibraryVersion"])("" + "1.9.121", "survey-creator-core");
25769
25846
 
25770
25847
 
25771
25848
  /***/ }),
@@ -28000,6 +28077,7 @@ var enStrings = {
28000
28077
  toolbox: "Toolbox",
28001
28078
  "property-grid": "Properties",
28002
28079
  propertyGridFilteredTextPlaceholder: "Type to search...",
28080
+ propertyGridNoResultsFound: "No results found",
28003
28081
  toolboxGeneralCategory: "General",
28004
28082
  toolboxChoiceCategory: "Choice Questions",
28005
28083
  toolboxTextCategory: "Text Input Questions",
@@ -31176,7 +31254,8 @@ var ConditionEditor = /** @class */ (function (_super) {
31176
31254
  if (!!panel.getQuestionByName("questionValue")) {
31177
31255
  panel.getQuestionByName("questionValue").clearValue();
31178
31256
  }
31179
- var json = this.getQuestionConditionJson(panel.getQuestionByName("questionName").value, panel.getQuestionByName("operator").value);
31257
+ var qName = panel.getQuestionByName("questionName").value;
31258
+ var json = this.getQuestionConditionJson(qName, panel.getQuestionByName("operator").value);
31180
31259
  if (!json) {
31181
31260
  json = {
31182
31261
  type: "text"
@@ -31203,6 +31282,15 @@ var ConditionEditor = /** @class */ (function (_super) {
31203
31282
  newQuestion.description = "";
31204
31283
  newQuestion.titleLocation = "top";
31205
31284
  newQuestion.hasComment = false;
31285
+ if (newQuestion.showOtherItem) {
31286
+ var question = this.getConditionQuestion(qName);
31287
+ if (question && question.getStoreOthersAsComment && question.getStoreOthersAsComment()) {
31288
+ var other = newQuestion.otherItem;
31289
+ newQuestion.choices.push(new survey_core__WEBPACK_IMPORTED_MODULE_1__["ItemValue"](other.value, other.title));
31290
+ other.value = "#" + other.value + "#";
31291
+ newQuestion.showOtherItem = false;
31292
+ }
31293
+ }
31206
31294
  panel.addElement(newQuestion);
31207
31295
  }
31208
31296
  };
@@ -32096,6 +32184,12 @@ var PropertyGridEditorCollection = {
32096
32184
  res.onValueChanged(obj, prop, question);
32097
32185
  }
32098
32186
  },
32187
+ onValueChanging: function (obj, prop, question, options) {
32188
+ var res = this.getEditor(prop);
32189
+ if (!!res && !!res.onValueChanging) {
32190
+ res.onValueChanging(obj, prop, question, options);
32191
+ }
32192
+ },
32099
32193
  onMasterValueChanged: function (obj, prop, question) {
32100
32194
  var res = this.getEditor(prop);
32101
32195
  if (!!res && !!res.onMasterValueChanged) {
@@ -32713,6 +32807,7 @@ var PropertyGridModel = /** @class */ (function () {
32713
32807
  var q = options.question;
32714
32808
  if (!q || !q.property || survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(options.value, options.oldValue, false, false, false))
32715
32809
  return;
32810
+ PropertyGridEditorCollection.onValueChanging(this.obj, q.property, q, options);
32716
32811
  var changingOptions = {
32717
32812
  obj: this.obj,
32718
32813
  propertyName: q.property.name,
@@ -33136,6 +33231,16 @@ var PropertyGridEditorNumber = /** @class */ (function (_super) {
33136
33231
  }
33137
33232
  return res;
33138
33233
  };
33234
+ PropertyGridEditorNumber.prototype.onValueChanging = function (obj, prop, question, options) {
33235
+ if (!options.value && options.value !== 0) {
33236
+ if (prop.defaultValue !== undefined) {
33237
+ options.value = prop.defaultValue;
33238
+ }
33239
+ else {
33240
+ options.value = prop.minValue !== undefined && prop.minValue > 0 ? prop.minValue : 0;
33241
+ }
33242
+ }
33243
+ };
33139
33244
  return PropertyGridEditorNumber;
33140
33245
  }(PropertyGridEditor));
33141
33246
 
@@ -33622,7 +33727,7 @@ var PropertyGridEditorMatrix = /** @class */ (function (_super) {
33622
33727
  return rowObj.text;
33623
33728
  });
33624
33729
  }
33625
- if (propertyName === "title" && objType === "matrixdropdowncolumn") {
33730
+ if (propertyName === "title" && (objType === "matrixdropdowncolumn" || objType === "multipletextitem")) {
33626
33731
  cellQuestion.placeholder = new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () {
33627
33732
  if (!!rowObj.name)
33628
33733
  return rowObj.name;
@@ -34267,7 +34372,7 @@ var PropertyGridEditorMatrixMutlipleTextItems = /** @class */ (function (_super)
34267
34372
  var editor = options.row.editingObj.editor;
34268
34373
  if (!!editor && !!q.property) {
34269
34374
  editor.registerFunctionOnPropertyValueChanged(q.property.name, function () {
34270
- q.value = editor[q.property.name];
34375
+ q.value = survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].getObjPropertyValue(editor, q.property.name);
34271
34376
  });
34272
34377
  }
34273
34378
  };
@@ -34874,6 +34979,7 @@ var SearchManager = /** @class */ (function (_super) {
34874
34979
  _this.highlightedEditorClass = " spg-editor--highlighted";
34875
34980
  _this.searchActionBar = new survey_core__WEBPACK_IMPORTED_MODULE_1__["ActionContainer"]();
34876
34981
  _this.filterStringPlaceholder = Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_2__["getLocString"])("ed.propertyGridFilteredTextPlaceholder");
34982
+ _this.propertyGridNoResultsFound = Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_2__["getLocString"])("ed.propertyGridNoResultsFound");
34877
34983
  _this.allMatches = [];
34878
34984
  _this.initActionBar();
34879
34985
  return _this;
@@ -34905,8 +35011,16 @@ var SearchManager = /** @class */ (function (_super) {
34905
35011
  };
34906
35012
  SearchManager.prototype.updatedMatchCounterText = function (index) {
34907
35013
  var count = this.allMatches.length;
34908
- var value = this.currentMatch ? index + 1 : "0";
34909
- this.matchCounterText = !!this.filterString ? [value, count].join("/") : "";
35014
+ if (count === 1) {
35015
+ this.matchCounterText = "";
35016
+ }
35017
+ else if (this.currentMatch) {
35018
+ var value = index + 1;
35019
+ this.matchCounterText = [value, count].join("/");
35020
+ }
35021
+ else {
35022
+ this.matchCounterText = !!this.filterString ? this.propertyGridNoResultsFound : "";
35023
+ }
34910
35024
  };
34911
35025
  SearchManager.prototype.navigateToEditor = function (index) {
34912
35026
  if (index < 0) {
@@ -34963,8 +35077,7 @@ var SearchManager = /** @class */ (function (_super) {
34963
35077
  showTitle: false,
34964
35078
  iconSize: 16,
34965
35079
  innerCss: "spg-search-editor_bar-item",
34966
- visible: new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return !!_this.filterString; }),
34967
- enabled: new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return _this.allMatches.length > 0; }),
35080
+ visible: new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return _this.allMatches.length > 1; }),
34968
35081
  action: function () {
34969
35082
  if (_this.allMatches.length > 0) {
34970
35083
  _this.navigateToEditor(_this.currentMatchIndex - 1);
@@ -34979,8 +35092,7 @@ var SearchManager = /** @class */ (function (_super) {
34979
35092
  showTitle: false,
34980
35093
  iconSize: 16,
34981
35094
  innerCss: "spg-search-editor_bar-item",
34982
- visible: new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return !!_this.filterString; }),
34983
- enabled: new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return _this.allMatches.length > 0; }),
35095
+ visible: new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return _this.allMatches.length > 1; }),
34984
35096
  action: function () {
34985
35097
  if (_this.allMatches.length > 0) {
34986
35098
  _this.navigateToEditor(_this.currentMatchIndex + 1);
@@ -34997,12 +35109,13 @@ var SearchManager = /** @class */ (function (_super) {
34997
35109
  innerCss: "spg-search-editor_bar-item",
34998
35110
  visible: new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return !!_this.filterString; }),
34999
35111
  action: function () {
35000
- _this.filterString = "";
35112
+ _this.clearFilterString();
35001
35113
  }
35002
35114
  }));
35003
35115
  this.searchActionBar.setItems(searchActions);
35004
35116
  };
35005
35117
  SearchManager.prototype.setSurvey = function (newSurvey) {
35118
+ this.clearFilterString();
35006
35119
  this.survey = newSurvey;
35007
35120
  if (!!this.survey) {
35008
35121
  var _self_1 = this;
@@ -35014,6 +35127,9 @@ var SearchManager = /** @class */ (function (_super) {
35014
35127
  });
35015
35128
  }
35016
35129
  };
35130
+ SearchManager.prototype.clearFilterString = function () {
35131
+ this.filterString = "";
35132
+ };
35017
35133
  SearchManager.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
35018
35134
  _super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
35019
35135
  if (name === "filterString") {
@@ -35496,6 +35612,12 @@ var SurveyQuestionEditorDefinition = /** @class */ (function () {
35496
35612
  "fileOrPhotoPlaceholder"
35497
35613
  ]
35498
35614
  },
35615
+ signaturepad: {
35616
+ properties: [
35617
+ "waitForUpload",
35618
+ { name: "storeDataAsText" },
35619
+ ]
35620
+ },
35499
35621
  html: {
35500
35622
  properties: ["html"]
35501
35623
  },