survey-creator-core 2.3.3 → 2.3.5
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 +145 -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 +32 -26
- package/survey-creator-core.fontless.css +31 -25
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +4 -4
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
- package/survey-creator-core.js +154 -37
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +5 -5
- 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 +4 -1
- package/typings/editorLocalization.d.ts +1 -0
- package/typings/tabbed-menu.d.ts +1 -0
- package/typings/toolbox.d.ts +9 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v2.3.
|
|
2
|
+
* SurveyJS Creator v2.3.5
|
|
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) {
|
|
@@ -12777,6 +12822,28 @@ const defaultProperties = {
|
|
|
12777
12822
|
],
|
|
12778
12823
|
tabs: [{ name: "rateValues", index: 5 }]
|
|
12779
12824
|
},
|
|
12825
|
+
"matrixdropdowncolumn@slider": {
|
|
12826
|
+
properties: [
|
|
12827
|
+
{ name: "sliderType", tab: "sliderSettings" },
|
|
12828
|
+
{ name: "min", tab: "sliderSettings" },
|
|
12829
|
+
{ name: "max", tab: "sliderSettings" },
|
|
12830
|
+
{ name: "step", tab: "sliderSettings" },
|
|
12831
|
+
{ name: "minRangeLength", tab: "sliderSettings" },
|
|
12832
|
+
{ name: "maxRangeLength", tab: "sliderSettings" },
|
|
12833
|
+
{ name: "showLabels", tab: "sliderSettings" },
|
|
12834
|
+
{ name: "autoGenerate", tab: "sliderSettings" },
|
|
12835
|
+
{ name: "labelCount", tab: "sliderSettings" },
|
|
12836
|
+
{ name: "customLabels", tab: "sliderSettings" },
|
|
12837
|
+
{ name: "labelFormat", tab: "sliderSettings" },
|
|
12838
|
+
{ name: "tooltipVisibilityPG", tab: "sliderSettings" },
|
|
12839
|
+
{ name: "tooltipFormat", tab: "sliderSettings" },
|
|
12840
|
+
{ name: "allowSwap", tab: "sliderSettings" },
|
|
12841
|
+
{ name: "allowClear", tab: "sliderSettings" },
|
|
12842
|
+
{ name: "minValueExpression", tab: "logic", index: 410 },
|
|
12843
|
+
{ name: "maxValueExpression", tab: "logic", index: 420 },
|
|
12844
|
+
],
|
|
12845
|
+
tabs: [{ name: "sliderSettings", index: 10 }]
|
|
12846
|
+
},
|
|
12780
12847
|
multipletextitem: {
|
|
12781
12848
|
properties: [
|
|
12782
12849
|
"name",
|
|
@@ -14259,9 +14326,13 @@ class PropertyJSONGenerator {
|
|
|
14259
14326
|
if (!!this.parentProperty) {
|
|
14260
14327
|
titleClass += "@" + this.parentProperty.name;
|
|
14261
14328
|
}
|
|
14262
|
-
|
|
14263
|
-
|
|
14264
|
-
|
|
14329
|
+
const dynamicFunc = this.obj.getDynamicType;
|
|
14330
|
+
const isDynamicFunc = !!dynamicFunc && typeof dynamicFunc === "function";
|
|
14331
|
+
if (isDynamicFunc) {
|
|
14332
|
+
const dType = this.obj.getDynamicType();
|
|
14333
|
+
if (dType !== "question" && !Serializer.findProperty(this.obj.getType(), prop.name) &&
|
|
14334
|
+
Serializer.findProperty(dType, prop.name)) {
|
|
14335
|
+
titleClass = dType;
|
|
14265
14336
|
}
|
|
14266
14337
|
}
|
|
14267
14338
|
return editorLocalization.getPropertyNameInEditor(titleClass, prop.name);
|
|
@@ -16209,6 +16280,9 @@ class TranslationItem extends TranslationItemBase {
|
|
|
16209
16280
|
return placeholderText;
|
|
16210
16281
|
}
|
|
16211
16282
|
getTextForExport(loc) {
|
|
16283
|
+
const val = this.hashValues[loc];
|
|
16284
|
+
if (!!val && !!val.text)
|
|
16285
|
+
return val.text;
|
|
16212
16286
|
const res = this.locString.getLocaleText(loc);
|
|
16213
16287
|
if (!!res)
|
|
16214
16288
|
return res;
|
|
@@ -17160,7 +17234,7 @@ class Translation extends Base {
|
|
|
17160
17234
|
}
|
|
17161
17235
|
let res = [];
|
|
17162
17236
|
let headerRow = [];
|
|
17163
|
-
|
|
17237
|
+
const visibleLocales = this.locales;
|
|
17164
17238
|
headerRow.push("description ↓ - language →");
|
|
17165
17239
|
for (let i = 0; i < visibleLocales.length; i++) {
|
|
17166
17240
|
headerRow.push(!!visibleLocales[i] ? visibleLocales[i] : "default");
|
|
@@ -18591,7 +18665,7 @@ class ConditionEditor extends PropertyEditorSetupValue {
|
|
|
18591
18665
|
if (this.panel.panelCount > 0)
|
|
18592
18666
|
this.panel.panels[0].getQuestionByName("questionName").titleLocation = "left";
|
|
18593
18667
|
});
|
|
18594
|
-
this.editSurvey.
|
|
18668
|
+
this.editSurvey.onDynamicPanelValueChanged.add((sender, options) => {
|
|
18595
18669
|
this.onPanelValueChanged(options.panel, options.name);
|
|
18596
18670
|
});
|
|
18597
18671
|
this.editSurvey.css = logicCss;
|
|
@@ -19437,6 +19511,17 @@ class LogicActionModelBase {
|
|
|
19437
19511
|
question.value = !!action && action.logicType == this.logicType ? action.elementName : undefined;
|
|
19438
19512
|
}
|
|
19439
19513
|
}
|
|
19514
|
+
getDPQuestion() {
|
|
19515
|
+
return this.panel.survey.getQuestionByName("panel");
|
|
19516
|
+
}
|
|
19517
|
+
updateParentQuestions() {
|
|
19518
|
+
const dp = this.getDPQuestion();
|
|
19519
|
+
this.panel.questions.forEach(q => {
|
|
19520
|
+
if (!q.parentQuestion) {
|
|
19521
|
+
q.setParentQuestion(dp);
|
|
19522
|
+
}
|
|
19523
|
+
});
|
|
19524
|
+
}
|
|
19440
19525
|
}
|
|
19441
19526
|
class LogicActionModel extends LogicActionModelBase {
|
|
19442
19527
|
getSelectorOptionsText(logicType) {
|
|
@@ -19457,9 +19542,8 @@ class LogicActionModel extends LogicActionModelBase {
|
|
|
19457
19542
|
updateCurrentLogicAction(survey) {
|
|
19458
19543
|
const selectedElement = this.getElementBySelectorName(this.panel);
|
|
19459
19544
|
const createNewAction = !this.initialLogicAction || this.initialLogicAction.logicType != this.logicType || (!!selectedElement && this.initialLogicAction.element != selectedElement);
|
|
19460
|
-
if (!createNewAction)
|
|
19545
|
+
if (!createNewAction)
|
|
19461
19546
|
return false;
|
|
19462
|
-
}
|
|
19463
19547
|
this.currentLogicAction = new SurveyLogicAction(this.logicType, selectedElement, survey);
|
|
19464
19548
|
return true;
|
|
19465
19549
|
}
|
|
@@ -19493,6 +19577,14 @@ class LogicActionSetValueModel extends LogicActionModel {
|
|
|
19493
19577
|
selectedElement.setValueExpression = this.panel.getQuestionByName("setValueExpression").value;
|
|
19494
19578
|
}
|
|
19495
19579
|
}
|
|
19580
|
+
updateCurrentLogicAction(survey) {
|
|
19581
|
+
const selectedElement = this.getElementBySelectorName(this.panel);
|
|
19582
|
+
if (selectedElement && !!selectedElement.setValueExpression) {
|
|
19583
|
+
this.afterUpdateInitialLogicAction();
|
|
19584
|
+
return false;
|
|
19585
|
+
}
|
|
19586
|
+
return super.updateCurrentLogicAction(survey);
|
|
19587
|
+
}
|
|
19496
19588
|
setValueExpressionValue() {
|
|
19497
19589
|
const selectedElement = this.getElementBySelectorName(this.panel);
|
|
19498
19590
|
if (!!selectedElement) {
|
|
@@ -19532,6 +19624,7 @@ class LogicActionTriggerModel extends LogicActionModelBase {
|
|
|
19532
19624
|
this.updateSetValueQuestion(newQuestion);
|
|
19533
19625
|
}
|
|
19534
19626
|
}
|
|
19627
|
+
this.updateParentQuestions();
|
|
19535
19628
|
this.updateVisibilityPanel(triggerEditorPanel);
|
|
19536
19629
|
tempPanel.dispose();
|
|
19537
19630
|
}
|
|
@@ -19694,10 +19787,15 @@ class LogicActionTriggerModel extends LogicActionModelBase {
|
|
|
19694
19787
|
});
|
|
19695
19788
|
}
|
|
19696
19789
|
triggerEditorPanel.getElementByName(this.logicType.propertyName).visible = false;
|
|
19697
|
-
|
|
19698
|
-
|
|
19699
|
-
|
|
19700
|
-
|
|
19790
|
+
[triggerQuestionsPanel, triggerEditorPanel].forEach(panel => {
|
|
19791
|
+
this.updateVisibilityPanel(panel);
|
|
19792
|
+
this.updatePanelQuestionsValue(panel);
|
|
19793
|
+
});
|
|
19794
|
+
this.updateParentQuestions();
|
|
19795
|
+
const setValueQ = triggerEditorPanel.getQuestionByName("setValue");
|
|
19796
|
+
if (!!setValueQ) {
|
|
19797
|
+
this.updateSetValueQuestion(setValueQ);
|
|
19798
|
+
}
|
|
19701
19799
|
const questions = this.getQuestions();
|
|
19702
19800
|
if (!!questions && !!selectedElement) {
|
|
19703
19801
|
questions.forEach(question => {
|
|
@@ -19741,7 +19839,7 @@ class LogicItemEditor extends PropertyEditorSetupValue {
|
|
|
19741
19839
|
if (!this.options) {
|
|
19742
19840
|
this.options = new EmptySurveyCreatorOptions();
|
|
19743
19841
|
}
|
|
19744
|
-
this.editSurvey.
|
|
19842
|
+
this.editSurvey.onDynamicPanelValueChanged.add((sender, options) => {
|
|
19745
19843
|
if (options.name == "logicTypeName") {
|
|
19746
19844
|
this.onLogicTypeChanged(options.panel);
|
|
19747
19845
|
}
|
|
@@ -19785,7 +19883,7 @@ class LogicItemEditor extends PropertyEditorSetupValue {
|
|
|
19785
19883
|
this.editSurvey.onValueChanged.add((sender, options) => {
|
|
19786
19884
|
this.onValueChanged(options);
|
|
19787
19885
|
});
|
|
19788
|
-
this.editSurvey.
|
|
19886
|
+
this.editSurvey.onDynamicPanelValueChanged.add((sender, options) => {
|
|
19789
19887
|
var _a;
|
|
19790
19888
|
const q = options.panel.getQuestionByName(options.name);
|
|
19791
19889
|
if (!!q && ((_a = q.parent) === null || _a === void 0 ? void 0 : _a.name) === "triggerEditorPanel") {
|
|
@@ -26676,6 +26774,7 @@ class ExpandCollapseManager {
|
|
|
26676
26774
|
class TabbedMenuItem extends Action {
|
|
26677
26775
|
constructor(item) {
|
|
26678
26776
|
super(item);
|
|
26777
|
+
this.enabled = true;
|
|
26679
26778
|
}
|
|
26680
26779
|
getRootCss() {
|
|
26681
26780
|
return new CssClassBuilder()
|
|
@@ -26699,6 +26798,12 @@ class TabbedMenuItem extends Action {
|
|
|
26699
26798
|
get hasIcon() {
|
|
26700
26799
|
return !this.disableShrink && this.iconName && this.mode == "small";
|
|
26701
26800
|
}
|
|
26801
|
+
doAction() {
|
|
26802
|
+
if (!this.enabled)
|
|
26803
|
+
return false;
|
|
26804
|
+
this.action();
|
|
26805
|
+
return true;
|
|
26806
|
+
}
|
|
26702
26807
|
}
|
|
26703
26808
|
class TabbedMenuContainer extends AdaptiveActionContainer {
|
|
26704
26809
|
constructor(creator) {
|
|
@@ -26715,6 +26820,9 @@ class TabbedMenuContainer extends AdaptiveActionContainer {
|
|
|
26715
26820
|
addTab(name, plugin, title, iconName, componentName, index) {
|
|
26716
26821
|
const tabName = name === "test" ? "preview" : name;
|
|
26717
26822
|
const locStrName = !title ? "tabs." + tabName : (title.indexOf("ed.") == 0 ? title : "");
|
|
26823
|
+
const actionHandler = function (name) {
|
|
26824
|
+
this.creator.switchTab(name);
|
|
26825
|
+
};
|
|
26718
26826
|
const tab = new TabbedMenuItem({
|
|
26719
26827
|
id: name,
|
|
26720
26828
|
locTitleName: locStrName,
|
|
@@ -26722,7 +26830,7 @@ class TabbedMenuContainer extends AdaptiveActionContainer {
|
|
|
26722
26830
|
componentContent: componentName ? componentName : "svc-tab-" + name,
|
|
26723
26831
|
data: plugin,
|
|
26724
26832
|
iconName: iconName || "icon-undefined-24x24",
|
|
26725
|
-
action: (
|
|
26833
|
+
action: actionHandler.bind(this, name),
|
|
26726
26834
|
active: this.creator.viewType === name,
|
|
26727
26835
|
disableHide: this.creator.viewType === name
|
|
26728
26836
|
});
|
|
@@ -31870,6 +31978,8 @@ class ToolboxToolViewModel extends Base {
|
|
|
31870
31978
|
this.click = (event) => {
|
|
31871
31979
|
if (!this.allowAdd)
|
|
31872
31980
|
return;
|
|
31981
|
+
if (!this.toolboxItem.enabled)
|
|
31982
|
+
return;
|
|
31873
31983
|
this.creator.clickToolboxItem(this.item.json);
|
|
31874
31984
|
this.hidePopup();
|
|
31875
31985
|
};
|
|
@@ -31879,6 +31989,8 @@ class ToolboxToolViewModel extends Base {
|
|
|
31879
31989
|
document.removeEventListener("pointerup", this.onPointerUp);
|
|
31880
31990
|
};
|
|
31881
31991
|
this.startDragToolboxItem = (pointerDownEvent) => {
|
|
31992
|
+
if (!this.toolboxItem.enabled)
|
|
31993
|
+
return;
|
|
31882
31994
|
var json = this.creator.getJSONForNewElement(this.item.json);
|
|
31883
31995
|
this.dragDropHelper.startDragToolboxItem(pointerDownEvent, json, this.item);
|
|
31884
31996
|
return true;
|
|
@@ -31898,6 +32010,9 @@ class ToolboxToolViewModel extends Base {
|
|
|
31898
32010
|
popup.isFocusedContent = false;
|
|
31899
32011
|
}
|
|
31900
32012
|
}
|
|
32013
|
+
if (typeof item.enabled === "undefined") {
|
|
32014
|
+
item.enabled = true;
|
|
32015
|
+
}
|
|
31901
32016
|
}
|
|
31902
32017
|
get toolboxItem() {
|
|
31903
32018
|
return this.item;
|
|
@@ -33047,14 +33162,8 @@ class QuestionAdornerViewModel extends SurveyElementAdornerBase {
|
|
|
33047
33162
|
(defaultJsons[type] || []).forEach((djson) => {
|
|
33048
33163
|
if (this.jsonIsCorresponded(djson)) {
|
|
33049
33164
|
newJson = Object.assign({}, json);
|
|
33050
|
-
const objJson = this.element.toJSON();
|
|
33051
|
-
const cleanJson = this.cleanDefaultsFromJson(type, djson);
|
|
33052
33165
|
Object.keys(djson).forEach(p => {
|
|
33053
|
-
if (p != "type" && !newJson
|
|
33054
|
-
newJson[p] = undefined;
|
|
33055
|
-
});
|
|
33056
|
-
Object.keys(json || {}).forEach(p => {
|
|
33057
|
-
if (p != "type" && !(!objJson[p] || cleanJson[p]))
|
|
33166
|
+
if (p != "type" && !newJson.hasOwnProperty(p))
|
|
33058
33167
|
newJson[p] = undefined;
|
|
33059
33168
|
});
|
|
33060
33169
|
}
|
|
@@ -36905,8 +37014,8 @@ class CreatorPreset extends CreatorPresetBase {
|
|
|
36905
37014
|
}
|
|
36906
37015
|
|
|
36907
37016
|
let Version;
|
|
36908
|
-
Version = `${"2.3.
|
|
36909
|
-
checkLibraryVersion(`${"2.3.
|
|
37017
|
+
Version = `${"2.3.5"}`;
|
|
37018
|
+
checkLibraryVersion(`${"2.3.5"}`, "survey-creator-core");
|
|
36910
37019
|
|
|
36911
37020
|
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 };
|
|
36912
37021
|
//# sourceMappingURL=survey-creator-core.mjs.map
|