survey-creator-core 2.0.6 → 2.0.7
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/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 +153 -110
- 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/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 +60 -20
- package/survey-creator-core.fontless.css +59 -19
- package/survey-creator-core.fontless.css.map +1 -1
- package/survey-creator-core.fontless.min.css +5 -5
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
- package/survey-creator-core.js +193 -120
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +6 -6
- 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/image-item-value.d.ts +7 -0
- package/typings/creator-base.d.ts +14 -14
- package/typings/creator-options.d.ts +4 -12
- package/typings/custom-questions/question-file.d.ts +2 -0
- package/typings/property-grid/condition.d.ts +3 -0
- package/typings/property-grid/matrices.d.ts +0 -1
- package/typings/property-grid/object-selector.d.ts +0 -1
- package/typings/property-grid-theme/property-grid.d.ts +13 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v2.0.
|
|
2
|
+
* SurveyJS Creator v2.0.7
|
|
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
|
|
@@ -2443,25 +2443,7 @@ var settings = {
|
|
|
2443
2443
|
choices: ["Item 1", "Item 2", "Item 3"]
|
|
2444
2444
|
},
|
|
2445
2445
|
imagepicker: {
|
|
2446
|
-
imageFit: "cover"
|
|
2447
|
-
choices: [
|
|
2448
|
-
{
|
|
2449
|
-
value: "Image 1",
|
|
2450
|
-
imageLink: "https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg"
|
|
2451
|
-
},
|
|
2452
|
-
{
|
|
2453
|
-
value: "Image 2",
|
|
2454
|
-
imageLink: "https://surveyjs.io/Content/Images/examples/image-picker/giraffe.jpg"
|
|
2455
|
-
},
|
|
2456
|
-
{
|
|
2457
|
-
value: "Image 3",
|
|
2458
|
-
imageLink: "https://surveyjs.io/Content/Images/examples/image-picker/panda.jpg"
|
|
2459
|
-
},
|
|
2460
|
-
{
|
|
2461
|
-
value: "Image 4",
|
|
2462
|
-
imageLink: "https://surveyjs.io/Content/Images/examples/image-picker/camel.jpg"
|
|
2463
|
-
}
|
|
2464
|
-
]
|
|
2446
|
+
imageFit: "cover"
|
|
2465
2447
|
},
|
|
2466
2448
|
image: {
|
|
2467
2449
|
imageFit: "cover",
|
|
@@ -11725,7 +11707,7 @@ var propertyGridCss = {
|
|
|
11725
11707
|
controlReadOnly: "sd-input--disabled sd-input--readonly"
|
|
11726
11708
|
},
|
|
11727
11709
|
buttongroup: {
|
|
11728
|
-
root: "spg-button-group",
|
|
11710
|
+
root: "sd-button-group-scrollable-container spg-button-group",
|
|
11729
11711
|
item: "spg-button-group__item",
|
|
11730
11712
|
itemIcon: "spg-button-group__item-icon",
|
|
11731
11713
|
itemDecorator: "spg-button-group__item-decorator",
|
|
@@ -11734,7 +11716,20 @@ var propertyGridCss = {
|
|
|
11734
11716
|
itemSelected: "spg-button-group__item--selected",
|
|
11735
11717
|
itemDisabled: "spg-button-group__item--disabled",
|
|
11736
11718
|
itemControl: "sv-visuallyhidden",
|
|
11737
|
-
readOnly: "spg-question--disabled"
|
|
11719
|
+
readOnly: "spg-question--disabled",
|
|
11720
|
+
rootDropdown: "sd-button-group-scrollable-container sd-scrollable-container--compact sd-selectbase",
|
|
11721
|
+
selectWrapper: "sv-dropdown_select-wrapper spg-dropdown_select-wrapper",
|
|
11722
|
+
control: "spg-input spg-dropdown sd-input sd-dropdown",
|
|
11723
|
+
controlEmpty: "spg-dropdown--empty sd-dropdown--empty",
|
|
11724
|
+
controlValue: "spg-dropdown__value sd-dropdown__value",
|
|
11725
|
+
controlDisabled: "spg-input--disabled sd-input--disabled",
|
|
11726
|
+
controlReadOnly: "spg-input--readonly sd-input--readonly",
|
|
11727
|
+
controlPreview: "spg-input--preview sd-input--preview",
|
|
11728
|
+
filterStringInput: "sd-dropdown__filter-string-input spg-dropdown__filter-string-input",
|
|
11729
|
+
chevronButton: "sd-dropdown_chevron-button spg-dropdown_chevron-button",
|
|
11730
|
+
chevronButtonSvg: "sd-dropdown_chevron-button-svg spg-dropdown_chevron-button-svg",
|
|
11731
|
+
chevronButtonIconId: "icon-chevron",
|
|
11732
|
+
popup: "spg-dropdown-popup svc-creator-popup",
|
|
11738
11733
|
},
|
|
11739
11734
|
imagepicker: {
|
|
11740
11735
|
root: "spg-imagepicker",
|
|
@@ -13691,13 +13686,6 @@ class PropertyGridTitleActionsCreator {
|
|
|
13691
13686
|
action.iconName = this.getHelpActionIconName(question);
|
|
13692
13687
|
}
|
|
13693
13688
|
});
|
|
13694
|
-
const baseOnMouseDown = action.doMouseDown;
|
|
13695
|
-
action.doMouseDown = (args) => {
|
|
13696
|
-
baseOnMouseDown.call(action);
|
|
13697
|
-
const evt = !!args.originalEvent ? args.originalEvent : args;
|
|
13698
|
-
evt.preventDefault();
|
|
13699
|
-
evt.stopPropagation();
|
|
13700
|
-
};
|
|
13701
13689
|
return action;
|
|
13702
13690
|
}
|
|
13703
13691
|
getHelpActionIconName(question) {
|
|
@@ -14710,8 +14698,9 @@ class PropertyGridEditorUndefinedBoolean extends PropertyGridEditor {
|
|
|
14710
14698
|
{ value: "false", text: editorLocalization.getString("pe.disabled") },
|
|
14711
14699
|
{ value: "true", text: editorLocalization.getString("pe.enabled") },
|
|
14712
14700
|
];
|
|
14701
|
+
const _renderAsButtonGroup = settings.propertyGrid.useButtonGroup;
|
|
14713
14702
|
const res = {
|
|
14714
|
-
type: "buttongroup",
|
|
14703
|
+
type: _renderAsButtonGroup ? "buttongroup" : "dropdown",
|
|
14715
14704
|
choices: choices,
|
|
14716
14705
|
showOptionsCaption: false
|
|
14717
14706
|
};
|
|
@@ -14994,10 +14983,9 @@ class PropertyGridEditorDropdown extends PropertyGridEditor {
|
|
|
14994
14983
|
}
|
|
14995
14984
|
getJSON(obj, prop, options) {
|
|
14996
14985
|
var choices = this.getChoices(obj, prop);
|
|
14986
|
+
const _renderAsButtonGroup = this.renderAsButtonGroup(prop, choices);
|
|
14997
14987
|
var json = {
|
|
14998
|
-
type:
|
|
14999
|
-
? "buttongroup"
|
|
15000
|
-
: "dropdown",
|
|
14988
|
+
type: _renderAsButtonGroup ? "buttongroup" : "dropdown",
|
|
15001
14989
|
choices: choices,
|
|
15002
14990
|
showOptionsCaption: false
|
|
15003
14991
|
};
|
|
@@ -20800,8 +20788,8 @@ function ignoreUndoRedo(undoRedoManagerProperty = "undoRedoManager") {
|
|
|
20800
20788
|
class ObjectSelectorItem extends Action {
|
|
20801
20789
|
constructor(id, data, title, level) {
|
|
20802
20790
|
super({ id: "sv_item_selector_" + id.toString(), title: title });
|
|
20803
|
-
this.data = data;
|
|
20804
20791
|
this.level = level;
|
|
20792
|
+
this.data = data;
|
|
20805
20793
|
}
|
|
20806
20794
|
hasText(filteredTextInLow) {
|
|
20807
20795
|
if (!filteredTextInLow)
|
|
@@ -27342,7 +27330,7 @@ class SurveyCreatorModel extends Base {
|
|
|
27342
27330
|
get showSimulatorInPreviewTab() { return this.showSimulatorInTestSurveyTab; }
|
|
27343
27331
|
set showSimulatorInPreviewTab(val) { this.showSimulatorInTestSurveyTab = val; }
|
|
27344
27332
|
/**
|
|
27345
|
-
* @deprecated
|
|
27333
|
+
* @deprecated Survey Creator no longer supports switching between UI themes in the Preview tab.
|
|
27346
27334
|
*/
|
|
27347
27335
|
get themeForPreview() { return this.previewTheme; }
|
|
27348
27336
|
set themeForPreview(val) { this.previewTheme = val; }
|
|
@@ -27381,13 +27369,25 @@ class SurveyCreatorModel extends Base {
|
|
|
27381
27369
|
return this._theme;
|
|
27382
27370
|
}
|
|
27383
27371
|
set theme(newTheme) {
|
|
27384
|
-
this.
|
|
27372
|
+
this.applyTheme(newTheme);
|
|
27373
|
+
}
|
|
27374
|
+
/**
|
|
27375
|
+
* Applies a [theme](https://surveyjs.io/form-library/documentation/api-reference/itheme) to the survey being configured.
|
|
27376
|
+
*
|
|
27377
|
+
* [Theme Editor](https://surveyjs.io/survey-creator/documentation/theme-editor (linkStyle))
|
|
27378
|
+
* @param surveyTheme An [`ITheme`](https://surveyjs.io/form-library/documentation/api-reference/itheme) object with theme settings.
|
|
27379
|
+
* @see theme
|
|
27380
|
+
* @see themeEditor
|
|
27381
|
+
* @see saveThemeFunc
|
|
27382
|
+
*/
|
|
27383
|
+
applyTheme(surveyTheme) {
|
|
27384
|
+
this._theme = surveyTheme;
|
|
27385
27385
|
this.hasPendingThemeChanges = true;
|
|
27386
27386
|
if (this.activeTab !== "theme") {
|
|
27387
27387
|
this.updatePlugin(this.activeTab);
|
|
27388
27388
|
}
|
|
27389
|
-
if (!!
|
|
27390
|
-
this.survey.headerView =
|
|
27389
|
+
if (!!surveyTheme && surveyTheme.headerView) {
|
|
27390
|
+
this.survey.headerView = surveyTheme.headerView;
|
|
27391
27391
|
}
|
|
27392
27392
|
}
|
|
27393
27393
|
_doSaveThemeCore(onSaveComplete) {
|
|
@@ -27479,7 +27479,7 @@ class SurveyCreatorModel extends Base {
|
|
|
27479
27479
|
get showInvisibleElementsInPreviewTab() { return this.showInvisibleElementsInTestSurveyTab; }
|
|
27480
27480
|
set showInvisibleElementsInPreviewTab(val) { this.showInvisibleElementsInTestSurveyTab = val; }
|
|
27481
27481
|
/**
|
|
27482
|
-
* @deprecated
|
|
27482
|
+
* @deprecated Survey Creator no longer supports switching between UI themes in the Preview tab.
|
|
27483
27483
|
*/
|
|
27484
27484
|
get allowChangeThemeInPreview() { return this.previewAllowSelectTheme; }
|
|
27485
27485
|
set allowChangeThemeInPreview(val) { this.previewAllowSelectTheme = val; }
|
|
@@ -28187,12 +28187,7 @@ class SurveyCreatorModel extends Base {
|
|
|
28187
28187
|
this.showPagesInTestSurveyTab = true;
|
|
28188
28188
|
this.showSimulatorInTestSurveyTab = true;
|
|
28189
28189
|
/**
|
|
28190
|
-
*
|
|
28191
|
-
*
|
|
28192
|
-
* Accepted values: `"default"`
|
|
28193
|
-
*
|
|
28194
|
-
* Default value: `"default"`
|
|
28195
|
-
* @see previewAllowSelectTheme
|
|
28190
|
+
* @deprecated Survey Creator no longer supports switching between UI themes in the Preview tab.
|
|
28196
28191
|
*/
|
|
28197
28192
|
this.previewTheme = "default";
|
|
28198
28193
|
this.hasPendingThemeChanges = false;
|
|
@@ -28202,12 +28197,7 @@ class SurveyCreatorModel extends Base {
|
|
|
28202
28197
|
this.showDefaultLanguageInTestSurveyTab = "auto";
|
|
28203
28198
|
this.showInvisibleElementsInTestSurveyTab = true;
|
|
28204
28199
|
/**
|
|
28205
|
-
*
|
|
28206
|
-
*
|
|
28207
|
-
* Default value: `true`
|
|
28208
|
-
*
|
|
28209
|
-
* [View Demo](https://surveyjs.io/Examples/Creator?id=theme-switcher (linkStyle))
|
|
28210
|
-
* @see previewTheme
|
|
28200
|
+
* @deprecated Survey Creator no longer supports switching between UI themes in the Preview tab.
|
|
28211
28201
|
*/
|
|
28212
28202
|
this.previewAllowSelectTheme = true;
|
|
28213
28203
|
this._tabResponsivenessMode = "icons";
|
|
@@ -30914,7 +30904,7 @@ class SurveyCreatorModel extends Base {
|
|
|
30914
30904
|
const newCssVariable = {};
|
|
30915
30905
|
assign(newCssVariable, theme === null || theme === void 0 ? void 0 : theme.cssVariables);
|
|
30916
30906
|
const designerPlugin = this.getPlugin("designer");
|
|
30917
|
-
if (designerPlugin) {
|
|
30907
|
+
if (designerPlugin && designerPlugin.model) {
|
|
30918
30908
|
designerPlugin.model.updateSurfaceCssVariables();
|
|
30919
30909
|
}
|
|
30920
30910
|
this.themeVariables = newCssVariable;
|
|
@@ -33263,25 +33253,40 @@ class ImageItemValueWrapperViewModel extends ItemValueWrapperViewModel {
|
|
|
33263
33253
|
this.templateData = templateData;
|
|
33264
33254
|
this.itemsRoot = itemsRoot;
|
|
33265
33255
|
this.isChoosingNewFile = false;
|
|
33256
|
+
this.onDragCounter = 0;
|
|
33257
|
+
this.onDragEnter = (event) => {
|
|
33258
|
+
if (this.isNew) {
|
|
33259
|
+
this.onDragCounter++;
|
|
33260
|
+
this.isFileDragging = true;
|
|
33261
|
+
}
|
|
33262
|
+
};
|
|
33266
33263
|
this.onDragOver = (event) => {
|
|
33267
|
-
this.
|
|
33268
|
-
|
|
33269
|
-
|
|
33264
|
+
if (this.isNew) {
|
|
33265
|
+
event.dataTransfer.dropEffect = "copy";
|
|
33266
|
+
event.preventDefault();
|
|
33267
|
+
}
|
|
33270
33268
|
};
|
|
33271
33269
|
this.onDrop = (event) => {
|
|
33272
|
-
this.
|
|
33273
|
-
|
|
33274
|
-
|
|
33275
|
-
|
|
33276
|
-
|
|
33277
|
-
|
|
33278
|
-
|
|
33279
|
-
files
|
|
33270
|
+
if (this.isNew) {
|
|
33271
|
+
this.onDragCounter = 0;
|
|
33272
|
+
this.isFileDragging = false;
|
|
33273
|
+
event.preventDefault();
|
|
33274
|
+
let input = event.dataTransfer;
|
|
33275
|
+
if (!input || !input.files || input.files.length < 1)
|
|
33276
|
+
return;
|
|
33277
|
+
let files = [];
|
|
33278
|
+
for (let i = 0; i < input.files.length; i++) {
|
|
33279
|
+
files.push(input.files[i]);
|
|
33280
|
+
}
|
|
33281
|
+
this.uploadFiles(files);
|
|
33280
33282
|
}
|
|
33281
|
-
this.uploadFiles(files);
|
|
33282
33283
|
};
|
|
33283
33284
|
this.onDragLeave = (event) => {
|
|
33284
|
-
this.
|
|
33285
|
+
if (this.isNew) {
|
|
33286
|
+
if (--this.onDragCounter == 0) {
|
|
33287
|
+
this.isFileDragging = false;
|
|
33288
|
+
}
|
|
33289
|
+
}
|
|
33285
33290
|
};
|
|
33286
33291
|
}
|
|
33287
33292
|
getRootCss() {
|
|
@@ -33308,6 +33313,27 @@ class ImageItemValueWrapperViewModel extends ItemValueWrapperViewModel {
|
|
|
33308
33313
|
get addFileTitle() {
|
|
33309
33314
|
return this.creator.getLocString("ed.selectFile");
|
|
33310
33315
|
}
|
|
33316
|
+
get placeholderText() {
|
|
33317
|
+
if (this.creator.isMobileView)
|
|
33318
|
+
return getLocString("ed.imagePlaceHolderMobile");
|
|
33319
|
+
return getLocString("ed.imagePlaceHolder");
|
|
33320
|
+
}
|
|
33321
|
+
get chooseImageText() {
|
|
33322
|
+
return getLocString("ed.imageChooseImage");
|
|
33323
|
+
}
|
|
33324
|
+
get showChooseButtonAsIcon() {
|
|
33325
|
+
return !this.getIsNewItemSingle();
|
|
33326
|
+
}
|
|
33327
|
+
get showPlaceholder() {
|
|
33328
|
+
return this.getIsNewItemSingle();
|
|
33329
|
+
}
|
|
33330
|
+
get addButtonCss() {
|
|
33331
|
+
return new CssClassBuilder()
|
|
33332
|
+
.append("svc-image-item-value-controls__add")
|
|
33333
|
+
.append("svc-context-button", this.showChooseButtonAsIcon)
|
|
33334
|
+
.append("sd-action", !this.showChooseButtonAsIcon)
|
|
33335
|
+
.toString();
|
|
33336
|
+
}
|
|
33311
33337
|
chooseFile(model) {
|
|
33312
33338
|
const fileInput = model.itemsRoot.getElementsByClassName("svc-choose-file-input")[0];
|
|
33313
33339
|
const context = { element: model.question, item: model.item, elementType: model.question.getType(), propertyName: "imageLink" };
|
|
@@ -34205,6 +34231,9 @@ class QuestionFileEditorModel extends QuestionFileModel {
|
|
|
34205
34231
|
get renderedPlaceholder() {
|
|
34206
34232
|
return this.notEmptyValuePlaceholder || this.placeholder;
|
|
34207
34233
|
}
|
|
34234
|
+
get isTextInputReadOnly() {
|
|
34235
|
+
return this.disableInput || this.isReadOnly;
|
|
34236
|
+
}
|
|
34208
34237
|
updateRenderedValue(value) {
|
|
34209
34238
|
const matchBase64 = !!value ? value.match(/^data:((?:\w+\/(?:(?!;).)+)?)((?:;[\w\W]*?[^;])*),/) : null;
|
|
34210
34239
|
if (matchBase64) {
|
|
@@ -34273,7 +34302,13 @@ __decorate([
|
|
|
34273
34302
|
__decorate([
|
|
34274
34303
|
property()
|
|
34275
34304
|
], QuestionFileEditorModel.prototype, "placeholder", void 0);
|
|
34276
|
-
|
|
34305
|
+
__decorate([
|
|
34306
|
+
property()
|
|
34307
|
+
], QuestionFileEditorModel.prototype, "disableInput", void 0);
|
|
34308
|
+
Serializer.addClass("fileedit", [
|
|
34309
|
+
"placeholder:string",
|
|
34310
|
+
{ name: "disableInput:boolean", default: false },
|
|
34311
|
+
], () => new QuestionFileEditorModel(""), "file");
|
|
34277
34312
|
QuestionFactory.Instance.registerQuestion("fileedit", name => {
|
|
34278
34313
|
return new QuestionFileEditorModel(name);
|
|
34279
34314
|
}, false);
|
|
@@ -34377,39 +34412,51 @@ class PropertyGridEditorExpression extends PropertyGridEditor {
|
|
|
34377
34412
|
}
|
|
34378
34413
|
onCreated(obj, question, prop, options) {
|
|
34379
34414
|
question.valueToDataCallback = (val) => {
|
|
34380
|
-
|
|
34381
|
-
return val;
|
|
34382
|
-
return val.replace(/\\n/g, "\n")
|
|
34383
|
-
.replace(/\\r/g, "\r")
|
|
34384
|
-
.replace(/\\t/g, "\t");
|
|
34415
|
+
return this.processExpression(val, true);
|
|
34385
34416
|
};
|
|
34386
34417
|
question.valueFromDataCallback = (val) => {
|
|
34387
|
-
|
|
34388
|
-
return val;
|
|
34389
|
-
return val.replace(/\n/g, "\\n")
|
|
34390
|
-
.replace(/\r/g, "\\r")
|
|
34391
|
-
.replace(/\t/g, "\\t");
|
|
34418
|
+
return this.processExpression(val, false);
|
|
34392
34419
|
};
|
|
34393
|
-
|
|
34394
|
-
|
|
34395
|
-
|
|
34396
|
-
|
|
34397
|
-
|
|
34398
|
-
|
|
34399
|
-
|
|
34420
|
+
}
|
|
34421
|
+
processExpression(val, valueToData) {
|
|
34422
|
+
if (!val)
|
|
34423
|
+
return val;
|
|
34424
|
+
const operand = new ConditionsParser().parseExpression(val);
|
|
34425
|
+
if (!operand)
|
|
34426
|
+
return val;
|
|
34427
|
+
const list = new Array();
|
|
34428
|
+
operand.addOperandsToList(list);
|
|
34429
|
+
const replacedText = new Array();
|
|
34430
|
+
for (let i = 0; i < list.length; i++) {
|
|
34431
|
+
const op = list[i];
|
|
34432
|
+
if (op.getType() === "const") {
|
|
34433
|
+
const constVal = op.correctValue;
|
|
34434
|
+
if (typeof constVal === "string") {
|
|
34435
|
+
const newVal = valueToData ? this.valueToData(constVal) : this.valueFromData(constVal);
|
|
34436
|
+
if (newVal !== constVal) {
|
|
34437
|
+
replacedText.push({ oldText: constVal, newText: newVal });
|
|
34438
|
+
}
|
|
34439
|
+
}
|
|
34440
|
+
}
|
|
34441
|
+
}
|
|
34442
|
+
replacedText.forEach((item) => {
|
|
34443
|
+
val = val.replace(item.oldText, item.newText);
|
|
34444
|
+
});
|
|
34445
|
+
return val;
|
|
34446
|
+
}
|
|
34447
|
+
valueToData(val) {
|
|
34448
|
+
if (!val)
|
|
34449
|
+
return val;
|
|
34450
|
+
return val.replace(/\\n/g, "\n")
|
|
34451
|
+
.replace(/\\r/g, "\r")
|
|
34452
|
+
.replace(/\\t/g, "\t");
|
|
34453
|
+
}
|
|
34454
|
+
valueFromData(val) {
|
|
34455
|
+
if (!val)
|
|
34456
|
+
return val;
|
|
34457
|
+
return val.replace(/\n/g, "\\n")
|
|
34400
34458
|
.replace(/\r/g, "\\r")
|
|
34401
34459
|
.replace(/\t/g, "\\t");
|
|
34402
|
-
};
|
|
34403
|
-
question.valueToDataCallback = (val: any): any => {
|
|
34404
|
-
if(!val) return val;
|
|
34405
|
-
return val.replace(/\\t/g, "\t")
|
|
34406
|
-
.replace(/\\r/g, "\r")
|
|
34407
|
-
.replace(/\\n/g, "\n")
|
|
34408
|
-
.replace(/\\"/g, '"')
|
|
34409
|
-
.replace(/\\'/g, "'")
|
|
34410
|
-
.replace(/\\\\/g, "\\");
|
|
34411
|
-
};
|
|
34412
|
-
*/
|
|
34413
34460
|
}
|
|
34414
34461
|
}
|
|
34415
34462
|
class PropertyGridEditorCondition extends PropertyGridEditorExpression {
|
|
@@ -35036,12 +35083,19 @@ class PropertyGridEditorMatrixItemValues extends PropertyGridEditorMatrix {
|
|
|
35036
35083
|
return (!!column &&
|
|
35037
35084
|
column.isVisible &&
|
|
35038
35085
|
!column.readOnly &&
|
|
35039
|
-
!this.hasMultipleLanguage(items)
|
|
35040
|
-
!this.hasVisibleIfOrEnableIf(items));
|
|
35086
|
+
!this.hasMultipleLanguage(items));
|
|
35041
35087
|
}
|
|
35042
35088
|
getAllowRowDragDrop(prop) { return true; }
|
|
35043
35089
|
createPropertyEditorSetup(obj, prop, question, options) {
|
|
35044
|
-
|
|
35090
|
+
const names = question.columns.filter(c => !c.readOnly).map(c => c.name);
|
|
35091
|
+
const visibleIfProp = Serializer.findProperty("itemvalue", "visibleIf");
|
|
35092
|
+
if (visibleIfProp && visibleIfProp.visible) {
|
|
35093
|
+
names.push("visibleIf");
|
|
35094
|
+
const enableIfProp = Serializer.findProperty("itemvalue", "enableIf");
|
|
35095
|
+
if (enableIfProp && enableIfProp.visible) {
|
|
35096
|
+
names.push("enableIf");
|
|
35097
|
+
}
|
|
35098
|
+
}
|
|
35045
35099
|
return new FastEntryEditor(obj[prop.name], options, prop.className, names);
|
|
35046
35100
|
}
|
|
35047
35101
|
canClearPropertyValue(obj, prop, question, options) {
|
|
@@ -35096,17 +35150,6 @@ class PropertyGridEditorMatrixItemValues extends PropertyGridEditorMatrix {
|
|
|
35096
35150
|
}
|
|
35097
35151
|
return false;
|
|
35098
35152
|
}
|
|
35099
|
-
hasVisibleIfOrEnableIf(items) {
|
|
35100
|
-
if (!items || !Array.isArray(items)) {
|
|
35101
|
-
return false;
|
|
35102
|
-
}
|
|
35103
|
-
for (var i = 0; i < items.length; i++) {
|
|
35104
|
-
if (!!items[i].visibleIf || items[i].enableIf) {
|
|
35105
|
-
return true;
|
|
35106
|
-
}
|
|
35107
|
-
}
|
|
35108
|
-
return false;
|
|
35109
|
-
}
|
|
35110
35153
|
onMatrixCellCreated(obj, options) {
|
|
35111
35154
|
super.onMatrixCellCreated(obj, options);
|
|
35112
35155
|
function updateHtml(question, value) {
|
|
@@ -36180,8 +36223,8 @@ class CreatorPreset extends CreatorPresetBase {
|
|
|
36180
36223
|
}
|
|
36181
36224
|
|
|
36182
36225
|
let Version;
|
|
36183
|
-
Version = `${"2.0.
|
|
36184
|
-
checkLibraryVersion(`${"2.0.
|
|
36226
|
+
Version = `${"2.0.7"}`;
|
|
36227
|
+
checkLibraryVersion(`${"2.0.7"}`, "survey-creator-core");
|
|
36185
36228
|
|
|
36186
36229
|
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, 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 };
|
|
36187
36230
|
//# sourceMappingURL=survey-creator-core.mjs.map
|