survey-creator-core 2.0.0-rc.3 → 2.0.0-rc.4

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 (153) hide show
  1. package/fesm/i18n/arabic.js +1 -1
  2. package/fesm/i18n/bulgarian.js +1 -1
  3. package/fesm/i18n/burmese.js +1 -1
  4. package/fesm/i18n/croatian.js +1 -1
  5. package/fesm/i18n/czech.js +1 -1
  6. package/fesm/i18n/danish.js +1 -1
  7. package/fesm/i18n/dutch.js +1 -1
  8. package/fesm/i18n/english.js +1 -1
  9. package/fesm/i18n/finnish.js +1 -1
  10. package/fesm/i18n/french.js +1 -1
  11. package/fesm/i18n/german.js +1 -1
  12. package/fesm/i18n/hebrew.js +1 -1
  13. package/fesm/i18n/hungarian.js +1 -1
  14. package/fesm/i18n/index.js +1 -1
  15. package/fesm/i18n/indonesian.js +1 -1
  16. package/fesm/i18n/italian.js +1 -1
  17. package/fesm/i18n/japanese.js +1 -1
  18. package/fesm/i18n/korean.js +1 -1
  19. package/fesm/i18n/malay.js +1 -1
  20. package/fesm/i18n/mongolian.js +1 -1
  21. package/fesm/i18n/norwegian.js +1 -1
  22. package/fesm/i18n/persian.js +1 -1
  23. package/fesm/i18n/polish.js +1 -1
  24. package/fesm/i18n/portuguese.js +1 -1
  25. package/fesm/i18n/romanian.js +1 -1
  26. package/fesm/i18n/russian.js +1 -1
  27. package/fesm/i18n/simplified-chinese.js +1 -1
  28. package/fesm/i18n/slovak.js +1 -1
  29. package/fesm/i18n/slovenian.js +1 -1
  30. package/fesm/i18n/spanish.js +1 -1
  31. package/fesm/i18n/swedish.js +1 -1
  32. package/fesm/i18n/tajik.js +1 -1
  33. package/fesm/i18n/thai.js +1 -1
  34. package/fesm/i18n/traditional-chinese.js +1 -1
  35. package/fesm/i18n/turkish.js +1 -1
  36. package/fesm/survey-creator-core.i18n.js +1 -1
  37. package/fesm/survey-creator-core.js +138 -49
  38. package/fesm/survey-creator-core.js.map +1 -1
  39. package/fesm/themes/default-contrast.js +1 -1
  40. package/fesm/themes/default-dark.js +1 -1
  41. package/fesm/themes/index.js +2 -2
  42. package/fesm/themes/index.js.map +1 -1
  43. package/fesm/themes/sc2020.js +2 -2
  44. package/fesm/themes/sc2020.js.map +1 -1
  45. package/fonts.fontless.css +1 -1
  46. package/fonts.fontless.min.css +1 -1
  47. package/i18n/arabic.js +1 -1
  48. package/i18n/arabic.min.js.LICENSE.txt +1 -1
  49. package/i18n/bulgarian.js +1 -1
  50. package/i18n/bulgarian.min.js.LICENSE.txt +1 -1
  51. package/i18n/burmese.js +1 -1
  52. package/i18n/burmese.min.js.LICENSE.txt +1 -1
  53. package/i18n/croatian.js +1 -1
  54. package/i18n/croatian.min.js.LICENSE.txt +1 -1
  55. package/i18n/czech.js +1 -1
  56. package/i18n/czech.min.js.LICENSE.txt +1 -1
  57. package/i18n/danish.js +1 -1
  58. package/i18n/danish.min.js.LICENSE.txt +1 -1
  59. package/i18n/dutch.js +1 -1
  60. package/i18n/dutch.min.js.LICENSE.txt +1 -1
  61. package/i18n/english.js +1 -1
  62. package/i18n/english.min.js.LICENSE.txt +1 -1
  63. package/i18n/finnish.js +1 -1
  64. package/i18n/finnish.min.js.LICENSE.txt +1 -1
  65. package/i18n/french.js +1 -1
  66. package/i18n/french.min.js.LICENSE.txt +1 -1
  67. package/i18n/german.js +1 -1
  68. package/i18n/german.min.js.LICENSE.txt +1 -1
  69. package/i18n/hebrew.js +1 -1
  70. package/i18n/hebrew.min.js.LICENSE.txt +1 -1
  71. package/i18n/hungarian.js +1 -1
  72. package/i18n/hungarian.min.js.LICENSE.txt +1 -1
  73. package/i18n/index.js +1 -1
  74. package/i18n/index.min.js.LICENSE.txt +1 -1
  75. package/i18n/indonesian.js +1 -1
  76. package/i18n/indonesian.min.js.LICENSE.txt +1 -1
  77. package/i18n/italian.js +1 -1
  78. package/i18n/italian.min.js.LICENSE.txt +1 -1
  79. package/i18n/japanese.js +1 -1
  80. package/i18n/japanese.min.js.LICENSE.txt +1 -1
  81. package/i18n/korean.js +1 -1
  82. package/i18n/korean.min.js.LICENSE.txt +1 -1
  83. package/i18n/malay.js +1 -1
  84. package/i18n/malay.min.js.LICENSE.txt +1 -1
  85. package/i18n/mongolian.js +1 -1
  86. package/i18n/mongolian.min.js.LICENSE.txt +1 -1
  87. package/i18n/norwegian.js +1 -1
  88. package/i18n/norwegian.min.js.LICENSE.txt +1 -1
  89. package/i18n/persian.js +1 -1
  90. package/i18n/persian.min.js.LICENSE.txt +1 -1
  91. package/i18n/polish.js +1 -1
  92. package/i18n/polish.min.js.LICENSE.txt +1 -1
  93. package/i18n/portuguese.js +1 -1
  94. package/i18n/portuguese.min.js.LICENSE.txt +1 -1
  95. package/i18n/romanian.js +1 -1
  96. package/i18n/romanian.min.js.LICENSE.txt +1 -1
  97. package/i18n/russian.js +1 -1
  98. package/i18n/russian.min.js.LICENSE.txt +1 -1
  99. package/i18n/simplified-chinese.js +1 -1
  100. package/i18n/simplified-chinese.min.js.LICENSE.txt +1 -1
  101. package/i18n/slovak.js +1 -1
  102. package/i18n/slovak.min.js.LICENSE.txt +1 -1
  103. package/i18n/slovenian.js +1 -1
  104. package/i18n/slovenian.min.js.LICENSE.txt +1 -1
  105. package/i18n/spanish.js +1 -1
  106. package/i18n/spanish.min.js.LICENSE.txt +1 -1
  107. package/i18n/swedish.js +1 -1
  108. package/i18n/swedish.min.js.LICENSE.txt +1 -1
  109. package/i18n/tajik.js +1 -1
  110. package/i18n/tajik.min.js.LICENSE.txt +1 -1
  111. package/i18n/thai.js +1 -1
  112. package/i18n/thai.min.js.LICENSE.txt +1 -1
  113. package/i18n/traditional-chinese.js +1 -1
  114. package/i18n/traditional-chinese.min.js.LICENSE.txt +1 -1
  115. package/i18n/turkish.js +1 -1
  116. package/i18n/turkish.min.js.LICENSE.txt +1 -1
  117. package/package.json +2 -2
  118. package/survey-creator-core.css +40 -59
  119. package/survey-creator-core.fontless.css +39 -58
  120. package/survey-creator-core.fontless.css.map +1 -1
  121. package/survey-creator-core.fontless.min.css +7 -7
  122. package/survey-creator-core.i18n.js +1 -1
  123. package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
  124. package/survey-creator-core.js +140 -55
  125. package/survey-creator-core.js.map +1 -1
  126. package/survey-creator-core.min.css +8 -8
  127. package/survey-creator-core.min.js +1 -1
  128. package/survey-creator-core.min.js.LICENSE.txt +1 -1
  129. package/themes/default-contrast.js +1 -1
  130. package/themes/default-contrast.min.js.LICENSE.txt +1 -1
  131. package/themes/default-dark.js +1 -1
  132. package/themes/default-dark.min.js.LICENSE.txt +1 -1
  133. package/themes/index.d.ts +1 -1
  134. package/themes/index.js +2 -2
  135. package/themes/index.js.map +1 -1
  136. package/themes/index.min.js +1 -1
  137. package/themes/index.min.js.LICENSE.txt +1 -1
  138. package/themes/sc2020.d.ts +2 -2
  139. package/themes/sc2020.js +2 -2
  140. package/themes/sc2020.js.map +1 -1
  141. package/themes/sc2020.min.js +1 -1
  142. package/themes/sc2020.min.js.LICENSE.txt +1 -1
  143. package/typings/components/tabs/designer.d.ts +4 -1
  144. package/typings/creator-base.d.ts +66 -11
  145. package/typings/creator-events-api.d.ts +6 -0
  146. package/typings/creator-options.d.ts +5 -0
  147. package/typings/creator-settings.d.ts +8 -1
  148. package/typings/creator-theme/creator-themes.d.ts +1 -0
  149. package/typings/designTabSurveyThemeJSON.d.ts +2 -0
  150. package/typings/tabbed-menu.d.ts +1 -1
  151. package/typings/themes/index.d.ts +1 -1
  152. package/typings/themes/sc2020.d.ts +2 -2
  153. package/typings/utils/utils.d.ts +1 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v2.0.0-rc.3
