survey-creator-core 1.9.97 → 1.9.99

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * SurveyJS Creator v1.9.97
2
+ * SurveyJS Creator v1.9.99
3
3
  * (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * Github: https://github.com/surveyjs/survey-creator
5
5
  * License: https://surveyjs.io/Licenses#SurveyCreator
@@ -1630,7 +1630,6 @@ var PageAdorner = /** @class */ (function (_super) {
1630
1630
  "description"
1631
1631
  ]);
1632
1632
  currentPage.name = _survey_helper__WEBPACK_IMPORTED_MODULE_4__["SurveyHelper"].getNewPageName(_this.creator.survey.pages);
1633
- _this.dragTypeOverMe = null;
1634
1633
  return true;
1635
1634
  })) {
1636
1635
  _this.creator.survey.currentPage = currentPage;
@@ -1645,29 +1644,50 @@ var PageAdorner = /** @class */ (function (_super) {
1645
1644
  _this.currentAddQuestionType = type;
1646
1645
  _this.addGhostPage();
1647
1646
  });
1648
- _this.attachElement(_this.page);
1647
+ _this.attachElement(page);
1649
1648
  return _this;
1650
1649
  }
1650
+ PageAdorner.prototype.updateDragTypeOverMe = function () {
1651
+ this.dragTypeOverMe = this.page.dragTypeOverMe;
1652
+ };
1651
1653
  PageAdorner.prototype.attachElement = function (surveyElement) {
1652
1654
  var _this = this;
1653
1655
  _super.prototype.attachElement.call(this, surveyElement);
1654
- if (!!this.page) {
1655
- this.dragTypeOverMe = new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return _this.page.dragTypeOverMe; });
1656
- this.page["surveyChangedCallback"] = function () {
1657
- _this.isPageLive = !!_this.page.survey;
1656
+ this.dragTypeOverMe = null;
1657
+ if (!!surveyElement) {
1658
+ surveyElement["surveyChangedCallback"] = function () {
1659
+ _this.isPageLive = !!surveyElement.survey;
1658
1660
  };
1659
1661
  if (this.isGhost) {
1660
1662
  this.updateActionsProperties();
1661
- this.page.registerFunctionOnPropertiesValueChanged(["title", "description"], function () {
1663
+ surveyElement.registerFunctionOnPropertiesValueChanged(["title", "description"], function () {
1662
1664
  _this.addGhostPage();
1663
1665
  });
1664
- this.patchPageForDragDrop(this.page, this.addGhostPage);
1666
+ this.patchPageForDragDrop(surveyElement, this.addGhostPage);
1665
1667
  }
1666
- this.page.onFirstRendering();
1667
- this.page.updateCustomWidgets();
1668
- this.page.setWasShown(true);
1668
+ surveyElement.registerFunctionOnPropertiesValueChanged(["dragTypeOverMe"], function () {
1669
+ _this.updateDragTypeOverMe();
1670
+ });
1671
+ surveyElement.onFirstRendering();
1672
+ surveyElement.updateCustomWidgets();
1673
+ surveyElement.setWasShown(true);
1669
1674
  this.checkActionProperties();
1675
+ this.dragTypeOverMe = surveyElement.dragTypeOverMe;
1676
+ }
1677
+ };
1678
+ PageAdorner.prototype.detachElement = function (surveyElement) {
1679
+ if (!!surveyElement) {
1680
+ surveyElement.unRegisterFunctionOnPropertiesValueChanged([
1681
+ "dragTypeOverMe"
1682
+ ]);
1683
+ surveyElement.unRegisterFunctionOnPropertiesValueChanged([
1684
+ "title",
1685
+ "description"
1686
+ ]);
1687
+ surveyElement["surveyChangedCallback"] = undefined;
1670
1688
  }
1689
+ _super.prototype.detachElement.call(this, surveyElement);
1690
+ this.dragTypeOverMe = null;
1671
1691
  };
1672
1692
  PageAdorner.prototype.onElementSelectedChanged = function (isSelected) {
1673
1693
  _super.prototype.onElementSelectedChanged.call(this, isSelected);
@@ -1687,13 +1707,7 @@ var PageAdorner = /** @class */ (function (_super) {
1687
1707
  };
1688
1708
  PageAdorner.prototype.dispose = function () {
1689
1709
  _super.prototype.dispose.call(this);
1690
- if (!!this.page) {
1691
- this.page.unRegisterFunctionOnPropertiesValueChanged([
1692
- "title",
1693
- "description"
1694
- ]);
1695
- this.page["surveyChangedCallback"] = undefined;
1696
- }
1710
+ this.detachElement(this.page);
1697
1711
  this.onPropertyValueChangedCallback = undefined;
1698
1712
  };
1699
1713
  Object.defineProperty(PageAdorner.prototype, "isGhost", {
@@ -1999,7 +2013,7 @@ var QuestionImageAdornerViewModel = /** @class */ (function (_super) {
1999
2013
  QuestionImageAdornerViewModel.prototype.initFilePresentationModel = function () {
2000
2014
  var _this = this;
2001
2015
  this.filePresentationModel = survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass("file", { name: this.question.name });
2002
- var surveyModel = this.question.getSurvey();
2016
+ var surveyModel = new survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyModel"]();
2003
2017
  this.filePresentationModel.setSurveyImpl(surveyModel);
2004
2018
  this.filePresentationModel.forceIsInputReadOnly = !this.creator.isCanModifyProperty(this.question, "imageLink");
2005
2019
  this.filePresentationModel.dragAreaPlaceholder = this.placeholderText;
@@ -3670,6 +3684,7 @@ __webpack_require__.r(__webpack_exports__);
3670
3684
 
3671
3685
 
3672
3686
 
3687
+
3673
3688
  var StringItemsNavigatorBase = /** @class */ (function () {
3674
3689
  function StringItemsNavigatorBase(question) {
3675
3690
  this.question = question;
@@ -4059,7 +4074,19 @@ var StringEditorViewModelBase = /** @class */ (function (_super) {
4059
4074
  !(!this.locString.text && clearedText == this.locString.calculatedText)) {
4060
4075
  if (!this.errorText) {
4061
4076
  if (this.locString.owner instanceof survey_core__WEBPACK_IMPORTED_MODULE_1__["ItemValue"] && this.creator.inplaceEditForValues) {
4062
- this.locString.owner.value = clearedText;
4077
+ var itemValue = this.locString.owner;
4078
+ if (itemValue.value !== clearedText) {
4079
+ if (!!itemValue.locOwner && !!itemValue.ownerPropertyName) {
4080
+ var choices = itemValue.locOwner[itemValue.ownerPropertyName];
4081
+ if (Array.isArray(choices) && !!survey_core__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].getItemByValue(choices, clearedText)) {
4082
+ clearedText = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_3__["getNextItemValue"])(clearedText, choices);
4083
+ if (!!event && !!event.target) {
4084
+ event.target.innerText = clearedText;
4085
+ }
4086
+ }
4087
+ }
4088
+ itemValue.value = clearedText;
4089
+ }
4063
4090
  }
4064
4091
  else {
4065
4092
  var oldStoreDefaultText = this.locString.storeDefaultText;
@@ -5070,15 +5097,19 @@ var AceJsonEditorModel = /** @class */ (function (_super) {
5070
5097
  this.isProcessingImmediately = false;
5071
5098
  };
5072
5099
  AceJsonEditorModel.prototype.init = function (aceEditor) {
5100
+ var _a, _b;
5073
5101
  this.aceEditor = aceEditor;
5074
- this.aceEditor.commands["removeCommand"]("find");
5102
+ var aceModules = (_b = (_a = window["ace"]) === null || _a === void 0 ? void 0 : _a.define) === null || _b === void 0 ? void 0 : _b.modules;
5103
+ if (!(aceModules && aceModules["ace/ext/searchbox"])) {
5104
+ this.aceEditor.commands["removeCommand"]("find");
5105
+ }
5075
5106
  this.aceEditor.setReadOnly(this.readOnly);
5076
5107
  if (AceJsonEditorModel.aceBasePath) {
5077
5108
  try {
5078
5109
  window["ace"]["config"].set("basePath", AceJsonEditorModel.aceBasePath);
5079
5110
  this.aceEditor.session.setMode("ace/mode/json");
5080
5111
  }
5081
- catch (_a) { }
5112
+ catch (_c) { }
5082
5113
  }
5083
5114
  var self = this;
5084
5115
  this.aceEditor.setShowPrintMargin(false);
@@ -6103,42 +6134,44 @@ var LogicItemEditor = /** @class */ (function (_super) {
6103
6134
  }).filter(function (action) { return !!action; });
6104
6135
  };
6105
6136
  LogicItemEditor.prototype.onUpdateQuestionCssClasses = function (options) {
6106
- options.cssClasses.answered = "svc-logic-question--answered";
6107
- if (options.question.name === "logicTypeName") {
6108
- options.question.allowRootStyle = false;
6109
- options.cssClasses.control += " svc-logic-operator svc-logic-operator--action";
6110
- options.cssClasses.error.root = "svc-logic-operator__error";
6111
- options.cssClasses.onError = "svc-logic-operator--error";
6112
- }
6113
- if (options.question.name === "elementSelector" || options.question.name === "setToName" || options.question.name === "fromName" || options.question.name === "gotoName") {
6114
- options.question.allowRootStyle = false;
6115
- options.cssClasses.control += " svc-logic-operator svc-logic-operator--question";
6116
- options.cssClasses.error.root = "svc-logic-operator__error";
6117
- options.cssClasses.onError = "svc-logic-operator--error";
6118
- }
6119
- if (options.question.name === "setToName" || options.question.name === "fromName") {
6120
- options.question.allowRootStyle = false;
6121
- options.question.titleLocation = "left";
6122
- options.question.startWithNewLine = false;
6123
- options.cssClasses.error.root = "svc-logic-operator__error";
6124
- options.cssClasses.onError = "svc-logic-operator--error";
6125
- }
6126
- if (options.question.name === "setValue") {
6127
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["assignDefaultV2Classes"])(options.cssClasses, options.question.getType());
6128
- options.cssClasses.mainRoot += " svc-logic-question-value sd-element--with-frame";
6129
- }
6130
- if (options.question.name === "removeAction") {
6131
- options.question.allowRootStyle = false;
6132
- options.cssClasses.mainRoot += " svc-logic-condition-remove-question";
6133
- }
6134
- // options.cssClasses.mainRoot = "sd-question sd-row__question";
6135
- if (options.question.name === "panel") {
6136
- options.cssClasses.root += " svc-logic-paneldynamic";
6137
- options.cssClasses.buttonAdd += " svc-logic-operator--action ";
6138
- options.cssClasses.iconRemove = "svc-icon-remove";
6139
- options.cssClasses.buttonRemove = "svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn";
6140
- options.cssClasses.buttonRemoveRight = "svc-logic-paneldynamic__remove-btn--right";
6141
- options.cssClasses.buttonRemoveText = "svc-logic-paneldynamic__button-remove-text";
6137
+ var cssClasses = options.cssClasses;
6138
+ var question = options.question;
6139
+ cssClasses.answered = "svc-logic-question--answered";
6140
+ if (question.name === "logicTypeName") {
6141
+ question.allowRootStyle = false;
6142
+ cssClasses.control += " svc-logic-operator svc-logic-operator--action";
6143
+ cssClasses.error.root = "svc-logic-operator__error";
6144
+ cssClasses.onError = "svc-logic-operator--error";
6145
+ }
6146
+ if (question.name === "elementSelector" || question.name === "setToName" || question.name === "fromName" || question.name === "gotoName") {
6147
+ question.allowRootStyle = false;
6148
+ cssClasses.control += " svc-logic-operator svc-logic-operator--question";
6149
+ cssClasses.error.root = "svc-logic-operator__error";
6150
+ cssClasses.onError = "svc-logic-operator--error";
6151
+ }
6152
+ if (question.name === "setToName" || question.name === "fromName") {
6153
+ question.allowRootStyle = false;
6154
+ question.titleLocation = "left";
6155
+ question.startWithNewLine = false;
6156
+ cssClasses.error.root = "svc-logic-operator__error";
6157
+ cssClasses.onError = "svc-logic-operator--error";
6158
+ }
6159
+ if (question.name === "setValue" || question.isContentElement) {
6160
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["assignDefaultV2Classes"])(cssClasses, question.getType());
6161
+ cssClasses.mainRoot += " svc-logic-question-value sd-element--with-frame";
6162
+ }
6163
+ if (question.name === "removeAction") {
6164
+ question.allowRootStyle = false;
6165
+ cssClasses.mainRoot += " svc-logic-condition-remove-question";
6166
+ }
6167
+ // cssClasses.mainRoot = "sd-question sd-row__question";
6168
+ if (question.name === "panel") {
6169
+ cssClasses.root += " svc-logic-paneldynamic";
6170
+ cssClasses.buttonAdd += " svc-logic-operator--action ";
6171
+ cssClasses.iconRemove = "svc-icon-remove";
6172
+ cssClasses.buttonRemove = "svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn";
6173
+ cssClasses.buttonRemoveRight = "svc-logic-paneldynamic__remove-btn--right";
6174
+ cssClasses.buttonRemoveText = "svc-logic-paneldynamic__button-remove-text";
6142
6175
  }
6143
6176
  };
6144
6177
  LogicItemEditor.prototype.onUpdatePanelCssClasses = function (options) {
@@ -9819,13 +9852,11 @@ survey_core__WEBPACK_IMPORTED_MODULE_1__["ComponentCollection"].Instance.add({
9819
9852
  "unit": "px",
9820
9853
  "title": Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_0__["getLocString"])("theme.boxShadowX"),
9821
9854
  "titleLocation": "left",
9822
- "min": 0,
9823
9855
  },
9824
9856
  {
9825
9857
  "type": "spinedit",
9826
9858
  "name": "y",
9827
9859
  "unit": "px",
9828
- "min": 0,
9829
9860
  "startWithNewLine": false,
9830
9861
  "title": Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_0__["getLocString"])("theme.boxShadowY"),
9831
9862
  "titleLocation": "left"
@@ -9931,12 +9962,21 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
9931
9962
  }
9932
9963
  ],
9933
9964
  onInit: function () {
9934
- survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addProperty("colorsettings", {
9935
- name: "choices:itemvalue[]"
9936
- });
9965
+ survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addProperties("colorsettings", [{
9966
+ name: "choices:itemvalue[]",
9967
+ },
9968
+ {
9969
+ name: "colorTitleLocation:string",
9970
+ default: "hidden",
9971
+ },
9972
+ {
9973
+ name: "colorTitle:string",
9974
+ }
9975
+ ]);
9937
9976
  },
9938
9977
  onLoaded: function (question) {
9939
- syncPropertiesFromCompositeToColor(question, "titleLocation", question.titleLocation);
9978
+ syncPropertiesFromCompositeToColor(question, "colorTitle", question.colorTitle);
9979
+ syncPropertiesFromCompositeToColor(question, "colorTitleLocation", question.colorTitleLocation);
9940
9980
  syncPropertiesFromCompositeToColor(question, "choices", question.choices);
9941
9981
  },
9942
9982
  onPropertyChanged: function (question, propertyName, newValue) {
@@ -9954,15 +9994,11 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
9954
9994
  });
9955
9995
  function syncPropertiesFromCompositeToColor(question, propertyName, newValue) {
9956
9996
  var colorQuestion = question.contentPanel.questions[0];
9957
- if (propertyName == "titleLocation") {
9958
- if (newValue == "left") {
9959
- question.titleLocation = "hidden";
9960
- colorQuestion.title = question.title;
9961
- colorQuestion.titleLocation = newValue;
9962
- }
9963
- else {
9964
- colorQuestion.titleLocation = "hidden";
9965
- }
9997
+ if (propertyName == "colorTitleLocation") {
9998
+ colorQuestion.titleLocation = newValue;
9999
+ }
10000
+ if (propertyName == "colorTitle") {
10001
+ colorQuestion.title = newValue;
9966
10002
  }
9967
10003
  if (propertyName == "choices") {
9968
10004
  colorQuestion.choices = newValue;
@@ -9979,11 +10015,13 @@ function createColor(value) {
9979
10015
  /*!************************************************************************!*\
9980
10016
  !*** ./src/components/tabs/theme-custom-questions/element-settings.ts ***!
9981
10017
  \************************************************************************/
9982
- /*! no exports provided */
10018
+ /*! exports provided: elementSettingsToCssVariable, elementSettingsFromCssVariable */
9983
10019
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
9984
10020
 
9985
10021
  "use strict";
9986
10022
  __webpack_require__.r(__webpack_exports__);
10023
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementSettingsToCssVariable", function() { return elementSettingsToCssVariable; });
10024
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementSettingsFromCssVariable", function() { return elementSettingsFromCssVariable; });
9987
10025
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "survey-core");
9988
10026
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_0__);
9989
10027
  /* harmony import */ var _editorLocalization__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../editorLocalization */ "./src/editorLocalization.ts");
@@ -9996,15 +10034,17 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
9996
10034
  {
9997
10035
  type: "colorsettings",
9998
10036
  name: "backcolor",
9999
- title: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.backcolor"),
10000
- titleLocation: "left",
10037
+ colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.backcolor"),
10038
+ colorTitleLocation: "left",
10039
+ titleLocation: "hidden",
10001
10040
  descriptionLocation: "hidden"
10002
10041
  },
10003
10042
  {
10004
10043
  type: "colorsettings",
10005
10044
  name: "hovercolor",
10006
- title: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.hovercolor"),
10007
- titleLocation: "left",
10045
+ colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.hovercolor"),
10046
+ colorTitleLocation: "left",
10047
+ titleLocation: "hidden",
10008
10048
  descriptionLocation: "hidden"
10009
10049
  },
10010
10050
  {
@@ -10030,6 +10070,33 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
10030
10070
  onValueChanged: function (question, name, newValue) {
10031
10071
  },
10032
10072
  });
10073
+ function elementSettingsToCssVariable(question, themeCssVariables) {
10074
+ Object.keys(question.value).forEach(function (key) {
10075
+ if (key === "corner")
10076
+ return;
10077
+ themeCssVariables["--sjs-" + question.name.toLocaleLowerCase() + "-" + key] = question.value[key];
10078
+ });
10079
+ }
10080
+ function elementSettingsFromCssVariable(question, themeCssVariables, defaultBackcolorVariable, defaultHovercolorVariable) {
10081
+ var result = {};
10082
+ Object.keys(themeCssVariables).filter(function (key) { return key.indexOf(question.name.toLocaleLowerCase()) !== -1; }).forEach(function (key) {
10083
+ var propertyName = key.split("-").pop();
10084
+ if (propertyName === "cornerRadius") {
10085
+ result["corner"] = parseFloat(themeCssVariables[key].toString());
10086
+ }
10087
+ else {
10088
+ result[propertyName] = themeCssVariables[key];
10089
+ }
10090
+ });
10091
+ if (Object.keys(result).length === 0) {
10092
+ question.contentPanel.getQuestionByName("backcolor").value = defaultBackcolorVariable;
10093
+ question.contentPanel.getQuestionByName("hovercolor").value = defaultHovercolorVariable;
10094
+ }
10095
+ else {
10096
+ question.value = result;
10097
+ }
10098
+ return result;
10099
+ }
10033
10100
 
10034
10101
 
10035
10102
  /***/ }),
@@ -10038,12 +10105,14 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
10038
10105
  /*!*********************************************************************!*\
10039
10106
  !*** ./src/components/tabs/theme-custom-questions/font-settings.ts ***!
10040
10107
  \*********************************************************************/
10041
- /*! exports provided: DefaultFonts */
10108
+ /*! exports provided: DefaultFonts, fontsettingsToCssVariable, fontsettingsFromCssVariable */
10042
10109
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
10043
10110
 
10044
10111
  "use strict";
10045
10112
  __webpack_require__.r(__webpack_exports__);
10046
10113
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultFonts", function() { return DefaultFonts; });
10114
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fontsettingsToCssVariable", function() { return fontsettingsToCssVariable; });
10115
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fontsettingsFromCssVariable", function() { return fontsettingsFromCssVariable; });
10047
10116
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "survey-core");
10048
10117
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_0__);
10049
10118
  /* harmony import */ var _editorLocalization__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../editorLocalization */ "./src/editorLocalization.ts");
@@ -10081,16 +10150,17 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
10081
10150
  descriptionLocation: "hidden",
10082
10151
  choices: [
10083
10152
  { value: "400", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.fontWeightRegular") },
10084
- { value: "500", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.fontWeightSemiBold") },
10085
- { value: "600", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.fontWeightBold") },
10086
- { value: "700", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.fontWeightHeavy") },
10153
+ { value: "600", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.fontWeightSemiBold") },
10154
+ { value: "700", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.fontWeightBold") },
10155
+ { value: "800", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.fontWeightHeavy") },
10087
10156
  ],
10088
10157
  },
10089
10158
  {
10090
10159
  type: "colorsettings",
10091
10160
  name: "color",
10092
- title: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.color"),
10093
- titleLocation: "left",
10161
+ colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.color"),
10162
+ colorTitleLocation: "left",
10163
+ titleLocation: "hidden",
10094
10164
  descriptionLocation: "hidden"
10095
10165
  },
10096
10166
  {
@@ -10112,6 +10182,27 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
10112
10182
  onValueChanged: function (question, name, newValue) {
10113
10183
  },
10114
10184
  });
10185
+ function fontsettingsToCssVariable(question, themeCssVariables) {
10186
+ Object.keys(question.value).forEach(function (key) {
10187
+ var _a;
10188
+ var innerQ = question.contentPanel.getQuestionByName(key);
10189
+ themeCssVariables["--sjs-font-" + question.name.toLocaleLowerCase() + "-" + key] = question.value[key] + (((_a = innerQ.unit) === null || _a === void 0 ? void 0 : _a.toString()) || "");
10190
+ });
10191
+ }
10192
+ function fontsettingsFromCssVariable(question, themeCssVariables, defaultColorVariable) {
10193
+ var result = {};
10194
+ Object.keys(themeCssVariables).filter(function (key) { return key.indexOf(question.name.toLocaleLowerCase()) !== -1; }).forEach(function (key) {
10195
+ var propertyName = key.split("-").pop();
10196
+ result[propertyName] = themeCssVariables[key];
10197
+ });
10198
+ if (Object.keys(result).length !== 0) {
10199
+ question.value = result;
10200
+ }
10201
+ else if (!!defaultColorVariable) {
10202
+ question.contentPanel.getQuestionByName("color").value = defaultColorVariable;
10203
+ }
10204
+ return result;
10205
+ }
10115
10206
 
10116
10207
 
10117
10208
  /***/ }),
@@ -10400,6 +10491,8 @@ __webpack_require__.r(__webpack_exports__);
10400
10491
  /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/utils */ "./src/utils/utils.ts");
10401
10492
  /* harmony import */ var _creator_settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../creator-settings */ "./src/creator-settings.ts");
10402
10493
  /* harmony import */ var _theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./theme-custom-questions/font-settings */ "./src/components/tabs/theme-custom-questions/font-settings.ts");
10494
+ /* harmony import */ var _theme_custom_questions_element_settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./theme-custom-questions/element-settings */ "./src/components/tabs/theme-custom-questions/element-settings.ts");
10495
+
10403
10496
 
10404
10497
 
10405
10498
 
@@ -10443,6 +10536,7 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
10443
10536
  _this.themeChanges = {};
10444
10537
  _this.colorCalculator = new _utils_utils__WEBPACK_IMPORTED_MODULE_6__["ColorCalculator"]();
10445
10538
  _this.blockChanges = false;
10539
+ _this.blockThemeChangedNotifications = 0;
10446
10540
  _this.simulator = new _simulator__WEBPACK_IMPORTED_MODULE_1__["SurveySimulatorModel"]();
10447
10541
  _this.loadTheme(_this.surveyProvider.theme);
10448
10542
  _this.themeEditorSurveyValue = _this.createThemeEditorSurvey();
@@ -10532,8 +10626,8 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
10532
10626
  };
10533
10627
  ThemeSurveyTabViewModel.prototype.loadTheme = function (theme) {
10534
10628
  this.themeName = theme.themeName;
10535
- this.themePalette = theme.themePalette;
10536
- this.themeMode = theme.isCompact ? "lightweight" : undefined;
10629
+ this.themePalette = theme.colorPalette;
10630
+ this.themeMode = theme.isPanelless ? "lightweight" : undefined;
10537
10631
  this.backgroundImage = theme.backgroundImage;
10538
10632
  this.backgroundImageFit = theme.backgroundImageFit;
10539
10633
  this.backgroundImageAttachment = theme.backgroundImageAttachment;
@@ -10628,12 +10722,18 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
10628
10722
  this.updateSimulatorSurvey(json, currTheme);
10629
10723
  };
10630
10724
  ThemeSurveyTabViewModel.prototype.initialize = function (json, options) {
10631
- this.setJSON(json, this.startTheme);
10632
- this.updatePageList();
10633
- if (options.showPagesInTestSurveyTab !== undefined) {
10634
- this.showPagesInTestSurveyTab = options.showPagesInTestSurveyTab;
10725
+ this.blockThemeChangedNotifications += 1;
10726
+ try {
10727
+ this.setJSON(json, this.startTheme);
10728
+ this.updatePageList();
10729
+ if (options.showPagesInTestSurveyTab !== undefined) {
10730
+ this.showPagesInTestSurveyTab = options.showPagesInTestSurveyTab;
10731
+ }
10732
+ this.buildActions();
10733
+ }
10734
+ finally {
10735
+ this.blockThemeChangedNotifications -= 1;
10635
10736
  }
10636
- this.buildActions();
10637
10737
  };
10638
10738
  ThemeSurveyTabViewModel.prototype.updatePageItem = function (page) {
10639
10739
  var item = this.getPageItemByPage(page);
@@ -10674,6 +10774,9 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
10674
10774
  ThemeSurveyTabViewModel.prototype.resetTheme = function () {
10675
10775
  this.themeChanges = {};
10676
10776
  this.applySelectedTheme();
10777
+ if (this.themeName === "default" && this.themeMode === "panels" && this.themePalette === "light") {
10778
+ this.surveyProvider.isThemePristine = true;
10779
+ }
10677
10780
  };
10678
10781
  ThemeSurveyTabViewModel.prototype.show = function () {
10679
10782
  this.showInvisibleElements = false;
@@ -10825,18 +10928,20 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
10825
10928
  var _a, _b;
10826
10929
  if (_this.blockChanges)
10827
10930
  return;
10828
- _this.themeChanges[options.name] = options.value;
10931
+ if (options.name.indexOf("--") === 0) {
10932
+ _this.themeChanges[options.name] = options.value;
10933
+ }
10829
10934
  if (["themeName", "themeMode", "themePalette"].indexOf(options.name) !== -1) {
10830
10935
  _this[options.name] = options.value;
10831
10936
  _this.initializeColorCalculator();
10832
10937
  if (options.name === "themeMode") {
10833
10938
  _this.survey["isCompact"] = options.value === "lightweight";
10834
- _this.currentTheme.isCompact = options.value === "lightweight";
10939
+ _this.currentTheme.isPanelless = options.value === "lightweight";
10835
10940
  _this.applySelectedTheme();
10836
10941
  }
10837
10942
  else {
10838
10943
  _this.currentTheme.themeName = _this.themeName;
10839
- _this.currentTheme.themePalette = _this.themePalette;
10944
+ _this.currentTheme.colorPalette = _this.themePalette;
10840
10945
  _this.resetTheme();
10841
10946
  }
10842
10947
  return;
@@ -10850,6 +10955,10 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
10850
10955
  _this.currentTheme.backgroundOpacity = options.value / 100;
10851
10956
  return;
10852
10957
  }
10958
+ _this.blockThemeChangedNotifications += 1;
10959
+ if (options.name == "commonScale") {
10960
+ _this.survey.triggerResponsiveness(true);
10961
+ }
10853
10962
  if (options.name === "--sjs-primary-backcolor") {
10854
10963
  _this.colorCalculator.calculateColors(options.value);
10855
10964
  _this.themeChanges["--sjs-primary-backcolor"] = options.value;
@@ -10869,22 +10978,15 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
10869
10978
  _this.themeChanges["--sjs-question-background"] = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["ingectAlpha"])(baseColor, panelBackgroundTransparencyValue / 100);
10870
10979
  }
10871
10980
  if (((_a = options.question) === null || _a === void 0 ? void 0 : _a.getType()) === "fontsettings") {
10872
- Object.keys(options.value).forEach(function (key) {
10873
- var _a;
10874
- var innerQ = options.question.contentPanel.getQuestionByName(key);
10875
- _this.themeChanges["--sjs-font-" + options.name.toLocaleLowerCase() + "-" + key] = options.value[key] + (((_a = innerQ.unit) === null || _a === void 0 ? void 0 : _a.toString()) || "");
10876
- });
10981
+ Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsToCssVariable"])(options.question, _this.themeChanges);
10877
10982
  }
10878
10983
  if (((_b = options.question) === null || _b === void 0 ? void 0 : _b.getType()) === "elementsettings") {
10879
- Object.keys(options.value).forEach(function (key) {
10880
- if (key === "corner")
10881
- return;
10882
- _this.themeChanges["--sjs-" + options.name.toLocaleLowerCase() + "-" + key] = options.value[key];
10883
- });
10984
+ Object(_theme_custom_questions_element_settings__WEBPACK_IMPORTED_MODULE_9__["elementSettingsToCssVariable"])(options.question, _this.themeChanges);
10884
10985
  }
10885
10986
  var newTheme = {};
10886
10987
  Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["assign"])(newTheme, _this.currentTheme.cssVariables, _this.themeChanges);
10887
10988
  _this.currentTheme.cssVariables = newTheme;
10989
+ _this.blockThemeChangedNotifications -= 1;
10888
10990
  _this.setThemeToSurvey();
10889
10991
  });
10890
10992
  themeEditorSurvey.getAllQuestions().forEach(function (q) { return q.allowRootStyle = false; });
@@ -10914,14 +11016,14 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
10914
11016
  themeEditorSurvey.getQuestionByName("backgroundImage").value = this.backgroundImage;
10915
11017
  themeEditorSurvey.getQuestionByName("backgroundImageFit").value = this.backgroundImageFit;
10916
11018
  themeEditorSurvey.getQuestionByName("backgroundImageAttachment").value = this.backgroundImageAttachment;
10917
- themeEditorSurvey.getQuestionByName("questionPanel").contentPanel.getQuestionByName("backcolor").value = newCssVariables["--sjs-general-backcolor"];
10918
- themeEditorSurvey.getQuestionByName("questionPanel").contentPanel.getQuestionByName("hovercolor").value = newCssVariables["--sjs-general-backcolor-dark"];
10919
- themeEditorSurvey.getQuestionByName("editorPanel").contentPanel.getQuestionByName("backcolor").value = newCssVariables["--sjs-general-backcolor-dim-light"];
10920
- themeEditorSurvey.getQuestionByName("editorPanel").contentPanel.getQuestionByName("hovercolor").value = newCssVariables["--sjs-general-backcolor-dim-dark"];
10921
- themeEditorSurvey.getQuestionByName("pageTitle").contentPanel.getQuestionByName("color").value = newCssVariables["--sjs-general-dim-forecolor"];
10922
- themeEditorSurvey.getQuestionByName("pageDescription").contentPanel.getQuestionByName("color").value = newCssVariables["--sjs-general-dim-forecolor-light"];
10923
- themeEditorSurvey.getQuestionByName("questionTitle").contentPanel.getQuestionByName("color").value = newCssVariables["--sjs-general-forecolor"];
10924
- themeEditorSurvey.getQuestionByName("questionDescription").contentPanel.getQuestionByName("color").value = newCssVariables["--sjs-general-forecolor-light"];
11019
+ Object(_theme_custom_questions_element_settings__WEBPACK_IMPORTED_MODULE_9__["elementSettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("questionPanel"), newCssVariables, newCssVariables["--sjs-general-backcolor"], newCssVariables["--sjs-general-backcolor-dark"]);
11020
+ Object(_theme_custom_questions_element_settings__WEBPACK_IMPORTED_MODULE_9__["elementSettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("editorPanel"), newCssVariables, newCssVariables["--sjs-general-backcolor-dim-light"], newCssVariables["--sjs-general-backcolor-dim-dark"]);
11021
+ Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("surveyTitle"), newCssVariables);
11022
+ Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("pageTitle"), newCssVariables, newCssVariables["--sjs-general-dim-forecolor"]);
11023
+ Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("pageDescription"), newCssVariables, newCssVariables["--sjs-general-dim-forecolor-light"]);
11024
+ Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("questionTitle"), newCssVariables, newCssVariables["--sjs-general-forecolor"]);
11025
+ Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("questionDescription"), newCssVariables, newCssVariables["--sjs-general-forecolor-light"]);
11026
+ Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("editorFont"), newCssVariables);
10925
11027
  themeEditorSurvey.getAllQuestions().forEach(function (question) {
10926
11028
  if (["color", "colorsettings"].indexOf(question.getType()) !== -1) {
10927
11029
  question.choices = Object.keys(PredefinedColors[_this.themePalette]).map(function (colorName) { return new survey_core__WEBPACK_IMPORTED_MODULE_2__["ItemValue"](PredefinedColors[_this.themePalette][colorName], Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.colors." + colorName)); });
@@ -10933,6 +11035,9 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
10933
11035
  this.surveyProvider.theme = theme;
10934
11036
  }
10935
11037
  this.survey.applyTheme(this.surveyProvider.theme);
11038
+ if (this.blockThemeChangedNotifications == 0) {
11039
+ this.surveyProvider.raiseThemeChanged();
11040
+ }
10936
11041
  };
10937
11042
  ThemeSurveyTabViewModel.prototype.getThemeEditorSurveyJSON = function () {
10938
11043
  var themeEditorSurveyJSON = {
@@ -10955,31 +11060,24 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
10955
11060
  allowClear: false
10956
11061
  },
10957
11062
  {
10958
- type: "panel",
11063
+ type: "buttongroup",
11064
+ name: "themePalette",
11065
+ titleLocation: "hidden",
11066
+ choices: [
11067
+ { value: "light", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.themePaletteLight") },
11068
+ { value: "dark", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.themePaletteDark") }
11069
+ ],
11070
+ defaultValue: "light"
11071
+ },
11072
+ {
11073
+ type: "buttongroup",
10959
11074
  name: "themeMode",
10960
11075
  title: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.themeMode"),
10961
- elements: [
10962
- {
10963
- type: "buttongroup",
10964
- name: "themeMode",
10965
- titleLocation: "hidden",
10966
- choices: [
10967
- { value: "panels", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.themeModePanels") },
10968
- { value: "lightweight", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.themeModeLightweight") }
10969
- ],
10970
- defaultValue: "panels"
10971
- },
10972
- {
10973
- type: "buttongroup",
10974
- name: "themePalette",
10975
- titleLocation: "hidden",
10976
- choices: [
10977
- { value: "light", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.themePaletteLight") },
10978
- { value: "dark", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.themePaletteDark") }
10979
- ],
10980
- defaultValue: "light"
10981
- }
10982
- ]
11076
+ choices: [
11077
+ { value: "panels", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.themeModePanels") },
11078
+ { value: "lightweight", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.themeModeLightweight") }
11079
+ ],
11080
+ defaultValue: "panels"
10983
11081
  }
10984
11082
  ]
10985
11083
  },
@@ -11013,6 +11111,7 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
11013
11111
  {
11014
11112
  type: "buttongroup",
11015
11113
  name: "backgroundImageFit",
11114
+ enableIf: "{backgroundImage} notempty",
11016
11115
  titleLocation: "hidden",
11017
11116
  choices: [
11018
11117
  { value: "auto", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.backgroundImageFitAuto") },
@@ -11024,6 +11123,7 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
11024
11123
  {
11025
11124
  type: "buttongroup",
11026
11125
  name: "backgroundImageAttachment",
11126
+ enableIf: "{backgroundImage} notempty",
11027
11127
  titleLocation: "hidden",
11028
11128
  choices: [
11029
11129
  { value: "fixed", text: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.backgroundImageAttachmentFixed") },
@@ -11034,6 +11134,7 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
11034
11134
  {
11035
11135
  type: "spinedit",
11036
11136
  name: "backgroundOpacity",
11137
+ enableIf: "{backgroundImage} notempty",
11037
11138
  titleLocation: "left",
11038
11139
  title: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.backgroundOpacity"),
11039
11140
  descriptionLocation: "hidden",
@@ -11154,22 +11255,25 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
11154
11255
  {
11155
11256
  type: "colorsettings",
11156
11257
  name: "--sjs-primary-backcolor",
11157
- title: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryDefaultColor"),
11158
- titleLocation: "left",
11258
+ colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryDefaultColor"),
11259
+ colorTitleLocation: "left",
11260
+ titleLocation: "hidden",
11159
11261
  descriptionLocation: "hidden",
11160
11262
  },
11161
11263
  {
11162
11264
  type: "colorsettings",
11163
11265
  name: "--sjs-primary-backcolor-dark",
11164
- title: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryDarkColor"),
11165
- titleLocation: "left",
11266
+ colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryDarkColor"),
11267
+ colorTitleLocation: "left",
11268
+ titleLocation: "hidden",
11166
11269
  descriptionLocation: "hidden",
11167
11270
  },
11168
11271
  {
11169
11272
  type: "colorsettings",
11170
11273
  name: "--sjs-primary-backcolor-light",
11171
- title: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryLightColor"),
11172
- titleLocation: "left",
11274
+ colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryLightColor"),
11275
+ colorTitleLocation: "left",
11276
+ titleLocation: "hidden",
11173
11277
  descriptionLocation: "hidden",
11174
11278
  }
11175
11279
  ]
@@ -11180,15 +11284,17 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
11180
11284
  {
11181
11285
  type: "colorsettings",
11182
11286
  name: "--sjs-primary-forecolor",
11183
- title: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryForecolor"),
11184
- titleLocation: "left",
11287
+ colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryForecolor"),
11288
+ colorTitleLocation: "left",
11289
+ titleLocation: "hidden",
11185
11290
  descriptionLocation: "hidden",
11186
11291
  },
11187
11292
  {
11188
11293
  type: "colorsettings",
11189
11294
  name: "--sjs-primary-forecolor-light",
11190
- title: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryForecolorLight"),
11191
- titleLocation: "left",
11295
+ colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryForecolorLight"),
11296
+ colorTitleLocation: "left",
11297
+ titleLocation: "hidden",
11192
11298
  descriptionLocation: "hidden",
11193
11299
  }
11194
11300
  ]
@@ -11343,15 +11449,17 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
11343
11449
  {
11344
11450
  type: "colorsettings",
11345
11451
  name: "--sjs-border-default",
11346
- title: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.borderDefault"),
11347
- titleLocation: "left",
11452
+ colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.borderDefault"),
11453
+ colorTitleLocation: "left",
11454
+ titleLocation: "hidden",
11348
11455
  descriptionLocation: "hidden",
11349
11456
  },
11350
11457
  {
11351
11458
  type: "colorsettings",
11352
11459
  name: "--sjs-border-light",
11353
- title: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.borderLight"),
11354
- titleLocation: "left",
11460
+ colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.borderLight"),
11461
+ colorTitleLocation: "left",
11462
+ titleLocation: "hidden",
11355
11463
  descriptionLocation: "hidden",
11356
11464
  }
11357
11465
  ]
@@ -13555,6 +13663,7 @@ var CreatorBase = /** @class */ (function (_super) {
13555
13663
  function CreatorBase(options, options2) {
13556
13664
  var _this = _super.call(this) || this;
13557
13665
  _this.options = options;
13666
+ _this.startEditTitleOnQuestionAdded = true;
13558
13667
  _this.isRTLValue = false;
13559
13668
  _this.alwaySaveTextInPropertyEditorsValue = false;
13560
13669
  _this.pageEditModeValue = "standard";
@@ -13847,6 +13956,22 @@ var CreatorBase = /** @class */ (function (_super) {
13847
13956
  *- options.title the default value of the title. You can change the default value.
13848
13957
  */
13849
13958
  _this.onConditionGetTitle = new CreatorEvent();
13959
+ /**
13960
+ * An event that is raised when Survey Creator populates a condition editor with operators. Use this event to hide individual condition operators.
13961
+ *
13962
+ * Parameters:
13963
+ *
13964
+ * - `sender`: `CreatorBase`\
13965
+ * A Survey Creator instance that raised the event.
13966
+ * - `options.questionName`: `String`\
13967
+ * The name of a question for which conditions are displayed.
13968
+ * - `options.operator`: `"empty"` | `"notempty"` | `"equal"` | `"notequal"` | `"contains"` | `"notcontains"` | `"anyof"` | `"allof"` | `"greater"` | `"less"` | `"greaterorequal"` | `"lessorequal"`\
13969
+ * A condition opeator for which the event is raised.
13970
+ * - `options.show`: `Boolean`\
13971
+ * A Boolean property that you can set to `false` if you want to hide the condition operator.
13972
+ *
13973
+ */
13974
+ _this.onGetConditionOperator = new CreatorEvent();
13850
13975
  /**
13851
13976
  * Use this event to modify the display text of a logic item in the Logic tab.
13852
13977
  *
@@ -14170,7 +14295,7 @@ var CreatorBase = /** @class */ (function (_super) {
14170
14295
  * Default value: `"defaultV2"`
14171
14296
  */
14172
14297
  _this.themeForPreview = "defaultV2";
14173
- _this.theme = { cssVariables: {} };
14298
+ _this._theme = { cssVariables: {} };
14174
14299
  _this._allowModifyPages = true;
14175
14300
  /**
14176
14301
  * Obsolete. Use the [`showDefaultLanguageInPreviewTab`](https://surveyjs.io/Documentation/Survey-Creator?id=surveycreator#showDefaultLanguageInPreviewTab) property instead.
@@ -14544,6 +14669,26 @@ var CreatorBase = /** @class */ (function (_super) {
14544
14669
  enumerable: false,
14545
14670
  configurable: true
14546
14671
  });
14672
+ Object.defineProperty(CreatorBase.prototype, "theme", {
14673
+ get: function () { return this._theme; },
14674
+ set: function (newTheme) {
14675
+ this._theme = newTheme;
14676
+ this.raiseThemeChanged();
14677
+ },
14678
+ enumerable: false,
14679
+ configurable: true
14680
+ });
14681
+ CreatorBase.prototype.raiseThemeChanged = function () {
14682
+ this.isThemePristine = false;
14683
+ this.hasPendingThemeChanges = true;
14684
+ var options = {
14685
+ propertyName: "theme",
14686
+ obj: this,
14687
+ value: this.theme,
14688
+ type: "THEME_MODIFIED"
14689
+ };
14690
+ this.setModified(options);
14691
+ };
14547
14692
  Object.defineProperty(CreatorBase.prototype, "allowModifyPages", {
14548
14693
  /**
14549
14694
  * Specifies whether users can add, edit, and delete survey pages.
@@ -15183,17 +15328,14 @@ var CreatorBase = /** @class */ (function (_super) {
15183
15328
  this.dragDropSurveyElements = new _survey_elements__WEBPACK_IMPORTED_MODULE_25__["DragDropSurveyElements"](null, this);
15184
15329
  var isDraggedFromToolbox = false;
15185
15330
  this.dragDropSurveyElements.onDragStart.add(function (sender, options) {
15186
- var panel = sender.dropTarget.parent;
15187
15331
  isDraggedFromToolbox = !sender.draggedElement.parent;
15188
15332
  _this.onDragStart.fire(sender, options);
15189
15333
  _this.startUndoRedoTransaction("drag drop");
15190
- _this.undoRedoManager.setUndoCallbackForTransaction(function () {
15191
- panel.updateRows();
15192
- });
15193
15334
  });
15194
15335
  this.dragDropSurveyElements.onDragEnd.add(function (sender, options) {
15195
15336
  _this.stopUndoRedoTransaction();
15196
- _this.selectElement(options.draggedElement, undefined, false, isDraggedFromToolbox);
15337
+ var editTitle = isDraggedFromToolbox && _this.startEditTitleOnQuestionAdded;
15338
+ _this.selectElement(options.draggedElement, undefined, false, editTitle);
15197
15339
  isDraggedFromToolbox = false;
15198
15340
  _this.onDragEnd.fire(sender, options);
15199
15341
  });
@@ -15476,10 +15618,11 @@ var CreatorBase = /** @class */ (function (_super) {
15476
15618
  }
15477
15619
  };
15478
15620
  CreatorBase.prototype.setModified = function (options) {
15621
+ var _this = this;
15479
15622
  if (options === void 0) { options = null; }
15480
15623
  this.setState("modified");
15481
15624
  this.onModified.fire(this, options);
15482
- this.isAutoSave && this.doAutoSave();
15625
+ this.isAutoSave && this.doAutoSave(options.type === "THEME_MODIFIED" ? function () { return _this.doSaveTheme(); } : function () { return _this.doSave(); });
15483
15626
  };
15484
15627
  CreatorBase.prototype.notifySurveyPropertyChanged = function (options) {
15485
15628
  this.clearSurveyLogicForUpdate(options.target, options.name, options.newValue);
@@ -16081,7 +16224,7 @@ var CreatorBase = /** @class */ (function (_super) {
16081
16224
  }
16082
16225
  this.survey.lazyRendering = false;
16083
16226
  this.doClickQuestionCore(newElement, modifiedType, -1, panel);
16084
- this.selectElement(newElement, null, true, true);
16227
+ this.selectElement(newElement, null, true, this.startEditTitleOnQuestionAdded);
16085
16228
  }
16086
16229
  };
16087
16230
  CreatorBase.prototype.getJSONForNewElement = function (json) {
@@ -16372,6 +16515,17 @@ var CreatorBase = /** @class */ (function (_super) {
16372
16515
  this.onConditionGetTitle.fire(this, options);
16373
16516
  return options.title;
16374
16517
  };
16518
+ CreatorBase.prototype.isConditionOperatorEnabled = function (questionName, operator, isEnabled) {
16519
+ if (this.onGetConditionOperator.isEmpty)
16520
+ return isEnabled;
16521
+ var options = {
16522
+ questionName: questionName,
16523
+ operator: operator,
16524
+ show: isEnabled
16525
+ };
16526
+ this.onGetConditionOperator.fire(this, options);
16527
+ return options.show;
16528
+ };
16375
16529
  CreatorBase.prototype.onLogicGetTitleCallback = function (expression, expressionText, text, logicItem) {
16376
16530
  if (this.onLogicItemDisplayText.isEmpty)
16377
16531
  return text;
@@ -16408,9 +16562,11 @@ var CreatorBase = /** @class */ (function (_super) {
16408
16562
  this.onTranslationExportItem.fire(this, options);
16409
16563
  return options.text;
16410
16564
  };
16411
- CreatorBase.prototype.doAutoSave = function () {
16565
+ CreatorBase.prototype.doAutoSave = function (saveFunc) {
16566
+ var _this = this;
16567
+ if (saveFunc === void 0) { saveFunc = function () { return _this.doSave(); }; }
16412
16568
  if (this.autoSaveDelay <= 0) {
16413
- this.doSave();
16569
+ saveFunc();
16414
16570
  return;
16415
16571
  }
16416
16572
  if (!!this.autoSaveTimerId) {
@@ -16420,7 +16576,7 @@ var CreatorBase = /** @class */ (function (_super) {
16420
16576
  this.autoSaveTimerId = setTimeout(function () {
16421
16577
  clearTimeout(self.autoSaveTimerId);
16422
16578
  self.autoSaveTimerId = null;
16423
- self.doSave();
16579
+ saveFunc();
16424
16580
  }, this.autoSaveDelay);
16425
16581
  };
16426
16582
  CreatorBase.prototype.doSave = function () {
@@ -16443,6 +16599,41 @@ var CreatorBase = /** @class */ (function (_super) {
16443
16599
  });
16444
16600
  }
16445
16601
  };
16602
+ CreatorBase.prototype.doSaveTheme = function () {
16603
+ var _this = this;
16604
+ this.setState("saving");
16605
+ if (this.hasPendingThemeChanges && this.saveThemeFunc) {
16606
+ this.saveNo++;
16607
+ this.saveThemeFunc(this.saveNo, function (no, isSuccess) {
16608
+ if (_this.saveNo !== no)
16609
+ return;
16610
+ if (isSuccess) {
16611
+ _this.setState("saved");
16612
+ _this.hasPendingThemeChanges = false;
16613
+ }
16614
+ else {
16615
+ _this.setState("modified");
16616
+ if (_this.showErrorOnFailedSave) {
16617
+ _this.notify(_this.getLocString("ed.saveError"), "error");
16618
+ }
16619
+ }
16620
+ });
16621
+ }
16622
+ };
16623
+ Object.defineProperty(CreatorBase.prototype, "saveThemeFunc", {
16624
+ /**
16625
+ * Assign to this property a function that will be called on clicking the 'Save' button or on any change if isAutoSave equals true.
16626
+ * @see isAutoSave
16627
+ */
16628
+ get: function () {
16629
+ return this.saveThemeFuncValue;
16630
+ },
16631
+ set: function (value) {
16632
+ this.saveThemeFuncValue = value;
16633
+ },
16634
+ enumerable: false,
16635
+ configurable: true
16636
+ });
16446
16637
  Object.defineProperty(CreatorBase.prototype, "saveSurveyFunc", {
16447
16638
  /**
16448
16639
  * Assign to this property a function that will be called on clicking the 'Save' button or on any change if isAutoSave equals true.
@@ -16678,6 +16869,12 @@ var CreatorBase = /** @class */ (function (_super) {
16678
16869
  Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
16679
16870
  Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])()
16680
16871
  ], CreatorBase.prototype, "viewType", void 0);
16872
+ Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
16873
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
16874
+ ], CreatorBase.prototype, "hasPendingThemeChanges", void 0);
16875
+ Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
16876
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
16877
+ ], CreatorBase.prototype, "isThemePristine", void 0);
16681
16878
  Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
16682
16879
  Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
16683
16880
  ], CreatorBase.prototype, "showToolboxValue", void 0);
@@ -17246,7 +17443,8 @@ var settings = {
17246
17443
  * Drag Drop Settings
17247
17444
  */
17248
17445
  dragDrop: {
17249
- restrictDragQuestionBetweenPages: false
17446
+ restrictDragQuestionBetweenPages: false,
17447
+ allowDragToTheSameLine: true
17250
17448
  },
17251
17449
  /**
17252
17450
  * Creator layout settings
@@ -17311,6 +17509,7 @@ var EmptySurveyCreatorOptions = /** @class */ (function () {
17311
17509
  EmptySurveyCreatorOptions.prototype.onConditionGetTitleCallback = function (expression, title) {
17312
17510
  return title;
17313
17511
  };
17512
+ EmptySurveyCreatorOptions.prototype.isConditionOperatorEnabled = function (questionName, operator, isEnabled) { return isEnabled; };
17314
17513
  EmptySurveyCreatorOptions.prototype.onLogicGetTitleCallback = function (expression, displayExpression, text, logicItem) { return text; };
17315
17514
  EmptySurveyCreatorOptions.prototype.getTranslationExportedText = function (obj, name, locString, locale, text) { return text; };
17316
17515
  EmptySurveyCreatorOptions.prototype.uploadFiles = function (files, question, uploadingCallback) { };
@@ -17417,6 +17616,9 @@ var QuestionColorModel = /** @class */ (function (_super) {
17417
17616
  enumerable: false,
17418
17617
  configurable: true
17419
17618
  });
17619
+ QuestionColorModel.prototype.getSwatchCss = function () {
17620
+ return new survey_core__WEBPACK_IMPORTED_MODULE_1__["CssClassBuilder"]().append(this.cssClasses.swatch).append(this.cssClasses.swatchDisabled, this.isInputReadOnly).toString();
17621
+ };
17420
17622
  QuestionColorModel.prototype.getSwatchStyle = function () {
17421
17623
  return { backgroundColor: this.renderedValue };
17422
17624
  };
@@ -17460,7 +17662,7 @@ var QuestionColorModel = /** @class */ (function (_super) {
17460
17662
  });
17461
17663
  QuestionColorModel.prototype.createDropdownAction = function () {
17462
17664
  var _this = this;
17463
- var action = Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["createDropdownActionModelAdvanced"])({}, {
17665
+ var action = Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["createDropdownActionModelAdvanced"])({ enabled: new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return !_this.isInputReadOnly; }) }, {
17464
17666
  onSelectionChanged: function (item) {
17465
17667
  _this.value = item.value;
17466
17668
  },
@@ -17609,6 +17811,9 @@ var QuestionFileEditorModel = /** @class */ (function (_super) {
17609
17811
  QuestionFileEditorModel.prototype.getIsClearButtonDisabled = function () {
17610
17812
  return !this.value || this.isInputReadOnly;
17611
17813
  };
17814
+ QuestionFileEditorModel.prototype.getChooseButtonCss = function () {
17815
+ return new survey_core__WEBPACK_IMPORTED_MODULE_1__["CssClassBuilder"]().append(this.cssClasses.chooseButton).append(this.cssClasses.chooseButtonDisabled, this.isInputReadOnly).toString();
17816
+ };
17612
17817
  return QuestionFileEditorModel;
17613
17818
  }(survey_core__WEBPACK_IMPORTED_MODULE_1__["QuestionFileModel"]));
17614
17819
 
@@ -18283,7 +18488,7 @@ var __spreadArray = function (to, from) {
18283
18488
  /*!******************************!*\
18284
18489
  !*** ./src/entries/index.ts ***!
18285
18490
  \******************************/
18286
- /*! exports provided: Version, enStrings, editorLocalization, defaultStrings, localization, QuestionConvertMode, settings, EmptySurveyCreatorOptions, CreatorAction, TabbedMenuItem, TabbedMenuContainer, ToolbarActionContainer, CreatorEvent, CreatorBase, SurveyCreatorModel, StylesManager, initializeDesignTimeSurveyModel, editableStringRendererName, getElementWrapperComponentName, getQuestionContentWrapperComponentName, getElementWrapperComponentData, getItemValueWrapperComponentName, getItemValueWrapperComponentData, isStringEditable, isTextInput, registerAdorner, removeAdorners, CreatorResponsivityManager, EmbedModel, TabEmbedPlugin, AceJsonEditorModel, TabJsonEditorAcePlugin, JsonEditorBaseModel, TabJsonEditorBasePlugin, TextareaJsonEditorModel, TabJsonEditorTextareaPlugin, TestSurveyTabViewModel, TabTestPlugin, createColor, createBoxShadow, parseBoxShadow, DefaultFonts, Themes, PredefinedThemes, PredefinedColors, ThemeSurveyTabViewModel, TabThemePlugin, initLogicOperator, LogicEvent, SurveyLogic, TranslationItemBase, TranslationItemString, TranslationItem, TranslationGroup, Translation, translationCss, TabTranslationPlugin, initialSettingsAllowShowEmptyTitleInDesignMode, TabDesignerViewModel, TabDesignerPlugin, SurveyLogicUI, TabLogicPlugin, logicCss, ToolboxToolViewModel, PageNavigatorViewModel, PageAdorner, RowViewModel, QuestionAdornerViewModel, QuestionDropdownAdornerViewModel, QuestionImageAdornerViewModel, QuestionRatingAdornerViewModel, ItemValueWrapperViewModel, ImageItemValueWrapperViewModel, MatrixCellWrapperEditSurvey, MatrixCellWrapperViewModel, SurveySimulatorModel, DEFAULT_MONITOR_DPI, simulatorDevices, SurveyResultsItemModel, SurveyResultsModel, LogoImageViewModel, StringItemsNavigatorBase, StringEditorConnector, StringEditorViewModelBase, QuestionEmbeddedSurveyModel, QuestionLinkValueModel, EditorLocalization, getLocString, SurveyJSON5, QuestionSpinEditorModel, QuestionColorModel, QuestionFileEditorModel, setSurveyJSONForPropertyGrid, PropertyEditorSetupValue, PropertyGridEditorCollection, PropertyGridTitleActionsCreator, PropertyJSONGenerator, PropertyGridModel, PropertyGridEditor, PropertyGridEditorBoolean, PropertyGridEditorStringBase, PropertyGridEditorString, PropertyGridLinkEditor, PropertyGridEditorNumber, PropertyGridEditorImageSize, PropertyGridEditorText, PropertyGridEditorHtml, PropertyGridEditorColor, PropertyGridEditorStringArray, PropertyGridEditorDropdown, PropertyGridEditorSet, PropertyGridEditorPage, PropertyGridEditorQuestion, PropertyGridEditorQuestionSelectBase, PropertyGridEditorQuestionValue, PropertyGridEditorExpression, PropertyGridEditorCondition, PropertyGridEditorMatrix, PropertyGridEditorMatrixItemValues, PropertyGridEditorMatrixRateValues, PropertyGridEditorMatrixColumns, PropertyGridEditorMatrixPages, PropertyGridEditorMatrixCalculatedValues, PropertyGridEditorMatrixHtmlConditions, PropertyGridEditorMatrixUrlConditions, PropertyGridEditorMatrixMutlipleTextItems, PropertyGridEditorMatrixMultipleTypes, PropertyGridEditorMatrixValidators, PropertyGridEditorMatrixTriggers, PropertyGridEditorBindings, PropertyGridViewModel, ObjectSelectorItem, ObjectSelector, ObjectSelectorModel, PropertyGridEditorQuestionRestfull, PropertyGridValueEditorBase, PropertyGridCellsEditor, PropertyGridValueEditor, PropertyGridRowValueEditor, PropertyGridPanelValueEditor, PropertyGridTriggerValueEditor, PropertyGridTriggerValueInLogicEditor, propertyGridCss, QuestionConverter, svgBundle, SurveyTextWorkerError, SurveyTextWorkerParserError, SurveyTextWorkerJsonError, SurveyTextWorker, JsonDuplicateNameError, QuestionToolboxCategory, QuestionToolboxItem, QuestionToolbox, SidebarModel, SidebarTabModel, getNextItemValue, getNextItemText, getNextValue, findParentNode, focusFirstControl, getFirstNonTextElement, getNodesFromKoComponentInfo, propertyExists, isPropertyVisible, toggleHovered, clearNewLines, select, copyObject, copyCssClasses, assignDefaultV2Classes, wrapTextByCurlyBraces, capitalize, notShortCircuitAnd, imageMimeTypes, getAcceptedTypesByContentMode, getQuestionFromObj, ingectAlpha, convertRgbaToString, parseRgbaFromString, parseColor, HSBToRGB, RGBToHSB, assign, ColorCalculator, SurveyQuestionEditorDefinition, ObjType, SurveyHelper, ResizeManager, UndoRedoPlugin, undoRedoTransaction, ignoreUndoRedo, UndoRedoManager, Transaction, UndoRedoAction, UndoRedoArrayAction, PagesController */
18491
+ /*! exports provided: Version, enStrings, editorLocalization, defaultStrings, localization, QuestionConvertMode, settings, EmptySurveyCreatorOptions, CreatorAction, TabbedMenuItem, TabbedMenuContainer, ToolbarActionContainer, CreatorEvent, CreatorBase, SurveyCreatorModel, StylesManager, initializeDesignTimeSurveyModel, editableStringRendererName, getElementWrapperComponentName, getQuestionContentWrapperComponentName, getElementWrapperComponentData, getItemValueWrapperComponentName, getItemValueWrapperComponentData, isStringEditable, isTextInput, registerAdorner, removeAdorners, CreatorResponsivityManager, EmbedModel, TabEmbedPlugin, AceJsonEditorModel, TabJsonEditorAcePlugin, JsonEditorBaseModel, TabJsonEditorBasePlugin, TextareaJsonEditorModel, TabJsonEditorTextareaPlugin, TestSurveyTabViewModel, TabTestPlugin, createColor, createBoxShadow, parseBoxShadow, DefaultFonts, fontsettingsToCssVariable, fontsettingsFromCssVariable, elementSettingsToCssVariable, elementSettingsFromCssVariable, Themes, PredefinedThemes, PredefinedColors, ThemeSurveyTabViewModel, TabThemePlugin, initLogicOperator, LogicEvent, SurveyLogic, TranslationItemBase, TranslationItemString, TranslationItem, TranslationGroup, Translation, translationCss, TabTranslationPlugin, initialSettingsAllowShowEmptyTitleInDesignMode, TabDesignerViewModel, TabDesignerPlugin, SurveyLogicUI, TabLogicPlugin, logicCss, ToolboxToolViewModel, PageNavigatorViewModel, PageAdorner, RowViewModel, QuestionAdornerViewModel, QuestionDropdownAdornerViewModel, QuestionImageAdornerViewModel, QuestionRatingAdornerViewModel, ItemValueWrapperViewModel, ImageItemValueWrapperViewModel, MatrixCellWrapperEditSurvey, MatrixCellWrapperViewModel, SurveySimulatorModel, DEFAULT_MONITOR_DPI, simulatorDevices, SurveyResultsItemModel, SurveyResultsModel, LogoImageViewModel, StringItemsNavigatorBase, StringEditorConnector, StringEditorViewModelBase, QuestionEmbeddedSurveyModel, QuestionLinkValueModel, EditorLocalization, getLocString, SurveyJSON5, QuestionSpinEditorModel, QuestionColorModel, QuestionFileEditorModel, setSurveyJSONForPropertyGrid, PropertyEditorSetupValue, PropertyGridEditorCollection, PropertyGridTitleActionsCreator, PropertyJSONGenerator, PropertyGridModel, PropertyGridEditor, PropertyGridEditorBoolean, PropertyGridEditorStringBase, PropertyGridEditorString, PropertyGridLinkEditor, PropertyGridEditorNumber, PropertyGridEditorImageSize, PropertyGridEditorText, PropertyGridEditorHtml, PropertyGridEditorColor, PropertyGridEditorStringArray, PropertyGridEditorDropdown, PropertyGridEditorSet, PropertyGridEditorPage, PropertyGridEditorQuestion, PropertyGridEditorQuestionSelectBase, PropertyGridEditorQuestionValue, PropertyGridEditorExpression, PropertyGridEditorCondition, PropertyGridEditorMatrix, PropertyGridEditorMatrixItemValues, PropertyGridEditorMatrixRateValues, PropertyGridEditorMatrixColumns, PropertyGridEditorMatrixPages, PropertyGridEditorMatrixCalculatedValues, PropertyGridEditorMatrixHtmlConditions, PropertyGridEditorMatrixUrlConditions, PropertyGridEditorMatrixMutlipleTextItems, PropertyGridEditorMatrixMultipleTypes, PropertyGridEditorMatrixValidators, PropertyGridEditorMatrixTriggers, PropertyGridEditorBindings, PropertyGridViewModel, ObjectSelectorItem, ObjectSelector, ObjectSelectorModel, PropertyGridEditorQuestionRestfull, PropertyGridValueEditorBase, PropertyGridCellsEditor, PropertyGridValueEditor, PropertyGridRowValueEditor, PropertyGridPanelValueEditor, PropertyGridTriggerValueEditor, PropertyGridTriggerValueInLogicEditor, propertyGridCss, QuestionConverter, svgBundle, SurveyTextWorkerError, SurveyTextWorkerParserError, SurveyTextWorkerJsonError, SurveyTextWorker, JsonDuplicateNameError, QuestionToolboxCategory, QuestionToolboxItem, QuestionToolbox, SidebarModel, SidebarTabModel, getNextItemValue, getNextItemText, getNextValue, findParentNode, focusFirstControl, getFirstNonTextElement, getNodesFromKoComponentInfo, propertyExists, isPropertyVisible, toggleHovered, clearNewLines, select, copyObject, copyCssClasses, assignDefaultV2Classes, wrapTextByCurlyBraces, capitalize, notShortCircuitAnd, imageMimeTypes, getAcceptedTypesByContentMode, getQuestionFromObj, ingectAlpha, convertRgbaToString, parseRgbaFromString, parseColor, HSBToRGB, RGBToHSB, assign, ColorCalculator, SurveyQuestionEditorDefinition, ObjType, SurveyHelper, ResizeManager, UndoRedoPlugin, undoRedoTransaction, ignoreUndoRedo, UndoRedoManager, Transaction, UndoRedoAction, UndoRedoArrayAction, PagesController */
18287
18492
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
18288
18493
 
18289
18494
  "use strict";
@@ -18385,8 +18590,16 @@ __webpack_require__.r(__webpack_exports__);
18385
18590
  /* harmony import */ var _components_tabs_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../components/tabs/theme-custom-questions/font-settings */ "./src/components/tabs/theme-custom-questions/font-settings.ts");
18386
18591
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DefaultFonts", function() { return _components_tabs_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_13__["DefaultFonts"]; });
18387
18592
 
18593
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fontsettingsToCssVariable", function() { return _components_tabs_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_13__["fontsettingsToCssVariable"]; });
18594
+
18595
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fontsettingsFromCssVariable", function() { return _components_tabs_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_13__["fontsettingsFromCssVariable"]; });
18596
+
18388
18597
  /* harmony import */ var _components_tabs_theme_custom_questions_element_settings__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../components/tabs/theme-custom-questions/element-settings */ "./src/components/tabs/theme-custom-questions/element-settings.ts");
18389
- /* empty/unused harmony star reexport *//* harmony import */ var _components_tabs_theme__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../components/tabs/theme */ "./src/components/tabs/theme.ts");
18598
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementSettingsToCssVariable", function() { return _components_tabs_theme_custom_questions_element_settings__WEBPACK_IMPORTED_MODULE_14__["elementSettingsToCssVariable"]; });
18599
+
18600
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementSettingsFromCssVariable", function() { return _components_tabs_theme_custom_questions_element_settings__WEBPACK_IMPORTED_MODULE_14__["elementSettingsFromCssVariable"]; });
18601
+
18602
+ /* harmony import */ var _components_tabs_theme__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../components/tabs/theme */ "./src/components/tabs/theme.ts");
18390
18603
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Themes", function() { return _components_tabs_theme__WEBPACK_IMPORTED_MODULE_15__["Themes"]; });
18391
18604
 
18392
18605
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PredefinedThemes", function() { return _components_tabs_theme__WEBPACK_IMPORTED_MODULE_15__["PredefinedThemes"]; });
@@ -18752,7 +18965,7 @@ __webpack_require__.r(__webpack_exports__);
18752
18965
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! survey-core */ "survey-core");
18753
18966
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_70___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_70__);
18754
18967
  var Version;
18755
- Version = "" + "1.9.97";
18968
+ Version = "" + "1.9.99";
18756
18969
  //should be loaded before other styles for easier override
18757
18970
  __webpack_require__(/*! ../utils/context-button.scss */ "./src/utils/context-button.scss");
18758
18971
 
@@ -18841,7 +19054,7 @@ __webpack_require__(/*! ../utils/design.scss */ "./src/utils/design.scss");
18841
19054
  __webpack_require__(/*! ../utils/layout.scss */ "./src/utils/layout.scss");
18842
19055
 
18843
19056
  survey_core__WEBPACK_IMPORTED_MODULE_70__["settings"].supportCreatorV2 = true;
18844
- Object(survey_core__WEBPACK_IMPORTED_MODULE_70__["checkLibraryVersion"])("" + "1.9.97", "survey-creator-core");
19057
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_70__["checkLibraryVersion"])("" + "1.9.99", "survey-creator-core");
18845
19058
 
18846
19059
 
18847
19060
  /***/ }),
@@ -21120,8 +21333,8 @@ var enStrings = {
21120
21333
  expressionInvalid: "The logic expression is empty or invalid. Please correct it.",
21121
21334
  noActionError: "Please, add at least one action.",
21122
21335
  actionInvalid: "Please, fix problems in your action(s).",
21123
- uncompletedRule_title: "Leave the tab?",
21124
- uncompletedRule_text: "One or more logical rules are uncompleted. If you leave the tab, those changes that cannot be applied will vanish. Are you sure you want to leave?",
21336
+ uncompletedRule_title: "Logical rules are incomplete",
21337
+ uncompletedRule_text: "You have not completed some of the logical rules. If you leave the tab now, the changes will be lost. Do you still want to leave the tab without completing the changes?",
21125
21338
  uncompletedRule_apply: "Yes",
21126
21339
  uncompletedRule_cancel: "No, I want to complete the rules",
21127
21340
  expressionSetup: "",
@@ -21431,7 +21644,7 @@ var enStrings = {
21431
21644
  readOnly: "Read-only",
21432
21645
  enableIf: "Editable if",
21433
21646
  emptyRowsText: "\"No rows\" message",
21434
- size: "Input size (in characters)",
21647
+ size: "Input field size (in characters)",
21435
21648
  separateSpecialChoices: "Separate special choices (None, Other, Select All)",
21436
21649
  choicesFromQuestion: "Copy choices from the following question",
21437
21650
  choicesFromQuestionMode: "Which choices to copy?",
@@ -21761,6 +21974,7 @@ var enStrings = {
21761
21974
  },
21762
21975
  pehelp: {
21763
21976
  cookieName: "Cookies prevent users from filling out the same survey twice.",
21977
+ size: "Resizes the visible area of the input field. Please use the <b>Validation → Maximum length</b> setting to limit the input length.",
21764
21978
  format: "Use {0} as a placeholder for the actual value.",
21765
21979
  totalText: "Visible only when at least one column has Total type or Total expression.",
21766
21980
  acceptedTypes: "Refer to the [accept](https://www.w3schools.com/tags/att_input_accept.asp) attribute description for more information.",
@@ -21859,71 +22073,71 @@ var enStrings = {
21859
22073
  iconSize: "Icon size" // Auto-generated string
21860
22074
  },
21861
22075
  theme: {
21862
- "--background": "Background Color",
21863
- "--background-dim-light": "Background Dim Light Color",
21864
- "--primary-foreground": "Primary Foreground Color",
21865
- "--foreground": "Foreground Color",
21866
- "--base-unit": "Base Unit",
22076
+ "--background": "Background color",
22077
+ "--background-dim-light": "Background dim light color",
22078
+ "--primary-foreground": "Primary foreground color",
22079
+ "--foreground": "Foreground color",
22080
+ "--base-unit": "Base unit",
21867
22081
  groupGeneral: "General",
21868
22082
  groupAdvanced: "Advanced",
21869
22083
  "themeName": "Theme",
21870
- "themeMode": "Modes",
21871
- "themeModePanels": "Panels",
21872
- "themeModeLightweight": "Lightweight",
22084
+ "themeMode": "Question appearance",
22085
+ "themeModePanels": "Default",
22086
+ "themeModeLightweight": "Without Panels",
21873
22087
  "themePaletteLight": "Light",
21874
22088
  "themePaletteDark": "Dark",
21875
- primaryColor: "Accent Color",
22089
+ primaryColor: "Accent color",
21876
22090
  primaryDefaultColor: "Default",
21877
22091
  primaryDarkColor: "Hover",
21878
22092
  primaryLightColor: "Selected",
21879
- "backgroundDimColor": "Background Color",
21880
- "backgroundImage": "Background Image",
22093
+ "backgroundDimColor": "Background color",
22094
+ "backgroundImage": "Background image",
21881
22095
  "backgroundImageFitAuto": "Auto",
21882
22096
  "backgroundImageFitCover": "Cover",
21883
22097
  "backgroundImageFitContain": "Contain",
21884
22098
  "backgroundOpacity": "Opacity",
21885
22099
  "backgroundImageAttachmentFixed": "Fixed",
21886
22100
  "backgroundImageAttachmentScroll": "Scroll",
21887
- "panelBackgroundTransparency": "Panel Background Transparency",
21888
- "questionBackgroundTransparency": "Question Background Transparency",
21889
- questionPanel: "Question Panel",
21890
- questionTitle: "Question Title Font",
21891
- questionDescription: "Question Description Font",
21892
- editorPanel: "Editor",
21893
- editorFont: "Editor Font",
21894
- backcolor: "Default Background",
21895
- hovercolor: "Hover Background",
21896
- borderDecoration: "Border Decoration",
21897
- accentBackground: "Accent Background",
21898
- accentForeground: "Accent Foreground",
21899
- primaryForecolor: "Default Color",
21900
- primaryForecolorLight: "Disabled Color",
21901
- linesColors: "Lines",
21902
- borderDefault: "Major",
21903
- borderLight: "Minor",
21904
- fontFamily: "Font Family",
21905
- fontSize: "Font Size",
22101
+ "panelBackgroundTransparency": "Panel background opacity",
22102
+ "questionBackgroundTransparency": "Question background opacity",
22103
+ questionPanel: "Panel background and corner radius",
22104
+ questionTitle: "Question title font",
22105
+ questionDescription: "Question description font",
22106
+ editorPanel: "Input element",
22107
+ editorFont: "Input element font",
22108
+ backcolor: "Default background",
22109
+ hovercolor: "Hover background",
22110
+ borderDecoration: "Border decoration",
22111
+ accentBackground: "Accent background",
22112
+ accentForeground: "Accent foreground",
22113
+ primaryForecolor: "Default color",
22114
+ primaryForecolorLight: "Disabled color",
22115
+ linesColors: "Minor line colors",
22116
+ borderDefault: "Darker",
22117
+ borderLight: "Lighter",
22118
+ fontFamily: "Font family",
22119
+ fontSize: "Font size",
21906
22120
  color: "Color",
21907
22121
  size: "Size",
21908
22122
  fontWeightRegular: "Regular",
21909
22123
  fontWeightHeavy: "Heavy",
21910
- fontWeightSemiBold: "Semi-Bold",
22124
+ fontWeightSemiBold: "Semi-bold",
21911
22125
  fontWeightBold: "Bold",
21912
22126
  scale: "Scale",
21913
- cornerRadius: "Corner Radius",
21914
- surveyTitle: "Survey Title Font",
21915
- pageTitle: "Page Title Font",
21916
- pageDescription: "Page Description Font",
22127
+ cornerRadius: "Corner radius",
22128
+ surveyTitle: "Survey title font",
22129
+ pageTitle: "Page title font",
22130
+ pageDescription: "Page description font",
21917
22131
  boxShadowX: "X",
21918
22132
  boxShadowY: "Y",
21919
- boxShadowAddRule: "Add More Shadow Effect",
22133
+ boxShadowAddRule: "Add Shadow Effect",
21920
22134
  opacity: "Opacity",
21921
22135
  boxShadowBlur: "Blur",
21922
22136
  boxShadowSpread: "Spread",
21923
22137
  boxShadowDrop: "Drop",
21924
22138
  boxShadowInner: "Inner",
21925
- questionShadow: "Question Panel Border / Shadow",
21926
- editorShadow: "Editor Border / Shadow",
22139
+ questionShadow: "Shadow effects",
22140
+ editorShadow: "Input element shadow effects",
21927
22141
  names: {
21928
22142
  "default": "Default",
21929
22143
  "contrast": "Contrast",
@@ -23019,6 +23233,7 @@ var propertyGridCss = {
23019
23233
  color: {
23020
23234
  root: "spg-input spg-color-editor spg-input-container",
23021
23235
  swatch: "spg-color-editor__color-swatch",
23236
+ swatchDisabled: "spg-color-editor__color-swatch--disabled",
23022
23237
  colorInput: "spg-color-editor__color-input",
23023
23238
  control: "spg-color-editor__input spg-input-container__input",
23024
23239
  colorDropdown: "spg-input__edit-button",
@@ -23034,7 +23249,8 @@ var propertyGridCss = {
23034
23249
  clearButtonIcon: "icon-clear",
23035
23250
  fileInput: "sd-visuallyhidden",
23036
23251
  clearButton: "spg-input__edit-button",
23037
- chooseButton: "spg-input__edit-button spg-file-edit__choose-button"
23252
+ chooseButton: "spg-input__edit-button spg-file-edit__choose-button",
23253
+ chooseButtonDisabled: "spg-input__edit-button--disabled"
23038
23254
  },
23039
23255
  linkvalue: {
23040
23256
  content: "spg-link"
@@ -23845,6 +24061,7 @@ var ConditionEditor = /** @class */ (function (_super) {
23845
24061
  var qType = !!json ? json.type : null;
23846
24062
  opt.choices.forEach(function (choice, index) {
23847
24063
  var isOperatorEnabled = ConditionEditor.isOperatorEnabled(qType, _creator_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].operators[choice.value]);
24064
+ isOperatorEnabled = _this.options.isConditionOperatorEnabled(questionName, choice.value, isOperatorEnabled);
23848
24065
  choice.setIsEnabled(isOperatorEnabled);
23849
24066
  choice.setIsVisible(isOperatorEnabled);
23850
24067
  });
@@ -23877,10 +24094,14 @@ var ConditionEditor = /** @class */ (function (_super) {
23877
24094
  this.setupConditionQuestionName(item, panel);
23878
24095
  if (!!panel.getQuestionByName("questionValue")) {
23879
24096
  panel.getQuestionByName("questionValue").value = item.value;
24097
+ this.updateSurveyVariable(item);
23880
24098
  }
23881
24099
  this.setupRemoveQuestion(panel);
23882
24100
  this.isSettingPanelValues = false;
23883
24101
  };
24102
+ ConditionEditor.prototype.updateSurveyVariable = function (item) {
24103
+ this.editSurvey.setVariable(item.questionName, item.value);
24104
+ };
23884
24105
  ConditionEditor.prototype.getConditionQuestions = function () {
23885
24106
  if (!this.context)
23886
24107
  return this.allConditionQuestions;
@@ -23922,6 +24143,7 @@ var ConditionEditor = /** @class */ (function (_super) {
23922
24143
  item.operator = panel.getQuestionByName("operator").value;
23923
24144
  if (!!panel.getQuestionByName("questionValue")) {
23924
24145
  item.value = panel.getQuestionByName("questionValue").value;
24146
+ this.updateSurveyVariable(item);
23925
24147
  }
23926
24148
  return item;
23927
24149
  };
@@ -24247,38 +24469,39 @@ var ConditionEditor = /** @class */ (function (_super) {
24247
24469
  this.updateQuestionsWidth(panel);
24248
24470
  };
24249
24471
  ConditionEditor.prototype.onUpdateQuestionCssClasses = function (options) {
24250
- options.cssClasses.answered = "svc-logic-question--answered";
24251
- if (options.question.name === "conjunction") {
24252
- options.question.allowRootStyle = false;
24253
- options.cssClasses.control += " svc-logic-operator svc-logic-operator--conjunction ";
24254
- }
24255
- if (options.question.name === "questionName") {
24256
- options.question.allowRootStyle = false;
24257
- options.cssClasses.control += " svc-logic-operator svc-logic-operator--question";
24258
- options.cssClasses.error.root = "svc-logic-operator__error";
24259
- options.cssClasses.onError = "svc-logic-operator--error";
24260
- }
24261
- if (options.question.name === "operator") {
24262
- options.question.allowRootStyle = false;
24263
- options.cssClasses.control += " svc-logic-operator svc-logic-operator--operator";
24264
- }
24265
- if (options.question.name === "removeAction") {
24266
- options.question.allowRootStyle = false;
24267
- options.cssClasses.mainRoot += " svc-logic-condition-remove-question";
24268
- }
24269
- // options.cssClasses.mainRoot += "sd-question sd-row__question";
24270
- if (options.question.name === "questionValue" || options.question.isContentElement) {
24271
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["assignDefaultV2Classes"])(options.cssClasses, options.question.getType());
24272
- options.cssClasses.mainRoot += " svc-logic-question-value sd-element--with-frame";
24273
- options.cssClasses.error.root = "svc-logic-operator__error";
24274
- }
24275
- if (options.question.name === "panel") {
24276
- options.cssClasses.root += " svc-logic-paneldynamic";
24277
- options.cssClasses.buttonAdd += " svc-logic-operator--operator";
24278
- options.cssClasses.iconRemove = "svc-icon-remove";
24279
- options.cssClasses.buttonRemove = "svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn";
24280
- options.cssClasses.buttonRemoveRight = "svc-logic-paneldynamic__remove-btn--right";
24281
- options.cssClasses.buttonRemoveText = "svc-logic-paneldynamic__button-remove-text";
24472
+ var cssClasses = options.cssClasses;
24473
+ var question = options.question;
24474
+ cssClasses.answered = "svc-logic-question--answered";
24475
+ if (question.name === "conjunction") {
24476
+ question.allowRootStyle = false;
24477
+ cssClasses.control += " svc-logic-operator svc-logic-operator--conjunction ";
24478
+ }
24479
+ if (question.name === "questionName") {
24480
+ question.allowRootStyle = false;
24481
+ cssClasses.control += " svc-logic-operator svc-logic-operator--question";
24482
+ cssClasses.error.root = "svc-logic-operator__error";
24483
+ cssClasses.onError = "svc-logic-operator--error";
24484
+ }
24485
+ if (question.name === "operator") {
24486
+ question.allowRootStyle = false;
24487
+ cssClasses.control += " svc-logic-operator svc-logic-operator--operator";
24488
+ }
24489
+ if (question.name === "removeAction") {
24490
+ question.allowRootStyle = false;
24491
+ cssClasses.mainRoot += " svc-logic-condition-remove-question";
24492
+ }
24493
+ if (question.name === "questionValue" || question.isContentElement) {
24494
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["assignDefaultV2Classes"])(cssClasses, question.getType());
24495
+ cssClasses.mainRoot += " svc-logic-question-value sd-element--with-frame";
24496
+ cssClasses.error.root = "svc-logic-operator__error";
24497
+ }
24498
+ if (question.name === "panel") {
24499
+ cssClasses.root += " svc-logic-paneldynamic";
24500
+ cssClasses.buttonAdd += " svc-logic-operator--operator";
24501
+ cssClasses.iconRemove = "svc-icon-remove";
24502
+ cssClasses.buttonRemove = "svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn";
24503
+ cssClasses.buttonRemoveRight = "svc-logic-paneldynamic__remove-btn--right";
24504
+ cssClasses.buttonRemoveText = "svc-logic-paneldynamic__button-remove-text";
24282
24505
  }
24283
24506
  };
24284
24507
  ConditionEditor.prototype.onValueChanged = function (options) {
@@ -25408,6 +25631,7 @@ var PropertyGridModel = /** @class */ (function () {
25408
25631
  if (!this.obj)
25409
25632
  return;
25410
25633
  new PropertyJSONGenerator(this.obj, this.options).setupObjPanel(page, false);
25634
+ this.survey.enterKeyAction = "loseFocus";
25411
25635
  this.survey.addPage(page);
25412
25636
  this.survey.getAllQuestions().forEach(function (q) {
25413
25637
  PropertyGridEditorCollection.onSetup(_this.obj, q, q.property, _this.options);
@@ -25549,13 +25773,15 @@ var PropertyGridModel = /** @class */ (function () {
25549
25773
  };
25550
25774
  PropertyGridModel.prototype.validateQuestionValue = function (obj, question, prop, val) {
25551
25775
  if (question.isRequired && (survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isValueEmpty(val) || question["valueChangingEmpty"]))
25552
- return _editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getString("pe.propertyIsEmpty");
25776
+ return this.getErrorTextOnValidate(_editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getString("pe.propertyIsEmpty"), prop.name, obj, val);
25553
25777
  if (this.isPropNameInValid(obj, prop, val) || question["nameHasError"])
25554
- return _editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getString("pe.propertyNameIsIncorrect");
25778
+ return this.getErrorTextOnValidate(_editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getString("pe.propertyNameIsIncorrect"), prop.name, obj, val);
25555
25779
  var editorError = PropertyGridEditorCollection.validateValue(obj, question, prop, val);
25556
- if (!!editorError)
25557
- return editorError;
25558
- return this.options.onGetErrorTextOnValidationCallback(prop.name, obj, val);
25780
+ return this.getErrorTextOnValidate(editorError, prop.name, obj, val);
25781
+ };
25782
+ PropertyGridModel.prototype.getErrorTextOnValidate = function (defaultError, propName, obj, val) {
25783
+ var customError = this.options.onGetErrorTextOnValidationCallback(propName, obj, val);
25784
+ return !!customError ? customError : defaultError;
25559
25785
  };
25560
25786
  PropertyGridModel.prototype.onValidateQuestion = function (options) {
25561
25787
  var q = options.question;
@@ -29310,6 +29536,8 @@ __webpack_require__.r(__webpack_exports__);
29310
29536
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./src/entries/helpers.ts");
29311
29537
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
29312
29538
  /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
29539
+ /* harmony import */ var _creator_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./creator-settings */ "./src/creator-settings.ts");
29540
+
29313
29541
 
29314
29542
 
29315
29543
  function calculateIsEdge(dropTargetNode, clientY) {
@@ -29325,6 +29553,14 @@ function calculateDragOverLocation(clientX, clientY, dropTargetNode) {
29325
29553
  var tg = rect.height / rect.width;
29326
29554
  var dx = clientX - rect.x;
29327
29555
  var dy = clientY - rect.y;
29556
+ if (!_creator_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].dragDrop.allowDragToTheSameLine) {
29557
+ if (dy >= rect.height / 2) {
29558
+ return survey_core__WEBPACK_IMPORTED_MODULE_1__["DragTypeOverMeEnum"].Bottom;
29559
+ }
29560
+ else {
29561
+ return survey_core__WEBPACK_IMPORTED_MODULE_1__["DragTypeOverMeEnum"].Top;
29562
+ }
29563
+ }
29328
29564
  if (dy >= tg * dx) {
29329
29565
  if (dy >= -tg * dx + rect.height) {
29330
29566
  return survey_core__WEBPACK_IMPORTED_MODULE_1__["DragTypeOverMeEnum"].Bottom;
@@ -29357,12 +29593,13 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
29357
29593
  _this.removeDragOverMarker(_this.dropTarget);
29358
29594
  };
29359
29595
  _this.doDrop = function () {
29596
+ var _a;
29360
29597
  if (!_this.dropTarget)
29361
29598
  return;
29362
29599
  var page = _this.parentElement;
29363
29600
  var dragged = _this.draggedElement;
29364
29601
  var src = _this.draggedElement;
29365
- var dest = _this.dropTarget;
29602
+ var dest = ((_a = _this.dragOverIndicatorElement) === null || _a === void 0 ? void 0 : _a.isPanel) ? _this.dragOverIndicatorElement : _this.dropTarget;
29366
29603
  var row = page.dragDropFindRow(dest);
29367
29604
  var targetIndex = _this.getElementIndexInPanel(dest, row);
29368
29605
  if (_this.dragOverLocation === survey_core__WEBPACK_IMPORTED_MODULE_1__["DragTypeOverMeEnum"].Right || _this.dragOverLocation === survey_core__WEBPACK_IMPORTED_MODULE_1__["DragTypeOverMeEnum"].Bottom) {
@@ -31985,10 +32222,11 @@ function RGBToHSB(r, g, b) {
31985
32222
  return [60 * (h < 0 ? h + 6 : h), v && (n / v) * 100, v * 100];
31986
32223
  }
31987
32224
  function assign() {
31988
- var objects = [];
32225
+ var inputs = [];
31989
32226
  for (var _i = 0; _i < arguments.length; _i++) {
31990
- objects[_i] = arguments[_i];
32227
+ inputs[_i] = arguments[_i];
31991
32228
  }
32229
+ var objects = (inputs || []).filter(function (obj) { return !!obj; });
31992
32230
  if (objects.length <= 1) {
31993
32231
  return;
31994
32232
  }