survey-creator-core 1.9.104 → 1.9.105
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 +8 -9
- package/survey-creator-core.fontless.css +7 -8
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +5 -5
- package/survey-creator-core.i18n.js +99 -99
- package/survey-creator-core.i18n.js.map +1 -1
- package/survey-creator-core.i18n.min.js +2 -2
- package/survey-creator-core.js +138 -73
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +6 -6
- package/survey-creator-core.min.js +2 -2
- package/typings/components/tabs/test.d.ts +1 -0
- package/typings/components/tabs/theme.d.ts +1 -0
- package/typings/components/tabs/translation.d.ts +7 -1
- package/typings/editorLocalization.d.ts +2 -0
- package/typings/localization/english.d.ts +1 -0
- package/typings/property-grid/matrices.d.ts +0 -1
- package/typings/survey-elements.d.ts +2 -1
- package/typings/toolbox.d.ts +2 -0
package/survey-creator-core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v1.9.
|
|
2
|
+
* SurveyJS Creator v1.9.105
|
|
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
|
|
@@ -9407,7 +9407,8 @@ var TestSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
9407
9407
|
TestSurveyTabViewModel.prototype.getPageTitle = function (page, area, reason) {
|
|
9408
9408
|
if (area === void 0) { area = "preview-tab:page-list"; }
|
|
9409
9409
|
if (reason === void 0) { reason = "survey-tester"; }
|
|
9410
|
-
var
|
|
9410
|
+
var pageTitle = page.title.replace(TestSurveyTabViewModel.tagRegex, "");
|
|
9411
|
+
var title = this.surveyProvider.getObjectDisplayName(page, area, reason, pageTitle);
|
|
9411
9412
|
if (title === page.name && title.indexOf("page") === 0) {
|
|
9412
9413
|
var index = this.survey.pages.indexOf(page);
|
|
9413
9414
|
return _editorLocalization__WEBPACK_IMPORTED_MODULE_3__["editorLocalization"].getString("ed.pageTypeName") + " " + (index + 1);
|
|
@@ -9560,6 +9561,7 @@ var TestSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
9560
9561
|
this.onScrollCallback();
|
|
9561
9562
|
return true;
|
|
9562
9563
|
};
|
|
9564
|
+
TestSurveyTabViewModel.tagRegex = /(<([^>]+)>)/ig;
|
|
9563
9565
|
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
|
|
9564
9566
|
Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["property"])({
|
|
9565
9567
|
defaultValue: false,
|
|
@@ -10201,6 +10203,8 @@ var TabThemePlugin = /** @class */ (function () {
|
|
|
10201
10203
|
this.resetTheme = new survey_core__WEBPACK_IMPORTED_MODULE_1__["Action"]({
|
|
10202
10204
|
id: "resetTheme",
|
|
10203
10205
|
iconName: "icon-reset",
|
|
10206
|
+
locTitleName: "ed.themeResetButton",
|
|
10207
|
+
locTooltipName: "ed.themeResetButton",
|
|
10204
10208
|
mode: "small",
|
|
10205
10209
|
visible: new survey_core__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () {
|
|
10206
10210
|
return (_this.creator.activeTab === "theme");
|
|
@@ -10431,6 +10435,7 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
10431
10435
|
this.setThemeToSurvey();
|
|
10432
10436
|
};
|
|
10433
10437
|
ThemeSurveyTabViewModel.prototype.loadTheme = function (theme) {
|
|
10438
|
+
this.blockThemeChangedNotifications += 1;
|
|
10434
10439
|
this.themeName = theme.themeName;
|
|
10435
10440
|
this.themePalette = theme.colorPalette;
|
|
10436
10441
|
this.themeMode = theme.isPanelless ? "lightweight" : undefined;
|
|
@@ -10446,6 +10451,7 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
10446
10451
|
var themeVariables = {};
|
|
10447
10452
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["assign"])(themeVariables, this.themeVariables, theme.cssVariables);
|
|
10448
10453
|
theme.cssVariables = themeVariables;
|
|
10454
|
+
this.blockThemeChangedNotifications -= 1;
|
|
10449
10455
|
};
|
|
10450
10456
|
ThemeSurveyTabViewModel.prototype.updateSimulatorSurvey = function (json, theme) {
|
|
10451
10457
|
var newSurvey = this.surveyProvider.createSurvey(json || {}, "theme");
|
|
@@ -10849,14 +10855,17 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
10849
10855
|
}
|
|
10850
10856
|
});
|
|
10851
10857
|
};
|
|
10858
|
+
ThemeSurveyTabViewModel.prototype.raiseThemeChanged = function () {
|
|
10859
|
+
if (this.blockThemeChangedNotifications == 0) {
|
|
10860
|
+
this.surveyProvider.raiseThemeChanged();
|
|
10861
|
+
}
|
|
10862
|
+
};
|
|
10852
10863
|
ThemeSurveyTabViewModel.prototype.setThemeToSurvey = function (theme) {
|
|
10853
10864
|
if (!!theme) {
|
|
10854
10865
|
this.surveyProvider.theme = theme;
|
|
10855
10866
|
}
|
|
10856
10867
|
this.survey.applyTheme(this.surveyProvider.theme);
|
|
10857
|
-
|
|
10858
|
-
this.surveyProvider.raiseThemeChanged();
|
|
10859
|
-
}
|
|
10868
|
+
this.raiseThemeChanged();
|
|
10860
10869
|
};
|
|
10861
10870
|
ThemeSurveyTabViewModel.prototype.getThemeEditorSurveyJSON = function () {
|
|
10862
10871
|
var themeEditorSurveyJSON = {
|
|
@@ -11349,6 +11358,7 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
11349
11358
|
_target.survey.backgroundImage = newValue;
|
|
11350
11359
|
}
|
|
11351
11360
|
_target.currentTheme["backgroundImage"] = newValue;
|
|
11361
|
+
_target.raiseThemeChanged();
|
|
11352
11362
|
}
|
|
11353
11363
|
})
|
|
11354
11364
|
], ThemeSurveyTabViewModel.prototype, "backgroundImage", void 0);
|
|
@@ -11360,6 +11370,7 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
11360
11370
|
_target.survey.backgroundImageFit = newValue;
|
|
11361
11371
|
}
|
|
11362
11372
|
_target.currentTheme["backgroundImageFit"] = newValue;
|
|
11373
|
+
_target.raiseThemeChanged();
|
|
11363
11374
|
}
|
|
11364
11375
|
})
|
|
11365
11376
|
], ThemeSurveyTabViewModel.prototype, "backgroundImageFit", void 0);
|
|
@@ -11371,6 +11382,7 @@ var ThemeSurveyTabViewModel = /** @class */ (function (_super) {
|
|
|
11371
11382
|
_target.survey.backgroundImageAttachment = newValue;
|
|
11372
11383
|
}
|
|
11373
11384
|
_target.currentTheme["backgroundImageAttachment"] = newValue;
|
|
11385
|
+
_target.raiseThemeChanged();
|
|
11374
11386
|
}
|
|
11375
11387
|
})
|
|
11376
11388
|
], ThemeSurveyTabViewModel.prototype, "backgroundImageAttachment", void 0);
|
|
@@ -12301,6 +12313,38 @@ var TranslationGroup = /** @class */ (function (_super) {
|
|
|
12301
12313
|
TranslationGroup.prototype.setAsRoot = function () {
|
|
12302
12314
|
this.isRootValue = true;
|
|
12303
12315
|
};
|
|
12316
|
+
TranslationGroup.prototype.setParent = function (parent) {
|
|
12317
|
+
this.parentValue = parent;
|
|
12318
|
+
};
|
|
12319
|
+
Object.defineProperty(TranslationGroup.prototype, "parent", {
|
|
12320
|
+
get: function () { return this.parentValue; },
|
|
12321
|
+
enumerable: false,
|
|
12322
|
+
configurable: true
|
|
12323
|
+
});
|
|
12324
|
+
Object.defineProperty(TranslationGroup.prototype, "fullName", {
|
|
12325
|
+
get: function () {
|
|
12326
|
+
var propsName = this.obj.name === this.name || this.isRoot ? "_props" : "";
|
|
12327
|
+
var name = this.name + propsName;
|
|
12328
|
+
if (this.isRoot || !this.parent)
|
|
12329
|
+
return name;
|
|
12330
|
+
var parentName = this.parent.getNameForChild();
|
|
12331
|
+
return (!!parentName ? parentName + "_" : "") + name;
|
|
12332
|
+
},
|
|
12333
|
+
enumerable: false,
|
|
12334
|
+
configurable: true
|
|
12335
|
+
});
|
|
12336
|
+
TranslationGroup.prototype.getNameForChild = function () {
|
|
12337
|
+
if (this.isRoot)
|
|
12338
|
+
return "";
|
|
12339
|
+
return this.isFinalNameObj ? this.name : this.fullName;
|
|
12340
|
+
};
|
|
12341
|
+
Object.defineProperty(TranslationGroup.prototype, "isFinalNameObj", {
|
|
12342
|
+
get: function () {
|
|
12343
|
+
return this.obj.isQuestion || this.obj.isPage || this.obj.isPanel;
|
|
12344
|
+
},
|
|
12345
|
+
enumerable: false,
|
|
12346
|
+
configurable: true
|
|
12347
|
+
});
|
|
12304
12348
|
TranslationGroup.prototype.getItemByName = function (name) {
|
|
12305
12349
|
for (var i = 0; i < this.itemValues.length; i++) {
|
|
12306
12350
|
if (this.itemValues[i].name == name)
|
|
@@ -12422,10 +12466,7 @@ var TranslationGroup = /** @class */ (function (_super) {
|
|
|
12422
12466
|
//If ItemValue array?
|
|
12423
12467
|
if (this.isItemValueArray(value)) {
|
|
12424
12468
|
if (this.canShowProperty(property, Array.isArray(value) && value.length > 0)) {
|
|
12425
|
-
|
|
12426
|
-
if (group.hasItems) {
|
|
12427
|
-
this.itemValues.push(group);
|
|
12428
|
-
}
|
|
12469
|
+
this.addNewGroup(new TranslationGroup(property.name, value, this.translation, _editorLocalization__WEBPACK_IMPORTED_MODULE_3__["editorLocalization"].getPropertyName(property.name), true));
|
|
12429
12470
|
}
|
|
12430
12471
|
}
|
|
12431
12472
|
else {
|
|
@@ -12520,13 +12561,16 @@ var TranslationGroup = /** @class */ (function (_super) {
|
|
|
12520
12561
|
name_1 = property.name + index;
|
|
12521
12562
|
text = _editorLocalization__WEBPACK_IMPORTED_MODULE_3__["editorLocalization"].getPropertyName(property.name) + index;
|
|
12522
12563
|
}
|
|
12523
|
-
|
|
12524
|
-
if (group.hasItems) {
|
|
12525
|
-
this.itemValues.push(group);
|
|
12526
|
-
}
|
|
12564
|
+
this.addNewGroup(new TranslationGroup(name_1, obj, this.translation, text));
|
|
12527
12565
|
}
|
|
12528
12566
|
}
|
|
12529
12567
|
};
|
|
12568
|
+
TranslationGroup.prototype.addNewGroup = function (group) {
|
|
12569
|
+
group.setParent(this);
|
|
12570
|
+
if (group.hasItems) {
|
|
12571
|
+
this.itemValues.push(group);
|
|
12572
|
+
}
|
|
12573
|
+
};
|
|
12530
12574
|
TranslationGroup.prototype.createItemValuesLocale = function () {
|
|
12531
12575
|
for (var i = 0; i < this.obj.length; i++) {
|
|
12532
12576
|
var val = this.obj[i];
|
|
@@ -12738,7 +12782,7 @@ var Translation = /** @class */ (function (_super) {
|
|
|
12738
12782
|
survey.startLoadingFromJson();
|
|
12739
12783
|
survey.css = _translation_theme__WEBPACK_IMPORTED_MODULE_8__["translationCss"];
|
|
12740
12784
|
survey.addNewPage("page");
|
|
12741
|
-
this.addTranslationGroupIntoStringsSurvey(survey.pages[0], this.root
|
|
12785
|
+
this.addTranslationGroupIntoStringsSurvey(survey.pages[0], this.root);
|
|
12742
12786
|
survey.data = this.getStringsSurveyData(survey);
|
|
12743
12787
|
survey.endLoadingFromJson();
|
|
12744
12788
|
var getTransationItem = function (question, rowName) {
|
|
@@ -12797,7 +12841,7 @@ var Translation = /** @class */ (function (_super) {
|
|
|
12797
12841
|
survey.currentPage = survey.pages[0];
|
|
12798
12842
|
return survey;
|
|
12799
12843
|
};
|
|
12800
|
-
Translation.prototype.addTranslationGroupIntoStringsSurvey = function (panel, group
|
|
12844
|
+
Translation.prototype.addTranslationGroupIntoStringsSurvey = function (panel, group) {
|
|
12801
12845
|
for (var i = 0; i < group.items.length; i++) {
|
|
12802
12846
|
if (group.items[i].isGroup)
|
|
12803
12847
|
continue;
|
|
@@ -12805,7 +12849,7 @@ var Translation = /** @class */ (function (_super) {
|
|
|
12805
12849
|
var matrix = (survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass("matrixdropdown"));
|
|
12806
12850
|
matrix.cellType = "comment";
|
|
12807
12851
|
matrix.titleLocation = "hidden";
|
|
12808
|
-
matrix.name =
|
|
12852
|
+
matrix.name = group.fullName + i;
|
|
12809
12853
|
matrix.showHeader = false;
|
|
12810
12854
|
panel.addQuestion(matrix);
|
|
12811
12855
|
this.addLocaleColumns(matrix);
|
|
@@ -12825,7 +12869,7 @@ var Translation = /** @class */ (function (_super) {
|
|
|
12825
12869
|
if (item.hasIndent) {
|
|
12826
12870
|
pnl.cssClasses.panel.content += " st-panel-indent";
|
|
12827
12871
|
}
|
|
12828
|
-
this.addTranslationGroupIntoStringsSurvey(pnl, item
|
|
12872
|
+
this.addTranslationGroupIntoStringsSurvey(pnl, item);
|
|
12829
12873
|
}
|
|
12830
12874
|
};
|
|
12831
12875
|
Translation.prototype.addLocaleColumns = function (matrix) {
|
|
@@ -12835,13 +12879,6 @@ var Translation = /** @class */ (function (_super) {
|
|
|
12835
12879
|
matrix.addColumn(locs[i], this.getLocaleName(locs[i]));
|
|
12836
12880
|
}
|
|
12837
12881
|
};
|
|
12838
|
-
Translation.prototype.getStringsSurveyQuestionName = function (group, parent) {
|
|
12839
|
-
var name = group.name + (group.obj.name == group.name || group.isRoot ? "_props" : "");
|
|
12840
|
-
if (!!parent && parent !== this.root) {
|
|
12841
|
-
name = parent.name + "_" + name;
|
|
12842
|
-
}
|
|
12843
|
-
return name;
|
|
12844
|
-
};
|
|
12845
12882
|
Translation.prototype.getStringsSurveyData = function (survey) {
|
|
12846
12883
|
var res = {};
|
|
12847
12884
|
var questions = survey.getAllQuestions();
|
|
@@ -13298,7 +13335,7 @@ var ToolboxToolViewModel = /** @class */ (function (_super) {
|
|
|
13298
13335
|
};
|
|
13299
13336
|
_this.startDragToolboxItem = function (pointerDownEvent, currentTarget) {
|
|
13300
13337
|
var json = _this.creator.getJSONForNewElement(_this.item.json);
|
|
13301
|
-
_this.dragDropHelper.startDragToolboxItem(pointerDownEvent, json, _this.item
|
|
13338
|
+
_this.dragDropHelper.startDragToolboxItem(pointerDownEvent, json, _this.item);
|
|
13302
13339
|
return true;
|
|
13303
13340
|
};
|
|
13304
13341
|
_this.dragOrClickHelper = new survey_core__WEBPACK_IMPORTED_MODULE_1__["DragOrClickHelper"](_this.startDragToolboxItem);
|
|
@@ -15583,6 +15620,11 @@ var CreatorBase = /** @class */ (function (_super) {
|
|
|
15583
15620
|
var selectedElement = this.getSelectedSurveyElement();
|
|
15584
15621
|
if (selectedElement && selectedElement.parent && selectedElement["page"] == parent &&
|
|
15585
15622
|
(selectedElement !== panel)) {
|
|
15623
|
+
if (!panel) {
|
|
15624
|
+
while (selectedElement.parent !== null && selectedElement.parent.isPanel) {
|
|
15625
|
+
selectedElement = selectedElement.parent;
|
|
15626
|
+
}
|
|
15627
|
+
}
|
|
15586
15628
|
parent = selectedElement.parent;
|
|
15587
15629
|
if (index < 0) {
|
|
15588
15630
|
index = parent.elements.indexOf(selectedElement);
|
|
@@ -15790,6 +15832,13 @@ var CreatorBase = /** @class */ (function (_super) {
|
|
|
15790
15832
|
this.selectElement(!!newPage ? newPage : this.survey);
|
|
15791
15833
|
}
|
|
15792
15834
|
else {
|
|
15835
|
+
if (this.isInitialSurveyEmpty && this.survey.pageCount === 1) {
|
|
15836
|
+
var page = this.survey.pages[0];
|
|
15837
|
+
if (page.elements.length === 1 && obj === page.elements[0]) {
|
|
15838
|
+
this.deleteObjectCore(page);
|
|
15839
|
+
return;
|
|
15840
|
+
}
|
|
15841
|
+
}
|
|
15793
15842
|
this.deletePanelOrQuestion(obj);
|
|
15794
15843
|
}
|
|
15795
15844
|
this.setModified({
|
|
@@ -16185,7 +16234,7 @@ var CreatorBase = /** @class */ (function (_super) {
|
|
|
16185
16234
|
if (obj["questions"]) {
|
|
16186
16235
|
obj["questions"].forEach(function (q) { return _this.updateConditionsOnRemove(q); });
|
|
16187
16236
|
}
|
|
16188
|
-
obj["delete"]();
|
|
16237
|
+
obj["delete"](false);
|
|
16189
16238
|
this.selectElement(objIndex > -1 ? elements[objIndex] : parent);
|
|
16190
16239
|
};
|
|
16191
16240
|
CreatorBase.prototype.onCanShowObjectProperty = function (object, property, showMode, parentObj, parentProperty) {
|
|
@@ -16821,7 +16870,7 @@ var CreatorBase = /** @class */ (function (_super) {
|
|
|
16821
16870
|
})
|
|
16822
16871
|
], CreatorBase.prototype, "isCreatorDisposed", void 0);
|
|
16823
16872
|
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
|
|
16824
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue:
|
|
16873
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
|
|
16825
16874
|
], CreatorBase.prototype, "enableLinkFileEditor", void 0);
|
|
16826
16875
|
return CreatorBase;
|
|
16827
16876
|
}(survey_core__WEBPACK_IMPORTED_MODULE_1__["Base"]));
|
|
@@ -18045,31 +18094,44 @@ var EditorLocalization = /** @class */ (function () {
|
|
|
18045
18094
|
};
|
|
18046
18095
|
EditorLocalization.prototype.getString = function (strName, locale) {
|
|
18047
18096
|
if (locale === void 0) { locale = null; }
|
|
18097
|
+
if (!locale)
|
|
18098
|
+
locale = this.currentLocale;
|
|
18048
18099
|
var loc = this.getLocale(locale);
|
|
18049
18100
|
var defaultLocale = this.getLocale("en");
|
|
18050
|
-
var
|
|
18051
|
-
|
|
18052
|
-
|
|
18053
|
-
|
|
18054
|
-
|
|
18055
|
-
|
|
18056
|
-
|
|
18057
|
-
return this.getString(strName, "en");
|
|
18058
|
-
}
|
|
18101
|
+
var locs = [];
|
|
18102
|
+
if (!!loc)
|
|
18103
|
+
locs.push(loc);
|
|
18104
|
+
if (!!locale && locale.indexOf("-") > -1) {
|
|
18105
|
+
var baseLocale = this.getLocale(locale.substring(0, locale.indexOf("-")));
|
|
18106
|
+
if (!!baseLocale)
|
|
18107
|
+
locs.push(baseLocale);
|
|
18059
18108
|
}
|
|
18060
|
-
|
|
18109
|
+
if (locs.length === 0 || locs[locs.length - 1] !== defaultLocale) {
|
|
18110
|
+
locs.push(defaultLocale);
|
|
18111
|
+
}
|
|
18112
|
+
for (var i = 0; i < locs.length; i++) {
|
|
18113
|
+
var res = this.getStringByLocale(strName, locs[i]);
|
|
18114
|
+
if (!!res || res === "")
|
|
18115
|
+
return res;
|
|
18116
|
+
}
|
|
18117
|
+
var path = strName.split(".");
|
|
18118
|
+
return path[path.length - 1];
|
|
18061
18119
|
};
|
|
18062
18120
|
EditorLocalization.prototype.hasString = function (strName, locale) {
|
|
18063
18121
|
if (locale === void 0) { locale = null; }
|
|
18064
|
-
|
|
18122
|
+
return this.getStringByLocale(strName, this.getLocale(locale)) !== undefined;
|
|
18123
|
+
};
|
|
18124
|
+
EditorLocalization.prototype.getStringByLocale = function (strName, loc) {
|
|
18065
18125
|
var path = strName.split(".");
|
|
18066
18126
|
var obj = loc;
|
|
18067
18127
|
for (var i = 0; i < path.length; i++) {
|
|
18128
|
+
if (typeof obj === "string")
|
|
18129
|
+
return undefined;
|
|
18068
18130
|
obj = obj[path[i]];
|
|
18069
18131
|
if (!obj && obj !== "")
|
|
18070
|
-
return
|
|
18132
|
+
return undefined;
|
|
18071
18133
|
}
|
|
18072
|
-
return
|
|
18134
|
+
return obj;
|
|
18073
18135
|
};
|
|
18074
18136
|
EditorLocalization.prototype.getLocaleName = function (loc, defaultLocale) {
|
|
18075
18137
|
if (defaultLocale === void 0) { defaultLocale = null; }
|
|
@@ -18263,10 +18325,7 @@ var EditorLocalization = /** @class */ (function () {
|
|
|
18263
18325
|
if (value === "" || value === null || value === undefined)
|
|
18264
18326
|
return "";
|
|
18265
18327
|
value = value.toString();
|
|
18266
|
-
var
|
|
18267
|
-
var res = loc[prefix] ? loc[prefix][value] : null;
|
|
18268
|
-
if (!res)
|
|
18269
|
-
res = defaultStrings[prefix][value];
|
|
18328
|
+
var res = this.getString(prefix + "." + value, locale);
|
|
18270
18329
|
if (!!res)
|
|
18271
18330
|
return res;
|
|
18272
18331
|
return this.camelCaseBreaking
|
|
@@ -18843,7 +18902,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18843
18902
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
18844
18903
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_69___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_69__);
|
|
18845
18904
|
var Version;
|
|
18846
|
-
Version = "" + "1.9.
|
|
18905
|
+
Version = "" + "1.9.105";
|
|
18847
18906
|
//should be loaded before other styles for easier override
|
|
18848
18907
|
__webpack_require__(/*! ../utils/context-button.scss */ "./src/utils/context-button.scss");
|
|
18849
18908
|
|
|
@@ -18931,7 +18990,7 @@ __webpack_require__(/*! ../utils/design.scss */ "./src/utils/design.scss");
|
|
|
18931
18990
|
__webpack_require__(/*! ../utils/layout.scss */ "./src/utils/layout.scss");
|
|
18932
18991
|
|
|
18933
18992
|
survey_core__WEBPACK_IMPORTED_MODULE_69__["settings"].supportCreatorV2 = true;
|
|
18934
|
-
Object(survey_core__WEBPACK_IMPORTED_MODULE_69__["checkLibraryVersion"])("" + "1.9.
|
|
18993
|
+
Object(survey_core__WEBPACK_IMPORTED_MODULE_69__["checkLibraryVersion"])("" + "1.9.105", "survey-creator-core");
|
|
18935
18994
|
|
|
18936
18995
|
|
|
18937
18996
|
/***/ }),
|
|
@@ -21157,6 +21216,7 @@ var enStrings = {
|
|
|
21157
21216
|
translationPlaceHolder: "Translation...",
|
|
21158
21217
|
themeExportButton: "Export",
|
|
21159
21218
|
themeImportButton: "Import",
|
|
21219
|
+
themeResetButton: "Reset theme settings to default",
|
|
21160
21220
|
bold: "Bold",
|
|
21161
21221
|
italic: "Italic",
|
|
21162
21222
|
underline: "Underline",
|
|
@@ -25309,7 +25369,8 @@ var PropertyJSONGenerator = /** @class */ (function () {
|
|
|
25309
25369
|
};
|
|
25310
25370
|
if (!!overridingQuestion) {
|
|
25311
25371
|
linkValue.linkClickCallback = function () {
|
|
25312
|
-
|
|
25372
|
+
//Focus and aways scroll into view
|
|
25373
|
+
overridingQuestion.focus(false, true);
|
|
25313
25374
|
};
|
|
25314
25375
|
}
|
|
25315
25376
|
return linkValue;
|
|
@@ -25433,6 +25494,9 @@ var PropertyJSONGenerator = /** @class */ (function () {
|
|
|
25433
25494
|
if (json.cellType === "buttongroup") {
|
|
25434
25495
|
json.cellType = "dropdown";
|
|
25435
25496
|
}
|
|
25497
|
+
if (json.cellType === "fileedit") {
|
|
25498
|
+
json.cellType = "text";
|
|
25499
|
+
}
|
|
25436
25500
|
if (!!prop.visibleIf) {
|
|
25437
25501
|
json.visibleIf = "propertyVisibleIf() = true";
|
|
25438
25502
|
}
|
|
@@ -25629,8 +25693,8 @@ var PropertyGridModel = /** @class */ (function () {
|
|
|
25629
25693
|
});
|
|
25630
25694
|
this.survey.onUploadFiles.add(function (_, options) {
|
|
25631
25695
|
var callback = function (status, data) { return options.callback(status, [{ content: data, file: options.files[0] }]); };
|
|
25632
|
-
var
|
|
25633
|
-
_this.options.uploadFiles(options.files,
|
|
25696
|
+
var question = options.question.obj.getType() == "survey" ? undefined : (options.question.obj.getType() == "imageitemvalue" ? options.question.obj.locOwner : options.question.obj);
|
|
25697
|
+
_this.options.uploadFiles(options.files, question, callback);
|
|
25634
25698
|
});
|
|
25635
25699
|
this.survey.getAllQuestions().map(function (q) { return q.allowRootStyle = false; });
|
|
25636
25700
|
this.survey.onQuestionCreated.add(function (_, opt) {
|
|
@@ -26045,19 +26109,23 @@ var PropertyGridLinkEditor = /** @class */ (function (_super) {
|
|
|
26045
26109
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
26046
26110
|
}
|
|
26047
26111
|
PropertyGridLinkEditor.prototype.fit = function (prop) {
|
|
26048
|
-
return ["logo", "imageLink"].indexOf(prop.name) > -1;
|
|
26112
|
+
return ["logo", "imageLink", "backgroundImage"].indexOf(prop.name) > -1;
|
|
26049
26113
|
};
|
|
26050
26114
|
PropertyGridLinkEditor.prototype.getJSON = function (obj, prop, options) {
|
|
26051
|
-
var
|
|
26115
|
+
var _a;
|
|
26116
|
+
var maxSize = ((_a = options.onUploadFile) === null || _a === void 0 ? void 0 : _a.isEmpty) ? 65536 : undefined;
|
|
26117
|
+
var res = { type: "fileedit", storeDataAsText: false, maxSize: maxSize };
|
|
26052
26118
|
return res;
|
|
26053
26119
|
};
|
|
26054
26120
|
PropertyGridLinkEditor.prototype.onCreated = function (obj, question, prop, options) {
|
|
26055
|
-
if (["image"].indexOf(obj.getType()) > -1) {
|
|
26056
|
-
var questionObj = obj;
|
|
26057
|
-
|
|
26058
|
-
|
|
26059
|
-
|
|
26060
|
-
|
|
26121
|
+
if (["image", "imageitemvalue"].indexOf(obj.getType()) > -1) {
|
|
26122
|
+
var questionObj = obj.getType() == "imageitemvalue" ? obj.locOwner : obj;
|
|
26123
|
+
if (questionObj) {
|
|
26124
|
+
questionObj.registerFunctionOnPropertyValueChanged("contentMode", function (newValue) {
|
|
26125
|
+
question.acceptedTypes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_10__["getAcceptedTypesByContentMode"])(newValue);
|
|
26126
|
+
});
|
|
26127
|
+
question.acceptedTypes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_10__["getAcceptedTypesByContentMode"])(questionObj.contentMode);
|
|
26128
|
+
}
|
|
26061
26129
|
}
|
|
26062
26130
|
else {
|
|
26063
26131
|
question.acceptedTypes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_10__["getAcceptedTypesByContentMode"])("image");
|
|
@@ -26573,14 +26641,6 @@ var PropertyGridEditorMatrix = /** @class */ (function (_super) {
|
|
|
26573
26641
|
matrix.dragDropMatrixRows.onDragEnd.add(function () { options.stopUndoRedoTransaction(); });
|
|
26574
26642
|
}
|
|
26575
26643
|
};
|
|
26576
|
-
PropertyGridEditorMatrix.prototype.initializeAcceptedTypes = function (obj, cellQuestion) {
|
|
26577
|
-
if (obj.getType() === "imagepicker" && cellQuestion.name == "imageLink" && cellQuestion.getType() == "fileedit") {
|
|
26578
|
-
obj.registerFunctionOnPropertyValueChanged("contentMode", function (newValue) {
|
|
26579
|
-
cellQuestion.acceptedTypes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["getAcceptedTypesByContentMode"])(newValue);
|
|
26580
|
-
});
|
|
26581
|
-
cellQuestion.acceptedTypes = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_4__["getAcceptedTypesByContentMode"])(obj.contentMode);
|
|
26582
|
-
}
|
|
26583
|
-
};
|
|
26584
26644
|
PropertyGridEditorMatrix.prototype.initializePlaceholder = function (rowObj, cellQuestion, propertyName) {
|
|
26585
26645
|
var objType = typeof rowObj.getType === "function" && rowObj.getType();
|
|
26586
26646
|
if (cellQuestion.getType() === "text" && !!objType) {
|
|
@@ -26606,7 +26666,6 @@ var PropertyGridEditorMatrix = /** @class */ (function (_super) {
|
|
|
26606
26666
|
return;
|
|
26607
26667
|
var q = options.cellQuestion;
|
|
26608
26668
|
q.obj = rowObj;
|
|
26609
|
-
this.initializeAcceptedTypes(obj, q);
|
|
26610
26669
|
this.initializePlaceholder(rowObj, q, options.columnName);
|
|
26611
26670
|
q.property = survey_core__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty(rowObj.getType(), options.columnName);
|
|
26612
26671
|
};
|
|
@@ -28470,6 +28529,7 @@ var SurveyQuestionEditorDefinition = /** @class */ (function () {
|
|
|
28470
28529
|
"cellType",
|
|
28471
28530
|
"name",
|
|
28472
28531
|
"title",
|
|
28532
|
+
"visible",
|
|
28473
28533
|
"isRequired",
|
|
28474
28534
|
"readOnly",
|
|
28475
28535
|
"isUnique",
|
|
@@ -29679,10 +29739,11 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
|
|
|
29679
29739
|
});
|
|
29680
29740
|
// private isRight: boolean;
|
|
29681
29741
|
// protected prevIsRight: boolean;
|
|
29682
|
-
DragDropSurveyElements.prototype.startDragToolboxItem = function (event, draggedElementJson,
|
|
29742
|
+
DragDropSurveyElements.prototype.startDragToolboxItem = function (event, draggedElementJson, toolboxItemModel) {
|
|
29683
29743
|
var preventSaveTargetNode = true;
|
|
29684
29744
|
var draggedElement = this.createElementFromJson(draggedElementJson);
|
|
29685
|
-
draggedElement.toolboxItemTitle =
|
|
29745
|
+
draggedElement.toolboxItemTitle = toolboxItemModel.title;
|
|
29746
|
+
draggedElement.toolboxItemIconName = toolboxItemModel.iconName;
|
|
29686
29747
|
this.startDrag(event, draggedElement, null, null, preventSaveTargetNode);
|
|
29687
29748
|
};
|
|
29688
29749
|
DragDropSurveyElements.prototype.startDragSurveyElement = function (event, draggedElement, isElementSelected) {
|
|
@@ -29704,8 +29765,8 @@ var DragDropSurveyElements = /** @class */ (function (_super) {
|
|
|
29704
29765
|
};
|
|
29705
29766
|
DragDropSurveyElements.prototype.createDraggedElementIcon = function () {
|
|
29706
29767
|
var span = document.createElement("span");
|
|
29707
|
-
var
|
|
29708
|
-
var svgString = "<svg class=\"sv-svg-icon\" role=\"img\" style=\"width: 24px; height: 24px;\"><use xlink:href=\"#
|
|
29768
|
+
var iconName = this.draggedElement.toolboxItemIconName;
|
|
29769
|
+
var svgString = "<svg class=\"sv-svg-icon\" role=\"img\" style=\"width: 24px; height: 24px;\"><use xlink:href=\"#" + iconName + "\"></use></svg>";
|
|
29709
29770
|
span.className = "svc-dragged-element-shortcut__icon";
|
|
29710
29771
|
span.innerHTML = svgString;
|
|
29711
29772
|
return span;
|
|
@@ -30851,7 +30912,7 @@ var QuestionToolbox = /** @class */ (function (_super) {
|
|
|
30851
30912
|
var json = _this.creator.getJSONForNewElement(itemModel.json);
|
|
30852
30913
|
_this.dotsItem.popupModel.toggleVisibility();
|
|
30853
30914
|
(_a = _this.creator) === null || _a === void 0 ? void 0 : _a.onDragDropItemStart();
|
|
30854
|
-
_this.dragDropHelper.startDragToolboxItem(pointerDownEvent, json, itemModel
|
|
30915
|
+
_this.dragDropHelper.startDragToolboxItem(pointerDownEvent, json, itemModel);
|
|
30855
30916
|
});
|
|
30856
30917
|
this.hiddenItemsListModel.onPointerDown = function (pointerDownEvent, item) {
|
|
30857
30918
|
if (!_this.creator.readOnly) {
|
|
@@ -30985,13 +31046,15 @@ var QuestionToolbox = /** @class */ (function (_super) {
|
|
|
30985
31046
|
var name = !!options.name ? options.name : question.name;
|
|
30986
31047
|
var title = !!options.title ? options.title : name;
|
|
30987
31048
|
var tooltip = !!options.tooltip ? options.tooltip : title;
|
|
31049
|
+
var iconName = !!options.iconName ? options.iconName : QuestionToolbox.defaultIconName;
|
|
30988
31050
|
var item = {
|
|
30989
31051
|
id: name,
|
|
30990
31052
|
name: name,
|
|
30991
31053
|
title: title,
|
|
30992
31054
|
tooltip: tooltip,
|
|
31055
|
+
className: "svc-toolbox__item svc-toolbox__item--" + iconName,
|
|
30993
31056
|
isCopied: options.isCopied !== false,
|
|
30994
|
-
iconName:
|
|
31057
|
+
iconName: iconName,
|
|
30995
31058
|
json: !!options.json ? options.json : this.getQuestionJSON(question),
|
|
30996
31059
|
category: !!options.category ? options.category : ""
|
|
30997
31060
|
};
|
|
@@ -31361,12 +31424,14 @@ var QuestionToolbox = /** @class */ (function (_super) {
|
|
|
31361
31424
|
}
|
|
31362
31425
|
var json = this.getQuestionJSON(question);
|
|
31363
31426
|
var title = _editorLocalization__WEBPACK_IMPORTED_MODULE_2__["editorLocalization"].getString("qt." + name);
|
|
31427
|
+
var iconName = "icon-" + name;
|
|
31364
31428
|
var item = {
|
|
31365
31429
|
id: name,
|
|
31366
31430
|
name: name,
|
|
31367
|
-
iconName:
|
|
31431
|
+
iconName: iconName,
|
|
31368
31432
|
title: title,
|
|
31369
31433
|
tooltip: title,
|
|
31434
|
+
className: "svc-toolbox__item svc-toolbox__item--" + iconName,
|
|
31370
31435
|
json: json,
|
|
31371
31436
|
isCopied: false,
|
|
31372
31437
|
category: (defaultCategories[name] || "")
|