survey-creator-core 2.0.7 → 2.0.9
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 +124 -23
- 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 +15 -17
- package/survey-creator-core.fontless.css +14 -16
- 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 +134 -23
- 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/action-container-view-model.d.ts +11 -1
- package/typings/components/tabs/theme-plugin.d.ts +2 -0
- package/typings/creator-base.d.ts +49 -9
- package/typings/creator-events-api.d.ts +6 -6
- package/typings/creator-options.d.ts +26 -6
- package/typings/toolbox.d.ts +13 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v2.0.
|
|
2
|
+
* SurveyJS Creator v2.0.9
|
|
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
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import * as Survey from 'survey-core';
|
|
9
|
-
import { surveyLocalization, Serializer, SurveyModel, Helpers, QuestionFactory, CustomWidgetCollection, defaultCss, settings as settings$1, MatrixDropdownColumn, ItemValue, JsonError, property, Base, Action, ComputedUpdater, ActionContainer, propertyArray, AdaptiveActionContainer, AnimationBoolean, CssClassBuilder, DragOrClickHelper, ElementFactory, ComponentCollection, JsonObject, ListModel, EventBase, createDropdownActionModel, surveyCss, defaultThemeName, ConditionsParser, SurveyTrigger, QuestionMatrixDropdownModelBase, QuestionPanelDynamicModel, ConditionRunner, ExpressionRunner, FunctionFactory, QuestionButtonGroupModel, QuestionTextBase, LocalizableString, PageModel, QuestionCommentModel, createPopupModelWithListModel, defaultActionBarCss, createDropdownActionModelAdvanced, PopupModel, getActionDropdownButtonTarget, prepareElementForVerticalAnimation, cleanHtmlElementAfterAnimation, DragDropCore, getIconNameFromProxy, AnimationGroup, activateLazyRenderingChecks, CharacterCounter, QuestionImagePickerModel, QuestionMultipleTextModel, QuestionMatrixDropdownModel, QuestionMatrixDynamicModel, QuestionMatrixModel, QuestionSelectBase, MultipleTextItemModel, addIconsToThemeSet, SvgRegistry, hasLicense, slk, Notifier, SvgThemeSets, IsTouch, SurveyElement, Question, PanelModel, DragDropChoices, chooseFiles, classesToSelector, PanelModelBase, QuestionHtmlModel, QuestionNonValue, QuestionTextModel, QuestionFileModel, QuestionRatingModel, renamedIcons, JsonObjectProperty, checkLibraryVersion } from 'survey-core';
|
|
9
|
+
import { surveyLocalization, Serializer, SurveyModel, Helpers, QuestionFactory, CustomWidgetCollection, defaultCss, settings as settings$1, MatrixDropdownColumn, ItemValue, JsonError, property, Base, Action, ComputedUpdater, ActionContainer, propertyArray, AdaptiveActionContainer, AnimationBoolean, CssClassBuilder, DragOrClickHelper, ElementFactory, ComponentCollection, JsonObject, ListModel, EventBase, createDropdownActionModel, surveyCss, defaultThemeName, ConditionsParser, SurveyTrigger, QuestionMatrixDropdownModelBase, QuestionPanelDynamicModel, ConditionRunner, ExpressionRunner, FunctionFactory, QuestionButtonGroupModel, QuestionTextBase, ResponsivityManager, LocalizableString, PageModel, QuestionCommentModel, createPopupModelWithListModel, defaultActionBarCss, createDropdownActionModelAdvanced, PopupModel, getActionDropdownButtonTarget, prepareElementForVerticalAnimation, cleanHtmlElementAfterAnimation, DragDropCore, getIconNameFromProxy, AnimationGroup, activateLazyRenderingChecks, CharacterCounter, QuestionImagePickerModel, QuestionMultipleTextModel, QuestionMatrixDropdownModel, QuestionMatrixDynamicModel, QuestionMatrixModel, QuestionSelectBase, MultipleTextItemModel, addIconsToThemeSet, SvgRegistry, hasLicense, slk, Notifier, SvgThemeSets, IsTouch, SurveyElement, Question, PanelModel, DragDropChoices, chooseFiles, classesToSelector, PanelModelBase, QuestionHtmlModel, QuestionNonValue, QuestionTextModel, QuestionFileModel, QuestionRatingModel, renamedIcons, JsonObjectProperty, checkLibraryVersion } from 'survey-core';
|
|
10
10
|
|
|
11
11
|
// Uncomment the line below if you create a custom dictionary
|
|
12
12
|
// import { editorLocalization } from "survey-creator-core";
|
|
@@ -4957,6 +4957,8 @@ class QuestionToolbox extends AdaptiveActionContainer {
|
|
|
4957
4957
|
}
|
|
4958
4958
|
/**
|
|
4959
4959
|
* Adds a new item to the Toolbox.
|
|
4960
|
+
*
|
|
4961
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/page-break-and-page-merge/ (linkStyle))
|
|
4960
4962
|
* @param item A [toolbox item configuration](https://surveyjs.io/survey-creator/documentation/api-reference/iquestiontoolboxitem).
|
|
4961
4963
|
* @param index *(Optional)* A zero-based index at which to insert the item. If you do not specify this parameter, the item is added to the end.
|
|
4962
4964
|
* @see removeItem
|
|
@@ -5031,6 +5033,8 @@ class QuestionToolbox extends AdaptiveActionContainer {
|
|
|
5031
5033
|
}
|
|
5032
5034
|
/**
|
|
5033
5035
|
* Returns a [toolbox item](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolboxitem) with a specified name.
|
|
5036
|
+
*
|
|
5037
|
+
* [View Toolbox Customization Demo](https://surveyjs.io/survey-creator/examples/survey-toolbox-customization/ (linkStyle))
|
|
5034
5038
|
* @param name A toolbox item's [`name`](https://surveyjs.io/survey-creator/documentation/api-reference/iquestiontoolboxitem#name).
|
|
5035
5039
|
* @returns A toolbox item or `null` if a toolbox item with the specified name isn't found.
|
|
5036
5040
|
*/
|
|
@@ -5046,6 +5050,8 @@ class QuestionToolbox extends AdaptiveActionContainer {
|
|
|
5046
5050
|
* If this property is `false`, the currently expanded category collapses when a user expands another category.
|
|
5047
5051
|
*
|
|
5048
5052
|
* Default value: `false`
|
|
5053
|
+
*
|
|
5054
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/survey-toolbox-categories/ (linkStyle))
|
|
5049
5055
|
* @see keepAllCategoriesExpanded
|
|
5050
5056
|
*/
|
|
5051
5057
|
get allowExpandMultipleCategories() {
|
|
@@ -5057,6 +5063,8 @@ class QuestionToolbox extends AdaptiveActionContainer {
|
|
|
5057
5063
|
}
|
|
5058
5064
|
/**
|
|
5059
5065
|
* Specifies whether to expand all categories without the capability to collapse any of them. Applies only if [`showCategoryTitles`](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox#showCategoryTitles) is `true`.
|
|
5066
|
+
*
|
|
5067
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/survey-toolbox-categories/ (linkStyle))
|
|
5060
5068
|
* @see allowExpandMultipleCategories
|
|
5061
5069
|
*/
|
|
5062
5070
|
get keepAllCategoriesExpanded() {
|
|
@@ -5072,7 +5080,9 @@ class QuestionToolbox extends AdaptiveActionContainer {
|
|
|
5072
5080
|
*
|
|
5073
5081
|
* Default value: `false`
|
|
5074
5082
|
*
|
|
5075
|
-
*
|
|
5083
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/survey-toolbox-categories/ (linkStyle))
|
|
5084
|
+
*
|
|
5085
|
+
* > If this property is disabled, the Toolbox hides the titles but continues to display horizontal lines that divide categories. To remove these lines as well, call the [`removeCategories()`](https://surveyjs.io/survey-creator/documentation/api-reference/questiontoolbox#removeCategories) method.
|
|
5076
5086
|
* @see allowExpandMultipleCategories
|
|
5077
5087
|
* @see keepAllCategoriesExpanded
|
|
5078
5088
|
*/
|
|
@@ -5248,6 +5258,8 @@ class QuestionToolbox extends AdaptiveActionContainer {
|
|
|
5248
5258
|
}
|
|
5249
5259
|
/**
|
|
5250
5260
|
* Removes all categories from the Toolbox.
|
|
5261
|
+
*
|
|
5262
|
+
* [View Toolbox Customization Demo](https://surveyjs.io/survey-creator/examples/survey-toolbox-customization/ (linkStyle))
|
|
5251
5263
|
*/
|
|
5252
5264
|
removeCategories() {
|
|
5253
5265
|
const allTypes = ElementFactory.Instance.getAllToolboxTypes();
|
|
@@ -15619,6 +15631,14 @@ __decorate([
|
|
|
15619
15631
|
property({ defaultValue: "icon" })
|
|
15620
15632
|
], MenuButton.prototype, "contentType", void 0);
|
|
15621
15633
|
|
|
15634
|
+
class SurveyElementResponsivityManager extends ResponsivityManager {
|
|
15635
|
+
constructor(container, model) {
|
|
15636
|
+
super(container, model);
|
|
15637
|
+
}
|
|
15638
|
+
shouldProcessResponsiveness() {
|
|
15639
|
+
return this["model"].isResponsivenessAllowed && super.shouldProcessResponsiveness();
|
|
15640
|
+
}
|
|
15641
|
+
}
|
|
15622
15642
|
class SurveyElementActionContainer extends AdaptiveActionContainer {
|
|
15623
15643
|
needToShrink(item, shrinkTypeConverterAction) {
|
|
15624
15644
|
return (item.innerItem.location == "start" && shrinkTypeConverterAction || item.innerItem.location != "start");
|
|
@@ -15649,6 +15669,7 @@ class SurveyElementActionContainer extends AdaptiveActionContainer {
|
|
|
15649
15669
|
constructor() {
|
|
15650
15670
|
super();
|
|
15651
15671
|
this.alwaysShrink = false;
|
|
15672
|
+
this._isResponsivenessAllowed = false;
|
|
15652
15673
|
this.dotsItem.iconSize = "auto";
|
|
15653
15674
|
this.dotsItem.popupModel.cssClass += " svc-creator-popup";
|
|
15654
15675
|
this.hiddenItemsListModel.cssClasses = listComponentCss;
|
|
@@ -15695,6 +15716,18 @@ class SurveyElementActionContainer extends AdaptiveActionContainer {
|
|
|
15695
15716
|
}
|
|
15696
15717
|
this.hiddenItemsListModel.setItems(items.filter(i => i.mode == "popup").map(i => i.innerItem));
|
|
15697
15718
|
}
|
|
15719
|
+
allowResponsiveness() {
|
|
15720
|
+
if (!this._isResponsivenessAllowed) {
|
|
15721
|
+
this._isResponsivenessAllowed = true;
|
|
15722
|
+
this.updateCallback && this.updateCallback(true);
|
|
15723
|
+
}
|
|
15724
|
+
}
|
|
15725
|
+
get isResponsivenessAllowed() {
|
|
15726
|
+
return this._isResponsivenessAllowed;
|
|
15727
|
+
}
|
|
15728
|
+
createResponsivityManager(container) {
|
|
15729
|
+
return new SurveyElementResponsivityManager(container, this);
|
|
15730
|
+
}
|
|
15698
15731
|
}
|
|
15699
15732
|
|
|
15700
15733
|
let isLocaleEnableIfExecuting;
|
|
@@ -17215,6 +17248,7 @@ class TranslationEditor {
|
|
|
17215
17248
|
}
|
|
17216
17249
|
setupNavigationButtons(survey) {
|
|
17217
17250
|
const navigationBar = new SurveyElementActionContainer();
|
|
17251
|
+
navigationBar.allowResponsiveness();
|
|
17218
17252
|
survey["navigationBarValue"] = navigationBar;
|
|
17219
17253
|
survey.findLayoutElement("buttons-navigation").data = navigationBar;
|
|
17220
17254
|
navigationBar.locOwner = survey;
|
|
@@ -21324,6 +21358,24 @@ __decorate([
|
|
|
21324
21358
|
property()
|
|
21325
21359
|
], PagesController.prototype, "page2Display", void 0);
|
|
21326
21360
|
|
|
21361
|
+
function debounce(func, delay) {
|
|
21362
|
+
let timeout;
|
|
21363
|
+
return function (...args) {
|
|
21364
|
+
clearTimeout(timeout);
|
|
21365
|
+
timeout = setTimeout(() => {
|
|
21366
|
+
func.apply(this, args);
|
|
21367
|
+
}, delay);
|
|
21368
|
+
};
|
|
21369
|
+
}
|
|
21370
|
+
const updateRowsVisibility = debounce((target) => {
|
|
21371
|
+
if (target.creator.rootElement.getAnimations({ subtree: true }).filter((animation => animation.effect.getComputedTiming().activeDuration !== Infinity && (animation.pending || animation.playState !== "finished")))[0]) {
|
|
21372
|
+
updateRowsVisibility(target);
|
|
21373
|
+
}
|
|
21374
|
+
else {
|
|
21375
|
+
target.creator.survey.pages.forEach(p => p.ensureRowsVisibility());
|
|
21376
|
+
target.creator.survey.getAllPanels().forEach(p => p.ensureRowsVisibility());
|
|
21377
|
+
}
|
|
21378
|
+
}, 50);
|
|
21327
21379
|
class SurveyElementAdornerBase extends Base {
|
|
21328
21380
|
getAnimatedElement() {
|
|
21329
21381
|
return null;
|
|
@@ -21356,6 +21408,7 @@ class SurveyElementAdornerBase extends Base {
|
|
|
21356
21408
|
this.hoverTimeout = undefined;
|
|
21357
21409
|
this.isHovered = false;
|
|
21358
21410
|
}
|
|
21411
|
+
this.actionContainer.allowResponsiveness();
|
|
21359
21412
|
}
|
|
21360
21413
|
getExpandCollapseAnimationOptions() {
|
|
21361
21414
|
const beforeRunAnimation = (el, animatingClassName) => {
|
|
@@ -21552,6 +21605,9 @@ class SurveyElementAdornerBase extends Base {
|
|
|
21552
21605
|
this.onElementSelectedChanged(newValue);
|
|
21553
21606
|
}, "questionSelected");
|
|
21554
21607
|
this.restoreState();
|
|
21608
|
+
if (surveyElement.getPropertyValue("isSelectedInDesigner")) {
|
|
21609
|
+
this.actionContainer.allowResponsiveness();
|
|
21610
|
+
}
|
|
21555
21611
|
this.updateActionsContainer(surveyElement);
|
|
21556
21612
|
this.updateActionsProperties();
|
|
21557
21613
|
surveyElement.setPropertyValue(SurveyElementAdornerBase.AdornerValueName, this);
|
|
@@ -21606,6 +21662,7 @@ class SurveyElementAdornerBase extends Base {
|
|
|
21606
21662
|
if (!isSelected)
|
|
21607
21663
|
return;
|
|
21608
21664
|
this.updateActionsProperties();
|
|
21665
|
+
this.actionContainer.allowResponsiveness();
|
|
21609
21666
|
}
|
|
21610
21667
|
getExpandCollapseAction() {
|
|
21611
21668
|
const collapseIcon = "icon-collapsepanel-16x16";
|
|
@@ -21778,17 +21835,16 @@ __decorate([
|
|
|
21778
21835
|
], SurveyElementAdornerBase.prototype, "allowExpandCollapse", void 0);
|
|
21779
21836
|
__decorate([
|
|
21780
21837
|
property({
|
|
21781
|
-
onSet: (val, target) => {
|
|
21838
|
+
onSet: (val, target, prevVal) => {
|
|
21782
21839
|
target.renderedCollapsed = val;
|
|
21783
21840
|
if (!val)
|
|
21784
21841
|
target.needToRenderContent = true;
|
|
21785
21842
|
if (target.creator.designerStateManager && target.surveyElement) {
|
|
21786
21843
|
target.creator.designerStateManager.setElementCollapsed(target.surveyElement, val);
|
|
21787
21844
|
}
|
|
21788
|
-
|
|
21789
|
-
target
|
|
21790
|
-
|
|
21791
|
-
}, 50);
|
|
21845
|
+
if (!!val !== !!prevVal) {
|
|
21846
|
+
updateRowsVisibility(target);
|
|
21847
|
+
}
|
|
21792
21848
|
}
|
|
21793
21849
|
})
|
|
21794
21850
|
], SurveyElementAdornerBase.prototype, "collapsed", void 0);
|
|
@@ -25533,6 +25589,8 @@ class ThemeTabPlugin {
|
|
|
25533
25589
|
* A `ThemeTabPlugin` instance that raised the event.
|
|
25534
25590
|
* - `options.theme`: [`ITheme`](https://surveyjs.io/form-library/documentation/api-reference/itheme)\
|
|
25535
25591
|
* A selected theme.
|
|
25592
|
+
*
|
|
25593
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/save-custom-theme/ (linkStyle))
|
|
25536
25594
|
* @see availableThemes
|
|
25537
25595
|
* @see addTheme
|
|
25538
25596
|
* @see removeTheme
|
|
@@ -27009,7 +27067,7 @@ class SurveyCreatorModel extends Base {
|
|
|
27009
27067
|
getProcessedText(text) { return text; }
|
|
27010
27068
|
getLocale() { return this.locale; }
|
|
27011
27069
|
/**
|
|
27012
|
-
* Specifies whether to display the Preview tab.
|
|
27070
|
+
* Specifies whether to display the [Preview](https://surveyjs.io/survey-creator/documentation/end-user-guide/user-interface#preview-tab) tab.
|
|
27013
27071
|
*
|
|
27014
27072
|
* Default value: `true`
|
|
27015
27073
|
* @see activeTab
|
|
@@ -27048,6 +27106,10 @@ class SurveyCreatorModel extends Base {
|
|
|
27048
27106
|
*
|
|
27049
27107
|
* - `"buttons"` (default)
|
|
27050
27108
|
* The Property Grid displays the properties of a currently selected category. Users can switch between categories using buttons on the right side of the Property Grid.
|
|
27109
|
+
*
|
|
27110
|
+
* [Accordion Mode Demo](https://surveyjs.io/survey-creator/examples/property-grid-accordion-view/ (linkStyle))
|
|
27111
|
+
*
|
|
27112
|
+
* [Buttons Mode Demo](https://surveyjs.io/survey-creator/examples/free-nps-survey-template/ (linkStyle))
|
|
27051
27113
|
*/
|
|
27052
27114
|
get propertyGridNavigationMode() {
|
|
27053
27115
|
return this.showOneCategoryInPropertyGrid ? "buttons" : "accordion";
|
|
@@ -27133,6 +27195,8 @@ class SurveyCreatorModel extends Base {
|
|
|
27133
27195
|
*
|
|
27134
27196
|
* - `"bypage"`
|
|
27135
27197
|
* Questions and panels are divided between pages. Users can use the page navigator to switch to a required page.
|
|
27198
|
+
*
|
|
27199
|
+
* [View Page-By-Page Mode Demo](https://surveyjs.io/survey-creator/examples/page-level-editing/ (linkStyle))
|
|
27136
27200
|
* @see allowModifyPages
|
|
27137
27201
|
*/
|
|
27138
27202
|
get pageEditMode() {
|
|
@@ -27337,6 +27401,8 @@ class SurveyCreatorModel extends Base {
|
|
|
27337
27401
|
//#region Theme
|
|
27338
27402
|
/**
|
|
27339
27403
|
* An object that enables you to manage UI themes. Refer to the following API section for information on available properties, methods, and events: [`ThemeTabPlugin`](https://surveyjs.io/survey-creator/documentation/api-reference/themetabplugin).
|
|
27404
|
+
*
|
|
27405
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/save-custom-theme/ (linkStyle))
|
|
27340
27406
|
* @see showThemeTab
|
|
27341
27407
|
* @see saveThemeFunc
|
|
27342
27408
|
*/
|
|
@@ -27347,6 +27413,8 @@ class SurveyCreatorModel extends Base {
|
|
|
27347
27413
|
* A function that is called each time users click the [Save button](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#showSaveButton) or [auto-save](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#autoSaveEnabled) is triggered to save a theme JSON object.
|
|
27348
27414
|
*
|
|
27349
27415
|
* For more information, refer to the [Save and Load Custom Themes](https://surveyjs.io/survey-creator/documentation/theme-editor#save-and-load-custom-themes) help topic.
|
|
27416
|
+
*
|
|
27417
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/change-form-theme/ (linkStyle))
|
|
27350
27418
|
* @see showThemeTab
|
|
27351
27419
|
* @see themeEditor
|
|
27352
27420
|
* @see saveSurveyFunc
|
|
@@ -27742,11 +27810,11 @@ class SurveyCreatorModel extends Base {
|
|
|
27742
27810
|
*/
|
|
27743
27811
|
this.onDefineElementMenuItems = this.onElementGetActions;
|
|
27744
27812
|
/**
|
|
27745
|
-
* An event that is raised when Survey Creator adds properties to a survey element selected on the design surface. Handle this event if you cancel the addition of certain properties and thus [hide them from the Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid-customization#hide-properties-from-the-property-grid).
|
|
27813
|
+
* An event that is raised when Survey Creator adds properties to a survey element selected on the design surface. Handle this event if you want to cancel the addition of certain properties and thus [hide them from the Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid-customization#hide-properties-from-the-property-grid).
|
|
27746
27814
|
*
|
|
27747
27815
|
* For information on event handler parameters, refer to descriptions within the interface.
|
|
27748
27816
|
*
|
|
27749
|
-
* [View Demo](https://surveyjs.io/survey-creator/examples/
|
|
27817
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/remove-properties-from-property-grid/ (linkStyle))
|
|
27750
27818
|
*/
|
|
27751
27819
|
this.onPropertyShowing = this.addCreatorEvent();
|
|
27752
27820
|
this.onCanShowProperty = this.onPropertyShowing;
|
|
@@ -27765,7 +27833,11 @@ class SurveyCreatorModel extends Base {
|
|
|
27765
27833
|
*/
|
|
27766
27834
|
this.onPropertyEditorCreated = this.addCreatorEvent();
|
|
27767
27835
|
/**
|
|
27768
|
-
* An event that is raised when title actions are added to a property editor. Title actions are most often used to reveal hints
|
|
27836
|
+
* An event that is raised when title actions are added to a property editor. Title actions are most often used to reveal property hints. Handle this event you want to add, remove, or modify the title actions.
|
|
27837
|
+
*
|
|
27838
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
27839
|
+
*
|
|
27840
|
+
* [View Demo](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onPropertyEditorUpdateTitleActions (linkStyle))
|
|
27769
27841
|
*/
|
|
27770
27842
|
this.onPropertyEditorUpdateTitleActions = this.addCreatorEvent();
|
|
27771
27843
|
/**
|
|
@@ -28030,6 +28102,10 @@ class SurveyCreatorModel extends Base {
|
|
|
28030
28102
|
* });
|
|
28031
28103
|
* ```
|
|
28032
28104
|
*
|
|
28105
|
+
* [Multilingual Form Demo](https://surveyjs.io/survey-creator/examples/create-multilingual-forms/ (linkStyle))
|
|
28106
|
+
*
|
|
28107
|
+
* [AI-Powered Translation Demo](https://surveyjs.io/survey-creator/examples/ai-translation/ (linkStyle))
|
|
28108
|
+
*
|
|
28033
28109
|
* > Survey Creator does not include a machine translation service out of the box. Our component only provides a UI for calling the service API.
|
|
28034
28110
|
* @see startMachineTranslationTo
|
|
28035
28111
|
*/
|
|
@@ -28047,6 +28123,10 @@ class SurveyCreatorModel extends Base {
|
|
|
28047
28123
|
this.onTranslationItemChanging = this.addCreatorEvent();
|
|
28048
28124
|
/**
|
|
28049
28125
|
* An event that is raised when users drag and drop survey elements within the design surface. Use this event to control drag and drop operations.
|
|
28126
|
+
*
|
|
28127
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
|
28128
|
+
*
|
|
28129
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/page-break-and-page-merge/ (linkStyle))
|
|
28050
28130
|
* @see onDragStart
|
|
28051
28131
|
* @see onDragEnd
|
|
28052
28132
|
*/
|
|
@@ -28128,6 +28208,8 @@ class SurveyCreatorModel extends Base {
|
|
|
28128
28208
|
* Specifies whether Survey Creator UI elements display survey, page, and question titles instead of their names.
|
|
28129
28209
|
*
|
|
28130
28210
|
* Default value: `false`
|
|
28211
|
+
*
|
|
28212
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/dynamically-modify-newly-added-questions/ (linkStyle))
|
|
28131
28213
|
* @see onElementGetDisplayName
|
|
28132
28214
|
*/
|
|
28133
28215
|
this.useElementTitles = false;
|
|
@@ -28339,6 +28421,8 @@ class SurveyCreatorModel extends Base {
|
|
|
28339
28421
|
* Specifies whether to clear translations to other languages when a source language translation is changed.
|
|
28340
28422
|
*
|
|
28341
28423
|
* Default value: `false`
|
|
28424
|
+
*
|
|
28425
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/ai-translation/ (linkStyle))
|
|
28342
28426
|
* @see showTranslationTab
|
|
28343
28427
|
*/
|
|
28344
28428
|
this.clearTranslationsOnSourceTextChange = false;
|
|
@@ -28418,6 +28502,8 @@ class SurveyCreatorModel extends Base {
|
|
|
28418
28502
|
* Specifies whether to show the sidebar that displays the Property Grid.
|
|
28419
28503
|
*
|
|
28420
28504
|
* Default value: `true`
|
|
28505
|
+
*
|
|
28506
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/customize-property-editors/ (linkStyle))
|
|
28421
28507
|
* @see sidebarLocation
|
|
28422
28508
|
*/
|
|
28423
28509
|
get showSidebar() {
|
|
@@ -29933,6 +30019,8 @@ class SurveyCreatorModel extends Base {
|
|
|
29933
30019
|
}
|
|
29934
30020
|
/**
|
|
29935
30021
|
* Activates a specified category in Property Grid. Applies only if [`propertyGridNavigationMode`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#propertyGridNavigationMode) is `"buttons"`.
|
|
30022
|
+
*
|
|
30023
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/add-properties-to-property-grid/ (linkStyle))
|
|
29936
30024
|
* @param name A [category name](https://surveyjs.io/form-library/documentation/customize-question-types/add-custom-properties-to-a-form#category).
|
|
29937
30025
|
*/
|
|
29938
30026
|
activatePropertyGridCategory(name) {
|
|
@@ -30511,6 +30599,8 @@ class SurveyCreatorModel extends Base {
|
|
|
30511
30599
|
* Starts the translation of survey strings from the default language to one or more specified languages using a machine translation service, such as Google Translate or Microsoft Translator.
|
|
30512
30600
|
*
|
|
30513
30601
|
* This method only launches the operation by raising the [`onMachineTranslate`](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onMachineTranslate) event. Handle this event to perform the actual translation.
|
|
30602
|
+
*
|
|
30603
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/ai-translation/ (linkStyle))
|
|
30514
30604
|
* @param locales An array of locale codes that correspond to target languages, for example, `[ "de", "fr" ]`.
|
|
30515
30605
|
*/
|
|
30516
30606
|
startMachineTranslationTo(locales) {
|
|
@@ -30612,6 +30702,8 @@ class SurveyCreatorModel extends Base {
|
|
|
30612
30702
|
* A function that is called each time users click the [Save button](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#showSaveButton) or [auto-save](https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#autoSaveEnabled) is triggered to save a survey JSON schema.
|
|
30613
30703
|
*
|
|
30614
30704
|
* For more information, refer to the Save and Load Survey Model Schemas help topic for your framework: [Angular](https://surveyjs.io/survey-creator/documentation/get-started-angular#save-and-load-survey-model-schemas) | [Vue](https://surveyjs.io/survey-creator/documentation/get-started-vue#save-and-load-survey-model-schemas) | [React](https://surveyjs.io/survey-creator/documentation/get-started-react#save-and-load-survey-model-schemas) | [HTML/CSS/JavaScript](https://surveyjs.io/survey-creator/documentation/get-started-html-css-javascript#save-and-load-survey-model-schemas).
|
|
30705
|
+
*
|
|
30706
|
+
* [View Demo](https://surveyjs.io/survey-creator/examples/set-how-survey-configuration-changes-are-saved/ (linkStyle))
|
|
30615
30707
|
* @see saveThemeFunc
|
|
30616
30708
|
*/
|
|
30617
30709
|
get saveSurveyFunc() {
|
|
@@ -32457,17 +32549,26 @@ class QuestionAdornerViewModel extends SurveyElementAdornerBase {
|
|
|
32457
32549
|
return newAction;
|
|
32458
32550
|
}
|
|
32459
32551
|
jsonsAreCompatible(objJson, json) {
|
|
32460
|
-
let
|
|
32461
|
-
|
|
32462
|
-
|
|
32463
|
-
|
|
32464
|
-
|
|
32465
|
-
|
|
32466
|
-
|
|
32467
|
-
|
|
32552
|
+
let question = this.element;
|
|
32553
|
+
if (!!objJson && !!objJson.type && question.getType() !== objJson.type) {
|
|
32554
|
+
question = QuestionFactory.Instance.createQuestion(objJson.type, "question") || this.element;
|
|
32555
|
+
}
|
|
32556
|
+
const keys = Object.keys(json);
|
|
32557
|
+
for (let i = 0; i < keys.length; i++) {
|
|
32558
|
+
const p = keys[i];
|
|
32559
|
+
if (!objJson && p === "type")
|
|
32560
|
+
continue;
|
|
32561
|
+
let propertyValue = !!objJson ? objJson[p] : question.getPropertyValue(p);
|
|
32562
|
+
if (!!objJson && propertyValue === undefined) {
|
|
32563
|
+
propertyValue = p === "type" ? question.getType() : question.getDefaultPropertyValue(p);
|
|
32564
|
+
}
|
|
32565
|
+
if (!Helpers.isTwoValueEquals(json[p], propertyValue))
|
|
32566
|
+
return false;
|
|
32567
|
+
}
|
|
32568
|
+
return true;
|
|
32468
32569
|
}
|
|
32469
32570
|
jsonIsCorresponded(json) {
|
|
32470
|
-
return this.jsonsAreCompatible(
|
|
32571
|
+
return this.jsonsAreCompatible(undefined, json);
|
|
32471
32572
|
}
|
|
32472
32573
|
toolboxItemIsCorresponded(toolboxItem, someItemSelectedAlready) {
|
|
32473
32574
|
const elementType = this.element.getType();
|
|
@@ -36223,8 +36324,8 @@ class CreatorPreset extends CreatorPresetBase {
|
|
|
36223
36324
|
}
|
|
36224
36325
|
|
|
36225
36326
|
let Version;
|
|
36226
|
-
Version = `${"2.0.
|
|
36227
|
-
checkLibraryVersion(`${"2.0.
|
|
36327
|
+
Version = `${"2.0.9"}`;
|
|
36328
|
+
checkLibraryVersion(`${"2.0.9"}`, "survey-creator-core");
|
|
36228
36329
|
|
|
36229
36330
|
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 };
|
|
36230
36331
|
//# sourceMappingURL=survey-creator-core.mjs.map
|