survey-creator-core 1.9.97 → 1.9.98
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.
- package/fonts.fontless.css +1 -1
- package/fonts.fontless.min.css +1 -1
- package/package.json +2 -2
- package/survey-creator-core.css +36 -22
- package/survey-creator-core.fontless.css +35 -21
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +8 -8
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js +1 -1
- package/survey-creator-core.js +264 -162
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +9 -9
- package/survey-creator-core.min.js +2 -2
- package/typings/components/page.d.ts +2 -0
- package/typings/components/tabs/theme-custom-questions/element-settings.d.ts +7 -1
- package/typings/components/tabs/theme-custom-questions/font-settings.d.ts +7 -0
- package/typings/creator-base.d.ts +1 -0
- package/typings/editorLocalization.d.ts +1 -0
- package/typings/localization/english.d.ts +1 -0
- package/typings/property-grid/index.d.ts +1 -0
package/survey-creator-core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v1.9.
|
|
2
|
+
* SurveyJS Creator v1.9.98
|
|
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,30 +1644,51 @@ var PageAdorner = /** @class */ (function (_super) {
|
|
|
1645
1644
|
_this.currentAddQuestionType = type;
|
|
1646
1645
|
_this.addGhostPage();
|
|
1647
1646
|
});
|
|
1648
|
-
_this.attachElement(
|
|
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
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
_this.isPageLive = !!
|
|
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
|
-
|
|
1663
|
+
surveyElement.registerFunctionOnPropertiesValueChanged(["title", "description"], function () {
|
|
1662
1664
|
_this.addGhostPage();
|
|
1663
1665
|
});
|
|
1664
|
-
this.patchPageForDragDrop(
|
|
1666
|
+
this.patchPageForDragDrop(surveyElement, this.addGhostPage);
|
|
1665
1667
|
}
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
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;
|
|
1670
1676
|
}
|
|
1671
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;
|
|
1688
|
+
}
|
|
1689
|
+
_super.prototype.detachElement.call(this, surveyElement);
|
|
1690
|
+
this.dragTypeOverMe = null;
|
|
1691
|
+
};
|
|
1672
1692
|
PageAdorner.prototype.onElementSelectedChanged = function (isSelected) {
|
|
1673
1693
|
_super.prototype.onElementSelectedChanged.call(this, isSelected);
|
|
1674
1694
|
this.isSelected = 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
|
-
|
|
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 =
|
|
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
|
|
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;
|
|
@@ -6103,42 +6130,44 @@ var LogicItemEditor = /** @class */ (function (_super) {
|
|
|
6103
6130
|
}).filter(function (action) { return !!action; });
|
|
6104
6131
|
};
|
|
6105
6132
|
LogicItemEditor.prototype.onUpdateQuestionCssClasses = function (options) {
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6133
|
+
var cssClasses = options.cssClasses;
|
|
6134
|
+
var question = options.question;
|
|
6135
|
+
cssClasses.answered = "svc-logic-question--answered";
|
|
6136
|
+
if (question.name === "logicTypeName") {
|
|
6137
|
+
question.allowRootStyle = false;
|
|
6138
|
+
cssClasses.control += " svc-logic-operator svc-logic-operator--action";
|
|
6139
|
+
cssClasses.error.root = "svc-logic-operator__error";
|
|
6140
|
+
cssClasses.onError = "svc-logic-operator--error";
|
|
6141
|
+
}
|
|
6142
|
+
if (question.name === "elementSelector" || question.name === "setToName" || question.name === "fromName" || question.name === "gotoName") {
|
|
6143
|
+
question.allowRootStyle = false;
|
|
6144
|
+
cssClasses.control += " svc-logic-operator svc-logic-operator--question";
|
|
6145
|
+
cssClasses.error.root = "svc-logic-operator__error";
|
|
6146
|
+
cssClasses.onError = "svc-logic-operator--error";
|
|
6147
|
+
}
|
|
6148
|
+
if (question.name === "setToName" || question.name === "fromName") {
|
|
6149
|
+
question.allowRootStyle = false;
|
|
6150
|
+
question.titleLocation = "left";
|
|
6151
|
+
question.startWithNewLine = false;
|
|
6152
|
+
cssClasses.error.root = "svc-logic-operator__error";
|
|
6153
|
+
cssClasses.onError = "svc-logic-operator--error";
|
|
6154
|
+
}
|
|
6155
|
+
if (question.name === "setValue" || question.isContentElement) {
|
|
6156
|
+
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["assignDefaultV2Classes"])(cssClasses, question.getType());
|
|
6157
|
+
cssClasses.mainRoot += " svc-logic-question-value sd-element--with-frame";
|
|
6158
|
+
}
|
|
6159
|
+
if (question.name === "removeAction") {
|
|
6160
|
+
question.allowRootStyle = false;
|
|
6161
|
+
cssClasses.mainRoot += " svc-logic-condition-remove-question";
|
|
6162
|
+
}
|
|
6163
|
+
// cssClasses.mainRoot = "sd-question sd-row__question";
|
|
6164
|
+
if (question.name === "panel") {
|
|
6165
|
+
cssClasses.root += " svc-logic-paneldynamic";
|
|
6166
|
+
cssClasses.buttonAdd += " svc-logic-operator--action ";
|
|
6167
|
+
cssClasses.iconRemove = "svc-icon-remove";
|
|
6168
|
+
cssClasses.buttonRemove = "svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn";
|
|
6169
|
+
cssClasses.buttonRemoveRight = "svc-logic-paneldynamic__remove-btn--right";
|
|
6170
|
+
cssClasses.buttonRemoveText = "svc-logic-paneldynamic__button-remove-text";
|
|
6142
6171
|
}
|
|
6143
6172
|
};
|
|
6144
6173
|
LogicItemEditor.prototype.onUpdatePanelCssClasses = function (options) {
|
|
@@ -9931,12 +9960,21 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
|
|
|
9931
9960
|
}
|
|
9932
9961
|
],
|
|
9933
9962
|
onInit: function () {
|
|
9934
|
-
survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].
|
|
9935
|
-
|
|
9936
|
-
|
|
9963
|
+
survey_core__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addProperties("colorsettings", [{
|
|
9964
|
+
name: "choices:itemvalue[]",
|
|
9965
|
+
},
|
|
9966
|
+
{
|
|
9967
|
+
name: "colorTitleLocation:string",
|
|
9968
|
+
default: "hidden",
|
|
9969
|
+
},
|
|
9970
|
+
{
|
|
9971
|
+
name: "colorTitle:string",
|
|
9972
|
+
}
|
|
9973
|
+
]);
|
|
9937
9974
|
},
|
|
9938
9975
|
onLoaded: function (question) {
|
|
9939
|
-
syncPropertiesFromCompositeToColor(question, "
|
|
9976
|
+
syncPropertiesFromCompositeToColor(question, "colorTitle", question.colorTitle);
|
|
9977
|
+
syncPropertiesFromCompositeToColor(question, "colorTitleLocation", question.colorTitleLocation);
|
|
9940
9978
|
syncPropertiesFromCompositeToColor(question, "choices", question.choices);
|
|
9941
9979
|
},
|
|
9942
9980
|
onPropertyChanged: function (question, propertyName, newValue) {
|
|
@@ -9954,15 +9992,11 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
|
|
|
9954
9992
|
});
|
|
9955
9993
|
function syncPropertiesFromCompositeToColor(question, propertyName, newValue) {
|
|
9956
9994
|
var colorQuestion = question.contentPanel.questions[0];
|
|
9957
|
-
if (propertyName == "
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
}
|
|
9963
|
-
else {
|
|
9964
|
-
colorQuestion.titleLocation = "hidden";
|
|
9965
|
-
}
|
|
9995
|
+
if (propertyName == "colorTitleLocation") {
|
|
9996
|
+
colorQuestion.titleLocation = newValue;
|
|
9997
|
+
}
|
|
9998
|
+
if (propertyName == "colorTitle") {
|
|
9999
|
+
colorQuestion.title = newValue;
|
|
9966
10000
|
}
|
|
9967
10001
|
if (propertyName == "choices") {
|
|
9968
10002
|
colorQuestion.choices = newValue;
|
|
@@ -9979,11 +10013,13 @@ function createColor(value) {
|
|
|
9979
10013
|
/*!************************************************************************!*\
|
|
9980
10014
|
!*** ./src/components/tabs/theme-custom-questions/element-settings.ts ***!
|
|
9981
10015
|
\************************************************************************/
|
|
9982
|
-
/*!
|
|
10016
|
+
/*! exports provided: elementSettingsToCssVariable, elementSettingsFromCssVariable */
|
|
9983
10017
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9984
10018
|
|
|
9985
10019
|
"use strict";
|
|
9986
10020
|
__webpack_require__.r(__webpack_exports__);
|
|
10021
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementSettingsToCssVariable", function() { return elementSettingsToCssVariable; });
|
|
10022
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementSettingsFromCssVariable", function() { return elementSettingsFromCssVariable; });
|
|
9987
10023
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
9988
10024
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
9989
10025
|
/* harmony import */ var _editorLocalization__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../editorLocalization */ "./src/editorLocalization.ts");
|
|
@@ -9996,15 +10032,17 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
|
|
|
9996
10032
|
{
|
|
9997
10033
|
type: "colorsettings",
|
|
9998
10034
|
name: "backcolor",
|
|
9999
|
-
|
|
10000
|
-
|
|
10035
|
+
colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.backcolor"),
|
|
10036
|
+
colorTitleLocation: "left",
|
|
10037
|
+
titleLocation: "hidden",
|
|
10001
10038
|
descriptionLocation: "hidden"
|
|
10002
10039
|
},
|
|
10003
10040
|
{
|
|
10004
10041
|
type: "colorsettings",
|
|
10005
10042
|
name: "hovercolor",
|
|
10006
|
-
|
|
10007
|
-
|
|
10043
|
+
colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.hovercolor"),
|
|
10044
|
+
colorTitleLocation: "left",
|
|
10045
|
+
titleLocation: "hidden",
|
|
10008
10046
|
descriptionLocation: "hidden"
|
|
10009
10047
|
},
|
|
10010
10048
|
{
|
|
@@ -10030,6 +10068,33 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
|
|
|
10030
10068
|
onValueChanged: function (question, name, newValue) {
|
|
10031
10069
|
},
|
|
10032
10070
|
});
|
|
10071
|
+
function elementSettingsToCssVariable(question, themeCssVariables) {
|
|
10072
|
+
Object.keys(question.value).forEach(function (key) {
|
|
10073
|
+
if (key === "corner")
|
|
10074
|
+
return;
|
|
10075
|
+
themeCssVariables["--sjs-" + question.name.toLocaleLowerCase() + "-" + key] = question.value[key];
|
|
10076
|
+
});
|
|
10077
|
+
}
|
|
10078
|
+
function elementSettingsFromCssVariable(question, themeCssVariables, defaultBackcolorVariable, defaultHovercolorVariable) {
|
|
10079
|
+
var result = {};
|
|
10080
|
+
Object.keys(themeCssVariables).filter(function (key) { return key.indexOf(question.name.toLocaleLowerCase()) !== -1; }).forEach(function (key) {
|
|
10081
|
+
var propertyName = key.split("-").pop();
|
|
10082
|
+
if (propertyName === "cornerRadius") {
|
|
10083
|
+
result["corner"] = parseFloat(themeCssVariables[key].toString());
|
|
10084
|
+
}
|
|
10085
|
+
else {
|
|
10086
|
+
result[propertyName] = themeCssVariables[key];
|
|
10087
|
+
}
|
|
10088
|
+
});
|
|
10089
|
+
if (Object.keys(result).length === 0) {
|
|
10090
|
+
question.contentPanel.getQuestionByName("backcolor").value = defaultBackcolorVariable;
|
|
10091
|
+
question.contentPanel.getQuestionByName("hovercolor").value = defaultHovercolorVariable;
|
|
10092
|
+
}
|
|
10093
|
+
else {
|
|
10094
|
+
question.value = result;
|
|
10095
|
+
}
|
|
10096
|
+
return result;
|
|
10097
|
+
}
|
|
10033
10098
|
|
|
10034
10099
|
|
|
10035
10100
|
/***/ }),
|
|
@@ -10038,12 +10103,14 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
|
|
|
10038
10103
|
/*!*********************************************************************!*\
|
|
10039
10104
|
!*** ./src/components/tabs/theme-custom-questions/font-settings.ts ***!
|
|
10040
10105
|
\*********************************************************************/
|
|
10041
|
-
/*! exports provided: DefaultFonts */
|
|
10106
|
+
/*! exports provided: DefaultFonts, fontsettingsToCssVariable, fontsettingsFromCssVariable */
|
|
10042
10107
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10043
10108
|
|
|
10044
10109
|
"use strict";
|
|
10045
10110
|
__webpack_require__.r(__webpack_exports__);
|
|
10046
10111
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DefaultFonts", function() { return DefaultFonts; });
|
|
10112
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fontsettingsToCssVariable", function() { return fontsettingsToCssVariable; });
|
|
10113
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fontsettingsFromCssVariable", function() { return fontsettingsFromCssVariable; });
|
|
10047
10114
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
10048
10115
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
10049
10116
|
/* harmony import */ var _editorLocalization__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../editorLocalization */ "./src/editorLocalization.ts");
|
|
@@ -10089,8 +10156,9 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
|
|
|
10089
10156
|
{
|
|
10090
10157
|
type: "colorsettings",
|
|
10091
10158
|
name: "color",
|
|
10092
|
-
|
|
10093
|
-
|
|
10159
|
+
colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_1__["getLocString"])("theme.color"),
|
|
10160
|
+
colorTitleLocation: "left",
|
|
10161
|
+
titleLocation: "hidden",
|
|
10094
10162
|
descriptionLocation: "hidden"
|
|
10095
10163
|
},
|
|
10096
10164
|
{
|
|
@@ -10112,6 +10180,27 @@ survey_core__WEBPACK_IMPORTED_MODULE_0__["ComponentCollection"].Instance.add({
|
|
|
10112
10180
|
onValueChanged: function (question, name, newValue) {
|
|
10113
10181
|
},
|
|
10114
10182
|
});
|
|
10183
|
+
function fontsettingsToCssVariable(question, themeCssVariables) {
|
|
10184
|
+
Object.keys(question.value).forEach(function (key) {
|
|
10185
|
+
var _a;
|
|
10186
|
+
var innerQ = question.contentPanel.getQuestionByName(key);
|
|
10187
|
+
themeCssVariables["--sjs-font-" + question.name.toLocaleLowerCase() + "-" + key] = question.value[key] + (((_a = innerQ.unit) === null || _a === void 0 ? void 0 : _a.toString()) || "");
|
|
10188
|
+
});
|
|
10189
|
+
}
|
|
10190
|
+
function fontsettingsFromCssVariable(question, themeCssVariables, defaultColorVariable) {
|
|
10191
|
+
var result = {};
|
|
10192
|
+
Object.keys(themeCssVariables).filter(function (key) { return key.indexOf(question.name.toLocaleLowerCase()) !== -1; }).forEach(function (key) {
|
|
10193
|
+
var propertyName = key.split("-").pop();
|
|
10194
|
+
result[propertyName] = themeCssVariables[key];
|
|
10195
|
+
});
|
|
10196
|
+
if (Object.keys(result).length !== 0) {
|
|
10197
|
+
question.value = result;
|
|
10198
|
+
}
|
|
10199
|
+
else if (!!defaultColorVariable) {
|
|
10200
|
+
question.contentPanel.getQuestionByName("color").value = defaultColorVariable;
|
|
10201
|
+
}
|
|
10202
|
+
return result;
|
|
10203
|
+
}
|
|
10115
10204
|
|
|
10116
10205
|
|
|
10117
10206
|
/***/ }),
|
|
@@ -10400,6 +10489,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10400
10489
|
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/utils */ "./src/utils/utils.ts");
|
|
10401
10490
|
/* harmony import */ var _creator_settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../creator-settings */ "./src/creator-settings.ts");
|
|
10402
10491
|
/* 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");
|
|
10492
|
+
/* 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");
|
|
10493
|
+
|
|
10403
10494
|
|
|
10404
10495
|
|
|
10405
10496
|
|
|
@@ -10825,7 +10916,9 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
10825
10916
|
var _a, _b;
|
|
10826
10917
|
if (_this.blockChanges)
|
|
10827
10918
|
return;
|
|
10828
|
-
|
|
10919
|
+
if (options.name.indexOf("--") === 0) {
|
|
10920
|
+
_this.themeChanges[options.name] = options.value;
|
|
10921
|
+
}
|
|
10829
10922
|
if (["themeName", "themeMode", "themePalette"].indexOf(options.name) !== -1) {
|
|
10830
10923
|
_this[options.name] = options.value;
|
|
10831
10924
|
_this.initializeColorCalculator();
|
|
@@ -10869,18 +10962,10 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
10869
10962
|
_this.themeChanges["--sjs-question-background"] = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["ingectAlpha"])(baseColor, panelBackgroundTransparencyValue / 100);
|
|
10870
10963
|
}
|
|
10871
10964
|
if (((_a = options.question) === null || _a === void 0 ? void 0 : _a.getType()) === "fontsettings") {
|
|
10872
|
-
Object
|
|
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
|
-
});
|
|
10965
|
+
Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsToCssVariable"])(options.question, _this.themeChanges);
|
|
10877
10966
|
}
|
|
10878
10967
|
if (((_b = options.question) === null || _b === void 0 ? void 0 : _b.getType()) === "elementsettings") {
|
|
10879
|
-
Object
|
|
10880
|
-
if (key === "corner")
|
|
10881
|
-
return;
|
|
10882
|
-
_this.themeChanges["--sjs-" + options.name.toLocaleLowerCase() + "-" + key] = options.value[key];
|
|
10883
|
-
});
|
|
10968
|
+
Object(_theme_custom_questions_element_settings__WEBPACK_IMPORTED_MODULE_9__["elementSettingsToCssVariable"])(options.question, _this.themeChanges);
|
|
10884
10969
|
}
|
|
10885
10970
|
var newTheme = {};
|
|
10886
10971
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["assign"])(newTheme, _this.currentTheme.cssVariables, _this.themeChanges);
|
|
@@ -10914,14 +10999,14 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
10914
10999
|
themeEditorSurvey.getQuestionByName("backgroundImage").value = this.backgroundImage;
|
|
10915
11000
|
themeEditorSurvey.getQuestionByName("backgroundImageFit").value = this.backgroundImageFit;
|
|
10916
11001
|
themeEditorSurvey.getQuestionByName("backgroundImageAttachment").value = this.backgroundImageAttachment;
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
11002
|
+
Object(_theme_custom_questions_element_settings__WEBPACK_IMPORTED_MODULE_9__["elementSettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("questionPanel"), newCssVariables, newCssVariables["--sjs-general-backcolor"], newCssVariables["--sjs-general-backcolor-dark"]);
|
|
11003
|
+
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"]);
|
|
11004
|
+
Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("surveyTitle"), newCssVariables);
|
|
11005
|
+
Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("pageTitle"), newCssVariables, newCssVariables["--sjs-general-dim-forecolor"]);
|
|
11006
|
+
Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("pageDescription"), newCssVariables, newCssVariables["--sjs-general-dim-forecolor-light"]);
|
|
11007
|
+
Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("questionTitle"), newCssVariables, newCssVariables["--sjs-general-forecolor"]);
|
|
11008
|
+
Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("questionDescription"), newCssVariables, newCssVariables["--sjs-general-forecolor-light"]);
|
|
11009
|
+
Object(_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_8__["fontsettingsFromCssVariable"])(themeEditorSurvey.getQuestionByName("editorFont"), newCssVariables);
|
|
10925
11010
|
themeEditorSurvey.getAllQuestions().forEach(function (question) {
|
|
10926
11011
|
if (["color", "colorsettings"].indexOf(question.getType()) !== -1) {
|
|
10927
11012
|
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)); });
|
|
@@ -10956,7 +11041,7 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
10956
11041
|
},
|
|
10957
11042
|
{
|
|
10958
11043
|
type: "panel",
|
|
10959
|
-
name: "
|
|
11044
|
+
name: "themeSettings",
|
|
10960
11045
|
title: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.themeMode"),
|
|
10961
11046
|
elements: [
|
|
10962
11047
|
{
|
|
@@ -11154,22 +11239,25 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
11154
11239
|
{
|
|
11155
11240
|
type: "colorsettings",
|
|
11156
11241
|
name: "--sjs-primary-backcolor",
|
|
11157
|
-
|
|
11158
|
-
|
|
11242
|
+
colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryDefaultColor"),
|
|
11243
|
+
colorTitleLocation: "left",
|
|
11244
|
+
titleLocation: "hidden",
|
|
11159
11245
|
descriptionLocation: "hidden",
|
|
11160
11246
|
},
|
|
11161
11247
|
{
|
|
11162
11248
|
type: "colorsettings",
|
|
11163
11249
|
name: "--sjs-primary-backcolor-dark",
|
|
11164
|
-
|
|
11165
|
-
|
|
11250
|
+
colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryDarkColor"),
|
|
11251
|
+
colorTitleLocation: "left",
|
|
11252
|
+
titleLocation: "hidden",
|
|
11166
11253
|
descriptionLocation: "hidden",
|
|
11167
11254
|
},
|
|
11168
11255
|
{
|
|
11169
11256
|
type: "colorsettings",
|
|
11170
11257
|
name: "--sjs-primary-backcolor-light",
|
|
11171
|
-
|
|
11172
|
-
|
|
11258
|
+
colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryLightColor"),
|
|
11259
|
+
colorTitleLocation: "left",
|
|
11260
|
+
titleLocation: "hidden",
|
|
11173
11261
|
descriptionLocation: "hidden",
|
|
11174
11262
|
}
|
|
11175
11263
|
]
|
|
@@ -11180,15 +11268,17 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
11180
11268
|
{
|
|
11181
11269
|
type: "colorsettings",
|
|
11182
11270
|
name: "--sjs-primary-forecolor",
|
|
11183
|
-
|
|
11184
|
-
|
|
11271
|
+
colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryForecolor"),
|
|
11272
|
+
colorTitleLocation: "left",
|
|
11273
|
+
titleLocation: "hidden",
|
|
11185
11274
|
descriptionLocation: "hidden",
|
|
11186
11275
|
},
|
|
11187
11276
|
{
|
|
11188
11277
|
type: "colorsettings",
|
|
11189
11278
|
name: "--sjs-primary-forecolor-light",
|
|
11190
|
-
|
|
11191
|
-
|
|
11279
|
+
colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.primaryForecolorLight"),
|
|
11280
|
+
colorTitleLocation: "left",
|
|
11281
|
+
titleLocation: "hidden",
|
|
11192
11282
|
descriptionLocation: "hidden",
|
|
11193
11283
|
}
|
|
11194
11284
|
]
|
|
@@ -11343,15 +11433,17 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
11343
11433
|
{
|
|
11344
11434
|
type: "colorsettings",
|
|
11345
11435
|
name: "--sjs-border-default",
|
|
11346
|
-
|
|
11347
|
-
|
|
11436
|
+
colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.borderDefault"),
|
|
11437
|
+
colorTitleLocation: "left",
|
|
11438
|
+
titleLocation: "hidden",
|
|
11348
11439
|
descriptionLocation: "hidden",
|
|
11349
11440
|
},
|
|
11350
11441
|
{
|
|
11351
11442
|
type: "colorsettings",
|
|
11352
11443
|
name: "--sjs-border-light",
|
|
11353
|
-
|
|
11354
|
-
|
|
11444
|
+
colorTitle: Object(_editorLocalization__WEBPACK_IMPORTED_MODULE_3__["getLocString"])("theme.borderLight"),
|
|
11445
|
+
colorTitleLocation: "left",
|
|
11446
|
+
titleLocation: "hidden",
|
|
11355
11447
|
descriptionLocation: "hidden",
|
|
11356
11448
|
}
|
|
11357
11449
|
]
|
|
@@ -13555,6 +13647,7 @@ var CreatorBase = /** @class */ (function (_super) {
|
|
|
13555
13647
|
function CreatorBase(options, options2) {
|
|
13556
13648
|
var _this = _super.call(this) || this;
|
|
13557
13649
|
_this.options = options;
|
|
13650
|
+
_this.startEditTitleOnQuestionAdded = true;
|
|
13558
13651
|
_this.isRTLValue = false;
|
|
13559
13652
|
_this.alwaySaveTextInPropertyEditorsValue = false;
|
|
13560
13653
|
_this.pageEditModeValue = "standard";
|
|
@@ -15183,17 +15276,14 @@ var CreatorBase = /** @class */ (function (_super) {
|
|
|
15183
15276
|
this.dragDropSurveyElements = new _survey_elements__WEBPACK_IMPORTED_MODULE_25__["DragDropSurveyElements"](null, this);
|
|
15184
15277
|
var isDraggedFromToolbox = false;
|
|
15185
15278
|
this.dragDropSurveyElements.onDragStart.add(function (sender, options) {
|
|
15186
|
-
var panel = sender.dropTarget.parent;
|
|
15187
15279
|
isDraggedFromToolbox = !sender.draggedElement.parent;
|
|
15188
15280
|
_this.onDragStart.fire(sender, options);
|
|
15189
15281
|
_this.startUndoRedoTransaction("drag drop");
|
|
15190
|
-
_this.undoRedoManager.setUndoCallbackForTransaction(function () {
|
|
15191
|
-
panel.updateRows();
|
|
15192
|
-
});
|
|
15193
15282
|
});
|
|
15194
15283
|
this.dragDropSurveyElements.onDragEnd.add(function (sender, options) {
|
|
15195
15284
|
_this.stopUndoRedoTransaction();
|
|
15196
|
-
|
|
15285
|
+
var editTitle = isDraggedFromToolbox && _this.startEditTitleOnQuestionAdded;
|
|
15286
|
+
_this.selectElement(options.draggedElement, undefined, false, editTitle);
|
|
15197
15287
|
isDraggedFromToolbox = false;
|
|
15198
15288
|
_this.onDragEnd.fire(sender, options);
|
|
15199
15289
|
});
|
|
@@ -16081,7 +16171,7 @@ var CreatorBase = /** @class */ (function (_super) {
|
|
|
16081
16171
|
}
|
|
16082
16172
|
this.survey.lazyRendering = false;
|
|
16083
16173
|
this.doClickQuestionCore(newElement, modifiedType, -1, panel);
|
|
16084
|
-
this.selectElement(newElement, null, true,
|
|
16174
|
+
this.selectElement(newElement, null, true, this.startEditTitleOnQuestionAdded);
|
|
16085
16175
|
}
|
|
16086
16176
|
};
|
|
16087
16177
|
CreatorBase.prototype.getJSONForNewElement = function (json) {
|
|
@@ -18283,7 +18373,7 @@ var __spreadArray = function (to, from) {
|
|
|
18283
18373
|
/*!******************************!*\
|
|
18284
18374
|
!*** ./src/entries/index.ts ***!
|
|
18285
18375
|
\******************************/
|
|
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 */
|
|
18376
|
+
/*! 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
18377
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
18288
18378
|
|
|
18289
18379
|
"use strict";
|
|
@@ -18385,8 +18475,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18385
18475
|
/* 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
18476
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DefaultFonts", function() { return _components_tabs_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_13__["DefaultFonts"]; });
|
|
18387
18477
|
|
|
18478
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fontsettingsToCssVariable", function() { return _components_tabs_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_13__["fontsettingsToCssVariable"]; });
|
|
18479
|
+
|
|
18480
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fontsettingsFromCssVariable", function() { return _components_tabs_theme_custom_questions_font_settings__WEBPACK_IMPORTED_MODULE_13__["fontsettingsFromCssVariable"]; });
|
|
18481
|
+
|
|
18388
18482
|
/* 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
|
-
/*
|
|
18483
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementSettingsToCssVariable", function() { return _components_tabs_theme_custom_questions_element_settings__WEBPACK_IMPORTED_MODULE_14__["elementSettingsToCssVariable"]; });
|
|
18484
|
+
|
|
18485
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementSettingsFromCssVariable", function() { return _components_tabs_theme_custom_questions_element_settings__WEBPACK_IMPORTED_MODULE_14__["elementSettingsFromCssVariable"]; });
|
|
18486
|
+
|
|
18487
|
+
/* harmony import */ var _components_tabs_theme__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../components/tabs/theme */ "./src/components/tabs/theme.ts");
|
|
18390
18488
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Themes", function() { return _components_tabs_theme__WEBPACK_IMPORTED_MODULE_15__["Themes"]; });
|
|
18391
18489
|
|
|
18392
18490
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PredefinedThemes", function() { return _components_tabs_theme__WEBPACK_IMPORTED_MODULE_15__["PredefinedThemes"]; });
|
|
@@ -18752,7 +18850,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18752
18850
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
18753
18851
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_70___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_70__);
|
|
18754
18852
|
var Version;
|
|
18755
|
-
Version = "" + "1.9.
|
|
18853
|
+
Version = "" + "1.9.98";
|
|
18756
18854
|
//should be loaded before other styles for easier override
|
|
18757
18855
|
__webpack_require__(/*! ../utils/context-button.scss */ "./src/utils/context-button.scss");
|
|
18758
18856
|
|
|
@@ -18841,7 +18939,7 @@ __webpack_require__(/*! ../utils/design.scss */ "./src/utils/design.scss");
|
|
|
18841
18939
|
__webpack_require__(/*! ../utils/layout.scss */ "./src/utils/layout.scss");
|
|
18842
18940
|
|
|
18843
18941
|
survey_core__WEBPACK_IMPORTED_MODULE_70__["settings"].supportCreatorV2 = true;
|
|
18844
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_70__["checkLibraryVersion"])("" + "1.9.
|
|
18942
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_70__["checkLibraryVersion"])("" + "1.9.98", "survey-creator-core");
|
|
18845
18943
|
|
|
18846
18944
|
|
|
18847
18945
|
/***/ }),
|
|
@@ -21120,8 +21218,8 @@ var enStrings = {
|
|
|
21120
21218
|
expressionInvalid: "The logic expression is empty or invalid. Please correct it.",
|
|
21121
21219
|
noActionError: "Please, add at least one action.",
|
|
21122
21220
|
actionInvalid: "Please, fix problems in your action(s).",
|
|
21123
|
-
uncompletedRule_title: "
|
|
21124
|
-
uncompletedRule_text: "
|
|
21221
|
+
uncompletedRule_title: "Logical rules are incomplete",
|
|
21222
|
+
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
21223
|
uncompletedRule_apply: "Yes",
|
|
21126
21224
|
uncompletedRule_cancel: "No, I want to complete the rules",
|
|
21127
21225
|
expressionSetup: "",
|
|
@@ -21431,7 +21529,7 @@ var enStrings = {
|
|
|
21431
21529
|
readOnly: "Read-only",
|
|
21432
21530
|
enableIf: "Editable if",
|
|
21433
21531
|
emptyRowsText: "\"No rows\" message",
|
|
21434
|
-
size: "Input size (in characters)",
|
|
21532
|
+
size: "Input field size (in characters)",
|
|
21435
21533
|
separateSpecialChoices: "Separate special choices (None, Other, Select All)",
|
|
21436
21534
|
choicesFromQuestion: "Copy choices from the following question",
|
|
21437
21535
|
choicesFromQuestionMode: "Which choices to copy?",
|
|
@@ -21761,6 +21859,7 @@ var enStrings = {
|
|
|
21761
21859
|
},
|
|
21762
21860
|
pehelp: {
|
|
21763
21861
|
cookieName: "Cookies prevent users from filling out the same survey twice.",
|
|
21862
|
+
size: "Resizes the visible area of the input field. Please use the <b>Validation → Maximum length</b> setting to limit the input length.",
|
|
21764
21863
|
format: "Use {0} as a placeholder for the actual value.",
|
|
21765
21864
|
totalText: "Visible only when at least one column has Total type or Total expression.",
|
|
21766
21865
|
acceptedTypes: "Refer to the [accept](https://www.w3schools.com/tags/att_input_accept.asp) attribute description for more information.",
|
|
@@ -24247,38 +24346,39 @@ var ConditionEditor = /** @class */ (function (_super) {
|
|
|
24247
24346
|
this.updateQuestionsWidth(panel);
|
|
24248
24347
|
};
|
|
24249
24348
|
ConditionEditor.prototype.onUpdateQuestionCssClasses = function (options) {
|
|
24250
|
-
|
|
24251
|
-
|
|
24252
|
-
|
|
24253
|
-
|
|
24254
|
-
|
|
24255
|
-
|
|
24256
|
-
|
|
24257
|
-
|
|
24258
|
-
|
|
24259
|
-
|
|
24260
|
-
|
|
24261
|
-
|
|
24262
|
-
|
|
24263
|
-
|
|
24264
|
-
|
|
24265
|
-
|
|
24266
|
-
|
|
24267
|
-
|
|
24268
|
-
|
|
24269
|
-
|
|
24270
|
-
|
|
24271
|
-
|
|
24272
|
-
|
|
24273
|
-
|
|
24274
|
-
|
|
24275
|
-
|
|
24276
|
-
|
|
24277
|
-
|
|
24278
|
-
|
|
24279
|
-
|
|
24280
|
-
|
|
24281
|
-
|
|
24349
|
+
var cssClasses = options.cssClasses;
|
|
24350
|
+
var question = options.question;
|
|
24351
|
+
cssClasses.answered = "svc-logic-question--answered";
|
|
24352
|
+
if (question.name === "conjunction") {
|
|
24353
|
+
question.allowRootStyle = false;
|
|
24354
|
+
cssClasses.control += " svc-logic-operator svc-logic-operator--conjunction ";
|
|
24355
|
+
}
|
|
24356
|
+
if (question.name === "questionName") {
|
|
24357
|
+
question.allowRootStyle = false;
|
|
24358
|
+
cssClasses.control += " svc-logic-operator svc-logic-operator--question";
|
|
24359
|
+
cssClasses.error.root = "svc-logic-operator__error";
|
|
24360
|
+
cssClasses.onError = "svc-logic-operator--error";
|
|
24361
|
+
}
|
|
24362
|
+
if (question.name === "operator") {
|
|
24363
|
+
question.allowRootStyle = false;
|
|
24364
|
+
cssClasses.control += " svc-logic-operator svc-logic-operator--operator";
|
|
24365
|
+
}
|
|
24366
|
+
if (question.name === "removeAction") {
|
|
24367
|
+
question.allowRootStyle = false;
|
|
24368
|
+
cssClasses.mainRoot += " svc-logic-condition-remove-question";
|
|
24369
|
+
}
|
|
24370
|
+
if (question.name === "questionValue" || question.isContentElement) {
|
|
24371
|
+
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["assignDefaultV2Classes"])(cssClasses, question.getType());
|
|
24372
|
+
cssClasses.mainRoot += " svc-logic-question-value sd-element--with-frame";
|
|
24373
|
+
cssClasses.error.root = "svc-logic-operator__error";
|
|
24374
|
+
}
|
|
24375
|
+
if (question.name === "panel") {
|
|
24376
|
+
cssClasses.root += " svc-logic-paneldynamic";
|
|
24377
|
+
cssClasses.buttonAdd += " svc-logic-operator--operator";
|
|
24378
|
+
cssClasses.iconRemove = "svc-icon-remove";
|
|
24379
|
+
cssClasses.buttonRemove = "svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn";
|
|
24380
|
+
cssClasses.buttonRemoveRight = "svc-logic-paneldynamic__remove-btn--right";
|
|
24381
|
+
cssClasses.buttonRemoveText = "svc-logic-paneldynamic__button-remove-text";
|
|
24282
24382
|
}
|
|
24283
24383
|
};
|
|
24284
24384
|
ConditionEditor.prototype.onValueChanged = function (options) {
|
|
@@ -25549,13 +25649,15 @@ var PropertyGridModel = /** @class */ (function () {
|
|
|
25549
25649
|
};
|
|
25550
25650
|
PropertyGridModel.prototype.validateQuestionValue = function (obj, question, prop, val) {
|
|
25551
25651
|
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");
|
|
25652
|
+
return this.getErrorTextOnValidate(_editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getString("pe.propertyIsEmpty"), prop.name, obj, val);
|
|
25553
25653
|
if (this.isPropNameInValid(obj, prop, val) || question["nameHasError"])
|
|
25554
|
-
return _editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getString("pe.propertyNameIsIncorrect");
|
|
25654
|
+
return this.getErrorTextOnValidate(_editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getString("pe.propertyNameIsIncorrect"), prop.name, obj, val);
|
|
25555
25655
|
var editorError = PropertyGridEditorCollection.validateValue(obj, question, prop, val);
|
|
25556
|
-
|
|
25557
|
-
|
|
25558
|
-
|
|
25656
|
+
return this.getErrorTextOnValidate(editorError, prop.name, obj, val);
|
|
25657
|
+
};
|
|
25658
|
+
PropertyGridModel.prototype.getErrorTextOnValidate = function (defaultError, propName, obj, val) {
|
|
25659
|
+
var customError = this.options.onGetErrorTextOnValidationCallback(propName, obj, val);
|
|
25660
|
+
return !!customError ? customError : defaultError;
|
|
25559
25661
|
};
|
|
25560
25662
|
PropertyGridModel.prototype.onValidateQuestion = function (options) {
|
|
25561
25663
|
var q = options.question;
|