survey-creator-core 2.3.2 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm/i18n/arabic.mjs +1 -1
- package/fesm/i18n/bulgarian.mjs +1 -1
- package/fesm/i18n/burmese.mjs +1 -1
- package/fesm/i18n/croatian.mjs +1 -1
- package/fesm/i18n/czech.mjs +1 -1
- package/fesm/i18n/danish.mjs +1 -1
- package/fesm/i18n/dutch.mjs +1 -1
- package/fesm/i18n/english.mjs +1 -1
- package/fesm/i18n/finnish.mjs +1 -1
- package/fesm/i18n/french.mjs +1 -1
- package/fesm/i18n/german.mjs +1 -1
- package/fesm/i18n/greek.mjs +1 -1
- package/fesm/i18n/haitian-creole.mjs +1 -1
- package/fesm/i18n/hebrew.mjs +1 -1
- package/fesm/i18n/hungarian.mjs +1 -1
- package/fesm/i18n/index.mjs +1 -1
- package/fesm/i18n/indonesian.mjs +1 -1
- package/fesm/i18n/italian.mjs +1 -1
- package/fesm/i18n/japanese.mjs +1 -1
- package/fesm/i18n/korean.mjs +1 -1
- package/fesm/i18n/malay.mjs +1 -1
- package/fesm/i18n/mongolian.mjs +1 -1
- package/fesm/i18n/norwegian.mjs +1 -1
- package/fesm/i18n/persian.mjs +1 -1
- package/fesm/i18n/polish.mjs +1 -1
- package/fesm/i18n/portuguese.mjs +1 -1
- package/fesm/i18n/romanian.mjs +1 -1
- package/fesm/i18n/russian.mjs +1 -1
- package/fesm/i18n/simplified-chinese.mjs +1 -1
- package/fesm/i18n/slovak.mjs +1 -1
- package/fesm/i18n/slovenian.mjs +1 -1
- package/fesm/i18n/spanish.mjs +1 -1
- package/fesm/i18n/swedish.mjs +1 -1
- package/fesm/i18n/tajik.mjs +1 -1
- package/fesm/i18n/thai.mjs +1 -1
- package/fesm/i18n/traditional-chinese.mjs +1 -1
- package/fesm/i18n/turkish.mjs +1 -1
- package/fesm/survey-creator-core.i18n.mjs +1 -1
- package/fesm/survey-creator-core.mjs +106 -36
- package/fesm/survey-creator-core.mjs.map +1 -1
- package/fesm/themes/index.mjs +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/greek.js +1 -1
- package/i18n/greek.min.js.LICENSE.txt +1 -1
- package/i18n/haitian-creole.js +1 -1
- package/i18n/haitian-creole.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 +31 -26
- package/survey-creator-core.fontless.css +30 -25
- 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 +115 -37
- 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/components/search-manager.d.ts +4 -0
- package/typings/components/tabs/logic-actions-model.d.ts +1 -0
- package/typings/components/tabs/translation.d.ts +1 -1
- package/typings/editorLocalization.d.ts +1 -0
- package/typings/tabbed-menu.d.ts +1 -0
- package/typings/toolbox.d.ts +9 -1
- package/typings/utils/color-utils.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v2.3.
|
|
2
|
+
* SurveyJS Creator v2.3.4
|
|
3
3
|
* (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -2025,6 +2025,7 @@ class EditorLocalization {
|
|
|
2025
2025
|
this.reset();
|
|
2026
2026
|
}
|
|
2027
2027
|
}
|
|
2028
|
+
get locale() { return this.currentLocale || this.defaultLocale; }
|
|
2028
2029
|
get presetStrings() { return this.presetStringsValues; }
|
|
2029
2030
|
set presetStrings(val) {
|
|
2030
2031
|
this.presetStringsValues = val;
|
|
@@ -2270,12 +2271,9 @@ class EditorLocalization {
|
|
|
2270
2271
|
return this.convertToCamelCase(propName);
|
|
2271
2272
|
}
|
|
2272
2273
|
getPropertyValueInEditor(propName, value) {
|
|
2273
|
-
const
|
|
2274
|
-
if (!!
|
|
2275
|
-
|
|
2276
|
-
if (!!res)
|
|
2277
|
-
return res;
|
|
2278
|
-
}
|
|
2274
|
+
const res = this.getStringByPath(["pv", propName, value]);
|
|
2275
|
+
if (!!res && res !== value)
|
|
2276
|
+
return res;
|
|
2279
2277
|
return this.getPropertyValue(value);
|
|
2280
2278
|
}
|
|
2281
2279
|
getPropertyValue(value, locale = null) {
|
|
@@ -4433,6 +4431,15 @@ class SearchManager extends Base {
|
|
|
4433
4431
|
clearFilterString() {
|
|
4434
4432
|
this.filterString = "";
|
|
4435
4433
|
}
|
|
4434
|
+
get enabled() {
|
|
4435
|
+
return this._enabled;
|
|
4436
|
+
}
|
|
4437
|
+
set enabled(value) {
|
|
4438
|
+
this._enabled = value;
|
|
4439
|
+
}
|
|
4440
|
+
getTabIndex() {
|
|
4441
|
+
return this.enabled ? 0 : -1;
|
|
4442
|
+
}
|
|
4436
4443
|
onPropertyValueChanged(name, oldValue, newValue) {
|
|
4437
4444
|
super.onPropertyValueChanged(name, oldValue, newValue);
|
|
4438
4445
|
if (name === "filterString") {
|
|
@@ -4442,6 +4449,7 @@ class SearchManager extends Base {
|
|
|
4442
4449
|
constructor() {
|
|
4443
4450
|
super();
|
|
4444
4451
|
this.searchActionBar = new ActionContainer();
|
|
4452
|
+
this._enabled = true;
|
|
4445
4453
|
this.initActionBar();
|
|
4446
4454
|
}
|
|
4447
4455
|
dispose() {
|
|
@@ -4850,9 +4858,12 @@ class QuestionToolbox extends AdaptiveActionContainer {
|
|
|
4850
4858
|
title: surveyLocalization.getString("ed.toolboxSearch"),
|
|
4851
4859
|
showTitle: false,
|
|
4852
4860
|
action: () => {
|
|
4861
|
+
if (!this.enabled)
|
|
4862
|
+
return;
|
|
4853
4863
|
this.rootElement.querySelector("input").focus();
|
|
4854
4864
|
this.isFocused = true;
|
|
4855
|
-
}
|
|
4865
|
+
},
|
|
4866
|
+
enabled: this.enabled
|
|
4856
4867
|
});
|
|
4857
4868
|
this.updateResponsiveness(this.isCompact, this.overflowBehavior);
|
|
4858
4869
|
this.createDefaultItems(supportedQuestions, useDefaultCategories);
|
|
@@ -4870,13 +4881,15 @@ class QuestionToolbox extends AdaptiveActionContainer {
|
|
|
4870
4881
|
this.dotsItem.popupModel.verticalPosition = "top";
|
|
4871
4882
|
this.dragOrClickHelper = new DragOrClickHelper((pointerDownEvent, _targets, itemModel) => {
|
|
4872
4883
|
var _a;
|
|
4884
|
+
if (!this.enabled)
|
|
4885
|
+
return;
|
|
4873
4886
|
const json = this.creator.getJSONForNewElement(itemModel.json);
|
|
4874
4887
|
this.dotsItem.popupModel.hide();
|
|
4875
4888
|
(_a = this.creator) === null || _a === void 0 ? void 0 : _a.onDragDropItemStart();
|
|
4876
4889
|
this.dragDropHelper.startDragToolboxItem(pointerDownEvent, json, itemModel);
|
|
4877
4890
|
}, false);
|
|
4878
4891
|
this.hiddenItemsListModel.onPointerDown = (pointerDownEvent, item) => {
|
|
4879
|
-
if (!this.creator.readOnly) {
|
|
4892
|
+
if (!this.creator.readOnly && this.enabled) {
|
|
4880
4893
|
this.dragOrClickHelper.onPointerDown(pointerDownEvent, item);
|
|
4881
4894
|
}
|
|
4882
4895
|
};
|
|
@@ -4941,7 +4954,9 @@ class QuestionToolbox extends AdaptiveActionContainer {
|
|
|
4941
4954
|
.append("svc-toolbox--flyout-to-compact-running", this.isFlyoutToCompactRunning)
|
|
4942
4955
|
.append("svc-toolbox--compact", this.isCompactRendered)
|
|
4943
4956
|
.append("svc-toolbox--flyout", this.isCompact && this.isFocused)
|
|
4944
|
-
.append("svc-toolbox--scrollable", this.overflowBehavior == "scroll")
|
|
4957
|
+
.append("svc-toolbox--scrollable", this.overflowBehavior == "scroll")
|
|
4958
|
+
.append("svc-toolbox--disabled", !this.enabled)
|
|
4959
|
+
.toString();
|
|
4945
4960
|
}
|
|
4946
4961
|
setLocation(toolboxLocation) {
|
|
4947
4962
|
if (toolboxLocation === "sidebar") {
|
|
@@ -5091,6 +5106,9 @@ class QuestionToolbox extends AdaptiveActionContainer {
|
|
|
5091
5106
|
this.onItemsChanged();
|
|
5092
5107
|
}
|
|
5093
5108
|
correctItem(item) {
|
|
5109
|
+
if (!item.id)
|
|
5110
|
+
item.id = item.name;
|
|
5111
|
+
this.updateActionTitle(item);
|
|
5094
5112
|
if (!item.title)
|
|
5095
5113
|
item.title = item.name;
|
|
5096
5114
|
if (!item.tooltip)
|
|
@@ -5231,8 +5249,21 @@ class QuestionToolbox extends AdaptiveActionContainer {
|
|
|
5231
5249
|
});
|
|
5232
5250
|
}
|
|
5233
5251
|
updateActionTitle(action) {
|
|
5234
|
-
|
|
5235
|
-
|
|
5252
|
+
let newTitle = "";
|
|
5253
|
+
const titles = action["titles"];
|
|
5254
|
+
if (!!titles) {
|
|
5255
|
+
newTitle = titles[editorLocalization.locale];
|
|
5256
|
+
if (!newTitle) {
|
|
5257
|
+
newTitle = titles["default"];
|
|
5258
|
+
}
|
|
5259
|
+
}
|
|
5260
|
+
if (!newTitle) {
|
|
5261
|
+
newTitle = editorLocalization.getString("qt." + action.id);
|
|
5262
|
+
if (newTitle === action.id) {
|
|
5263
|
+
newTitle = "";
|
|
5264
|
+
}
|
|
5265
|
+
}
|
|
5266
|
+
if (!!newTitle) {
|
|
5236
5267
|
action.title = newTitle;
|
|
5237
5268
|
action.tooltip = newTitle;
|
|
5238
5269
|
}
|
|
@@ -5656,10 +5687,12 @@ class QuestionToolbox extends AdaptiveActionContainer {
|
|
|
5656
5687
|
}
|
|
5657
5688
|
delete elementJson.name;
|
|
5658
5689
|
var category = json.category ? json.category : "";
|
|
5690
|
+
const titles = typeof json.title === "object" ? json.title : undefined;
|
|
5659
5691
|
const item = new Action({
|
|
5660
5692
|
id: json.name,
|
|
5661
5693
|
name: json.name,
|
|
5662
5694
|
iconName: iconName,
|
|
5695
|
+
titles: titles,
|
|
5663
5696
|
title: title,
|
|
5664
5697
|
tooltip: title,
|
|
5665
5698
|
className: QuestionToolboxItem.getItemClassNames(iconName),
|
|
@@ -5667,7 +5700,9 @@ class QuestionToolbox extends AdaptiveActionContainer {
|
|
|
5667
5700
|
isCopied: false,
|
|
5668
5701
|
category: category
|
|
5669
5702
|
});
|
|
5670
|
-
|
|
5703
|
+
const res = this.getOrCreateToolboxItem(item);
|
|
5704
|
+
this.updateActionTitle(res);
|
|
5705
|
+
return res;
|
|
5671
5706
|
}
|
|
5672
5707
|
getTitleFromJsonTitle(title, name) {
|
|
5673
5708
|
if (!title)
|
|
@@ -5814,6 +5849,16 @@ __decorate([
|
|
|
5814
5849
|
__decorate([
|
|
5815
5850
|
property({ defaultValue: true })
|
|
5816
5851
|
], QuestionToolbox.prototype, "showSeparators", void 0);
|
|
5852
|
+
__decorate([
|
|
5853
|
+
property({
|
|
5854
|
+
defaultValue: true,
|
|
5855
|
+
onSet: (val, target) => {
|
|
5856
|
+
target.items.forEach(i => i.enabled = val);
|
|
5857
|
+
target.searchManager.enabled = val;
|
|
5858
|
+
target.searchItem.enabled = val;
|
|
5859
|
+
}
|
|
5860
|
+
})
|
|
5861
|
+
], QuestionToolbox.prototype, "enabled", void 0);
|
|
5817
5862
|
|
|
5818
5863
|
class SelectionHistory extends Base {
|
|
5819
5864
|
constructor(creator) {
|
|
@@ -7633,13 +7678,13 @@ class ColorCalculator {
|
|
|
7633
7678
|
this.colorSettings = [];
|
|
7634
7679
|
this.isInitialized = false;
|
|
7635
7680
|
}
|
|
7636
|
-
initializeColorSettings(baseColor,
|
|
7681
|
+
initializeColorSettings(baseColor, dependentColorValues) {
|
|
7637
7682
|
const baseColorRgba = getRGBaChannelValues(baseColor);
|
|
7638
|
-
|
|
7639
|
-
const
|
|
7640
|
-
const colorAlpha =
|
|
7683
|
+
dependentColorValues.forEach((dependentColor) => {
|
|
7684
|
+
const dependentColorRgba = getRGBaChannelValues(dependentColor);
|
|
7685
|
+
const colorAlpha = dependentColorRgba[3];
|
|
7641
7686
|
const baseColorHSB = RGBToHSB(baseColorRgba[0], baseColorRgba[1], baseColorRgba[2]);
|
|
7642
|
-
const colorHSB = RGBToHSB(
|
|
7687
|
+
const colorHSB = RGBToHSB(dependentColorRgba[0], dependentColorRgba[1], dependentColorRgba[2]);
|
|
7643
7688
|
const colorDelta = baseColorHSB[2] - colorHSB[2];
|
|
7644
7689
|
this.colorSettings.push({ colorAlpha, colorDelta });
|
|
7645
7690
|
});
|
|
@@ -16209,6 +16254,9 @@ class TranslationItem extends TranslationItemBase {
|
|
|
16209
16254
|
return placeholderText;
|
|
16210
16255
|
}
|
|
16211
16256
|
getTextForExport(loc) {
|
|
16257
|
+
const val = this.hashValues[loc];
|
|
16258
|
+
if (!!val && !!val.text)
|
|
16259
|
+
return val.text;
|
|
16212
16260
|
const res = this.locString.getLocaleText(loc);
|
|
16213
16261
|
if (!!res)
|
|
16214
16262
|
return res;
|
|
@@ -17160,7 +17208,7 @@ class Translation extends Base {
|
|
|
17160
17208
|
}
|
|
17161
17209
|
let res = [];
|
|
17162
17210
|
let headerRow = [];
|
|
17163
|
-
|
|
17211
|
+
const visibleLocales = this.locales;
|
|
17164
17212
|
headerRow.push("description ↓ - language →");
|
|
17165
17213
|
for (let i = 0; i < visibleLocales.length; i++) {
|
|
17166
17214
|
headerRow.push(!!visibleLocales[i] ? visibleLocales[i] : "default");
|
|
@@ -17251,7 +17299,7 @@ class Translation extends Base {
|
|
|
17251
17299
|
this.reset();
|
|
17252
17300
|
}
|
|
17253
17301
|
createTranslationEditor(locale) {
|
|
17254
|
-
const res = new TranslationEditor(this.survey, locale, this.options);
|
|
17302
|
+
const res = new TranslationEditor(this.survey, locale, this.options, this.translationStringVisibilityCallback);
|
|
17255
17303
|
res.onApply = () => {
|
|
17256
17304
|
this.reset();
|
|
17257
17305
|
};
|
|
@@ -17375,7 +17423,7 @@ class TranslationForEditor extends Translation {
|
|
|
17375
17423
|
}
|
|
17376
17424
|
}
|
|
17377
17425
|
class TranslationEditor {
|
|
17378
|
-
constructor(survey, locale, options) {
|
|
17426
|
+
constructor(survey, locale, options, translationStringVisibilityCallback) {
|
|
17379
17427
|
this.fromLocales = [];
|
|
17380
17428
|
this.survey = survey;
|
|
17381
17429
|
this.options = options;
|
|
@@ -17383,6 +17431,7 @@ class TranslationEditor {
|
|
|
17383
17431
|
this.translationValue = new TranslationForEditor(this.survey, this.options, (survey) => {
|
|
17384
17432
|
this.setupNavigationButtons(survey);
|
|
17385
17433
|
});
|
|
17434
|
+
this.translationValue.translationStringVisibilityCallback = translationStringVisibilityCallback;
|
|
17386
17435
|
this.translation.setEditMode(this.locale);
|
|
17387
17436
|
this.translation.reset();
|
|
17388
17437
|
this.fillFromLocales();
|
|
@@ -19456,9 +19505,8 @@ class LogicActionModel extends LogicActionModelBase {
|
|
|
19456
19505
|
updateCurrentLogicAction(survey) {
|
|
19457
19506
|
const selectedElement = this.getElementBySelectorName(this.panel);
|
|
19458
19507
|
const createNewAction = !this.initialLogicAction || this.initialLogicAction.logicType != this.logicType || (!!selectedElement && this.initialLogicAction.element != selectedElement);
|
|
19459
|
-
if (!createNewAction)
|
|
19508
|
+
if (!createNewAction)
|
|
19460
19509
|
return false;
|
|
19461
|
-
}
|
|
19462
19510
|
this.currentLogicAction = new SurveyLogicAction(this.logicType, selectedElement, survey);
|
|
19463
19511
|
return true;
|
|
19464
19512
|
}
|
|
@@ -19492,6 +19540,14 @@ class LogicActionSetValueModel extends LogicActionModel {
|
|
|
19492
19540
|
selectedElement.setValueExpression = this.panel.getQuestionByName("setValueExpression").value;
|
|
19493
19541
|
}
|
|
19494
19542
|
}
|
|
19543
|
+
updateCurrentLogicAction(survey) {
|
|
19544
|
+
const selectedElement = this.getElementBySelectorName(this.panel);
|
|
19545
|
+
if (selectedElement && !!selectedElement.setValueExpression) {
|
|
19546
|
+
this.afterUpdateInitialLogicAction();
|
|
19547
|
+
return false;
|
|
19548
|
+
}
|
|
19549
|
+
return super.updateCurrentLogicAction(survey);
|
|
19550
|
+
}
|
|
19495
19551
|
setValueExpressionValue() {
|
|
19496
19552
|
const selectedElement = this.getElementBySelectorName(this.panel);
|
|
19497
19553
|
if (!!selectedElement) {
|
|
@@ -26675,6 +26731,7 @@ class ExpandCollapseManager {
|
|
|
26675
26731
|
class TabbedMenuItem extends Action {
|
|
26676
26732
|
constructor(item) {
|
|
26677
26733
|
super(item);
|
|
26734
|
+
this.enabled = true;
|
|
26678
26735
|
}
|
|
26679
26736
|
getRootCss() {
|
|
26680
26737
|
return new CssClassBuilder()
|
|
@@ -26698,6 +26755,12 @@ class TabbedMenuItem extends Action {
|
|
|
26698
26755
|
get hasIcon() {
|
|
26699
26756
|
return !this.disableShrink && this.iconName && this.mode == "small";
|
|
26700
26757
|
}
|
|
26758
|
+
doAction() {
|
|
26759
|
+
if (!this.enabled)
|
|
26760
|
+
return false;
|
|
26761
|
+
this.action();
|
|
26762
|
+
return true;
|
|
26763
|
+
}
|
|
26701
26764
|
}
|
|
26702
26765
|
class TabbedMenuContainer extends AdaptiveActionContainer {
|
|
26703
26766
|
constructor(creator) {
|
|
@@ -26714,6 +26777,9 @@ class TabbedMenuContainer extends AdaptiveActionContainer {
|
|
|
26714
26777
|
addTab(name, plugin, title, iconName, componentName, index) {
|
|
26715
26778
|
const tabName = name === "test" ? "preview" : name;
|
|
26716
26779
|
const locStrName = !title ? "tabs." + tabName : (title.indexOf("ed.") == 0 ? title : "");
|
|
26780
|
+
const actionHandler = function (name) {
|
|
26781
|
+
this.creator.switchTab(name);
|
|
26782
|
+
};
|
|
26717
26783
|
const tab = new TabbedMenuItem({
|
|
26718
26784
|
id: name,
|
|
26719
26785
|
locTitleName: locStrName,
|
|
@@ -26721,7 +26787,7 @@ class TabbedMenuContainer extends AdaptiveActionContainer {
|
|
|
26721
26787
|
componentContent: componentName ? componentName : "svc-tab-" + name,
|
|
26722
26788
|
data: plugin,
|
|
26723
26789
|
iconName: iconName || "icon-undefined-24x24",
|
|
26724
|
-
action: (
|
|
26790
|
+
action: actionHandler.bind(this, name),
|
|
26725
26791
|
active: this.creator.viewType === name,
|
|
26726
26792
|
disableHide: this.creator.viewType === name
|
|
26727
26793
|
});
|
|
@@ -31869,6 +31935,8 @@ class ToolboxToolViewModel extends Base {
|
|
|
31869
31935
|
this.click = (event) => {
|
|
31870
31936
|
if (!this.allowAdd)
|
|
31871
31937
|
return;
|
|
31938
|
+
if (!this.toolboxItem.enabled)
|
|
31939
|
+
return;
|
|
31872
31940
|
this.creator.clickToolboxItem(this.item.json);
|
|
31873
31941
|
this.hidePopup();
|
|
31874
31942
|
};
|
|
@@ -31878,6 +31946,8 @@ class ToolboxToolViewModel extends Base {
|
|
|
31878
31946
|
document.removeEventListener("pointerup", this.onPointerUp);
|
|
31879
31947
|
};
|
|
31880
31948
|
this.startDragToolboxItem = (pointerDownEvent) => {
|
|
31949
|
+
if (!this.toolboxItem.enabled)
|
|
31950
|
+
return;
|
|
31881
31951
|
var json = this.creator.getJSONForNewElement(this.item.json);
|
|
31882
31952
|
this.dragDropHelper.startDragToolboxItem(pointerDownEvent, json, this.item);
|
|
31883
31953
|
return true;
|
|
@@ -31897,6 +31967,9 @@ class ToolboxToolViewModel extends Base {
|
|
|
31897
31967
|
popup.isFocusedContent = false;
|
|
31898
31968
|
}
|
|
31899
31969
|
}
|
|
31970
|
+
if (typeof item.enabled === "undefined") {
|
|
31971
|
+
item.enabled = true;
|
|
31972
|
+
}
|
|
31900
31973
|
}
|
|
31901
31974
|
get toolboxItem() {
|
|
31902
31975
|
return this.item;
|
|
@@ -32943,8 +33016,13 @@ class QuestionAdornerViewModel extends SurveyElementAdornerBase {
|
|
|
32943
33016
|
const actions = this.actionContainer.getVisibleActions();
|
|
32944
33017
|
let switchToStartLocation = false;
|
|
32945
33018
|
for (var i = actions.length - 1; i >= 0; i--) {
|
|
32946
|
-
if (actions[i].id === "convertTo")
|
|
33019
|
+
if (actions[i].id === "convertTo" || actions[i].id === "convertInputType") {
|
|
33020
|
+
actions[i].css = "svc-dropdown-action--convertTo";
|
|
33021
|
+
if (!switchToStartLocation) {
|
|
33022
|
+
actions[i].css += " svc-dropdown-action--convertTo-last";
|
|
33023
|
+
}
|
|
32947
33024
|
switchToStartLocation = true;
|
|
33025
|
+
}
|
|
32948
33026
|
if (!actions[i].innerItem.location)
|
|
32949
33027
|
actions[i].innerItem.location = switchToStartLocation ? "start" : "end";
|
|
32950
33028
|
}
|
|
@@ -33041,14 +33119,8 @@ class QuestionAdornerViewModel extends SurveyElementAdornerBase {
|
|
|
33041
33119
|
(defaultJsons[type] || []).forEach((djson) => {
|
|
33042
33120
|
if (this.jsonIsCorresponded(djson)) {
|
|
33043
33121
|
newJson = Object.assign({}, json);
|
|
33044
|
-
const objJson = this.element.toJSON();
|
|
33045
|
-
const cleanJson = this.cleanDefaultsFromJson(type, djson);
|
|
33046
33122
|
Object.keys(djson).forEach(p => {
|
|
33047
|
-
if (p != "type" && !newJson
|
|
33048
|
-
newJson[p] = undefined;
|
|
33049
|
-
});
|
|
33050
|
-
Object.keys(json || {}).forEach(p => {
|
|
33051
|
-
if (p != "type" && !(!objJson[p] || cleanJson[p]))
|
|
33123
|
+
if (p != "type" && !newJson.hasOwnProperty(p))
|
|
33052
33124
|
newJson[p] = undefined;
|
|
33053
33125
|
});
|
|
33054
33126
|
}
|
|
@@ -33271,7 +33343,6 @@ class QuestionAdornerViewModel extends SurveyElementAdornerBase {
|
|
|
33271
33343
|
createDropdownModel(options) {
|
|
33272
33344
|
const newAction = createDropdownActionModel({
|
|
33273
33345
|
id: options.actionData.id,
|
|
33274
|
-
css: "svc-dropdown-action--convertTo",
|
|
33275
33346
|
iconName: options.actionData.iconName,
|
|
33276
33347
|
iconSize: "auto",
|
|
33277
33348
|
title: options.actionData.title,
|
|
@@ -33354,7 +33425,6 @@ class QuestionAdornerViewModel extends SurveyElementAdornerBase {
|
|
|
33354
33425
|
if (!!inputTypeConverter) {
|
|
33355
33426
|
items.push(inputTypeConverter);
|
|
33356
33427
|
}
|
|
33357
|
-
items[items.length - 1].css += " svc-dropdown-action--convertTo-last";
|
|
33358
33428
|
if (typeof element["isRequired"] !== "undefined" && !!element.getType
|
|
33359
33429
|
&& SurveyHelper.isPropertyVisible(element, Serializer.findProperty(element.getType(), "isRequired"), this.creator)) {
|
|
33360
33430
|
items.push(this.createRequiredAction());
|
|
@@ -36901,8 +36971,8 @@ class CreatorPreset extends CreatorPresetBase {
|
|
|
36901
36971
|
}
|
|
36902
36972
|
|
|
36903
36973
|
let Version;
|
|
36904
|
-
Version = `${"2.3.
|
|
36905
|
-
checkLibraryVersion(`${"2.3.
|
|
36974
|
+
Version = `${"2.3.4"}`;
|
|
36975
|
+
checkLibraryVersion(`${"2.3.4"}`, "survey-creator-core");
|
|
36906
36976
|
|
|
36907
36977
|
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, 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, getRowWrapperComponentData, getRowWrapperComponentName, 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, updateThemeEditorsDefaultFontFamily, updatecoloralphaJSON, wrapTextByCurlyBraces };
|
|
36908
36978
|
//# sourceMappingURL=survey-creator-core.mjs.map
|