survey-creator-core 2.0.1 → 2.0.2
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/fesm/i18n/arabic.js +1 -1
- package/fesm/i18n/bulgarian.js +1 -1
- package/fesm/i18n/burmese.js +1 -1
- package/fesm/i18n/croatian.js +1 -1
- package/fesm/i18n/czech.js +1 -1
- package/fesm/i18n/danish.js +1 -1
- package/fesm/i18n/dutch.js +1 -1
- package/fesm/i18n/english.js +1 -1
- package/fesm/i18n/finnish.js +1 -1
- package/fesm/i18n/french.js +1 -1
- package/fesm/i18n/german.js +1 -1
- package/fesm/i18n/hebrew.js +1 -1
- package/fesm/i18n/hungarian.js +1 -1
- package/fesm/i18n/index.js +1 -1
- package/fesm/i18n/indonesian.js +1 -1
- package/fesm/i18n/italian.js +1 -1
- package/fesm/i18n/japanese.js +1 -1
- package/fesm/i18n/korean.js +1 -1
- package/fesm/i18n/malay.js +1 -1
- package/fesm/i18n/mongolian.js +1 -1
- package/fesm/i18n/norwegian.js +1 -1
- package/fesm/i18n/persian.js +1 -1
- package/fesm/i18n/polish.js +1 -1
- package/fesm/i18n/portuguese.js +1 -1
- package/fesm/i18n/romanian.js +1 -1
- package/fesm/i18n/russian.js +1 -1
- package/fesm/i18n/simplified-chinese.js +1 -1
- package/fesm/i18n/slovak.js +1 -1
- package/fesm/i18n/slovenian.js +1 -1
- package/fesm/i18n/spanish.js +1 -1
- package/fesm/i18n/swedish.js +1 -1
- package/fesm/i18n/tajik.js +1 -1
- package/fesm/i18n/thai.js +1 -1
- package/fesm/i18n/traditional-chinese.js +1 -1
- package/fesm/i18n/turkish.js +1 -1
- package/fesm/survey-creator-core.i18n.js +1 -1
- package/fesm/survey-creator-core.js +344 -80
- package/fesm/survey-creator-core.js.map +1 -1
- package/fesm/themes/index.js +1 -1
- package/fonts.fontless.css +1 -1
- package/fonts.fontless.min.css +1 -1
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js.LICENSE.txt +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js.LICENSE.txt +1 -1
- package/i18n/burmese.js +1 -1
- package/i18n/burmese.min.js.LICENSE.txt +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js.LICENSE.txt +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js.LICENSE.txt +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js.LICENSE.txt +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js.LICENSE.txt +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js.LICENSE.txt +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js.LICENSE.txt +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js.LICENSE.txt +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js.LICENSE.txt +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js.LICENSE.txt +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js.LICENSE.txt +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js.LICENSE.txt +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js.LICENSE.txt +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js.LICENSE.txt +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js.LICENSE.txt +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js.LICENSE.txt +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js.LICENSE.txt +1 -1
- package/i18n/mongolian.js +1 -1
- package/i18n/mongolian.min.js.LICENSE.txt +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js.LICENSE.txt +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js.LICENSE.txt +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js.LICENSE.txt +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js.LICENSE.txt +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js.LICENSE.txt +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js.LICENSE.txt +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js.LICENSE.txt +1 -1
- package/i18n/slovenian.js +1 -1
- package/i18n/slovenian.min.js.LICENSE.txt +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js.LICENSE.txt +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js.LICENSE.txt +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js.LICENSE.txt +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js.LICENSE.txt +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js.LICENSE.txt +1 -1
- package/package.json +2 -2
- package/survey-creator-core.css +3 -3
- package/survey-creator-core.fontless.css +2 -2
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +3 -3
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
- package/survey-creator-core.js +371 -79
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +4 -4
- package/survey-creator-core.min.js +1 -1
- package/survey-creator-core.min.js.LICENSE.txt +1 -1
- package/themes/default-contrast.js +1 -1
- package/themes/default-contrast.min.js.LICENSE.txt +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js.LICENSE.txt +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js.LICENSE.txt +1 -1
- package/themes/sc2020.js +1 -1
- package/themes/sc2020.min.js.LICENSE.txt +1 -1
- package/typings/creator-base.d.ts +19 -1
- package/typings/creator-options.d.ts +6 -0
- package/typings/expand-collapse-manager.d.ts +1 -5
- package/typings/plugins/undo-redo/undo-redo-controller.d.ts +1 -0
- package/typings/property-grid/index.d.ts +1 -0
- package/typings/question-editor/properties.d.ts +1 -0
- package/typings/utils/creator-locstrings.d.ts +9 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v2.0.
|
|
2
|
+
* SurveyJS Creator v2.0.2
|
|
3
3
|
* (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -2220,6 +2220,10 @@ class EditorLocalization {
|
|
|
2220
2220
|
return (locale ? this.getLocaleStrings(locale) : this.getDefaultStrings()) || this.getDefaultStrings();
|
|
2221
2221
|
}
|
|
2222
2222
|
getLocaleStrings(loc) {
|
|
2223
|
+
if (!loc)
|
|
2224
|
+
loc = this.defaultLocale;
|
|
2225
|
+
if (loc === "en")
|
|
2226
|
+
return defaultStrings;
|
|
2223
2227
|
return this.locales[loc];
|
|
2224
2228
|
}
|
|
2225
2229
|
setupLocale(loc, strings) {
|
|
@@ -12768,6 +12772,38 @@ class SurveyQuestionEditorDefinition {
|
|
|
12768
12772
|
}
|
|
12769
12773
|
SurveyQuestionEditorDefinition.definition = defaultProperties;
|
|
12770
12774
|
|
|
12775
|
+
const pgTabIcons = {
|
|
12776
|
+
"appearance": "icon-pg-appearance-24x24",
|
|
12777
|
+
"background": "icon-pg-background-24x24",
|
|
12778
|
+
"columns": "icon-pg-columns-24x24",
|
|
12779
|
+
"logic": "icon-pg-conditions-24x24",
|
|
12780
|
+
"data": "icon-pg-data-24x24",
|
|
12781
|
+
"design": "icon-pg-design-24x24",
|
|
12782
|
+
"general": "icon-pg-general-24x24",
|
|
12783
|
+
"header": "icon-pg-header-24x24",
|
|
12784
|
+
"language": "icon-pg-language-24x24",
|
|
12785
|
+
"layout": "icon-pg-design-24x24",
|
|
12786
|
+
"logo": "icon-pg-logo-24x24",
|
|
12787
|
+
"navigation": "icon-pg-navigation-24x24",
|
|
12788
|
+
"pages": "icon-pg-pages-24x24",
|
|
12789
|
+
"question": "icon-pg-questiondesign-24x24",
|
|
12790
|
+
"questionSettings": "icon-pg-questiondesign-24x24",
|
|
12791
|
+
"timer": "icon-pg-quiz-24x24",
|
|
12792
|
+
"rows": "icon-pg-rows-24x24",
|
|
12793
|
+
"specific": "icon-pg-specific-24x24",
|
|
12794
|
+
"showOnCompleted": "icon-pg-thankyyoupage-24x24",
|
|
12795
|
+
"themes": "icon-pg-themes-24x24",
|
|
12796
|
+
"totals": "icon-pg-totals-24x24",
|
|
12797
|
+
"validation": "icon-pg-validation-24x24",
|
|
12798
|
+
"cells": "icon-pg-specific-24x24",
|
|
12799
|
+
"items": "icon-pg-specific-24x24",
|
|
12800
|
+
"mask": "icon-pg-specific-24x24",
|
|
12801
|
+
"rateValues": "icon-pg-specific-24x24",
|
|
12802
|
+
"choices": "icon-pg-specific-24x24",
|
|
12803
|
+
"choicesByUrl": "icon-pg-webservice-24x24",
|
|
12804
|
+
"undefined": "icon-pg-undefined-24x24",
|
|
12805
|
+
};
|
|
12806
|
+
|
|
12771
12807
|
class SurveyQuestionEditorPropertyDefinition {
|
|
12772
12808
|
get name() {
|
|
12773
12809
|
return !!this.property ? this.property.name : "";
|
|
@@ -13026,6 +13062,7 @@ class SurveyQuestionProperties {
|
|
|
13026
13062
|
}
|
|
13027
13063
|
var res = new SurveyQuestionEditorTabDefinition();
|
|
13028
13064
|
res.name = tabName;
|
|
13065
|
+
res.iconName = pgTabIcons[tabName] || pgTabIcons["undefined"];
|
|
13029
13066
|
if (tabName == settings.propertyGrid.generalTabName) {
|
|
13030
13067
|
res.index = -1;
|
|
13031
13068
|
}
|
|
@@ -13549,6 +13586,15 @@ class PropertyGridTitleActionsCreator {
|
|
|
13549
13586
|
options.titleActions = actions;
|
|
13550
13587
|
}
|
|
13551
13588
|
}
|
|
13589
|
+
onValueChanged(obj, property, question) {
|
|
13590
|
+
const editor = PropertyGridEditorCollection.getEditor(property);
|
|
13591
|
+
if (!!editor && !!editor.createPropertyEditorSetup && !!editor.isPropertyEditorSetupEnabled) {
|
|
13592
|
+
const act = question.getTitleToolbar().getActionById("property-grid-setup");
|
|
13593
|
+
if (!!act) {
|
|
13594
|
+
act.enabled = editor.isPropertyEditorSetupEnabled(obj, property, question, this.options);
|
|
13595
|
+
}
|
|
13596
|
+
}
|
|
13597
|
+
}
|
|
13552
13598
|
createClearValueAction(editor, property, question, enabled) {
|
|
13553
13599
|
return {
|
|
13554
13600
|
id: "property-grid-clear",
|
|
@@ -13615,6 +13661,7 @@ class PropertyGridTitleActionsCreator {
|
|
|
13615
13661
|
return question.descriptionLocation != "hidden" ? "icon-description-hide" : "icon-description";
|
|
13616
13662
|
}
|
|
13617
13663
|
}
|
|
13664
|
+
Serializer.addProperty("panelbase", { name: "iconName", visible: false });
|
|
13618
13665
|
class PropertyJSONGenerator {
|
|
13619
13666
|
static isPropertyReadOnly(prop, options, obj, parentObj, parentProperty) {
|
|
13620
13667
|
var res = prop.readOnly;
|
|
@@ -13787,7 +13834,7 @@ class PropertyJSONGenerator {
|
|
|
13787
13834
|
return json;
|
|
13788
13835
|
}
|
|
13789
13836
|
createPanelProps(tab, context, isChild = false) {
|
|
13790
|
-
var panel = this.createPanelJSON(tab.name, tab.title, isChild);
|
|
13837
|
+
var panel = this.createPanelJSON(tab.name, tab.title, tab.iconName, isChild);
|
|
13791
13838
|
for (var i = 0; i < tab.properties.length; i++) {
|
|
13792
13839
|
var propDef = tab.properties[i];
|
|
13793
13840
|
var propJSON = this.createQuestionJSON(this.obj, propDef.property, propDef.title, false, context);
|
|
@@ -13819,10 +13866,11 @@ class PropertyJSONGenerator {
|
|
|
13819
13866
|
json.titleLocation = "left";
|
|
13820
13867
|
json.minWidth = "50px";
|
|
13821
13868
|
}
|
|
13822
|
-
createPanelJSON(category, title, isChild) {
|
|
13869
|
+
createPanelJSON(category, title, iconName, isChild) {
|
|
13823
13870
|
const res = {
|
|
13824
13871
|
type: "panel",
|
|
13825
13872
|
name: category,
|
|
13873
|
+
iconName: iconName,
|
|
13826
13874
|
title: this.getPanelTitle(category, title),
|
|
13827
13875
|
elements: []
|
|
13828
13876
|
};
|
|
@@ -14435,6 +14483,8 @@ class PropertyGridModel {
|
|
|
14435
14483
|
const cellQuestion = options.row.getQuestionByName(options.columnName);
|
|
14436
14484
|
if (!!cellQuestion) {
|
|
14437
14485
|
this.changeDependedProperties(cellQuestion, (name) => { return options.row.getQuestionByName(name); }, (name) => { return options.row.getValue(name); });
|
|
14486
|
+
const matrix = options.question;
|
|
14487
|
+
this.titleActionsCreator.onValueChanged(matrix.obj, matrix.property, matrix);
|
|
14438
14488
|
}
|
|
14439
14489
|
PropertyGridEditorCollection.onMatrixCellValueChanged(this.obj, options.question.property, options);
|
|
14440
14490
|
}
|
|
@@ -16007,8 +16057,7 @@ class TranslationGroup extends TranslationItemBase {
|
|
|
16007
16057
|
return;
|
|
16008
16058
|
var properties = this.getLocalizedProperties(this.obj);
|
|
16009
16059
|
for (var i = 0; i < properties.length; i++) {
|
|
16010
|
-
|
|
16011
|
-
var item = this.createTranslationItem(this.obj, properties[i]);
|
|
16060
|
+
const item = this.createTranslationItem(this.obj, properties[i]);
|
|
16012
16061
|
if (!!item) {
|
|
16013
16062
|
this.itemValues.push(item);
|
|
16014
16063
|
}
|
|
@@ -16107,10 +16156,10 @@ class TranslationGroup extends TranslationItemBase {
|
|
|
16107
16156
|
}
|
|
16108
16157
|
createTranslationItem(obj, property) {
|
|
16109
16158
|
var _a;
|
|
16110
|
-
const defaultValue = this.getDefaultValue(obj, property);
|
|
16111
16159
|
const locStr = obj[property.serializationProperty];
|
|
16112
16160
|
if (!locStr)
|
|
16113
16161
|
return null;
|
|
16162
|
+
const defaultValue = this.getDefaultValue(obj, property);
|
|
16114
16163
|
if (!this.showAllStrings && !defaultValue && locStr.isEmpty)
|
|
16115
16164
|
return null;
|
|
16116
16165
|
const editLocale = (_a = this.translation) === null || _a === void 0 ? void 0 : _a.getEditLocale();
|
|
@@ -16125,9 +16174,7 @@ class TranslationGroup extends TranslationItemBase {
|
|
|
16125
16174
|
property.isLocalizable &&
|
|
16126
16175
|
!!property.serializationProperty) {
|
|
16127
16176
|
var locStr = obj[property.serializationProperty];
|
|
16128
|
-
if (!!locStr &&
|
|
16129
|
-
!obj.isPage && !obj.isPanel &&
|
|
16130
|
-
(!!locStr.onGetTextCallback || locStr["onRenderedHtmlCallback"]))
|
|
16177
|
+
if (!!locStr && !obj.isPage && !obj.isPanel && !!locStr.onGetTextCallback)
|
|
16131
16178
|
return obj["name"];
|
|
16132
16179
|
}
|
|
16133
16180
|
return "";
|
|
@@ -20443,7 +20490,7 @@ class TabLogicPlugin {
|
|
|
20443
20490
|
|
|
20444
20491
|
class UndoRedoController extends Base {
|
|
20445
20492
|
onSurveyPropertyValueChangedCallback(name, oldValue, newValue, sender, arrayChanges) {
|
|
20446
|
-
if (!this.undoRedoManager || !this.undoRedoManager.isCorrectProperty(sender, name)) {
|
|
20493
|
+
if (this.ignoreChanges || !this.undoRedoManager || !this.undoRedoManager.isCorrectProperty(sender, name)) {
|
|
20447
20494
|
return;
|
|
20448
20495
|
}
|
|
20449
20496
|
const canUndoRedoMerge = this.undoRedoManager.tryMergeTransaction(sender, name, newValue);
|
|
@@ -21487,7 +21534,6 @@ class SurveyElementAdornerBase extends Base {
|
|
|
21487
21534
|
this.setSurveyElement(surveyElement);
|
|
21488
21535
|
this.creator.onLocaleChanded.add(this.creatorOnLocaleChanged);
|
|
21489
21536
|
this.creator.sidebar.onPropertyChanged.add(this.sidebarFlyoutModeChangedFunc);
|
|
21490
|
-
this.creator.expandCollapseManager.add(this);
|
|
21491
21537
|
}
|
|
21492
21538
|
}
|
|
21493
21539
|
detachOnlyMyElement() {
|
|
@@ -21501,7 +21547,6 @@ class SurveyElementAdornerBase extends Base {
|
|
|
21501
21547
|
this.surveyElement = undefined;
|
|
21502
21548
|
this.creator.onLocaleChanded.remove(this.creatorOnLocaleChanged);
|
|
21503
21549
|
this.creator.sidebar.onPropertyChanged.remove(this.sidebarFlyoutModeChangedFunc);
|
|
21504
|
-
this.creator.expandCollapseManager.remove(this);
|
|
21505
21550
|
}
|
|
21506
21551
|
dispose() {
|
|
21507
21552
|
this.detachFromUI();
|
|
@@ -22856,38 +22901,6 @@ class DesignerStateManager {
|
|
|
22856
22901
|
}
|
|
22857
22902
|
}
|
|
22858
22903
|
|
|
22859
|
-
const pgTabIcons = {
|
|
22860
|
-
"appearance": "icon-pg-appearance-24x24",
|
|
22861
|
-
"background": "icon-pg-background-24x24",
|
|
22862
|
-
"columns": "icon-pg-columns-24x24",
|
|
22863
|
-
"logic": "icon-pg-conditions-24x24",
|
|
22864
|
-
"data": "icon-pg-data-24x24",
|
|
22865
|
-
"design": "icon-pg-design-24x24",
|
|
22866
|
-
"general": "icon-pg-general-24x24",
|
|
22867
|
-
"header": "icon-pg-header-24x24",
|
|
22868
|
-
"language": "icon-pg-language-24x24",
|
|
22869
|
-
"layout": "icon-pg-design-24x24",
|
|
22870
|
-
"logo": "icon-pg-logo-24x24",
|
|
22871
|
-
"navigation": "icon-pg-navigation-24x24",
|
|
22872
|
-
"pages": "icon-pg-pages-24x24",
|
|
22873
|
-
"question": "icon-pg-questiondesign-24x24",
|
|
22874
|
-
"questionSettings": "icon-pg-questiondesign-24x24",
|
|
22875
|
-
"timer": "icon-pg-quiz-24x24",
|
|
22876
|
-
"rows": "icon-pg-rows-24x24",
|
|
22877
|
-
"specific": "icon-pg-specific-24x24",
|
|
22878
|
-
"showOnCompleted": "icon-pg-thankyyoupage-24x24",
|
|
22879
|
-
"themes": "icon-pg-themes-24x24",
|
|
22880
|
-
"totals": "icon-pg-totals-24x24",
|
|
22881
|
-
"validation": "icon-pg-validation-24x24",
|
|
22882
|
-
"cells": "icon-pg-specific-24x24",
|
|
22883
|
-
"items": "icon-pg-specific-24x24",
|
|
22884
|
-
"mask": "icon-pg-specific-24x24",
|
|
22885
|
-
"rateValues": "icon-pg-specific-24x24",
|
|
22886
|
-
"choices": "icon-pg-specific-24x24",
|
|
22887
|
-
"choicesByUrl": "icon-pg-webservice-24x24",
|
|
22888
|
-
"undefined": "icon-pg-undefined-24x24",
|
|
22889
|
-
};
|
|
22890
|
-
|
|
22891
22904
|
const creatorThemeModelProperties = {
|
|
22892
22905
|
"creatortheme": {
|
|
22893
22906
|
properties: [
|
|
@@ -23727,7 +23740,7 @@ class TabDesignerPlugin {
|
|
|
23727
23740
|
const action = new MenuButton({
|
|
23728
23741
|
id: p.name,
|
|
23729
23742
|
tooltip: p.title,
|
|
23730
|
-
iconName:
|
|
23743
|
+
iconName: p["iconName"],
|
|
23731
23744
|
iconSize: "auto",
|
|
23732
23745
|
active: this.activePageIsPropertyGrid && p.name === this.propertyGrid.survey.currentPage.name,
|
|
23733
23746
|
pressed: false,
|
|
@@ -23768,7 +23781,6 @@ class TabDesignerPlugin {
|
|
|
23768
23781
|
this.creator.sidebar.sideAreaComponentData = undefined;
|
|
23769
23782
|
this.creator.sidebar.onPropertyChanged.clear();
|
|
23770
23783
|
this.creator.sidebar.header.reset();
|
|
23771
|
-
this.creator.expandCollapseManager.clear();
|
|
23772
23784
|
return true;
|
|
23773
23785
|
}
|
|
23774
23786
|
onDesignerSurveyPropertyChanged(obj, propName) {
|
|
@@ -25559,7 +25571,7 @@ class ThemeTabPlugin {
|
|
|
25559
25571
|
const action = new MenuButton({
|
|
25560
25572
|
id: p.name,
|
|
25561
25573
|
tooltip: p.title,
|
|
25562
|
-
iconName:
|
|
25574
|
+
iconName: p["iconName"],
|
|
25563
25575
|
iconSize: "auto",
|
|
25564
25576
|
active: p.name === this.propertyGrid.survey.currentPage.name,
|
|
25565
25577
|
pressed: false,
|
|
@@ -26083,7 +26095,6 @@ class ExpandCollapseManager {
|
|
|
26083
26095
|
constructor(creator) {
|
|
26084
26096
|
this.creator = creator;
|
|
26085
26097
|
this._lockQuestions = false;
|
|
26086
|
-
this.adorners = [];
|
|
26087
26098
|
}
|
|
26088
26099
|
expandCollapseElements(reason, isCollapsed, elements = null) {
|
|
26089
26100
|
this.updateCollapsed(elements || this.getCollapsableElements(), isCollapsed, reason);
|
|
@@ -26099,34 +26110,26 @@ class ExpandCollapseManager {
|
|
|
26099
26110
|
.concat(this.creator.survey.getAllPanels())
|
|
26100
26111
|
.concat(this.creator.survey.getAllQuestions());
|
|
26101
26112
|
}
|
|
26113
|
+
sortElements(elements) {
|
|
26114
|
+
return [].concat(elements).sort((el, el2) => {
|
|
26115
|
+
const a = el.isPage ? 2 : el.isPanel ? 1 : 0;
|
|
26116
|
+
const b = el2.isPage ? 2 : el2.isPanel ? 1 : 0;
|
|
26117
|
+
return a - b;
|
|
26118
|
+
});
|
|
26119
|
+
}
|
|
26102
26120
|
updateCollapsed(elements, value, reason) {
|
|
26103
|
-
elements.forEach(element => {
|
|
26121
|
+
this.sortElements(elements).forEach(element => {
|
|
26104
26122
|
var _a;
|
|
26105
26123
|
if (element.isQuestion && this._lockQuestions)
|
|
26106
26124
|
return;
|
|
26107
26125
|
const collapsed = this.creator.getElementExpandCollapseState(element, reason, value);
|
|
26108
26126
|
(_a = this.creator.designerStateManager) === null || _a === void 0 ? void 0 : _a.setElementCollapsed(element, collapsed);
|
|
26109
|
-
|
|
26110
|
-
|
|
26111
|
-
const element = this.adorners[i].element;
|
|
26112
|
-
if (element.isQuestion && this._lockQuestions)
|
|
26113
|
-
continue;
|
|
26114
|
-
if (elements.indexOf(element) == -1)
|
|
26115
|
-
continue;
|
|
26116
|
-
if (this.adorners[i].allowExpandCollapse) {
|
|
26127
|
+
const adorner = SurveyElementAdornerBase.GetAdorner(element);
|
|
26128
|
+
if (adorner && adorner.allowExpandCollapse) {
|
|
26117
26129
|
const newState = this.creator.getElementExpandCollapseState(element, reason, value);
|
|
26118
|
-
|
|
26130
|
+
adorner.collapsed = newState;
|
|
26119
26131
|
}
|
|
26120
|
-
}
|
|
26121
|
-
}
|
|
26122
|
-
add(adorner) {
|
|
26123
|
-
this.adorners.push(adorner);
|
|
26124
|
-
}
|
|
26125
|
-
remove(adorner) {
|
|
26126
|
-
this.adorners.splice(this.adorners.indexOf(adorner), 1);
|
|
26127
|
-
}
|
|
26128
|
-
clear() {
|
|
26129
|
-
this.adorners.length = 0;
|
|
26132
|
+
});
|
|
26130
26133
|
}
|
|
26131
26134
|
}
|
|
26132
26135
|
|
|
@@ -26199,6 +26202,210 @@ class TabbedMenuContainer extends AdaptiveActionContainer {
|
|
|
26199
26202
|
}
|
|
26200
26203
|
}
|
|
26201
26204
|
|
|
26205
|
+
function doMachineStringsTranslation(survey, creatorOptions, locales) {
|
|
26206
|
+
locales.forEach(loc => {
|
|
26207
|
+
const locStrs = getUnlocalizedStrings(survey);
|
|
26208
|
+
if (locStrs.length > 0) {
|
|
26209
|
+
const locStrsHash = {};
|
|
26210
|
+
const defaultStrs = new Array();
|
|
26211
|
+
locStrs.forEach(locStr => {
|
|
26212
|
+
let text = locStr.getLocaleText("");
|
|
26213
|
+
if (!text && locStr.onGetTextCallback) {
|
|
26214
|
+
text = locStr.onGetTextCallback("");
|
|
26215
|
+
if (isTextNonTranslated(text)) {
|
|
26216
|
+
text = undefined;
|
|
26217
|
+
}
|
|
26218
|
+
}
|
|
26219
|
+
if (!!text) {
|
|
26220
|
+
if (!locStrsHash[text]) {
|
|
26221
|
+
locStrsHash[text] = [];
|
|
26222
|
+
defaultStrs.push(text);
|
|
26223
|
+
}
|
|
26224
|
+
locStrsHash[text].push(locStr);
|
|
26225
|
+
}
|
|
26226
|
+
});
|
|
26227
|
+
creatorOptions.doMachineTranslation(surveyLocalization.defaultLocale, loc, defaultStrs, (translated) => {
|
|
26228
|
+
if (!!translated && translated.length === defaultStrs.length) {
|
|
26229
|
+
creatorOptions.startUndoRedoTransaction("Translate to " + loc);
|
|
26230
|
+
for (let i = 0; i < defaultStrs.length; i++) {
|
|
26231
|
+
locStrsHash[defaultStrs[i]].forEach(locStr => locStr.setLocaleText(loc, translated[i]));
|
|
26232
|
+
}
|
|
26233
|
+
creatorOptions.stopUndoRedoTransaction();
|
|
26234
|
+
}
|
|
26235
|
+
});
|
|
26236
|
+
}
|
|
26237
|
+
});
|
|
26238
|
+
}
|
|
26239
|
+
function getUnlocalizedStrings(survey, creatorOptions, loc) {
|
|
26240
|
+
const res = new Array();
|
|
26241
|
+
const options = {
|
|
26242
|
+
canShowProperty: (reason, obj, property, locStr, isShowing, defaultValue) => {
|
|
26243
|
+
return isShowing && (!locStr || !(locStr === null || locStr === void 0 ? void 0 : locStr.isEmpty)) || !!defaultValue;
|
|
26244
|
+
},
|
|
26245
|
+
onAddLocalizedString: (obj, property, locStr, translatedObj) => {
|
|
26246
|
+
res.push(locStr);
|
|
26247
|
+
},
|
|
26248
|
+
onCreateNewTranslateObj: (obj, property, translateObj) => {
|
|
26249
|
+
return undefined;
|
|
26250
|
+
}
|
|
26251
|
+
};
|
|
26252
|
+
collectStringsByObj(survey, options, undefined);
|
|
26253
|
+
return res;
|
|
26254
|
+
}
|
|
26255
|
+
function collectStringsByObj(obj, options, translateObj) {
|
|
26256
|
+
if (isItemValueArray(obj)) {
|
|
26257
|
+
createItemValuesLocale(obj, options, translateObj);
|
|
26258
|
+
return;
|
|
26259
|
+
}
|
|
26260
|
+
if (!obj || !obj.getType)
|
|
26261
|
+
return;
|
|
26262
|
+
let properties = getLocalizedProperties(obj, options);
|
|
26263
|
+
for (let i = 0; i < properties.length; i++) {
|
|
26264
|
+
addLocalizationItem(obj, options, properties[i], translateObj);
|
|
26265
|
+
}
|
|
26266
|
+
properties = getArrayProperties(obj);
|
|
26267
|
+
for (var i = 0; i < properties.length; i++) {
|
|
26268
|
+
var property = properties[i];
|
|
26269
|
+
var value = obj[property.name];
|
|
26270
|
+
//If ItemValue array?
|
|
26271
|
+
if (isItemValueArray(value)) {
|
|
26272
|
+
if (canShowProperty("itemvalue-array", options, obj, property, Array.isArray(value) && value.length > 0)) {
|
|
26273
|
+
createGroup(options, obj[property.name], property, translateObj);
|
|
26274
|
+
}
|
|
26275
|
+
}
|
|
26276
|
+
else {
|
|
26277
|
+
for (let i = 0; i < value.length; i++) {
|
|
26278
|
+
createGroup(options, value[i], property, translateObj);
|
|
26279
|
+
}
|
|
26280
|
+
}
|
|
26281
|
+
}
|
|
26282
|
+
createMatrixCellsGroup(options, obj, translateObj);
|
|
26283
|
+
}
|
|
26284
|
+
function isItemValueArray(val) {
|
|
26285
|
+
return (!!val &&
|
|
26286
|
+
Array.isArray(val) &&
|
|
26287
|
+
val.length > 0 &&
|
|
26288
|
+
!!val[0] &&
|
|
26289
|
+
!!val[0]["getType"] &&
|
|
26290
|
+
!!val[0]["setData"] &&
|
|
26291
|
+
!!val[0]["setLocText"]);
|
|
26292
|
+
}
|
|
26293
|
+
function addLocalizationItem(obj, options, property, translateObj) {
|
|
26294
|
+
const locStr = getLocalizableStr(obj, property);
|
|
26295
|
+
if (!locStr)
|
|
26296
|
+
return;
|
|
26297
|
+
const defaultValue = getDefaultValue(obj, property);
|
|
26298
|
+
if (canShowProperty("add-locsr", options, obj, property, !locStr.isEmpty, defaultValue)) {
|
|
26299
|
+
options.onAddLocalizedString(obj, property, locStr, translateObj);
|
|
26300
|
+
}
|
|
26301
|
+
}
|
|
26302
|
+
function createItemValuesLocale(obj, options, translateObj) {
|
|
26303
|
+
for (let i = 0; i < obj.length; i++) {
|
|
26304
|
+
const val = obj[i];
|
|
26305
|
+
addPropertiesForItemValue(val, options, translateObj);
|
|
26306
|
+
}
|
|
26307
|
+
}
|
|
26308
|
+
function addPropertiesForItemValue(itemValue, options, translateObj) {
|
|
26309
|
+
const locProperties = getLocalizedProperties(itemValue, options, false);
|
|
26310
|
+
for (let i = 0; i < locProperties.length; i++) {
|
|
26311
|
+
const prop = locProperties[i];
|
|
26312
|
+
const isText = prop.name === "text";
|
|
26313
|
+
const reason = isText ? "itemvalue-text" : "itemvalue-customprop";
|
|
26314
|
+
const defValue = isText ? itemValue.value : undefined;
|
|
26315
|
+
const canshow = canShowProperty(reason, options, itemValue, prop, true, defValue);
|
|
26316
|
+
if (!canshow && isText)
|
|
26317
|
+
break;
|
|
26318
|
+
if (canshow) {
|
|
26319
|
+
options.onAddLocalizedString(itemValue, prop, getLocalizableStr(itemValue, prop), translateObj);
|
|
26320
|
+
}
|
|
26321
|
+
}
|
|
26322
|
+
}
|
|
26323
|
+
function getLocalizedProperties(obj, options, checkIsShowing = true) {
|
|
26324
|
+
const res = new Array();
|
|
26325
|
+
const properties = Serializer.getPropertiesByObj(obj);
|
|
26326
|
+
for (let i = 0; i < properties.length; i++) {
|
|
26327
|
+
const property = properties[i];
|
|
26328
|
+
if (property.readOnly || !property.visible || !property.isSerializable || !property.isLocalizable)
|
|
26329
|
+
continue;
|
|
26330
|
+
const isShowing = ["url", "file"].indexOf(property.type) < 0;
|
|
26331
|
+
if (!checkIsShowing || canShowProperty("get-property", options, obj, property, isShowing)) {
|
|
26332
|
+
res.push(property);
|
|
26333
|
+
}
|
|
26334
|
+
}
|
|
26335
|
+
return res;
|
|
26336
|
+
}
|
|
26337
|
+
function getArrayProperties(obj) {
|
|
26338
|
+
var res = new Array();
|
|
26339
|
+
var properties = Serializer.getPropertiesByObj(obj);
|
|
26340
|
+
for (var i = 0; i < properties.length; i++) {
|
|
26341
|
+
var property = properties[i];
|
|
26342
|
+
if (property.isSerializable === false)
|
|
26343
|
+
continue;
|
|
26344
|
+
var value = obj[property.name];
|
|
26345
|
+
if (!!value && Array.isArray(value) && value.length > 0) {
|
|
26346
|
+
res.push(property);
|
|
26347
|
+
}
|
|
26348
|
+
}
|
|
26349
|
+
return res;
|
|
26350
|
+
}
|
|
26351
|
+
function getLocalizableStr(obj, prop) {
|
|
26352
|
+
return obj[prop.serializationProperty];
|
|
26353
|
+
}
|
|
26354
|
+
function createGroup(options, obj, property, translateObj) {
|
|
26355
|
+
if (!!obj && (obj.getType || Array.isArray(obj))) {
|
|
26356
|
+
translateObj = options.onCreateNewTranslateObj(obj, property, translateObj);
|
|
26357
|
+
collectStringsByObj(obj, options, translateObj);
|
|
26358
|
+
}
|
|
26359
|
+
}
|
|
26360
|
+
function canShowProperty(reason, options, obj, property, isShowing, defaultValue) {
|
|
26361
|
+
if (options.canShowProperty) {
|
|
26362
|
+
return options.canShowProperty(reason, obj, property, getLocalizableStr(obj, property), isShowing, defaultValue);
|
|
26363
|
+
}
|
|
26364
|
+
return isShowing;
|
|
26365
|
+
}
|
|
26366
|
+
function createMatrixCellsGroup(options, obj, translateObj) {
|
|
26367
|
+
Serializer.getPropertiesByObj(obj).forEach(prop => {
|
|
26368
|
+
if (prop.type === "cells" && canShowProperty("matrix-cell", options, obj, prop, true)) {
|
|
26369
|
+
createMatrixCellsGroupCore(options, obj, prop, translateObj);
|
|
26370
|
+
}
|
|
26371
|
+
});
|
|
26372
|
+
}
|
|
26373
|
+
function createMatrixCellsGroupCore(options, obj, prop, translateObj) {
|
|
26374
|
+
const cells = obj[prop.name];
|
|
26375
|
+
if (cells.isEmpty)
|
|
26376
|
+
return;
|
|
26377
|
+
const matrix = obj;
|
|
26378
|
+
translateObj = options.onCreateNewTranslateObj(obj, prop, translateObj);
|
|
26379
|
+
const defaultName = settings$1.matrix.defaultRowName;
|
|
26380
|
+
const rows = [defaultName];
|
|
26381
|
+
matrix.rows.forEach(row => rows.push(row.value));
|
|
26382
|
+
rows.forEach(val => {
|
|
26383
|
+
matrix.columns.forEach(col => {
|
|
26384
|
+
const locStr = cells.getCellDisplayLocText(val, col);
|
|
26385
|
+
if (!!locStr) {
|
|
26386
|
+
options.onAddLocalizedString(obj, prop, locStr, translateObj);
|
|
26387
|
+
}
|
|
26388
|
+
});
|
|
26389
|
+
});
|
|
26390
|
+
}
|
|
26391
|
+
function getDefaultValue(obj, prop) {
|
|
26392
|
+
const locStr = getLocalizableStr(obj, prop);
|
|
26393
|
+
if (!locStr)
|
|
26394
|
+
return "";
|
|
26395
|
+
if (prop.name == "title") {
|
|
26396
|
+
if (!!locStr && !obj.isPage && !obj.isPanel && !!locStr.onGetTextCallback)
|
|
26397
|
+
return obj["name"];
|
|
26398
|
+
}
|
|
26399
|
+
return "";
|
|
26400
|
+
}
|
|
26401
|
+
function isTextNonTranslated(text) {
|
|
26402
|
+
if (!text)
|
|
26403
|
+
return true;
|
|
26404
|
+
if (Helpers.isNumber(text))
|
|
26405
|
+
return true;
|
|
26406
|
+
return text.length < 2;
|
|
26407
|
+
}
|
|
26408
|
+
|
|
26202
26409
|
var iconsV1Data = {
|
|
26203
26410
|
"actual-size-24x24": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M10 6C7.79 6 6 7.79 6 10C6 12.21 7.79 14 10 14C12.21 14 14 12.21 14 10C14 7.79 12.21 6 10 6ZM10 12C8.9 12 8 11.1 8 10C8 8.9 8.9 8 10 8C11.1 8 12 8.9 12 10C12 11.1 11.1 12 10 12ZM22.71 21.29L17.03 15.61C18.26 14.07 19 12.12 19 10C19 5.04 14.96 1 10 1C5.04 1 1 5.04 1 10C1 14.96 5.04 19 10 19C12.12 19 14.07 18.26 15.61 17.03L21.29 22.71L22.7 21.3L22.71 21.29ZM3 10C3 6.14 6.14 3 10 3C13.86 3 17 6.14 17 10C17 13.86 13.86 17 10 17C6.14 17 3 13.86 3 10Z\"></path></svg>",
|
|
26204
26411
|
"add-16x16": "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_554_309816)\"><path d=\"M9 7H12V9H9V12H7V9H4V7H7V4H9V7ZM16 8C16 12.4 12.4 16 8 16C3.6 16 0 12.4 0 8C0 3.6 3.6 0 8 0C12.4 0 16 3.6 16 8ZM14 8C14 4.7 11.3 2 8 2C4.7 2 2 4.7 2 8C2 11.3 4.7 14 8 14C11.3 14 14 11.3 14 8Z\"></path></g><defs><clipPath id=\"clip0_554_309816\"><rect width=\"16\" height=\"16\" fill=\"white\"></rect></clipPath></defs></svg>",
|
|
@@ -27627,7 +27834,6 @@ class SurveyCreatorModel extends Base {
|
|
|
27627
27834
|
*
|
|
27628
27835
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
27629
27836
|
*
|
|
27630
|
-
*
|
|
27631
27837
|
* Within the event handler, you need to pass translation strings and locale information to the translation service API. The service should return an array of translated strings that you need to pass to the `options.callback` function. The following code shows how to integrate the Microsoft Translator service into Survey Creator:
|
|
27632
27838
|
*
|
|
27633
27839
|
* ```js
|
|
@@ -27673,6 +27879,7 @@ class SurveyCreatorModel extends Base {
|
|
|
27673
27879
|
* ```
|
|
27674
27880
|
*
|
|
27675
27881
|
* > Survey Creator does not include a machine translation service out of the box. Our component only provides a UI for calling the service API.
|
|
27882
|
+
* @see startMachineTranslationTo
|
|
27676
27883
|
*/
|
|
27677
27884
|
this.onMachineTranslate = this.addCreatorEvent();
|
|
27678
27885
|
/**
|
|
@@ -27986,6 +28193,13 @@ class SurveyCreatorModel extends Base {
|
|
|
27986
28193
|
* Default value: `false`
|
|
27987
28194
|
*/
|
|
27988
28195
|
this.collapseOnDrag = false;
|
|
28196
|
+
/**
|
|
28197
|
+
* Specifies whether to clear translations to other languages when a source language translation is changed.
|
|
28198
|
+
*
|
|
28199
|
+
* Default value: `false`
|
|
28200
|
+
* @see showTranslationTab
|
|
28201
|
+
*/
|
|
28202
|
+
this.clearTranslationsOnSourceTextChange = false;
|
|
27989
28203
|
if (!!options2 ||
|
|
27990
28204
|
typeof this.options === "string" ||
|
|
27991
28205
|
this.options instanceof String) {
|
|
@@ -29016,9 +29230,52 @@ class SurveyCreatorModel extends Base {
|
|
|
29016
29230
|
options.value = options.newValue;
|
|
29017
29231
|
this.onAfterPropertyChanged.fire(this, options);
|
|
29018
29232
|
}
|
|
29233
|
+
this.clearLocalizationStrings(options.target, options.name);
|
|
29019
29234
|
options.type = "PROPERTY_CHANGED";
|
|
29020
29235
|
this.setModified(options);
|
|
29021
29236
|
}
|
|
29237
|
+
clearLocalizationStrings(el, name) {
|
|
29238
|
+
if (this.clearTranslationsOnSourceTextChange) {
|
|
29239
|
+
const loc = this.survey.locale;
|
|
29240
|
+
if (!!loc && loc !== surveyLocalization.defaultLocale)
|
|
29241
|
+
return;
|
|
29242
|
+
if ((el.isQuestion || Serializer.isDescendantOf(el.getType(), "matrixdropdowncolumn")) && name === "name") {
|
|
29243
|
+
this.clearNonDefaultLocalesInStrByValue(el.locTitle);
|
|
29244
|
+
}
|
|
29245
|
+
else {
|
|
29246
|
+
if (Serializer.isDescendantOf(el.getType(), "itemvalue") && name === "value") {
|
|
29247
|
+
this.clearNonDefaultLocalesInStrByValue(el.locText);
|
|
29248
|
+
}
|
|
29249
|
+
else {
|
|
29250
|
+
const prop = Serializer.findProperty(el.getType(), name);
|
|
29251
|
+
if (prop && prop.isLocalizable && prop.serializationProperty) {
|
|
29252
|
+
const locStr = el[prop.serializationProperty];
|
|
29253
|
+
this.clearNonDefaultLocalesInStr(locStr);
|
|
29254
|
+
}
|
|
29255
|
+
}
|
|
29256
|
+
}
|
|
29257
|
+
}
|
|
29258
|
+
}
|
|
29259
|
+
clearNonDefaultLocalesInStrByValue(locStr) {
|
|
29260
|
+
if (!locStr.isEmpty && !locStr.getLocaleText("")) {
|
|
29261
|
+
this.clearNonDefaultLocalesInStr(locStr);
|
|
29262
|
+
}
|
|
29263
|
+
}
|
|
29264
|
+
clearNonDefaultLocalesInStr(locStr) {
|
|
29265
|
+
if (locStr) {
|
|
29266
|
+
const ctrl = this.undoRedoController;
|
|
29267
|
+
if (ctrl)
|
|
29268
|
+
ctrl.ignoreChanges = true;
|
|
29269
|
+
const locs = locStr.getLocales();
|
|
29270
|
+
locs.forEach(l => {
|
|
29271
|
+
if (l !== surveyLocalization.defaultLocale && l !== "default") {
|
|
29272
|
+
locStr.setLocaleText(l, "");
|
|
29273
|
+
}
|
|
29274
|
+
});
|
|
29275
|
+
if (ctrl)
|
|
29276
|
+
ctrl.ignoreChanges = false;
|
|
29277
|
+
}
|
|
29278
|
+
}
|
|
29022
29279
|
notifySurveyItemMoved(options) {
|
|
29023
29280
|
options.type = "ELEMENT_REORDERED";
|
|
29024
29281
|
this.setModified(options);
|
|
@@ -30102,6 +30359,17 @@ class SurveyCreatorModel extends Base {
|
|
|
30102
30359
|
this.onMachineTranslate.fire(this, { fromLocale: fromLocale, toLocale: toLocale, strings: strings, callback: callback });
|
|
30103
30360
|
}
|
|
30104
30361
|
}
|
|
30362
|
+
/**
|
|
30363
|
+
* Starts the translation of survey strings from the default language to one or more specified languages using a machine translation service, such as Google Translate or Microsoft Translator.
|
|
30364
|
+
*
|
|
30365
|
+
* This method only launches the operation by raising the [`onMachineTranslate`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onMachineTranslate) event. Handle this event to perform the actual translation.
|
|
30366
|
+
* @param locales An array of locale codes that correspond to target languages, for example, `[ "de", "fr" ]`.
|
|
30367
|
+
*/
|
|
30368
|
+
startMachineTranslationTo(locales) {
|
|
30369
|
+
if (!this.getHasMachineTranslation())
|
|
30370
|
+
return;
|
|
30371
|
+
doMachineStringsTranslation(this.survey, this, locales);
|
|
30372
|
+
}
|
|
30105
30373
|
doAutoSave() {
|
|
30106
30374
|
const saveFunc = () => this.doSave();
|
|
30107
30375
|
if (this.autoSaveDelay <= 0) {
|
|
@@ -34213,9 +34481,9 @@ class FastEntryEditor extends FastEntryEditorBase {
|
|
|
34213
34481
|
if (item) {
|
|
34214
34482
|
item.text = src[i].text;
|
|
34215
34483
|
names.forEach((name) => {
|
|
34216
|
-
if (name
|
|
34217
|
-
|
|
34218
|
-
|
|
34484
|
+
if (name !== "value") {
|
|
34485
|
+
item[name] = src[i][name];
|
|
34486
|
+
}
|
|
34219
34487
|
});
|
|
34220
34488
|
src.splice(i, 1, item);
|
|
34221
34489
|
}
|
|
@@ -34270,16 +34538,12 @@ class PropertyGridEditorMatrix extends PropertyGridEditor {
|
|
|
34270
34538
|
if (cellQuestion.getType() === "text" && !!objType) {
|
|
34271
34539
|
if (propertyName === "text" && objType === "itemvalue") {
|
|
34272
34540
|
cellQuestion.placeholder = new ComputedUpdater(() => {
|
|
34273
|
-
|
|
34274
|
-
return rowObj.value.toString();
|
|
34275
|
-
return rowObj.text;
|
|
34541
|
+
return rowObj.locText.getPlaceholder();
|
|
34276
34542
|
});
|
|
34277
34543
|
}
|
|
34278
34544
|
if (propertyName === "title" && (objType === "matrixdropdowncolumn" || objType === "multipletextitem")) {
|
|
34279
34545
|
cellQuestion.placeholder = new ComputedUpdater(() => {
|
|
34280
|
-
|
|
34281
|
-
return rowObj.name;
|
|
34282
|
-
return rowObj.title;
|
|
34546
|
+
return rowObj.locTitle.getPlaceholder();
|
|
34283
34547
|
});
|
|
34284
34548
|
}
|
|
34285
34549
|
}
|
|
@@ -35759,8 +36023,8 @@ class CreatorPreset extends CreatorPresetBase {
|
|
|
35759
36023
|
}
|
|
35760
36024
|
|
|
35761
36025
|
let Version;
|
|
35762
|
-
Version = `${"2.0.
|
|
35763
|
-
checkLibraryVersion(`${"2.0.
|
|
36026
|
+
Version = `${"2.0.2"}`;
|
|
36027
|
+
checkLibraryVersion(`${"2.0.2"}`, "survey-creator-core");
|
|
35764
36028
|
|
|
35765
36029
|
export { AceJsonEditorModel, ColorCalculator, CreatorAction, CreatorBase, CreatorEvent, CreatorPreset, CreatorPresetBase, CreatorPresetPropertyGrid, CreatorPresetPropertyGridDefinition, CreatorPresetTabs, CreatorPresetToolbox, CreatorPresetToolboxConfigurator, CreatorPresetToolboxDefinition, CreatorResponsivityManager, CreatorThemeModel, CreatorThemes, DEFAULT_MONITOR_DPI, DefaultFonts, DragDropSurveyElements, EditorLocalization, EmptySurveyCreatorOptions, FooterToolbarActionContainer, HEXToRGB, HSBToRGB, HueColorCalculator, ImageItemValueWrapperViewModel, ItemValueWrapperViewModel, JsonDuplicateNameError, JsonEditorBaseModel, LogicEvent, LogoImageViewModel, MatrixCellWrapperEditSurvey, MatrixCellWrapperViewModel, MenuButton, ObjType, ObjectSelector, ObjectSelectorItem, ObjectSelectorModel, PageAdorner, PageNavigatorViewModel, PagesController, PredefinedBackgroundColors, PredefinedColors, PredefinedCreatorThemes, PredefinedThemes, PropertyEditorSetupValue, PropertyGridCellsEditor, PropertyGridEditor, PropertyGridEditorBackgroundCornerRadius, PropertyGridEditorBindings, PropertyGridEditorBoolean, PropertyGridEditorCollection, PropertyGridEditorColor, PropertyGridEditorColorWithAlpha, PropertyGridEditorCondition, PropertyGridEditorDateTime, PropertyGridEditorDropdown, PropertyGridEditorExpression, PropertyGridEditorFontSettings, PropertyGridEditorHtml, PropertyGridEditorImageSize, PropertyGridEditorMatrix, PropertyGridEditorMatrixCalculatedValues, PropertyGridEditorMatrixColumns, PropertyGridEditorMatrixHtmlConditions, PropertyGridEditorMatrixItemValues, PropertyGridEditorMatrixLayoutColumns, PropertyGridEditorMatrixMultipleTypes, PropertyGridEditorMatrixMutlipleTextItems, PropertyGridEditorMatrixPages, PropertyGridEditorMatrixRateValues, PropertyGridEditorMatrixTriggers, PropertyGridEditorMatrixUrlConditions, PropertyGridEditorMatrixValidators, PropertyGridEditorNumber, PropertyGridEditorPage, PropertyGridEditorQuestion, PropertyGridEditorQuestionCarryForward, PropertyGridEditorQuestionHeader, PropertyGridEditorQuestionMaskSettings, PropertyGridEditorQuestionRestfull, PropertyGridEditorQuestionSelectBase, PropertyGridEditorQuestionValue, PropertyGridEditorSet, PropertyGridEditorShadowEffects, PropertyGridEditorSpinEdit, PropertyGridEditorString, PropertyGridEditorStringArray, PropertyGridEditorStringBase, PropertyGridEditorSwitchToggle, PropertyGridEditorText, PropertyGridEditorUndefinedBoolean, PropertyGridLinkEditor, PropertyGridModel, PropertyGridPanelValueEditor, PropertyGridRowValueEditor, PropertyGridTitleActionsCreator, PropertyGridTriggerValueEditor, PropertyGridTriggerValueInLogicEditor, PropertyGridValueEditor, PropertyGridValueEditorBase, PropertyGridViewModel, PropertyJSONGenerator, QuestionAdornerViewModel, QuestionColorModel, QuestionCommentWithResetModel, QuestionConvertMode, QuestionConverter, QuestionDropdownAdornerViewModel, QuestionEmbeddedSurveyModel, QuestionFileEditorModel, QuestionImageAdornerViewModel, QuestionLinkValueModel, QuestionRatingAdornerViewModel, QuestionSpinEditorModel, QuestionTextWithResetModel, QuestionToolbox, QuestionToolboxCategory, QuestionToolboxItem, RGBToHSB, ResetValueAdorner, ResizeManager, RowViewModel, ScrollViewModel, SearchManager, SearchManagerPropertyGrid, SearchManagerToolbox, SidebarHeaderModel, SidebarModel, SidebarPageModel, StringEditorConnector, StringEditorViewModelBase, StringItemsNavigatorBase, SurveyCreatorModel, SurveyHelper, SurveyJSON5, SurveyLogic, SurveyLogicUI, SurveyQuestionEditorDefinition, SurveyQuestionEditorPropertyDefinition, SurveyQuestionEditorTabDefinition, SurveyQuestionProperties, SurveyResultsItemModel, SurveyResultsModel, SurveySimulatorModel, SurveyTextWorker, SurveyTextWorkerError, SurveyTextWorkerJsonError, SurveyTextWorkerParserError, Switcher, TabControlModel, TabDesignerPlugin, TabDesignerViewModel, TabJsonEditorAcePlugin, TabJsonEditorBasePlugin, TabJsonEditorTextareaPlugin, TabLogicPlugin, TabTestPlugin, TabTranslationPlugin, TabbedMenuContainer, TabbedMenuItem, TestSurveyTabViewModel, TextareaJsonEditorModel, ThemeModelEditorDefinition, ThemeTabPlugin, ThemeTabViewModel, Themes, ToolbarActionContainer, ToolboxToolViewModel, Transaction, Translation, TranslationEditor, TranslationForEditor, TranslationGroup, TranslationItem, TranslationItemBase, TranslationItemString, UndoRedoAction, UndoRedoArrayAction, UndoRedoManager, UndoRedoPlugin, Version, assign, assignDefaultClasses, backgroundCornerRadiusFromCssVariable, backgroundCornerRadiusToCssVariable, calculateDragOverLocation, calculateIsEdge, calculateIsSide, capitalize, clearNewLines, colorsAreEqual, convertRgbaToString, copyCssClasses, copyObject, createBoxShadow, createBoxShadowReset, createColor, createExportCSVAction, createImportCSVAction, creatorThemeModelEditorDefinition, creatorThemeModelPropertyGridDefinition, defaultCreatorThemesOrder, defaultPropertyGridDefinition, defaultStrings, defaultThemesOrder, editableStringRendererName, editorLocalization, enStrings, findParentNode, focusFirstControl, fontsettingsFromCssVariable, fontsettingsToCssVariable, getAcceptedTypesByContentMode, getElementWrapperComponentData, getElementWrapperComponentName, getFirstNonTextElement, getItemValueWrapperComponentData, getItemValueWrapperComponentName, getLocString, getLocaleStrings, getNextItemText, getNextItemValue, getNextValue, getNodesFromKoComponentInfo, getOS, getPredefinedBackgoundColorsChoices, getPredefinedColorsItemValues, getQuestionContentWrapperComponentName, getQuestionFromObj, getRGBaChannelValues, iconsV1, iconsV2, ignoreUndoRedo, imageMimeTypes, ingectAlpha, initLogicOperator, initialSettingsAllowShowEmptyTitleInDesignMode, initializeDesignTimeSurveyModel, isStringEditable, isTextInput, listComponentCss, editorLocalization as localization, logicCss, notShortCircuitAnd, parseBoxShadow, parseColor, parseRgbaFromString, propertyGridCss, registerAdorner, registerCreatorTheme, registerSurveyTheme, removeAdorners, roundTo2Decimals, saveToFileHandler, scrollElementIntoView, select, setSurveyJSONForPropertyGrid, settings, setupLocale, simulatorDevices, svgBundle, themeModelPropertyGridDefinition, toggleHovered, translationCss, trimBoxShadowValue, trimEmptyFields, undoRedoTransaction, updateBackgroundCornerRadiusJSON, updateFontSettingsJSON, updateShadowEffectsJSON, updatecoloralphaJSON, wrapTextByCurlyBraces };
|
|
35766
36030
|
//# sourceMappingURL=survey-creator-core.js.map
|