survey-creator-core 2.0.9 → 2.0.10

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 (137) hide show
  1. package/fesm/i18n/arabic.mjs +1 -1
  2. package/fesm/i18n/bulgarian.mjs +1 -1
  3. package/fesm/i18n/burmese.mjs +1 -1
  4. package/fesm/i18n/croatian.mjs +1 -1
  5. package/fesm/i18n/czech.mjs +1 -1
  6. package/fesm/i18n/danish.mjs +1 -1
  7. package/fesm/i18n/dutch.mjs +1 -1
  8. package/fesm/i18n/english.mjs +1 -1
  9. package/fesm/i18n/finnish.mjs +1 -1
  10. package/fesm/i18n/french.mjs +1 -1
  11. package/fesm/i18n/german.mjs +1 -1
  12. package/fesm/i18n/haitian-creole.mjs +1 -1
  13. package/fesm/i18n/hebrew.mjs +1 -1
  14. package/fesm/i18n/hungarian.mjs +1 -1
  15. package/fesm/i18n/index.mjs +1 -1
  16. package/fesm/i18n/indonesian.mjs +1 -1
  17. package/fesm/i18n/italian.mjs +1 -1
  18. package/fesm/i18n/japanese.mjs +1 -1
  19. package/fesm/i18n/korean.mjs +1 -1
  20. package/fesm/i18n/malay.mjs +1 -1
  21. package/fesm/i18n/mongolian.mjs +1 -1
  22. package/fesm/i18n/norwegian.mjs +1 -1
  23. package/fesm/i18n/persian.mjs +1 -1
  24. package/fesm/i18n/polish.mjs +1 -1
  25. package/fesm/i18n/portuguese.mjs +1 -1
  26. package/fesm/i18n/romanian.mjs +1 -1
  27. package/fesm/i18n/russian.mjs +1 -1
  28. package/fesm/i18n/simplified-chinese.mjs +1 -1
  29. package/fesm/i18n/slovak.mjs +1 -1
  30. package/fesm/i18n/slovenian.mjs +1 -1
  31. package/fesm/i18n/spanish.mjs +1 -1
  32. package/fesm/i18n/swedish.mjs +1 -1
  33. package/fesm/i18n/tajik.mjs +1 -1
  34. package/fesm/i18n/thai.mjs +1 -1
  35. package/fesm/i18n/traditional-chinese.mjs +1 -1
  36. package/fesm/i18n/turkish.mjs +1 -1
  37. package/fesm/survey-creator-core.i18n.mjs +1 -1
  38. package/fesm/survey-creator-core.mjs +36 -19
  39. package/fesm/survey-creator-core.mjs.map +1 -1
  40. package/fesm/themes/index.mjs +1 -1
  41. package/fonts.fontless.css +1 -1
  42. package/fonts.fontless.min.css +1 -1
  43. package/i18n/arabic.js +1 -1
  44. package/i18n/arabic.min.js.LICENSE.txt +1 -1
  45. package/i18n/bulgarian.js +1 -1
  46. package/i18n/bulgarian.min.js.LICENSE.txt +1 -1
  47. package/i18n/burmese.js +1 -1
  48. package/i18n/burmese.min.js.LICENSE.txt +1 -1
  49. package/i18n/croatian.js +1 -1
  50. package/i18n/croatian.min.js.LICENSE.txt +1 -1
  51. package/i18n/czech.js +1 -1
  52. package/i18n/czech.min.js.LICENSE.txt +1 -1
  53. package/i18n/danish.js +1 -1
  54. package/i18n/danish.min.js.LICENSE.txt +1 -1
  55. package/i18n/dutch.js +1 -1
  56. package/i18n/dutch.min.js.LICENSE.txt +1 -1
  57. package/i18n/english.js +1 -1
  58. package/i18n/english.min.js.LICENSE.txt +1 -1
  59. package/i18n/finnish.js +1 -1
  60. package/i18n/finnish.min.js.LICENSE.txt +1 -1
  61. package/i18n/french.js +1 -1
  62. package/i18n/french.min.js.LICENSE.txt +1 -1
  63. package/i18n/german.js +1 -1
  64. package/i18n/german.min.js.LICENSE.txt +1 -1
  65. package/i18n/haitian-creole.js +1 -1
  66. package/i18n/haitian-creole.min.js.LICENSE.txt +1 -1
  67. package/i18n/hebrew.js +1 -1
  68. package/i18n/hebrew.min.js.LICENSE.txt +1 -1
  69. package/i18n/hungarian.js +1 -1
  70. package/i18n/hungarian.min.js.LICENSE.txt +1 -1
  71. package/i18n/index.js +1 -1
  72. package/i18n/index.min.js.LICENSE.txt +1 -1
  73. package/i18n/indonesian.js +1 -1
  74. package/i18n/indonesian.min.js.LICENSE.txt +1 -1
  75. package/i18n/italian.js +1 -1
  76. package/i18n/italian.min.js.LICENSE.txt +1 -1
  77. package/i18n/japanese.js +1 -1
  78. package/i18n/japanese.min.js.LICENSE.txt +1 -1
  79. package/i18n/korean.js +1 -1
  80. package/i18n/korean.min.js.LICENSE.txt +1 -1
  81. package/i18n/malay.js +1 -1
  82. package/i18n/malay.min.js.LICENSE.txt +1 -1
  83. package/i18n/mongolian.js +1 -1
  84. package/i18n/mongolian.min.js.LICENSE.txt +1 -1
  85. package/i18n/norwegian.js +1 -1
  86. package/i18n/norwegian.min.js.LICENSE.txt +1 -1
  87. package/i18n/persian.js +1 -1
  88. package/i18n/persian.min.js.LICENSE.txt +1 -1
  89. package/i18n/polish.js +1 -1
  90. package/i18n/polish.min.js.LICENSE.txt +1 -1
  91. package/i18n/portuguese.js +1 -1
  92. package/i18n/portuguese.min.js.LICENSE.txt +1 -1
  93. package/i18n/romanian.js +1 -1
  94. package/i18n/romanian.min.js.LICENSE.txt +1 -1
  95. package/i18n/russian.js +1 -1
  96. package/i18n/russian.min.js.LICENSE.txt +1 -1
  97. package/i18n/simplified-chinese.js +1 -1
  98. package/i18n/simplified-chinese.min.js.LICENSE.txt +1 -1
  99. package/i18n/slovak.js +1 -1
  100. package/i18n/slovak.min.js.LICENSE.txt +1 -1
  101. package/i18n/slovenian.js +1 -1
  102. package/i18n/slovenian.min.js.LICENSE.txt +1 -1
  103. package/i18n/spanish.js +1 -1
  104. package/i18n/spanish.min.js.LICENSE.txt +1 -1
  105. package/i18n/swedish.js +1 -1
  106. package/i18n/swedish.min.js.LICENSE.txt +1 -1
  107. package/i18n/tajik.js +1 -1
  108. package/i18n/tajik.min.js.LICENSE.txt +1 -1
  109. package/i18n/thai.js +1 -1
  110. package/i18n/thai.min.js.LICENSE.txt +1 -1
  111. package/i18n/traditional-chinese.js +1 -1
  112. package/i18n/traditional-chinese.min.js.LICENSE.txt +1 -1
  113. package/i18n/turkish.js +1 -1
  114. package/i18n/turkish.min.js.LICENSE.txt +1 -1
  115. package/package.json +2 -2
  116. package/survey-creator-core.css +7 -2
  117. package/survey-creator-core.fontless.css +6 -1
  118. package/survey-creator-core.fontless.css.map +1 -1
  119. package/survey-creator-core.fontless.min.css +4 -4
  120. package/survey-creator-core.i18n.js +1 -1
  121. package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
  122. package/survey-creator-core.js +36 -19
  123. package/survey-creator-core.js.map +1 -1
  124. package/survey-creator-core.min.css +5 -5
  125. package/survey-creator-core.min.js +1 -1
  126. package/survey-creator-core.min.js.LICENSE.txt +1 -1
  127. package/themes/default-contrast.js +1 -1
  128. package/themes/default-contrast.min.js.LICENSE.txt +1 -1
  129. package/themes/default-dark.js +1 -1
  130. package/themes/default-dark.min.js.LICENSE.txt +1 -1
  131. package/themes/index.js +1 -1
  132. package/themes/index.min.js.LICENSE.txt +1 -1
  133. package/themes/sc2020.js +1 -1
  134. package/themes/sc2020.min.js.LICENSE.txt +1 -1
  135. package/typings/components/page.d.ts +2 -2
  136. package/typings/components/question.d.ts +3 -1
  137. package/typings/toolbox.d.ts +1 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v2.0.9