2
+ * SurveyJS Creator v2.0.0-rc.4
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.0-rc.3
2
+ * SurveyJS Creator v2.0.0-rc.4
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.0-rc.3
2
+ * SurveyJS Creator v2.0.0-rc.4
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
@@ -10469,7 +10469,7 @@ var TabDesignerPlugin = /** @class */ (function () {
10469
10469
  var _this = this;
10470
10470
  this.creator = creator;
10471
10471
  this._showOneCategoryInPropertyGrid = true;
10472
- creator.addPluginTab("designer", this);
10472
+ creator.addTab({ name: "designer", plugin: this, iconName: "icon-config" });
10473
10473
  this.tabControlModel = new _side_bar_tab_control_model__WEBPACK_IMPORTED_MODULE_6__.TabControlModel(this.creator.sidebar);
10474
10474
  this.propertyGrid = new _property_grid__WEBPACK_IMPORTED_MODULE_2__.PropertyGridModel(undefined, creator, creator.getPropertyGridDefinition());
10475
10475
  this.showOneCategoryInPropertyGrid = creator.showOneCategoryInPropertyGrid;
@@ -11069,6 +11069,7 @@ var TabDesignerViewModel = /** @class */ (function (_super) {
11069
11069
  "--lbr-stroke-unit": 1,
11070
11070
  };
11071
11071
  _this.surfaceScale = 100;
11072
+ _this.surfaceCssVariables = {};
11072
11073
  _this.scaleCssVariables = {};
11073
11074
  _this._pages = [];
11074
11075
  _this.pagesAnimation = new survey_core__WEBPACK_IMPORTED_MODULE_1__.AnimationGroup(_this.getPagesAnimationOptions(), function (val) {
@@ -11078,12 +11079,22 @@ var TabDesignerViewModel = /** @class */ (function (_super) {
11078
11079
  _this.creator = creator;
11079
11080
  _this.pagesControllerValue = new _pages_controller__WEBPACK_IMPORTED_MODULE_3__.PagesController(creator);
11080
11081
  _this.creator.dragDropChoices.onShortcutCreated = function (shortcut) {
11081
- Object.keys(_this.surveyThemeVariables).forEach(function (key) {
11082
- shortcut.style.setProperty(key, _this.surveyThemeVariables[key]);
11082
+ var _a;
11083
+ var cssVariables = {};
11084
+ if ((_a = _this.creator.dragDropChoices["parentElement"]) === null || _a === void 0 ? void 0 : _a.survey["isPopupEditorContent"]) {
11085
+ (0,_utils_utils__WEBPACK_IMPORTED_MODULE_7__.assign)(cssVariables, _designTabSurveyThemeJSON__WEBPACK_IMPORTED_MODULE_8__["default"].cssVariables);
11086
+ }
11087
+ else {
11088
+ shortcut.classList.add("svc-surface-drag-drop-choices-shortcut");
11089
+ (0,_utils_utils__WEBPACK_IMPORTED_MODULE_7__.assign)(cssVariables, _this.surfaceCssVariables);
11090
+ }
11091
+ Object.keys(cssVariables).forEach(function (key) {
11092
+ shortcut.style.setProperty(key, cssVariables[key]);
11083
11093
  });
11084
11094
  };
11085
11095
  _this.initSurfaceToolbar();
11086
11096
  _this.initSurvey();
11097
+ _this.updateSurfaceCssVariables();
11087
11098
  return _this;
11088
11099
  }
11089
11100
  Object.defineProperty(TabDesignerViewModel.prototype, "displayPageDropTarget", {
@@ -11139,18 +11150,12 @@ var TabDesignerViewModel = /** @class */ (function (_super) {
11139
11150
  TabDesignerViewModel.prototype.isModifiedPage = function (page) {
11140
11151
  return Object.keys(page.toJSON()).filter(function (key) { return key !== "name"; }).length > 0;
11141
11152
  };
11142
- Object.defineProperty(TabDesignerViewModel.prototype, "surveyThemeVariables", {
11143
- get: function () {
11144
- var cssVariables = {};
11145
- (0,_utils_utils__WEBPACK_IMPORTED_MODULE_7__.assign)(cssVariables, _designTabSurveyThemeJSON__WEBPACK_IMPORTED_MODULE_8__["default"].cssVariables, {
11146
- "--sjs-base-unit": "var(--ctr-surface-base-unit)",
11147
- "--sjs-font-size": "calc(2 * var(--ctr-surface-base-unit))",
11148
- });
11149
- return cssVariables;
11150
- },
11151
- enumerable: false,
11152
- configurable: true
11153
- });
11153
+ TabDesignerViewModel.prototype.updateSurfaceCssVariables = function () {
11154
+ var _a;
11155
+ var cssVariables = {};
11156
+ (0,_utils_utils__WEBPACK_IMPORTED_MODULE_7__.assign)(cssVariables, _designTabSurveyThemeJSON__WEBPACK_IMPORTED_MODULE_8__["default"].cssVariables, ((_a = this.creator.creatorTheme) === null || _a === void 0 ? void 0 : _a.cssVariables) || {}, this.scaleCssVariables);
11157
+ this.surfaceCssVariables = cssVariables;
11158
+ };
11154
11159
  TabDesignerViewModel.prototype.initSurfaceToolbar = function () {
11155
11160
  var _this = this;
11156
11161
  this.surfaceToolbar = new survey_core__WEBPACK_IMPORTED_MODULE_1__.ActionContainer();
@@ -11245,9 +11250,7 @@ var TabDesignerViewModel = /** @class */ (function (_super) {
11245
11250
  Object.keys(this.unitDictionary).forEach(function (key) {
11246
11251
  _this.scaleCssVariables[key] = (_this.unitDictionary[key] * scaleFactor / 100) + "px";
11247
11252
  });
11248
- var newCssVariable = {};
11249
- (0,_utils_utils__WEBPACK_IMPORTED_MODULE_7__.assign)(newCssVariable, this.creator.themeVariables, this.scaleCssVariables);
11250
- this.creator.themeVariables = newCssVariable;
11253
+ this.updateSurfaceCssVariables();
11251
11254
  };
11252
11255
  Object.defineProperty(TabDesignerViewModel.prototype, "survey", {
11253
11256
  get: function () {
@@ -11326,7 +11329,11 @@ var TabDesignerViewModel = /** @class */ (function (_super) {
11326
11329
  this.isUpdatingNewPage = false;
11327
11330
  };
11328
11331
  TabDesignerViewModel.prototype.calculateDesignerCss = function () {
11329
- return this.survey.css.container + " " + this.survey.css.container + "--" + this.survey.calculatedWidthMode;
11332
+ return new survey_core__WEBPACK_IMPORTED_MODULE_1__.CssClassBuilder()
11333
+ .append("svc-designer-surface")
11334
+ .append(this.survey.css.container)
11335
+ .append(this.survey.css.container + "--" + this.survey.calculatedWidthMode)
11336
+ .toString();
11330
11337
  };
11331
11338
  TabDesignerViewModel.prototype.initSurvey = function () {
11332
11339
  var _this = this;
@@ -11495,6 +11502,9 @@ var TabDesignerViewModel = /** @class */ (function (_super) {
11495
11502
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
11496
11503
  (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.property)()
11497
11504
  ], TabDesignerViewModel.prototype, "surfaceScale", void 0);
11505
+ (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
11506
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.property)()
11507
+ ], TabDesignerViewModel.prototype, "surfaceCssVariables", void 0);
11498
11508
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
11499
11509
  (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.propertyArray)()
11500
11510
  ], TabDesignerViewModel.prototype, "_pages", void 0);
@@ -11977,7 +11987,7 @@ var TabJsonEditorAcePlugin = /** @class */ (function (_super) {
11977
11987
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(TabJsonEditorAcePlugin, _super);
11978
11988
  function TabJsonEditorAcePlugin(creator) {
11979
11989
  var _this = _super.call(this, creator) || this;
11980
- creator.addPluginTab("json", _this, undefined, "svc-tab-json-editor-ace");
11990
+ creator.addTab({ name: "json", plugin: _this, iconName: "icon-codeeditor-24x24", componentName: "svc-tab-json-editor-ace" });
11981
11991
  return _this;
11982
11992
  }
11983
11993
  TabJsonEditorAcePlugin.prototype.createModel = function (creator) {
@@ -12388,7 +12398,7 @@ var TabJsonEditorTextareaPlugin = /** @class */ (function (_super) {
12388
12398
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(TabJsonEditorTextareaPlugin, _super);
12389
12399
  function TabJsonEditorTextareaPlugin(creator) {
12390
12400
  var _this = _super.call(this, creator) || this;
12391
- creator.addPluginTab("json", _this, undefined, "svc-tab-json-editor-textarea");
12401
+ creator.addTab({ name: "json", plugin: _this, iconName: "icon-codeeditor-24x24", componentName: "svc-tab-json-editor-textarea" });
12392
12402
  return _this;
12393
12403
  }
12394
12404
  TabJsonEditorTextareaPlugin.prototype.createModel = function (creator) {
@@ -14131,7 +14141,7 @@ __webpack_require__.r(__webpack_exports__);
14131
14141
  var TabLogicPlugin = /** @class */ (function () {
14132
14142
  function TabLogicPlugin(creator) {
14133
14143
  this.creator = creator;
14134
- creator.addPluginTab("logic", this);
14144
+ creator.addTab({ name: "logic", plugin: this, iconName: "icon-logic-24x24" });
14135
14145
  this.createActions().forEach(function (action) { return creator.toolbar.actions.push(action); });
14136
14146
  }
14137
14147
  TabLogicPlugin.prototype.activate = function () {
@@ -15323,7 +15333,6 @@ var SurveyLogicUI = /** @class */ (function (_super) {
15323
15333
  if (!_this.options)
15324
15334
  _this.options = new _creator_settings__WEBPACK_IMPORTED_MODULE_3__.EmptySurveyCreatorOptions();
15325
15335
  _this.setupToolbarItems();
15326
- _this.update();
15327
15336
  return _this;
15328
15337
  }
15329
15338
  SurveyLogicUI.prototype.update = function (survey, options) {
@@ -16858,7 +16867,7 @@ var TabTestPlugin = /** @class */ (function () {
16858
16867
  this.creator = creator;
16859
16868
  this.simulatorTheme = survey_core__WEBPACK_IMPORTED_MODULE_1__.surveyCss[survey_core__WEBPACK_IMPORTED_MODULE_1__.defaultThemeName];
16860
16869
  this._previewDevice = "";
16861
- creator.addPluginTab("preview", this);
16870
+ creator.addTab({ name: "preview", plugin: this, iconName: "icon-preview" });
16862
16871
  this.setPreviewTheme(this.creator.previewTheme);
16863
16872
  this.createActions().forEach(function (action) { return creator.toolbar.actions.push(action); });
16864
16873
  }
@@ -19067,7 +19076,7 @@ var ThemeTabPlugin = /** @class */ (function () {
19067
19076
  * A Boolean property that you can set to `false` if you want to disallow theme modifications.
19068
19077
  */
19069
19078
  this.onAllowModifyTheme = new survey_core__WEBPACK_IMPORTED_MODULE_0__.EventBase();
19070
- creator.addPluginTab("theme", this);
19079
+ creator.addTab({ name: "theme", plugin: this, iconName: "icon-theme" });
19071
19080
  this.simulatorCssClasses = survey_core__WEBPACK_IMPORTED_MODULE_0__.surveyCss[survey_core__WEBPACK_IMPORTED_MODULE_0__.defaultThemeName];
19072
19081
  this.tabControlModel = new _side_bar_tab_control_model__WEBPACK_IMPORTED_MODULE_13__.TabControlModel(this.creator.sidebar);
19073
19082
  this.createActions().forEach(function (action) { return creator.toolbar.actions.push(action); });
@@ -20010,7 +20019,7 @@ var TabTranslationPlugin = /** @class */ (function () {
20010
20019
  function TabTranslationPlugin(creator) {
20011
20020
  this.creator = creator;
20012
20021
  this._showOneCategoryInPropertyGrid = true;
20013
- creator.addPluginTab("translation", this);
20022
+ creator.addTab({ name: "translation", plugin: this, iconName: "icon-language" });
20014
20023
  this.showOneCategoryInPropertyGrid = creator.showOneCategoryInPropertyGrid;
20015
20024
  this.tabControlModel = new _side_bar_tab_control_model__WEBPACK_IMPORTED_MODULE_3__.TabControlModel(this.creator.sidebar);
20016
20025
  this.sidebarTab = this.creator.sidebar.addPage("translation");
@@ -23278,6 +23287,9 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23278
23287
  * ```
23279
23288
  */
23280
23289
  _this.onCreateCustomMessagePanel = _this.addCreatorEvent();
23290
+ /**
23291
+ * An event that is raised when users change a property in a [Survey Creator theme](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#creatorTheme).
23292
+ */
23281
23293
  _this.onCreatorThemePropertyChanged = _this.addCreatorEvent();
23282
23294
  // /**
23283
23295
  // * You need to set this property to true if you want to use tabs instead of accordion in the popup element's editor.
@@ -23542,6 +23554,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23542
23554
  _this.initTabs();
23543
23555
  _this.syncSaveButtons = _this.options.saveSurveyAndTheme !== undefined ? _this.options.saveSurveyAndTheme : _this.options.syncSaveButtons;
23544
23556
  _this.isTouch = survey_core__WEBPACK_IMPORTED_MODULE_1__.IsTouch;
23557
+ _this.currentOS = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_8__.getOS)();
23545
23558
  var expandAction = _this.sidebar.getExpandAction();
23546
23559
  !!expandAction && _this.toolbar.actions.push(expandAction);
23547
23560
  return _this;
@@ -23692,7 +23705,10 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23692
23705
  });
23693
23706
  Object.defineProperty(SurveyCreatorModel.prototype, "startEditTitleOnQuestionAdded", {
23694
23707
  get: function () {
23695
- return !this.isMobileView && !this.toolbox.searchManager.filterString && this.startEditTitleOnQuestionAddedValue;
23708
+ return !this.isMobileView &&
23709
+ !((this.currentOS == "iOS" || this.currentOS == "Mac OS") && this.isTouch) &&
23710
+ !this.toolbox.searchManager.filterString &&
23711
+ this.startEditTitleOnQuestionAddedValue;
23696
23712
  },
23697
23713
  set: function (value) {
23698
23714
  this.startEditTitleOnQuestionAddedValue = value;
@@ -23804,18 +23820,45 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
23804
23820
  SurveyCreatorModel.prototype.showPreview = function () {
23805
23821
  this.activeTab = "preview";
23806
23822
  };
23823
+ /**
23824
+ * @deprecated Use the [`addTab(tabOptions)`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#addTab) method instead.
23825
+ */
23826
+ SurveyCreatorModel.prototype.addPluginTab = function (name, plugin, title, componentName, index) {
23827
+ this.tabbedMenu.addTab(name, plugin, title, undefined, componentName, index);
23828
+ this.addPlugin(name, plugin);
23829
+ };
23807
23830
  /**
23808
23831
  * Adds a custom tab to Survey Creator.
23809
23832
  *
23833
+ * This method accepts an `ITabOptions` object with the following properties:
23834
+ *
23835
+ * - `name`: `string`\
23836
+ * A unique tab ID.
23837
+ *
23838
+ * - `plugin`: `ICreatorPlugin`\
23839
+ * An object that allows you to handle user interactions with the tab.
23840
+ *
23841
+ * - `title`: `string`\
23842
+ * *(Optional)* A tab caption. If `title` is undefined, the `name` property value is displayed instead. To localize the caption, add its translations to the `ed` object within [localization dictionaries](https://github.com/surveyjs/survey-creator/tree/90de47d2c9da49b06a7f97414026d70f7acf05c6/packages/survey-creator-core/src/localization) and pass `ed.propertyName` as the `title` property.
23843
+ *
23844
+ * - `iconName`: `string`\
23845
+ * *(Optional)* An [icon name](https://surveyjs.io/form-library/documentation/icons). Icons are used when the tab bar doesn't have enough width to display tab titles.
23846
+ *
23847
+ * - `componentName`: `string`\
23848
+ * *(Optional)* The name of the component that renders tab markup. Default value: `"svc-tab-" + name`.
23849
+ *
23850
+ * - `index`: `number`\
23851
+ * *(Optional)* A zero-based index that specifies the tab's position relative to other tabs.
23852
+ *
23810
23853
  * [View Demo](https://surveyjs.io/survey-creator/examples/modify-tab-bar/ (linkStyle))
23811
- * @param name A unique tab ID.
23812
- * @param plugin An object that allows you to handle user interactions with the tab.
23813
- * @param title A tab caption. If `title` is undefined, the `name` argument value is displayed instead. To localize the caption, add its translations to the `ed` object within [localization dictionaries](https://github.com/surveyjs/survey-creator/tree/90de47d2c9da49b06a7f97414026d70f7acf05c6/packages/survey-creator-core/src/localization) and pass `ed.propertyName` as the `title` argument.
23814
- * @param componentName The name of the component that renders tab markup. Default value: `"svc-tab-" + name`.
23815
- * @param index A zero-based index that specifies the tab's position relative to other tabs.
23854
+ * @param tabOptions An object that configures the custom tab.
23816
23855
  */
23817
- SurveyCreatorModel.prototype.addPluginTab = function (name, plugin, title, componentName, index) {
23818
- this.tabbedMenu.addTab(name, plugin, title, componentName, index);
23856
+ SurveyCreatorModel.prototype.addTab = function (tabOptions) {
23857
+ var name = tabOptions.name, plugin = tabOptions.plugin, title = tabOptions.title, iconName = tabOptions.iconName, componentName = tabOptions.componentName, index = tabOptions.index;
23858
+ if (!name || !plugin) {
23859
+ throw new Error("Plugin or name is not set");
23860
+ }
23861
+ this.tabbedMenu.addTab(name, plugin, title, iconName, componentName, index);
23819
23862
  this.addPlugin(name, plugin);
23820
23863
  };
23821
23864
  SurveyCreatorModel.prototype.addPlugin = function (name, plugin) {
@@ -25917,18 +25960,32 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
25917
25960
  return options.newSelectedElement;
25918
25961
  return val;
25919
25962
  };
25963
+ /**
25964
+ * Opens [Survey Creator theme](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#creatorTheme) settings in Property Grid. Applies only if [`propertyGridNavigationMode`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#propertyGridNavigationMode) is `"buttons"`.
25965
+ * @see closeCreatorThemeSettings
25966
+ * @see showCreatorThemeSettings
25967
+ */
25920
25968
  SurveyCreatorModel.prototype.openCreatorThemeSettings = function () {
25921
25969
  var designerPlugin = this.getPlugin("designer");
25922
25970
  if (designerPlugin) {
25923
25971
  designerPlugin.openCreatorThemeSettings();
25924
25972
  }
25925
25973
  };
25974
+ /**
25975
+ * Closes [Survey Creator theme](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#creatorTheme) settings in Property Grid. Applies only if [`propertyGridNavigationMode`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#propertyGridNavigationMode) is `"buttons"`.
25976
+ * @see openCreatorThemeSettings
25977
+ * @see showCreatorThemeSettings
25978
+ */
25926
25979
  SurveyCreatorModel.prototype.closeCreatorThemeSettings = function () {
25927
25980
  var designerPlugin = this.getPlugin("designer");
25928
25981
  if (designerPlugin) {
25929
25982
  designerPlugin.closeCreatorThemeSettings();
25930
25983
  }
25931
25984
  };
25985
+ /**
25986
+ * Activates a specified category in Property Grid. Applies only if [`propertyGridNavigationMode`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#propertyGridNavigationMode) is `"buttons"`.
25987
+ * @param name A [category name](https://surveyjs.io/form-library/documentation/customize-question-types/add-custom-properties-to-a-form#category).
25988
+ */
25932
25989
  SurveyCreatorModel.prototype.activatePropertyGridCategory = function (name) {
25933
25990
  if (!!this.designerPropertyGrid) {
25934
25991
  this.designerPropertyGrid.activateCategory(name);
@@ -25953,7 +26010,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
25953
26010
  configurable: true
25954
26011
  });
25955
26012
  /**
25956
- * Collapses a specified category in Property Grid.
26013
+ * Collapses a specified category in Property Grid. Applies only if [`propertyGridNavigationMode`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#propertyGridNavigationMode) is `"accordion"`.
25957
26014
  * @param name A [category name](https://surveyjs.io/form-library/documentation/customize-question-types/add-custom-properties-to-a-form#category).
25958
26015
  * @see expandPropertyGridCategory
25959
26016
  */
@@ -25963,9 +26020,10 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
25963
26020
  }
25964
26021
  };
25965
26022
  /**
25966
- * Expands a specified category in Property Grid.
26023
+ * Expands a specified category in Property Grid. Applies only if [`propertyGridNavigationMode`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#propertyGridNavigationMode) is `"accordion"`.
25967
26024
  * @param name A [category name](https://surveyjs.io/form-library/documentation/customize-question-types/add-custom-properties-to-a-form#category).
25968
26025
  * @see collapsePropertyGridCategory
26026
+ * @see activatePropertyGridCategory
25969
26027
  */
25970
26028
  SurveyCreatorModel.prototype.expandPropertyGridCategory = function (name) {
25971
26029
  if (!!this.designerPropertyGrid) {
@@ -25973,7 +26031,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
25973
26031
  }
25974
26032
  };
25975
26033
  /**
25976
- * Collapses all categories in Property Grid.
26034
+ * Collapses all categories in Property Grid. Applies only if [`propertyGridNavigationMode`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#propertyGridNavigationMode) is `"accordion"`.
25977
26035
  * @see expandAllPropertyGridCategories
25978
26036
  */
25979
26037
  SurveyCreatorModel.prototype.collapseAllPropertyGridCategories = function () {
@@ -25982,7 +26040,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
25982
26040
  }
25983
26041
  };
25984
26042
  /**
25985
- * Expands all categories in Property Grid.
26043
+ * Expands all categories in Property Grid. Applies only if [`propertyGridNavigationMode`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#propertyGridNavigationMode) is `"accordion"`.
25986
26044
  * @see collapseAllPropertyGridCategories
25987
26045
  */
25988
26046
  SurveyCreatorModel.prototype.expandAllPropertyGridCategories = function () {
@@ -26911,6 +26969,12 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
26911
26969
  .append("svc-creator--disable-animations", !this.animationEnabled)
26912
26970
  .toString();
26913
26971
  };
26972
+ /**
26973
+ * Applies a specified UI theme to Survey Creator.
26974
+ * @param theme An `ICreatorTheme` object with theme settings.
26975
+ * @see creatorTheme
26976
+ * @see showCreatorThemeSettings
26977
+ */
26914
26978
  SurveyCreatorModel.prototype.applyCreatorTheme = function (theme) {
26915
26979
  this.syncTheme(theme);
26916
26980
  var designerPlugin = this.getPlugin("designer");
@@ -26926,7 +26990,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
26926
26990
  (0,_utils_utils__WEBPACK_IMPORTED_MODULE_8__.assign)(newCssVariable, theme === null || theme === void 0 ? void 0 : theme.cssVariables);
26927
26991
  var designerPlugin = this.getPlugin("designer");
26928
26992
  if (designerPlugin) {
26929
- (0,_utils_utils__WEBPACK_IMPORTED_MODULE_8__.assign)(newCssVariable, designerPlugin.model.scaleCssVariables || {});
26993
+ designerPlugin.model.updateSurfaceCssVariables();
26930
26994
  }
26931
26995
  this.themeVariables = newCssVariable;
26932
26996
  var iconsSetName = this.creatorTheme && this.creatorTheme["iconSet"] ? this.creatorTheme["iconSet"] : "v2";
@@ -28254,7 +28318,8 @@ __webpack_require__.r(__webpack_exports__);
28254
28318
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
28255
28319
  /* harmony export */ CreatorThemes: () => (/* binding */ CreatorThemes),
28256
28320
  /* harmony export */ PredefinedCreatorThemes: () => (/* binding */ PredefinedCreatorThemes),
28257
- /* harmony export */ defaultCreatorThemesOrder: () => (/* binding */ defaultCreatorThemesOrder)
28321
+ /* harmony export */ defaultCreatorThemesOrder: () => (/* binding */ defaultCreatorThemesOrder),
28322
+ /* harmony export */ registerCreatorTheme: () => (/* binding */ registerCreatorTheme)
28258
28323
  /* harmony export */ });
28259
28324
  /* harmony import */ var _styles_manager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./styles-manager */ "./src/creator-theme/styles-manager.ts");
28260
28325
  /* harmony import */ var _themes_default_light_color_css_variables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../themes/default-light-color-css-variables */ "./src/themes/default-light-color-css-variables.ts");
@@ -28262,6 +28327,10 @@ __webpack_require__.r(__webpack_exports__);
28262
28327
 
28263
28328
  var PredefinedCreatorThemes = ["default-light"];
28264
28329
  var defaultCreatorThemesOrder = ["default-light", "default-contrast", "default-dark", "sc2020"];
28330
+ function registerCreatorTheme(theme) {
28331
+ PredefinedCreatorThemes.push(theme.themeName);
28332
+ CreatorThemes[theme.themeName] = theme;
28333
+ }
28265
28334
  var defaultVariables = {
28266
28335
  "--sjs-special-background": "#EDF9F7FF",
28267
28336
  "--sjs-primary-background-500": "#19B394FF",
@@ -29140,6 +29209,8 @@ __webpack_require__.r(__webpack_exports__);
29140
29209
  /* harmony export */ });
29141
29210
  var designTabSurveyThemeJSON = {
29142
29211
  "cssVariables": {
29212
+ "--sjs-base-unit": "var(--ctr-surface-base-unit)",
29213
+ "--sjs-font-size": "calc(2 * var(--ctr-surface-base-unit))",
29143
29214
  "--sjs-primary-backcolor": "var(--sjs-primary-background-500, #19B394FF)",
29144
29215
  "--sjs-primary-backcolor-light": "var(--sjs-primary-background-10, #19B3941A)",
29145
29216
  "--sjs-primary-backcolor-dark": "var(--sjs-primary-background-400, #14A48BFF)",
@@ -43109,16 +43180,6 @@ __webpack_require__.r(__webpack_exports__);
43109
43180
 
43110
43181
 
43111
43182
 
43112
- var tabsIcons = {
43113
- designer: "icon-config",
43114
- theme: "icon-theme",
43115
- json: "icon-codeeditor-24x24",
43116
- translation: "icon-language",
43117
- preview: "icon-preview",
43118
- logic: "icon-logic-24x24",
43119
- customembeded: "icon-embedsurvey-24x24",
43120
- default: "icon-undefined-24x24"
43121
- };
43122
43183
  var TabbedMenuItem = /** @class */ (function (_super) {
43123
43184
  (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(TabbedMenuItem, _super);
43124
43185
  function TabbedMenuItem(item) {
@@ -43168,7 +43229,7 @@ var TabbedMenuContainer = /** @class */ (function (_super) {
43168
43229
  _this.minVisibleItemsCount = 1;
43169
43230
  return _this;
43170
43231
  }
43171
- TabbedMenuContainer.prototype.addTab = function (name, plugin, title, componentName, index) {
43232
+ TabbedMenuContainer.prototype.addTab = function (name, plugin, title, iconName, componentName, index) {
43172
43233
  var _this = this;
43173
43234
  var tabName = name === "test" ? "preview" : name;
43174
43235
  var locStrName = !title ? "tabs." + tabName : (title.indexOf("ed.") == 0 ? title : "");
@@ -43178,7 +43239,7 @@ var TabbedMenuContainer = /** @class */ (function (_super) {
43178
43239
  title: title,
43179
43240
  componentContent: componentName ? componentName : "svc-tab-" + name,
43180
43241
  data: plugin,
43181
- iconName: tabsIcons[tabName] || tabsIcons["default"],
43242
+ iconName: iconName || "icon-undefined-24x24",
43182
43243
  action: function () { _this.creator.switchTab(name); },
43183
43244
  active: this.creator.viewType === name,
43184
43245
  disableHide: this.creator.viewType === name
@@ -45879,6 +45940,7 @@ __webpack_require__.r(__webpack_exports__);
45879
45940
  /* harmony export */ copyCssClasses: () => (/* binding */ copyCssClasses),
45880
45941
  /* harmony export */ copyObject: () => (/* binding */ copyObject),
45881
45942
  /* harmony export */ getAcceptedTypesByContentMode: () => (/* binding */ getAcceptedTypesByContentMode),
45943
+ /* harmony export */ getOS: () => (/* binding */ getOS),
45882
45944
  /* harmony export */ imageMimeTypes: () => (/* binding */ imageMimeTypes),
45883
45945
  /* harmony export */ notShortCircuitAnd: () => (/* binding */ notShortCircuitAnd),
45884
45946
  /* harmony export */ roundTo2Decimals: () => (/* binding */ roundTo2Decimals),
@@ -45975,6 +46037,27 @@ function sortDefaultThemes(defaultThemesOrder, themes, resultArray) {
45975
46037
  }
45976
46038
  });
45977
46039
  }
46040
+ function getOS() {
46041
+ var _a, _b;
46042
+ var userAgent = window.navigator.userAgent, platform = ((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgentData) === null || _b === void 0 ? void 0 : _b.platform) || window.navigator.platform, macosPlatforms = ["macOS", "Macintosh", "MacIntel", "MacPPC", "Mac68K"], windowsPlatforms = ["Win32", "Win64", "Windows", "WinCE"], iosPlatforms = ["iPhone", "iPad", "iPod"];
46043
+ var os = null;
46044
+ if (macosPlatforms.indexOf(platform) !== -1) {
46045
+ os = "Mac OS";
46046
+ }
46047
+ else if (iosPlatforms.indexOf(platform) !== -1) {
46048
+ os = "iOS";
46049
+ }
46050
+ else if (windowsPlatforms.indexOf(platform) !== -1) {
46051
+ os = "Windows";
46052
+ }
46053
+ else if (/Android/.test(userAgent)) {
46054
+ os = "Android";
46055
+ }
46056
+ else if (/Linux/.test(platform)) {
46057
+ os = "Linux";
46058
+ }
46059
+ return os;
46060
+ }
45978
46061
 
45979
46062
 
45980
46063
  /***/ }),
@@ -46783,6 +46866,7 @@ __webpack_require__.r(__webpack_exports__);
46783
46866
  /* harmony export */ getNextItemValue: () => (/* reexport safe */ _utils_creator_utils__WEBPACK_IMPORTED_MODULE_81__.getNextItemValue),
46784
46867
  /* harmony export */ getNextValue: () => (/* reexport safe */ _utils_creator_utils__WEBPACK_IMPORTED_MODULE_81__.getNextValue),
46785
46868
  /* harmony export */ getNodesFromKoComponentInfo: () => (/* reexport safe */ _utils_html_element_utils__WEBPACK_IMPORTED_MODULE_79__.getNodesFromKoComponentInfo),
46869
+ /* harmony export */ getOS: () => (/* reexport safe */ _utils_utils__WEBPACK_IMPORTED_MODULE_78__.getOS),
46786
46870
  /* harmony export */ getPredefinedBackgoundColorsChoices: () => (/* reexport safe */ _components_tabs_themes__WEBPACK_IMPORTED_MODULE_16__.getPredefinedBackgoundColorsChoices),
46787
46871
  /* harmony export */ getPredefinedColorsItemValues: () => (/* reexport safe */ _components_tabs_themes__WEBPACK_IMPORTED_MODULE_16__.getPredefinedColorsItemValues),
46788
46872
  /* harmony export */ getQuestionContentWrapperComponentName: () => (/* reexport safe */ _creator_base__WEBPACK_IMPORTED_MODULE_4__.getQuestionContentWrapperComponentName),
@@ -46810,6 +46894,7 @@ __webpack_require__.r(__webpack_exports__);
46810
46894
  /* harmony export */ propertyExists: () => (/* reexport safe */ _utils_creator_utils__WEBPACK_IMPORTED_MODULE_81__.propertyExists),
46811
46895
  /* harmony export */ propertyGridCss: () => (/* reexport safe */ _property_grid_theme_property_grid__WEBPACK_IMPORTED_MODULE_67__.propertyGridCss),
46812
46896
  /* harmony export */ registerAdorner: () => (/* reexport safe */ _creator_base__WEBPACK_IMPORTED_MODULE_4__.registerAdorner),
46897
+ /* harmony export */ registerCreatorTheme: () => (/* reexport safe */ _creator_theme_creator_themes__WEBPACK_IMPORTED_MODULE_90__.registerCreatorTheme),
46813
46898
  /* harmony export */ registerDefaultThemes: () => (/* reexport safe */ _creator_theme_creator_theme_model__WEBPACK_IMPORTED_MODULE_92__.registerDefaultThemes),
46814
46899
  /* harmony export */ removeAdorners: () => (/* reexport safe */ _creator_base__WEBPACK_IMPORTED_MODULE_4__.removeAdorners),
46815
46900
  /* harmony export */ roundTo2Decimals: () => (/* reexport safe */ _utils_utils__WEBPACK_IMPORTED_MODULE_78__.roundTo2Decimals),
@@ -46936,7 +47021,7 @@ __webpack_require__.r(__webpack_exports__);
46936
47021
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! survey-core */ "survey-core");
46937
47022
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_99___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_99__);
46938
47023
  var Version;
46939
- Version = "".concat("2.0.0-rc.3");
47024
+ Version = "".concat("2.0.0-rc.4");
46940
47025
  //should be loaded before other styles for easier override
46941
47026
  __webpack_require__(/*! ../utils/context-button.scss */ "./src/utils/context-button.scss");
46942
47027
 
@@ -47059,7 +47144,7 @@ __webpack_require__(/*! ../property-grid-theme/property-grid.scss */ "./src/prop
47059
47144
  __webpack_require__(/*! ../utils/layout.scss */ "./src/utils/layout.scss");
47060
47145
  __webpack_require__(/*! ../custom-questions/boolean-switch.scss */ "./src/custom-questions/boolean-switch.scss");
47061
47146
 
47062
- (0,survey_core__WEBPACK_IMPORTED_MODULE_99__.checkLibraryVersion)("".concat("2.0.0-rc.3"), "survey-creator-core");
47147
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_99__.checkLibraryVersion)("".concat("2.0.0-rc.4"), "survey-creator-core");
47063
47148
 
47064
47149
  })();
47065
47150