declare module "settings" { export type ISurveyEnvironment = { root: Document | ShadowRoot; rootElement: HTMLElement | ShadowRoot; popupMountContainer: HTMLElement | string; svgMountContainer: HTMLElement | string; stylesSheetsMountContainer: HTMLElement; }; /** * Global settings that apply to all surveys on the page. To specify one of the settings, use the code below: * * ```js * import { settings } from "survey-core"; * * settings.settingName = "value"; * ``` */ export var settings: { /** * Specifies an action to perform when users press the Enter key within a survey. * * Possible values: * * - `"moveToNextEditor"` - Moves focus to the next editor. * - `"loseFocus"` - Removes focus from the current editor. * - `"default"` - Behaves as a standard `` element. */ enterKeyAction: "default" | "moveToNextEditor" | "loseFocus"; /** * An object that configures string comparison. * * Nested properties: * * - `trimStrings`: `Boolean`\ * Specifies whether to remove whitespace from both ends of a string before the comparison. Default value: `true`. * * - `caseSensitive`: `Boolean`\ * Specifies whether to differentiate between capital and lower-case letters. Default value: `false`. */ comparator: { trimStrings: boolean; caseSensitive: boolean; }; expressionDisableConversionChar: string; /** * Disable this property if you want internal SurveyJS functions to use methods that work with UTC date and time (`setUTCDate()` `setUTCHours()`, etc.) instead of methods that work with local date and time (`setYear`, `setHours()`, etc.). * * Default value: `true` */ useLocalTimeZone: boolean; commentPrefix: string; /** * A suffix added to the name of the property that stores comments. * * Default value: "-Comment" * * You can specify this setting for an individual survey: [`commentSuffix`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#commentSuffix). */ commentSuffix: string; /** * Specifies whether to encode URL parameters when you access a web service. * * Default value: `true` */ webserviceEncodeParameters: boolean; /** * Specifies whether to cache choices loaded from a web service. * * Default value: `true` * @see settings.disableOnGettingChoicesFromWeb */ useCachingForChoicesRestful: boolean; useCachingForChoicesRestfull: boolean; /** * The URL of the SurveyJS Service API endpoint. */ surveyServiceUrl: string; /** * A separator used in a shorthand notation that specifies a value and display text for an [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) object: `"value|text"`. * * Default value: `"|"` */ itemValueSeparator: string; /** * Enable this property if you want to serialize [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) instances as objects even when they include only the `value` property. * * ```js * import { ItemValue, settings } from "survey-core"; * * settings.itemValueAlwaysSerializeAsObject = true; * const item = new ItemValue(5); * const itemString = item.toJSON(); // Produces { value: 5 } instead of 5 * ``` * * @see settings.serializeLocalizableStringAsObject */ itemValueAlwaysSerializeAsObject: boolean; /** * Enable this property if you want to serialize the `text` property of [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) objects even when it is empty or equal to the `value` property. * * ```js * import { ItemValue, settings } from "survey-core"; * * settings.itemValueAlwaysSerializeText = true; * const item = new ItemValue("item1"); * const itemString = item.toJSON(); // Produces { value: "item1", text: "item1" } instead of "item1" * ``` */ itemValueAlwaysSerializeText: boolean; /** * Specifies a property key that stores a translation for the default locale. * * Default value: `"default"` * @see storeDuplicatedTranslations */ defaultLocaleName: string; /** * Specifies whether surveys should store translation strings that equal the translation string specified by the `"default"` key. * * Default value: `false` * @see settings.defaultLocaleName */ storeDuplicatedTranslations: boolean; /** * Specifies a property key that stores an object with default cell values in [Single-Choice Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model) questions. * * Default value: "default" */ matrixDefaultRowName: string; /** * The default type of matrix cells in the [Multiple-Choice Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list) and [Dynamic Matrix](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model) question types. * * Default value: `"dropdown"` * * You can specify this setting for individual questions or matrix columns: [`cellType`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#cellType). Refer to the `cellType` property description for information on possible values. */ matrixDefaultCellType: string; /** * A suffix added to the name of the property that stores total values. The resulting property name consists of the matrix name and the suffix. * * Default value: `"-total"` */ matrixTotalValuePostFix: string; /** * A maximum number of rows in a [Dynamic Matrix](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model). * * Default value: 1000 * * You can specify this setting for an individual Dynamic Matrix: [`maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model#maxRowCount). */ matrixMaximumRowCount: number; /** * A maximum number of matrix rows included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic. * * Default value: 1 * * If you set this property to 0, the Condition menu does not include any matrix rows. Users still can specify conditions that use matrix rows but only with Manual Entry. */ matrixMaxRowCountInCondition: number; /** * A maximum number of panels from [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model) included in the Condition drop-down menu in Survey Creator. This menu is used to configure conditional survey logic. * * Default value: 1 * * If you set this property to 0, the Condition menu does not include any panel questions. Users still can specify conditions that use panel questions but only with Manual Entry. */ panelDynamicMaxPanelCountInCondition: number; /** * Disable this property if you want to render the Remove action in Dynamic Matrix as a button. Otherwise, the action is rendered as an icon. * * Default value: `true` */ matrixRenderRemoveAsIcon: boolean; /** * A maximum number of panels in [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model). * * Default value: 100 * * You can specify this setting for an individual Dynamic Panel: [`maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#maxPanelCount). */ panelMaximumPanelCount: number; /** * A maximum number of rate values in a [Rating](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) question. * * Default value: 20 */ ratingMaximumRateValueCount: number; /** * Specifies whether to close the drop-down menu of a [TagBox](https://surveyjs.io/form-library/examples/how-to-create-multiselect-tag-box/) question after a user selects a value. * * This setting applies to all TagBox questions on a page. You can use the [closeOnSelect](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model#closeOnSelect) property to specify the same setting for an individual TagBox question. */ tagboxCloseOnSelect: boolean; /** * Disables the question while choices are being loaded from a web service. * * Default value: `false` * @see settings.useCachingForChoicesRestful */ disableOnGettingChoicesFromWeb: boolean; /** * Enable this property if you want to serialize [`LocalizableString`](https://surveyjs.io/form-library/documentation/api-reference/localizablestring) instances as objects even when they include only a translation string for the default locale. For example, `"Custom String"` will be serialized as `{ default: "Custom String" }`. * * Default value: `false` * @see settings.itemValueAlwaysSerializeAsObject */ serializeLocalizableStringAsObject: boolean; /** * Specifies whether to display an empty title for pages and panels when they are being designed in Survey Creator. * * Default value: `true` */ allowShowEmptyTitleInDesignMode: boolean; /** * Specifies whether to display an empty description for pages and panels when they are being designed in Survey Creator. * * Default value: `true` */ allowShowEmptyDescriptionInDesignMode: boolean; /** * Specifies whether to re-evaluate an expression associated with the [Complete trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete) immediately when a question value changes. If the expression evaluates to `true`, the trigger is executed. * * Keep this property set to `false` if you want to re-evaluate the Complete trigger's expression only when the respondents navigate to another page. * * Default value: `false` * @see settings.changeNavigationButtonsOnCompleteTrigger */ executeCompleteTriggerOnValueChanged: boolean; /** * Specifies whether to replace the Next button with the Complete button when the [Complete trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete) is going to be executed. * * Default value: `true` * @see settings.executeCompleteTriggerOnValueChanged */ changeNavigationButtonsOnCompleteTrigger: boolean; /** * Specifies whether to re-evaluate an expression associated with the [Skip trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#skip) immediately when a question value changes. If the expression evaluates to `true`, the trigger is executed. * * Disable this property if you want to re-evaluate the Skip trigger's expression only when the respondents navigate to another page. * * Default value: `true` */ executeSkipTriggerOnValueChanged: boolean; /** * Specifies how to render the input field of [Comment](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model) questions in [read-only](https://surveyjs.io/form-library/documentation/api-reference/comment-field-model#readOnly) mode. * * Possible values: * * - `"textarea"` (default) - Renders the input field as a disabled `