2
+ * SurveyJS Creator v2.0.10
3
3
  * (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v2.0.9
2
+ * SurveyJS Creator v2.0.10
3
3
  * (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v2.0.9
2
+ * SurveyJS Creator v2.0.10
3
3
  * (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -3169,18 +3169,29 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
3169
3169
  newAction.disableHide = true;
3170
3170
  return newAction;
3171
3171
  };
3172
- QuestionAdornerViewModel.prototype.jsonsAreCompatible = function (objJson, json) {
3173
- var question = this.element;
3174
- if (!!objJson && !!objJson.type && question.getType() !== objJson.type) {
3175
- question = survey_core__WEBPACK_IMPORTED_MODULE_1__.QuestionFactory.Instance.createQuestion(objJson.type, "question") || this.element;
3176
- }
3172
+ QuestionAdornerViewModel.checkForNeedDefaultSubitems = function (items) {
3173
+ items.filter(function (i) { return i.needDefaultSubitem === undefined; }).forEach(function (item) {
3174
+ var _a;
3175
+ item.needDefaultSubitem = false;
3176
+ if (((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
3177
+ item.needDefaultSubitem = true;
3178
+ item.items.forEach(function (subitem) {
3179
+ var question = survey_core__WEBPACK_IMPORTED_MODULE_1__.QuestionFactory.Instance.createQuestion(item.json.type, "question");
3180
+ if (QuestionAdornerViewModel.jsonsAreCompatible(question, subitem.json))
3181
+ item.needDefaultSubitem = false;
3182
+ });
3183
+ }
3184
+ });
3185
+ };
3186
+ QuestionAdornerViewModel.jsonsAreCompatible = function (element, json) {
3187
+ var question = element;
3177
3188
  var keys = Object.keys(json);
3178
3189
  for (var i = 0; i < keys.length; i++) {
3179
3190
  var p = keys[i];
3180
- if (!objJson && p === "type")
3191
+ if (p === "type")
3181
3192
  continue;
3182
- var propertyValue = !!objJson ? objJson[p] : question.getPropertyValue(p);
3183
- if (!!objJson && propertyValue === undefined) {
3193
+ var propertyValue = question.getPropertyValue(p);
3194
+ if (propertyValue === undefined) {
3184
3195
  propertyValue = p === "type" ? question.getType() : question.getDefaultPropertyValue(p);
3185
3196
  }
3186
3197
  if (!survey_core__WEBPACK_IMPORTED_MODULE_1__.Helpers.isTwoValueEquals(json[p], propertyValue))
@@ -3189,7 +3200,7 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
3189
3200
  return true;
3190
3201
  };
3191
3202
  QuestionAdornerViewModel.prototype.jsonIsCorresponded = function (json) {
3192
- return this.jsonsAreCompatible(undefined, json);
3203
+ return QuestionAdornerViewModel.jsonsAreCompatible(this.element, json);
3193
3204
  };
3194
3205
  QuestionAdornerViewModel.prototype.toolboxItemIsCorresponded = function (toolboxItem, someItemSelectedAlready) {
3195
3206
  var elementType = this.element.getType();
@@ -3217,6 +3228,7 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
3217
3228
  var _this = this;
3218
3229
  var _a;
3219
3230
  var availableItems = this.getConvertToTypes();
3231
+ QuestionAdornerViewModel.checkForNeedDefaultSubitems(availableItems);
3220
3232
  var defaultJsons = this.buildDefaultJsonMap(availableItems);
3221
3233
  var newItems = [];
3222
3234
  var lastItem;
@@ -3240,16 +3252,13 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
3240
3252
  if (((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) > 0 && _this.creator.toolbox.showSubitems) {
3241
3253
  var subactions_1 = [];
3242
3254
  var selectedSubactionLocal_1 = undefined;
3243
- var allChildsAreCompatibleToParent_1 = false;
3244
3255
  item.items.forEach(function (subitem) {
3245
3256
  var subaction = toolboxItemToAction(subitem);
3246
3257
  if (_this.toolboxItemIsCorresponded(subitem, !!selectedAction))
3247
3258
  selectedSubactionLocal_1 = subitem;
3248
- if (_this.jsonsAreCompatible(item.json, subitem.json))
3249
- allChildsAreCompatibleToParent_1 = true;
3250
3259
  subactions_1.push(subaction);
3251
3260
  });
3252
- if (!allChildsAreCompatibleToParent_1 && subactions_1.length > 0) {
3261
+ if (item.needDefaultSubitem && subactions_1.length > 0) {
3253
3262
  var defaultSubaction = toolboxItemToAction(item);
3254
3263
  defaultSubaction.id = action.id + "-default";
3255
3264
  defaultSubaction.iconName = undefined;
@@ -6490,6 +6499,7 @@ var TabDesignerPlugin = /** @class */ (function () {
6490
6499
  iconName: "gear-24x24",
6491
6500
  iconSize: "auto",
6492
6501
  pressed: false,
6502
+ visible: new survey_core__WEBPACK_IMPORTED_MODULE_0__.ComputedUpdater(function () { return _this.creator.showCreatorThemeSettings; }),
6493
6503
  action: function () {
6494
6504
  if (settingsAction.active) {
6495
6505
  _this.closeCreatorThemeSettings();
@@ -21959,7 +21969,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
21959
21969
  SurveyCreatorModel.prototype.deleteObjectCore = function (obj) {
21960
21970
  if (obj.isPage) {
21961
21971
  var newPage = this.getNextPage(obj);
21962
- this.survey.removePage(obj);
21972
+ obj.delete(false);
21963
21973
  this.selectElement(!!newPage ? newPage : this.survey);
21964
21974
  }
21965
21975
  else {
@@ -42696,6 +42706,7 @@ var defaultProperties = {
42696
42706
  { name: "questionTitleWidth", tab: "questionSettings" },
42697
42707
  { name: "questionErrorLocation", tab: "questionSettings" },
42698
42708
  { name: "gridLayoutColumns", tab: "questionSettings", index: 900 },
42709
+ { name: "questionOrder", tab: "questionSettings" },
42699
42710
  ],
42700
42711
  tabs: [
42701
42712
  { name: "questionSettings", index: 100 },
@@ -42707,7 +42718,6 @@ var defaultProperties = {
42707
42718
  panel: {
42708
42719
  properties: [
42709
42720
  "isRequired",
42710
- { name: "questionOrder", tab: "questionSettings" },
42711
42721
  { name: "innerIndent", tab: "questionSettings" },
42712
42722
  { name: "requiredErrorText", tab: "validation" },
42713
42723
  { name: "page", tab: "layout" },
@@ -42732,7 +42742,6 @@ var defaultProperties = {
42732
42742
  "navigationDescription",
42733
42743
  "timeLimit",
42734
42744
  "maxTimeToFinish",
42735
- { name: "questionOrder", tab: "questionSettings" },
42736
42745
  { name: "showNavigationButtons", tab: "navigation" }
42737
42746
  ],
42738
42747
  tabs: [{ name: "navigation", index: 350 }, { name: "layout", visible: false }]
@@ -44068,6 +44077,10 @@ var SurveyHelper = /** @class */ (function () {
44068
44077
  delete json["valueName"];
44069
44078
  delete json["choicesVisibleIf"];
44070
44079
  delete json["choicesEnableIf"];
44080
+ delete json["columnsVisibleIf"];
44081
+ delete json["columnsEnableIf"];
44082
+ delete json["rowsVisibleIf"];
44083
+ delete json["rowsEnableIf"];
44071
44084
  delete json["width"];
44072
44085
  delete json["minWidth"];
44073
44086
  delete json["maxWidth"];
@@ -44916,6 +44929,7 @@ var QuestionToolboxItem = /** @class */ (function (_super) {
44916
44929
  var _this = _super.call(this, item) || this;
44917
44930
  _this.item = item;
44918
44931
  _this.showInToolboxOnly = false;
44932
+ _this.needDefaultSubitem = undefined;
44919
44933
  if (!_this.id) {
44920
44934
  _this.id = _this.name;
44921
44935
  }
@@ -45039,6 +45053,7 @@ var QuestionToolboxItem = /** @class */ (function (_super) {
45039
45053
  */
45040
45054
  QuestionToolboxItem.prototype.clearSubitems = function () {
45041
45055
  if (this.hasSubItems) {
45056
+ this.needDefaultSubitem = undefined;
45042
45057
  this.items = [];
45043
45058
  this.component = "";
45044
45059
  this.popupModel.dispose();
@@ -45057,6 +45072,7 @@ var QuestionToolboxItem = /** @class */ (function (_super) {
45057
45072
  if (index === void 0) { index = -1; }
45058
45073
  if (!subitem)
45059
45074
  return;
45075
+ this.needDefaultSubitem = undefined;
45060
45076
  var newItem = new QuestionToolboxItem(subitem);
45061
45077
  newItem.iconName = "";
45062
45078
  if (!newItem.className)
@@ -45082,6 +45098,7 @@ var QuestionToolboxItem = /** @class */ (function (_super) {
45082
45098
  QuestionToolboxItem.prototype.removeSubitem = function (subitem) {
45083
45099
  if (!this.hasSubItems || !subitem)
45084
45100
  return;
45101
+ this.needDefaultSubitem = undefined;
45085
45102
  var id = (subitem === null || subitem === void 0 ? void 0 : subitem.id) || subitem;
45086
45103
  if (!id)
45087
45104
  return;
@@ -48072,7 +48089,7 @@ __webpack_require__.r(__webpack_exports__);
48072
48089
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! survey-core */ "survey-core");
48073
48090
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_116___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_116__);
48074
48091
  var Version;
48075
- Version = "".concat("2.0.9");
48092
+ Version = "".concat("2.0.10");
48076
48093
  //should be loaded before other styles for easier override
48077
48094
 
48078
48095
 
@@ -48194,7 +48211,7 @@ Version = "".concat("2.0.9");
48194
48211
 
48195
48212
 
48196
48213
 
48197
- (0,survey_core__WEBPACK_IMPORTED_MODULE_116__.checkLibraryVersion)("".concat("2.0.9"), "survey-creator-core");
48214
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_116__.checkLibraryVersion)("".concat("2.0.10"), "survey-creator-core");
48198
48215
 
48199
48216
  })();
48200
48217