survey-creator-core 2.0.8 → 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 (142) hide show
  1. package/fesm/i18n/arabic.mjs +1 -1
  2. package/fesm/i18n/bulgarian.mjs +1 -1
  3. package/fesm/i18n/burmese.mjs +1 -1
  4. package/fesm/i18n/croatian.mjs +1 -1
  5. package/fesm/i18n/czech.mjs +1 -1
  6. package/fesm/i18n/danish.mjs +1 -1
  7. package/fesm/i18n/dutch.mjs +1 -1
  8. package/fesm/i18n/english.mjs +1 -1
  9. package/fesm/i18n/finnish.mjs +1 -1
  10. package/fesm/i18n/french.mjs +1 -1
  11. package/fesm/i18n/german.mjs +1 -1
  12. package/fesm/i18n/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 +107 -31
  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 +19 -14
  117. package/survey-creator-core.fontless.css +18 -13
  118. package/survey-creator-core.fontless.css.map +1 -1
  119. package/survey-creator-core.fontless.min.css +5 -5
  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 +112 -35
  123. package/survey-creator-core.js.map +1 -1
  124. package/survey-creator-core.min.css +6 -6
  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/action-container-view-model.d.ts +3 -3
  136. package/typings/components/page.d.ts +2 -2
  137. package/typings/components/question.d.ts +3 -1
  138. package/typings/components/tabs/theme-plugin.d.ts +2 -0
  139. package/typings/creator-base.d.ts +49 -9
  140. package/typings/creator-events-api.d.ts +6 -6
  141. package/typings/creator-options.d.ts +26 -6
  142. package/typings/toolbox.d.ts +14 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v2.0.8
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
@@ -3858,6 +3858,10 @@ class SurveyHelper {
3858
3858
  delete json["valueName"];
3859
3859
  delete json["choicesVisibleIf"];
3860
3860
  delete json["choicesEnableIf"];
3861
+ delete json["columnsVisibleIf"];
3862
+ delete json["columnsEnableIf"];
3863
+ delete json["rowsVisibleIf"];
3864
+ delete json["rowsEnableIf"];
3861
3865
  delete json["width"];
3862
3866
  delete json["minWidth"];
3863
3867
  delete json["maxWidth"];
@@ -4456,6 +4460,7 @@ class QuestionToolboxItem extends Action {
4456
4460
  super(item);
4457
4461
  this.item = item;
4458
4462
  this.showInToolboxOnly = false;
4463
+ this.needDefaultSubitem = undefined;
4459
4464
  if (!this.id) {
4460
4465
  this.id = this.name;
4461
4466
  }
@@ -4551,6 +4556,7 @@ class QuestionToolboxItem extends Action {
4551
4556
  */
4552
4557
  clearSubitems() {
4553
4558
  if (this.hasSubItems) {
4559
+ this.needDefaultSubitem = undefined;
4554
4560
  this.items = [];
4555
4561
  this.component = "";
4556
4562
  this.popupModel.dispose();
@@ -4568,6 +4574,7 @@ class QuestionToolboxItem extends Action {
4568
4574
  addSubitem(subitem, index = -1) {
4569
4575
  if (!subitem)
4570
4576
  return;
4577
+ this.needDefaultSubitem = undefined;
4571
4578
  const newItem = new QuestionToolboxItem(subitem);
4572
4579
  newItem.iconName = "";
4573
4580
  if (!newItem.className)
@@ -4593,6 +4600,7 @@ class QuestionToolboxItem extends Action {
4593
4600
  removeSubitem(subitem) {
4594
4601
  if (!this.hasSubItems || !subitem)
4595
4602
  return;
4603
+ this.needDefaultSubitem = undefined;
4596
4604
  const id = (subitem === null || subitem === void 0 ? void 0 : subitem.id) || subitem;
4597
4605
  if (!id)
4598
4606
  return;
@@ -4957,6 +4965,8 @@ class QuestionToolbox extends AdaptiveActionContainer {
4957
4965
  }
4958
4966
  /**
4959
4967
  * Adds a new item to the Toolbox.
4968
+ *
4969
+ * [View Demo](https://surveyjs.io/survey-creator/examples/page-break-and-page-merge/ (linkStyle))
4960
4970
  * @param item A [toolbox item configuration](https://surveyjs.io/survey-creator/documentation/api-reference/iquestiontoolboxitem).
4961
4971
  * @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.
4962
4972
  * @see removeItem
@@ -5031,6 +5041,8 @@ class QuestionToolbox extends AdaptiveActionContainer {
5031
5041
  }
5032
5042
  /**
5033
5043
  * Returns a [toolbox item](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolboxitem) with a specified name.
5044
+ *
5045
+ * [View Toolbox Customization Demo](https://surveyjs.io/survey-creator/examples/survey-toolbox-customization/ (linkStyle))
5034
5046
  * @param name A toolbox item's [`name`](https://surveyjs.io/survey-creator/documentation/api-reference/iquestiontoolboxitem#name).
5035
5047
  * @returns A toolbox item or `null` if a toolbox item with the specified name isn't found.
5036
5048
  */
@@ -5046,6 +5058,8 @@ class QuestionToolbox extends AdaptiveActionContainer {
5046
5058
  * If this property is `false`, the currently expanded category collapses when a user expands another category.
5047
5059
  *
5048
5060
  * Default value: `false`
5061
+ *
5062
+ * [View Demo](https://surveyjs.io/survey-creator/examples/survey-toolbox-categories/ (linkStyle))
5049
5063
  * @see keepAllCategoriesExpanded
5050
5064
  */
5051
5065
  get allowExpandMultipleCategories() {
@@ -5057,6 +5071,8 @@ class QuestionToolbox extends AdaptiveActionContainer {
5057
5071
  }
5058
5072
  /**
5059
5073
  * 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`.
5074
+ *
5075
+ * [View Demo](https://surveyjs.io/survey-creator/examples/survey-toolbox-categories/ (linkStyle))
5060
5076
  * @see allowExpandMultipleCategories
5061
5077
  */
5062
5078
  get keepAllCategoriesExpanded() {
@@ -5072,7 +5088,9 @@ class QuestionToolbox extends AdaptiveActionContainer {
5072
5088
  *
5073
5089
  * Default value: `false`
5074
5090
  *
5075
- * 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.
5091
+ * [View Demo](https://surveyjs.io/survey-creator/examples/survey-toolbox-categories/ (linkStyle))
5092
+ *
5093
+ * > 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.
5076
5094
  * @see allowExpandMultipleCategories
5077
5095
  * @see keepAllCategoriesExpanded
5078
5096
  */
@@ -5248,6 +5266,8 @@ class QuestionToolbox extends AdaptiveActionContainer {
5248
5266
  }
5249
5267
  /**
5250
5268
  * Removes all categories from the Toolbox.
5269
+ *
5270
+ * [View Toolbox Customization Demo](https://surveyjs.io/survey-creator/examples/survey-toolbox-customization/ (linkStyle))
5251
5271
  */
5252
5272
  removeCategories() {
5253
5273
  const allTypes = ElementFactory.Instance.getAllToolboxTypes();
@@ -12607,6 +12627,7 @@ const defaultProperties = {
12607
12627
  { name: "questionTitleWidth", tab: "questionSettings" },
12608
12628
  { name: "questionErrorLocation", tab: "questionSettings" },
12609
12629
  { name: "gridLayoutColumns", tab: "questionSettings", index: 900 },
12630
+ { name: "questionOrder", tab: "questionSettings" },
12610
12631
  ],
12611
12632
  tabs: [
12612
12633
  { name: "questionSettings", index: 100 },
@@ -12618,7 +12639,6 @@ const defaultProperties = {
12618
12639
  panel: {
12619
12640
  properties: [
12620
12641
  "isRequired",
12621
- { name: "questionOrder", tab: "questionSettings" },
12622
12642
  { name: "innerIndent", tab: "questionSettings" },
12623
12643
  { name: "requiredErrorText", tab: "validation" },
12624
12644
  { name: "page", tab: "layout" },
@@ -12643,7 +12663,6 @@ const defaultProperties = {
12643
12663
  "navigationDescription",
12644
12664
  "timeLimit",
12645
12665
  "maxTimeToFinish",
12646
- { name: "questionOrder", tab: "questionSettings" },
12647
12666
  { name: "showNavigationButtons", tab: "navigation" }
12648
12667
  ],
12649
12668
  tabs: [{ name: "navigation", index: 350 }, { name: "layout", visible: false }]
@@ -15620,12 +15639,11 @@ __decorate([
15620
15639
  ], MenuButton.prototype, "contentType", void 0);
15621
15640
 
15622
15641
  class SurveyElementResponsivityManager extends ResponsivityManager {
15623
- constructor(container, model, onGetAllowResponsivenessCallback) {
15642
+ constructor(container, model) {
15624
15643
  super(container, model);
15625
- this.onGetAllowResponsivenessCallback = onGetAllowResponsivenessCallback;
15626
15644
  }
15627
15645
  shouldProcessResponsiveness() {
15628
- return super.shouldProcessResponsiveness() && (!this.onGetAllowResponsivenessCallback || this.onGetAllowResponsivenessCallback());
15646
+ return this["model"].isResponsivenessAllowed && super.shouldProcessResponsiveness();
15629
15647
  }
15630
15648
  }
15631
15649
  class SurveyElementActionContainer extends AdaptiveActionContainer {
@@ -15658,7 +15676,7 @@ class SurveyElementActionContainer extends AdaptiveActionContainer {
15658
15676
  constructor() {
15659
15677
  super();
15660
15678
  this.alwaysShrink = false;
15661
- this.isResponsivenessAllowed = false;
15679
+ this._isResponsivenessAllowed = false;
15662
15680
  this.dotsItem.iconSize = "auto";
15663
15681
  this.dotsItem.popupModel.cssClass += " svc-creator-popup";
15664
15682
  this.hiddenItemsListModel.cssClasses = listComponentCss;
@@ -15706,13 +15724,16 @@ class SurveyElementActionContainer extends AdaptiveActionContainer {
15706
15724
  this.hiddenItemsListModel.setItems(items.filter(i => i.mode == "popup").map(i => i.innerItem));
15707
15725
  }
15708
15726
  allowResponsiveness() {
15709
- if (!this.isResponsivenessAllowed) {
15710
- this.isResponsivenessAllowed = true;
15727
+ if (!this._isResponsivenessAllowed) {
15728
+ this._isResponsivenessAllowed = true;
15711
15729
  this.updateCallback && this.updateCallback(true);
15712
15730
  }
15713
15731
  }
15732
+ get isResponsivenessAllowed() {
15733
+ return this._isResponsivenessAllowed;
15734
+ }
15714
15735
  createResponsivityManager(container) {
15715
- return new SurveyElementResponsivityManager(container, this, () => this.isResponsivenessAllowed);
15736
+ return new SurveyElementResponsivityManager(container, this);
15716
15737
  }
15717
15738
  }
15718
15739
 
@@ -23753,6 +23774,7 @@ class TabDesignerPlugin {
23753
23774
  iconName: "gear-24x24",
23754
23775
  iconSize: "auto",
23755
23776
  pressed: false,
23777
+ visible: new ComputedUpdater(() => { return this.creator.showCreatorThemeSettings; }),
23756
23778
  action: () => {
23757
23779
  if (settingsAction.active) {
23758
23780
  this.closeCreatorThemeSettings();
@@ -25575,6 +25597,8 @@ class ThemeTabPlugin {
25575
25597
  * A `ThemeTabPlugin` instance that raised the event.
25576
25598
  * - `options.theme`: [`ITheme`](https://surveyjs.io/form-library/documentation/api-reference/itheme)\
25577
25599
  * A selected theme.
25600
+ *
25601
+ * [View Demo](https://surveyjs.io/survey-creator/examples/save-custom-theme/ (linkStyle))
25578
25602
  * @see availableThemes
25579
25603
  * @see addTheme
25580
25604
  * @see removeTheme
@@ -27051,7 +27075,7 @@ class SurveyCreatorModel extends Base {
27051
27075
  getProcessedText(text) { return text; }
27052
27076
  getLocale() { return this.locale; }
27053
27077
  /**
27054
- * Specifies whether to display the Preview tab.
27078
+ * Specifies whether to display the [Preview](https://surveyjs.io/survey-creator/documentation/end-user-guide/user-interface#preview-tab) tab.
27055
27079
  *
27056
27080
  * Default value: `true`
27057
27081
  * @see activeTab
@@ -27090,6 +27114,10 @@ class SurveyCreatorModel extends Base {
27090
27114
  *
27091
27115
  * - `"buttons"` (default)
27092
27116
  * The Property Grid displays the properties of a currently selected category. Users can switch between categories using buttons on the right side of the Property Grid.
27117
+ *
27118
+ * [Accordion Mode Demo](https://surveyjs.io/survey-creator/examples/property-grid-accordion-view/ (linkStyle))
27119
+ *
27120
+ * [Buttons Mode Demo](https://surveyjs.io/survey-creator/examples/free-nps-survey-template/ (linkStyle))
27093
27121
  */
27094
27122
  get propertyGridNavigationMode() {
27095
27123
  return this.showOneCategoryInPropertyGrid ? "buttons" : "accordion";
@@ -27175,6 +27203,8 @@ class SurveyCreatorModel extends Base {
27175
27203
  *
27176
27204
  * - `"bypage"`
27177
27205
  * Questions and panels are divided between pages. Users can use the page navigator to switch to a required page.
27206
+ *
27207
+ * [View Page-By-Page Mode Demo](https://surveyjs.io/survey-creator/examples/page-level-editing/ (linkStyle))
27178
27208
  * @see allowModifyPages
27179
27209
  */
27180
27210
  get pageEditMode() {
@@ -27379,6 +27409,8 @@ class SurveyCreatorModel extends Base {
27379
27409
  //#region Theme
27380
27410
  /**
27381
27411
  * An object that enables you to manage UI themes. Refer to the following API section for information on available properties, methods, and events: [`ThemeTabPlugin`](https://surveyjs.io/survey-creator/documentation/api-reference/themetabplugin).
27412
+ *
27413
+ * [View Demo](https://surveyjs.io/survey-creator/examples/save-custom-theme/ (linkStyle))
27382
27414
  * @see showThemeTab
27383
27415
  * @see saveThemeFunc
27384
27416
  */
@@ -27389,6 +27421,8 @@ class SurveyCreatorModel extends Base {
27389
27421
  * A function that is called each time users click the [Save button](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#showSaveButton) or [auto-save](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#autoSaveEnabled) is triggered to save a theme JSON object.
27390
27422
  *
27391
27423
  * For more information, refer to the [Save and Load Custom Themes](https://surveyjs.io/survey-creator/documentation/theme-editor#save-and-load-custom-themes) help topic.
27424
+ *
27425
+ * [View Demo](https://surveyjs.io/survey-creator/examples/change-form-theme/ (linkStyle))
27392
27426
  * @see showThemeTab
27393
27427
  * @see themeEditor
27394
27428
  * @see saveSurveyFunc
@@ -27784,11 +27818,11 @@ class SurveyCreatorModel extends Base {
27784
27818
  */
27785
27819
  this.onDefineElementMenuItems = this.onElementGetActions;
27786
27820
  /**
27787
- * An event that is raised when Survey Creator adds properties to a survey element selected on the design surface. Handle this event if you cancel the addition of certain properties and thus [hide them from the Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid-customization#hide-properties-from-the-property-grid).
27821
+ * An event that is raised when Survey Creator adds properties to a survey element selected on the design surface. Handle this event if you want to cancel the addition of certain properties and thus [hide them from the Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid-customization#hide-properties-from-the-property-grid).
27788
27822
  *
27789
27823
  * For information on event handler parameters, refer to descriptions within the interface.
27790
27824
  *
27791
- * [View Demo](https://surveyjs.io/survey-creator/examples/hide-category-from-property-grid/ (linkStyle))
27825
+ * [View Demo](https://surveyjs.io/survey-creator/examples/remove-properties-from-property-grid/ (linkStyle))
27792
27826
  */
27793
27827
  this.onPropertyShowing = this.addCreatorEvent();
27794
27828
  this.onCanShowProperty = this.onPropertyShowing;
@@ -27807,7 +27841,11 @@ class SurveyCreatorModel extends Base {
27807
27841
  */
27808
27842
  this.onPropertyEditorCreated = this.addCreatorEvent();
27809
27843
  /**
27810
- * An event that is raised when title actions are added to a property editor. Title actions are most often used to reveal hints for properties configured by users. Handle this event you want to add, remove, or modify the title actions.
27844
+ * An event that is raised when title actions are added to a property editor. Title actions are most often used to reveal property hints. Handle this event you want to add, remove, or modify the title actions.
27845
+ *
27846
+ * For information on event handler parameters, refer to descriptions within the interface.
27847
+ *
27848
+ * [View Demo](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onPropertyEditorUpdateTitleActions (linkStyle))
27811
27849
  */
27812
27850
  this.onPropertyEditorUpdateTitleActions = this.addCreatorEvent();
27813
27851
  /**
@@ -28072,6 +28110,10 @@ class SurveyCreatorModel extends Base {
28072
28110
  * });
28073
28111
  * ```
28074
28112
  *
28113
+ * [Multilingual Form Demo](https://surveyjs.io/survey-creator/examples/create-multilingual-forms/ (linkStyle))
28114
+ *
28115
+ * [AI-Powered Translation Demo](https://surveyjs.io/survey-creator/examples/ai-translation/ (linkStyle))
28116
+ *
28075
28117
  * > Survey Creator does not include a machine translation service out of the box. Our component only provides a UI for calling the service API.
28076
28118
  * @see startMachineTranslationTo
28077
28119
  */
@@ -28089,6 +28131,10 @@ class SurveyCreatorModel extends Base {
28089
28131
  this.onTranslationItemChanging = this.addCreatorEvent();
28090
28132
  /**
28091
28133
  * An event that is raised when users drag and drop survey elements within the design surface. Use this event to control drag and drop operations.
28134
+ *
28135
+ * For information on event handler parameters, refer to descriptions within the interface.
28136
+ *
28137
+ * [View Demo](https://surveyjs.io/survey-creator/examples/page-break-and-page-merge/ (linkStyle))
28092
28138
  * @see onDragStart
28093
28139
  * @see onDragEnd
28094
28140
  */
@@ -28170,6 +28216,8 @@ class SurveyCreatorModel extends Base {
28170
28216
  * Specifies whether Survey Creator UI elements display survey, page, and question titles instead of their names.
28171
28217
  *
28172
28218
  * Default value: `false`
28219
+ *
28220
+ * [View Demo](https://surveyjs.io/survey-creator/examples/dynamically-modify-newly-added-questions/ (linkStyle))
28173
28221
  * @see onElementGetDisplayName
28174
28222
  */
28175
28223
  this.useElementTitles = false;
@@ -28381,6 +28429,8 @@ class SurveyCreatorModel extends Base {
28381
28429
  * Specifies whether to clear translations to other languages when a source language translation is changed.
28382
28430
  *
28383
28431
  * Default value: `false`
28432
+ *
28433
+ * [View Demo](https://surveyjs.io/survey-creator/examples/ai-translation/ (linkStyle))
28384
28434
  * @see showTranslationTab
28385
28435
  */
28386
28436
  this.clearTranslationsOnSourceTextChange = false;
@@ -28460,6 +28510,8 @@ class SurveyCreatorModel extends Base {
28460
28510
  * Specifies whether to show the sidebar that displays the Property Grid.
28461
28511
  *
28462
28512
  * Default value: `true`
28513
+ *
28514
+ * [View Demo](https://surveyjs.io/survey-creator/examples/customize-property-editors/ (linkStyle))
28463
28515
  * @see sidebarLocation
28464
28516
  */
28465
28517
  get showSidebar() {
@@ -29793,7 +29845,7 @@ class SurveyCreatorModel extends Base {
29793
29845
  deleteObjectCore(obj) {
29794
29846
  if (obj.isPage) {
29795
29847
  var newPage = this.getNextPage(obj);
29796
- this.survey.removePage(obj);
29848
+ obj.delete(false);
29797
29849
  this.selectElement(!!newPage ? newPage : this.survey);
29798
29850
  }
29799
29851
  else {
@@ -29975,6 +30027,8 @@ class SurveyCreatorModel extends Base {
29975
30027
  }
29976
30028
  /**
29977
30029
  * Activates a specified category in Property Grid. Applies only if [`propertyGridNavigationMode`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#propertyGridNavigationMode) is `"buttons"`.
30030
+ *
30031
+ * [View Demo](https://surveyjs.io/survey-creator/examples/add-properties-to-property-grid/ (linkStyle))
29978
30032
  * @param name A [category name](https://surveyjs.io/form-library/documentation/customize-question-types/add-custom-properties-to-a-form#category).
29979
30033
  */
29980
30034
  activatePropertyGridCategory(name) {
@@ -30553,6 +30607,8 @@ class SurveyCreatorModel extends Base {
30553
30607
  * Starts the translation of survey strings from the default language to one or more specified languages using a machine translation service, such as Google Translate or Microsoft Translator.
30554
30608
  *
30555
30609
  * This method only launches the operation by raising the [`onMachineTranslate`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onMachineTranslate) event. Handle this event to perform the actual translation.
30610
+ *
30611
+ * [View Demo](https://surveyjs.io/survey-creator/examples/ai-translation/ (linkStyle))
30556
30612
  * @param locales An array of locale codes that correspond to target languages, for example, `[ "de", "fr" ]`.
30557
30613
  */
30558
30614
  startMachineTranslationTo(locales) {
@@ -30654,6 +30710,8 @@ class SurveyCreatorModel extends Base {
30654
30710
  * A function that is called each time users click the [Save button](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#showSaveButton) or [auto-save](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#autoSaveEnabled) is triggered to save a survey JSON schema.
30655
30711
  *
30656
30712
  * For more information, refer to the Save and Load Survey Model Schemas help topic for your framework: [Angular](https://surveyjs.io/survey-creator/documentation/get-started-angular#save-and-load-survey-model-schemas) | [Vue](https://surveyjs.io/survey-creator/documentation/get-started-vue#save-and-load-survey-model-schemas) | [React](https://surveyjs.io/survey-creator/documentation/get-started-react#save-and-load-survey-model-schemas) | [HTML/CSS/JavaScript](https://surveyjs.io/survey-creator/documentation/get-started-html-css-javascript#save-and-load-survey-model-schemas).
30713
+ *
30714
+ * [View Demo](https://surveyjs.io/survey-creator/examples/set-how-survey-configuration-changes-are-saved/ (linkStyle))
30657
30715
  * @see saveThemeFunc
30658
30716
  */
30659
30717
  get saveSurveyFunc() {
@@ -32498,18 +32556,38 @@ class QuestionAdornerViewModel extends SurveyElementAdornerBase {
32498
32556
  newAction.disableHide = true;
32499
32557
  return newAction;
32500
32558
  }
32501
- jsonsAreCompatible(objJson, json) {
32502
- let jsonIsCorresponded = true;
32503
- Object.keys(json).forEach(p => {
32504
- const question = QuestionFactory.Instance.createQuestion(objJson.type, "question") || this.element;
32505
- const propertyValue = objJson[p] === undefined ? question.getDefaultPropertyValue(p) : objJson[p];
32506
- if (p != "type" && !Helpers.isTwoValueEquals(json[p], propertyValue))
32507
- jsonIsCorresponded = false;
32559
+ static checkForNeedDefaultSubitems(items) {
32560
+ items.filter(i => i.needDefaultSubitem === undefined).forEach((item) => {
32561
+ var _a;
32562
+ item.needDefaultSubitem = false;
32563
+ if (((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
32564
+ item.needDefaultSubitem = true;
32565
+ item.items.forEach(subitem => {
32566
+ const question = QuestionFactory.Instance.createQuestion(item.json.type, "question");
32567
+ if (QuestionAdornerViewModel.jsonsAreCompatible(question, subitem.json))
32568
+ item.needDefaultSubitem = false;
32569
+ });
32570
+ }
32508
32571
  });
32509
- return jsonIsCorresponded;
32572
+ }
32573
+ static jsonsAreCompatible(element, json) {
32574
+ let question = element;
32575
+ const keys = Object.keys(json);
32576
+ for (let i = 0; i < keys.length; i++) {
32577
+ const p = keys[i];
32578
+ if (p === "type")
32579
+ continue;
32580
+ let propertyValue = question.getPropertyValue(p);
32581
+ if (propertyValue === undefined) {
32582
+ propertyValue = p === "type" ? question.getType() : question.getDefaultPropertyValue(p);
32583
+ }
32584
+ if (!Helpers.isTwoValueEquals(json[p], propertyValue))
32585
+ return false;
32586
+ }
32587
+ return true;
32510
32588
  }
32511
32589
  jsonIsCorresponded(json) {
32512
- return this.jsonsAreCompatible(this.element.toJSON(), json);
32590
+ return QuestionAdornerViewModel.jsonsAreCompatible(this.element, json);
32513
32591
  }
32514
32592
  toolboxItemIsCorresponded(toolboxItem, someItemSelectedAlready) {
32515
32593
  const elementType = this.element.getType();
@@ -32536,6 +32614,7 @@ class QuestionAdornerViewModel extends SurveyElementAdornerBase {
32536
32614
  updateQuestionTypeOrSubtypeListModel(listModel, subtypeOnly) {
32537
32615
  var _a;
32538
32616
  const availableItems = this.getConvertToTypes();
32617
+ QuestionAdornerViewModel.checkForNeedDefaultSubitems(availableItems);
32539
32618
  const defaultJsons = this.buildDefaultJsonMap(availableItems);
32540
32619
  const newItems = [];
32541
32620
  let lastItem;
@@ -32558,16 +32637,13 @@ class QuestionAdornerViewModel extends SurveyElementAdornerBase {
32558
32637
  if (((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.creator.toolbox.showSubitems) {
32559
32638
  const subactions = [];
32560
32639
  let selectedSubactionLocal = undefined;
32561
- let allChildsAreCompatibleToParent = false;
32562
32640
  item.items.forEach(subitem => {
32563
32641
  const subaction = toolboxItemToAction(subitem);
32564
32642
  if (this.toolboxItemIsCorresponded(subitem, !!selectedAction))
32565
32643
  selectedSubactionLocal = subitem;
32566
- if (this.jsonsAreCompatible(item.json, subitem.json))
32567
- allChildsAreCompatibleToParent = true;
32568
32644
  subactions.push(subaction);
32569
32645
  });
32570
- if (!allChildsAreCompatibleToParent && subactions.length > 0) {
32646
+ if (item.needDefaultSubitem && subactions.length > 0) {
32571
32647
  const defaultSubaction = toolboxItemToAction(item);
32572
32648
  defaultSubaction.id = action.id + "-default";
32573
32649
  defaultSubaction.iconName = undefined;
@@ -36265,8 +36341,8 @@ class CreatorPreset extends CreatorPresetBase {
36265
36341
  }
36266
36342
 
36267
36343
  let Version;
36268
- Version = `${"2.0.8"}`;
36269
- checkLibraryVersion(`${"2.0.8"}`, "survey-creator-core");
36344
+ Version = `${"2.0.10"}`;
36345
+ checkLibraryVersion(`${"2.0.10"}`, "survey-creator-core");
36270
36346
 
36271
36347
  export { AceJsonEditorModel, ColorCalculator, CreatorAction, CreatorBase, CreatorEvent, CreatorPreset, CreatorPresetBase, CreatorPresetPropertyGrid, CreatorPresetPropertyGridDefinition, CreatorPresetTabs, CreatorPresetToolbox, CreatorPresetToolboxConfigurator, CreatorPresetToolboxDefinition, CreatorResponsivityManager, CreatorThemeModel, CreatorThemes, DEFAULT_MONITOR_DPI, DefaultFonts, DragDropSurveyElements, EditorLocalization, EmptySurveyCreatorOptions, FooterToolbarActionContainer, HEXToRGB, HSBToRGB, HueColorCalculator, ImageItemValueWrapperViewModel, ItemValueWrapperViewModel, JsonDuplicateNameError, JsonEditorBaseModel, LogicEvent, LogoImageViewModel, MatrixCellWrapperEditSurvey, MatrixCellWrapperViewModel, MenuButton, ObjType, ObjectSelector, ObjectSelectorItem, ObjectSelectorModel, PageAdorner, PageNavigatorViewModel, PagesController, PredefinedBackgroundColors, PredefinedColors, PredefinedCreatorThemes, PredefinedThemes, PropertyEditorSetupValue, PropertyGridCellsEditor, PropertyGridEditor, PropertyGridEditorBackgroundCornerRadius, PropertyGridEditorBindings, PropertyGridEditorBoolean, PropertyGridEditorCollection, PropertyGridEditorColor, PropertyGridEditorColorWithAlpha, PropertyGridEditorCondition, PropertyGridEditorDateTime, PropertyGridEditorDropdown, PropertyGridEditorExpression, PropertyGridEditorFontSettings, PropertyGridEditorHtml, PropertyGridEditorImageSize, PropertyGridEditorMatrix, PropertyGridEditorMatrixCalculatedValues, PropertyGridEditorMatrixColumns, PropertyGridEditorMatrixHtmlConditions, PropertyGridEditorMatrixItemValues, PropertyGridEditorMatrixLayoutColumns, PropertyGridEditorMatrixMultipleTypes, PropertyGridEditorMatrixMutlipleTextItems, PropertyGridEditorMatrixPages, PropertyGridEditorMatrixRateValues, PropertyGridEditorMatrixTriggers, PropertyGridEditorMatrixUrlConditions, PropertyGridEditorMatrixValidators, PropertyGridEditorNumber, PropertyGridEditorPage, PropertyGridEditorQuestion, PropertyGridEditorQuestionCarryForward, PropertyGridEditorQuestionHeader, PropertyGridEditorQuestionMaskSettings, PropertyGridEditorQuestionRestfull, PropertyGridEditorQuestionSelectBase, PropertyGridEditorQuestionValue, PropertyGridEditorSet, PropertyGridEditorShadowEffects, PropertyGridEditorSpinEdit, PropertyGridEditorString, PropertyGridEditorStringArray, PropertyGridEditorStringBase, PropertyGridEditorSwitchToggle, PropertyGridEditorText, PropertyGridEditorUndefinedBoolean, PropertyGridLinkEditor, PropertyGridModel, PropertyGridPanelValueEditor, PropertyGridRowValueEditor, PropertyGridTitleActionsCreator, PropertyGridTriggerValueEditor, PropertyGridTriggerValueInLogicEditor, PropertyGridValueEditor, PropertyGridValueEditorBase, PropertyGridViewModel, PropertyJSONGenerator, QuestionAdornerViewModel, QuestionColorModel, QuestionCommentWithResetModel, QuestionConvertMode, QuestionConverter, QuestionDropdownAdornerViewModel, QuestionEmbeddedSurveyModel, QuestionFileEditorModel, QuestionImageAdornerViewModel, QuestionLinkValueModel, QuestionRatingAdornerViewModel, QuestionSpinEditorModel, QuestionTextWithResetModel, QuestionToolbox, QuestionToolboxCategory, QuestionToolboxItem, RGBToHSB, ResetValueAdorner, ResizeManager, RowViewModel, SearchManager, SearchManagerPropertyGrid, SearchManagerToolbox, SidebarHeaderModel, SidebarModel, SidebarPageModel, StringEditorConnector, StringEditorViewModelBase, StringItemsNavigatorBase, SurveyCreatorModel, SurveyHelper, SurveyJSON5, SurveyLogic, SurveyLogicUI, SurveyQuestionEditorDefinition, SurveyQuestionEditorPropertyDefinition, SurveyQuestionEditorTabDefinition, SurveyQuestionProperties, SurveyResultsItemModel, SurveyResultsModel, SurveySimulatorModel, SurveyTextWorker, SurveyTextWorkerError, SurveyTextWorkerJsonError, SurveyTextWorkerParserError, Switcher, TabControlModel, TabDesignerPlugin, TabDesignerViewModel, TabJsonEditorAcePlugin, TabJsonEditorBasePlugin, TabJsonEditorTextareaPlugin, TabLogicPlugin, TabTestPlugin, TabTranslationPlugin, TabbedMenuContainer, TabbedMenuItem, TestSurveyTabViewModel, TextareaJsonEditorModel, ThemeModelEditorDefinition, ThemeTabPlugin, ThemeTabViewModel, Themes, ToolbarActionContainer, ToolboxToolViewModel, Transaction, Translation, TranslationEditor, TranslationForEditor, TranslationGroup, TranslationItem, TranslationItemBase, TranslationItemString, UndoRedoAction, UndoRedoArrayAction, UndoRedoManager, UndoRedoPlugin, Version, assign, assignDefaultClasses, backgroundCornerRadiusFromCssVariable, backgroundCornerRadiusToCssVariable, calculateDragOverLocation, calculateIsEdge, calculateIsSide, capitalize, clearNewLines, colorsAreEqual, convertRgbaToString, copyCssClasses, copyObject, createBoxShadow, createBoxShadowReset, createColor, createExportCSVAction, createImportCSVAction, creatorThemeModelEditorDefinition, creatorThemeModelPropertyGridDefinition, defaultCreatorThemesOrder, defaultPropertyGridDefinition, defaultStrings, defaultThemesOrder, editableStringRendererName, editorLocalization, enStrings, findParentNode, focusFirstControl, fontsettingsFromCssVariable, fontsettingsToCssVariable, getAcceptedTypesByContentMode, getElementWrapperComponentData, getElementWrapperComponentName, getFirstNonTextElement, getItemValueWrapperComponentData, getItemValueWrapperComponentName, getLocString, getLocaleStrings, getNextItemText, getNextItemValue, getNextValue, getNodesFromKoComponentInfo, getOS, getPredefinedBackgoundColorsChoices, getPredefinedColorsItemValues, getQuestionContentWrapperComponentName, getQuestionFromObj, getRGBaChannelValues, iconsV1, iconsV2, ignoreUndoRedo, imageMimeTypes, ingectAlpha, initLogicOperator, initialSettingsAllowShowEmptyTitleInDesignMode, initializeDesignTimeSurveyModel, isStringEditable, isTextInput, listComponentCss, editorLocalization as localization, logicCss, notShortCircuitAnd, parseBoxShadow, parseColor, parseRgbaFromString, propertyGridCss, registerAdorner, registerCreatorTheme, registerSurveyTheme, removeAdorners, roundTo2Decimals, saveToFileHandler, scrollElementIntoView, select, setSurveyJSONForPropertyGrid, settings, setupLocale, simulatorDevices, svgBundle, themeModelPropertyGridDefinition, toggleHovered, translationCss, trimBoxShadowValue, trimEmptyFields, undoRedoTransaction, updateBackgroundCornerRadiusJSON, updateFontSettingsJSON, updateShadowEffectsJSON, updatecoloralphaJSON, wrapTextByCurlyBraces };
36272
36348
  //# sourceMappingURL=survey-creator-core.mjs.map