survey-core 1.9.133 → 1.9.135

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.
Files changed (261) hide show
  1. package/defaultV2.css +26 -20
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +26 -20
  4. package/defaultV2.fontless.css.map +1 -1
  5. package/defaultV2.fontless.min.css +2 -2
  6. package/defaultV2.min.css +2 -2
  7. package/i18n/arabic.js +1 -1
  8. package/i18n/arabic.min.js +1 -1
  9. package/i18n/basque.js +1 -1
  10. package/i18n/basque.min.js +1 -1
  11. package/i18n/bulgarian.js +1 -1
  12. package/i18n/bulgarian.min.js +1 -1
  13. package/i18n/catalan.js +1 -1
  14. package/i18n/catalan.min.js +1 -1
  15. package/i18n/croatian.js +1 -1
  16. package/i18n/croatian.min.js +1 -1
  17. package/i18n/czech.js +1 -1
  18. package/i18n/czech.min.js +1 -1
  19. package/i18n/danish.js +1 -1
  20. package/i18n/danish.min.js +1 -1
  21. package/i18n/dutch.js +1 -1
  22. package/i18n/dutch.min.js +1 -1
  23. package/i18n/english.js +1 -1
  24. package/i18n/english.min.js +1 -1
  25. package/i18n/estonian.js +1 -1
  26. package/i18n/estonian.min.js +1 -1
  27. package/i18n/finnish.js +1 -1
  28. package/i18n/finnish.min.js +1 -1
  29. package/i18n/french.js +1 -1
  30. package/i18n/french.min.js +1 -1
  31. package/i18n/georgian.js +1 -1
  32. package/i18n/georgian.min.js +1 -1
  33. package/i18n/german.js +1 -1
  34. package/i18n/german.min.js +1 -1
  35. package/i18n/greek.js +1 -1
  36. package/i18n/greek.min.js +1 -1
  37. package/i18n/hebrew.js +1 -1
  38. package/i18n/hebrew.min.js +1 -1
  39. package/i18n/hindi.js +1 -1
  40. package/i18n/hindi.min.js +1 -1
  41. package/i18n/hungarian.js +1 -1
  42. package/i18n/hungarian.min.js +1 -1
  43. package/i18n/icelandic.js +1 -1
  44. package/i18n/icelandic.min.js +1 -1
  45. package/i18n/index.js +1 -1
  46. package/i18n/index.min.js +1 -1
  47. package/i18n/indonesian.js +1 -1
  48. package/i18n/indonesian.min.js +1 -1
  49. package/i18n/italian.js +1 -1
  50. package/i18n/italian.min.js +1 -1
  51. package/i18n/japanese.js +1 -1
  52. package/i18n/japanese.min.js +1 -1
  53. package/i18n/kazakh.js +1 -1
  54. package/i18n/kazakh.min.js +1 -1
  55. package/i18n/korean.js +1 -1
  56. package/i18n/korean.min.js +1 -1
  57. package/i18n/latvian.js +1 -1
  58. package/i18n/latvian.min.js +1 -1
  59. package/i18n/lithuanian.js +1 -1
  60. package/i18n/lithuanian.min.js +1 -1
  61. package/i18n/macedonian.js +1 -1
  62. package/i18n/macedonian.min.js +1 -1
  63. package/i18n/malay.js +1 -1
  64. package/i18n/malay.min.js +1 -1
  65. package/i18n/nl-BE.js +1 -1
  66. package/i18n/nl-BE.min.js +1 -1
  67. package/i18n/norwegian.js +1 -1
  68. package/i18n/norwegian.min.js +1 -1
  69. package/i18n/persian.js +1 -1
  70. package/i18n/persian.min.js +1 -1
  71. package/i18n/polish.js +1 -1
  72. package/i18n/polish.min.js +1 -1
  73. package/i18n/portuguese-br.js +1 -1
  74. package/i18n/portuguese-br.min.js +1 -1
  75. package/i18n/portuguese.js +1 -1
  76. package/i18n/portuguese.min.js +1 -1
  77. package/i18n/romanian.js +1 -1
  78. package/i18n/romanian.min.js +1 -1
  79. package/i18n/russian.js +1 -1
  80. package/i18n/russian.min.js +1 -1
  81. package/i18n/serbian.js +1 -1
  82. package/i18n/serbian.min.js +1 -1
  83. package/i18n/simplified-chinese.js +1 -1
  84. package/i18n/simplified-chinese.min.js +1 -1
  85. package/i18n/slovak.js +1 -1
  86. package/i18n/slovak.min.js +1 -1
  87. package/i18n/spanish.js +1 -1
  88. package/i18n/spanish.min.js +1 -1
  89. package/i18n/swahili.js +1 -1
  90. package/i18n/swahili.min.js +1 -1
  91. package/i18n/swedish.js +1 -1
  92. package/i18n/swedish.min.js +1 -1
  93. package/i18n/tajik.js +1 -1
  94. package/i18n/tajik.min.js +1 -1
  95. package/i18n/telugu.js +1 -1
  96. package/i18n/telugu.min.js +1 -1
  97. package/i18n/thai.js +1 -1
  98. package/i18n/thai.min.js +1 -1
  99. package/i18n/traditional-chinese.js +1 -1
  100. package/i18n/traditional-chinese.min.js +1 -1
  101. package/i18n/turkish.js +1 -1
  102. package/i18n/turkish.min.js +1 -1
  103. package/i18n/ukrainian.js +1 -1
  104. package/i18n/ukrainian.min.js +1 -1
  105. package/i18n/urdu.js +1 -1
  106. package/i18n/urdu.min.js +1 -1
  107. package/i18n/vietnamese.js +1 -1
  108. package/i18n/vietnamese.min.js +1 -1
  109. package/i18n/welsh.js +1 -1
  110. package/i18n/welsh.min.js +1 -1
  111. package/modern.css +6 -1
  112. package/modern.css.map +1 -1
  113. package/modern.fontless.css +6 -1
  114. package/modern.fontless.css.map +1 -1
  115. package/modern.fontless.min.css +2 -2
  116. package/modern.min.css +2 -2
  117. package/package.json +1 -1
  118. package/plugins/bootstrap-integration.js +1 -1
  119. package/plugins/bootstrap-integration.min.js +1 -1
  120. package/plugins/bootstrap-material-integration.js +1 -1
  121. package/plugins/bootstrap-material-integration.min.js +1 -1
  122. package/survey.core.js +2424 -634
  123. package/survey.core.js.map +1 -1
  124. package/survey.core.min.js +5 -5
  125. package/survey.css +1 -1
  126. package/survey.css.map +1 -1
  127. package/survey.i18n.js +1 -1
  128. package/survey.i18n.min.js +1 -1
  129. package/survey.min.css +1 -1
  130. package/themes/borderless-dark-panelless.js +1 -1
  131. package/themes/borderless-dark-panelless.min.js +1 -1
  132. package/themes/borderless-dark.js +1 -1
  133. package/themes/borderless-dark.min.js +1 -1
  134. package/themes/borderless-light-panelless..js +1 -1
  135. package/themes/borderless-light-panelless..min.js +1 -1
  136. package/themes/borderless-light.js +1 -1
  137. package/themes/borderless-light.min.js +1 -1
  138. package/themes/contrast-dark-panelless.js +1 -1
  139. package/themes/contrast-dark-panelless.min.js +1 -1
  140. package/themes/contrast-dark.js +1 -1
  141. package/themes/contrast-dark.min.js +1 -1
  142. package/themes/contrast-light-panelless.js +1 -1
  143. package/themes/contrast-light-panelless.min.js +1 -1
  144. package/themes/contrast-light.js +1 -1
  145. package/themes/contrast-light.min.js +1 -1
  146. package/themes/default-dark-panelless.js +1 -1
  147. package/themes/default-dark-panelless.min.js +1 -1
  148. package/themes/default-dark.js +1 -1
  149. package/themes/default-dark.min.js +1 -1
  150. package/themes/default-light-panelless.js +1 -1
  151. package/themes/default-light-panelless.min.js +1 -1
  152. package/themes/default-light.js +1 -1
  153. package/themes/default-light.min.js +1 -1
  154. package/themes/doubleborder-dark-panelless.js +1 -1
  155. package/themes/doubleborder-dark-panelless.min.js +1 -1
  156. package/themes/doubleborder-dark.js +1 -1
  157. package/themes/doubleborder-dark.min.js +1 -1
  158. package/themes/doubleborder-light-panelles.js +1 -1
  159. package/themes/doubleborder-light-panelles.min.js +1 -1
  160. package/themes/doubleborder-light.js +1 -1
  161. package/themes/doubleborder-light.min.js +1 -1
  162. package/themes/flat-dark-panelless.js +1 -1
  163. package/themes/flat-dark-panelless.min.js +1 -1
  164. package/themes/flat-dark.js +1 -1
  165. package/themes/flat-dark.min.js +1 -1
  166. package/themes/flat-light-panelless.js +1 -1
  167. package/themes/flat-light-panelless.min.js +1 -1
  168. package/themes/flat-light.js +1 -1
  169. package/themes/flat-light.min.js +1 -1
  170. package/themes/index.js +1 -1
  171. package/themes/index.min.js +1 -1
  172. package/themes/layered-dark-panelless.js +1 -1
  173. package/themes/layered-dark-panelless.min.js +1 -1
  174. package/themes/layered-dark.js +1 -1
  175. package/themes/layered-dark.min.js +1 -1
  176. package/themes/layered-light-panelless.js +1 -1
  177. package/themes/layered-light-panelless.min.js +1 -1
  178. package/themes/layered-light.js +1 -1
  179. package/themes/layered-light.min.js +1 -1
  180. package/themes/plain-dark-panelless.js +1 -1
  181. package/themes/plain-dark-panelless.min.js +1 -1
  182. package/themes/plain-dark.js +1 -1
  183. package/themes/plain-dark.min.js +1 -1
  184. package/themes/plain-light-panelless.js +1 -1
  185. package/themes/plain-light-panelless.min.js +1 -1
  186. package/themes/plain-light.js +1 -1
  187. package/themes/plain-light.min.js +1 -1
  188. package/themes/sharp-dark-panelless.js +1 -1
  189. package/themes/sharp-dark-panelless.min.js +1 -1
  190. package/themes/sharp-dark.js +1 -1
  191. package/themes/sharp-dark.min.js +1 -1
  192. package/themes/sharp-light-panelless.js +1 -1
  193. package/themes/sharp-light-panelless.min.js +1 -1
  194. package/themes/sharp-light.js +1 -1
  195. package/themes/sharp-light.min.js +1 -1
  196. package/themes/solid-dark-panelless.js +1 -1
  197. package/themes/solid-dark-panelless.min.js +1 -1
  198. package/themes/solid-dark.js +1 -1
  199. package/themes/solid-dark.min.js +1 -1
  200. package/themes/solid-light-panelless.js +1 -1
  201. package/themes/solid-light-panelless.min.js +1 -1
  202. package/themes/solid-light.js +1 -1
  203. package/themes/solid-light.min.js +1 -1
  204. package/themes/three-dimensional-dark-panelless.js +1 -1
  205. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  206. package/themes/three-dimensional-dark.js +1 -1
  207. package/themes/three-dimensional-dark.min.js +1 -1
  208. package/themes/three-dimensional-light-panelless.js +1 -1
  209. package/themes/three-dimensional-light-panelless.min.js +1 -1
  210. package/themes/three-dimensional-light.js +1 -1
  211. package/themes/three-dimensional-light.min.js +1 -1
  212. package/ts3.4/typings/base-interfaces.d.ts +4 -1
  213. package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +5 -0
  214. package/ts3.4/typings/dragdrop/core.d.ts +1 -0
  215. package/ts3.4/typings/dropdownListModel.d.ts +1 -0
  216. package/ts3.4/typings/entries/chunks/model.d.ts +5 -0
  217. package/ts3.4/typings/global_variables_utils.d.ts +27 -0
  218. package/ts3.4/typings/list.d.ts +3 -0
  219. package/ts3.4/typings/martixBase.d.ts +1 -0
  220. package/ts3.4/typings/mask/input_element_adapter.d.ts +14 -0
  221. package/ts3.4/typings/mask/mask_base.d.ts +24 -0
  222. package/ts3.4/typings/mask/mask_currency.d.ts +41 -0
  223. package/ts3.4/typings/mask/mask_datetime.d.ts +65 -0
  224. package/ts3.4/typings/mask/mask_numeric.d.ts +88 -0
  225. package/ts3.4/typings/mask/mask_pattern.d.ts +70 -0
  226. package/ts3.4/typings/mask/mask_utils.d.ts +18 -0
  227. package/ts3.4/typings/question_baseselect.d.ts +1 -0
  228. package/ts3.4/typings/question_dropdown.d.ts +8 -0
  229. package/ts3.4/typings/question_html.d.ts +1 -0
  230. package/ts3.4/typings/question_tagbox.d.ts +1 -0
  231. package/ts3.4/typings/question_text.d.ts +47 -0
  232. package/ts3.4/typings/settings.d.ts +24 -2
  233. package/ts3.4/typings/survey-element.d.ts +1 -0
  234. package/ts3.4/typings/survey-events-api.d.ts +28 -1
  235. package/ts3.4/typings/survey.d.ts +16 -10
  236. package/ts3.4/typings/surveytimer.d.ts +1 -1
  237. package/typings/base-interfaces.d.ts +4 -1
  238. package/typings/defaultCss/defaultV2Css.d.ts +5 -0
  239. package/typings/dragdrop/core.d.ts +1 -0
  240. package/typings/dropdownListModel.d.ts +1 -0
  241. package/typings/entries/chunks/model.d.ts +5 -0
  242. package/typings/global_variables_utils.d.ts +27 -0
  243. package/typings/list.d.ts +3 -0
  244. package/typings/martixBase.d.ts +1 -0
  245. package/typings/mask/input_element_adapter.d.ts +14 -0
  246. package/typings/mask/mask_base.d.ts +24 -0
  247. package/typings/mask/mask_currency.d.ts +41 -0
  248. package/typings/mask/mask_datetime.d.ts +65 -0
  249. package/typings/mask/mask_numeric.d.ts +88 -0
  250. package/typings/mask/mask_pattern.d.ts +70 -0
  251. package/typings/mask/mask_utils.d.ts +18 -0
  252. package/typings/question_baseselect.d.ts +1 -0
  253. package/typings/question_dropdown.d.ts +8 -0
  254. package/typings/question_html.d.ts +1 -0
  255. package/typings/question_tagbox.d.ts +1 -0
  256. package/typings/question_text.d.ts +49 -0
  257. package/typings/settings.d.ts +24 -2
  258. package/typings/survey-element.d.ts +1 -0
  259. package/typings/survey-events-api.d.ts +28 -1
  260. package/typings/survey.d.ts +16 -10
  261. package/typings/surveytimer.d.ts +1 -1
@@ -0,0 +1,88 @@
1
+ import { InputMaskBase } from "./mask_base";
2
+ import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
3
+ interface INumericalComposition {
4
+ integralPart: string;
5
+ fractionalPart: string;
6
+ isNegative?: boolean;
7
+ hasDecimalSeparator?: boolean;
8
+ }
9
+ export declare function splitString(str: string, reverse?: boolean, n?: number): Array<string>;
10
+ /**
11
+ * A class that describes an input mask of the `"numeric"` [`maskType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#maskType).
12
+ *
13
+ * The following code shows how to specify the properties of this class within a survey JSON schema:
14
+ *
15
+ * ```js
16
+ * const surveyJson = {
17
+ * "elements": [{
18
+ * "name": "textquestion1"
19
+ * "type": "text",
20
+ * "maskType": "numeric",
21
+ * "maskSettings": {
22
+ * // Specify the properties of a numeric input mask here
23
+ * }
24
+ * }]
25
+ * }
26
+ * ```
27
+ *
28
+ * [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
29
+ */
30
+ export declare class InputMaskNumeric extends InputMaskBase {
31
+ /**
32
+ * Specifies whether respondents can enter negative values.
33
+ *
34
+ * Default value: `true`
35
+ * @see min
36
+ * @see max
37
+ */
38
+ allowNegativeValues: boolean;
39
+ /**
40
+ * A symbol used to separate the fractional part from the integer part of a displayed number.
41
+ *
42
+ * Default value: `"."`
43
+ * @see precision
44
+ * @see thousandsSeparator
45
+ */
46
+ decimalSeparator: string;
47
+ /**
48
+ * Limits how many digits to retain after the decimal point for a displayed number.
49
+ *
50
+ * Default value: 2
51
+ *
52
+ * [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
53
+ * @see decimalSeparator
54
+ */
55
+ precision: number;
56
+ /**
57
+ * A symbol used to separate the digits of a large number into groups of three.
58
+ *
59
+ * Default value: `","`
60
+ * @see decimalSeparator
61
+ */
62
+ thousandsSeparator: string;
63
+ /**
64
+ * A minimum value that respondents can enter.
65
+ * @see max
66
+ * @see allowNegativeValues
67
+ */
68
+ min: number;
69
+ /**
70
+ * A maximum value that respondents can enter.
71
+ * @see min
72
+ * @see allowNegativeValues
73
+ */
74
+ max: number;
75
+ private calccaretPosition;
76
+ displayNumber(parsedNumber: INumericalComposition, insertThousandsSeparator?: boolean, matchWholeMask?: boolean): string;
77
+ convertNumber(parsedNumber: INumericalComposition): number;
78
+ validateNumber(number: INumericalComposition): boolean;
79
+ parseNumber(src: string | number): INumericalComposition;
80
+ getNumberMaskedValue(src: string | number, matchWholeMask?: boolean): string;
81
+ private getNumberUnmaskedValue;
82
+ getMaskedValue(src: any): string;
83
+ getUnmaskedValue(src: string): any;
84
+ processInput(args: ITextInputParams): IMaskedInputResult;
85
+ getType(): string;
86
+ protected isPropertyEmpty(value: any): boolean;
87
+ }
88
+ export {};
@@ -0,0 +1,70 @@
1
+ import { InputMaskBase } from "./mask_base";
2
+ import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
3
+ import { ILoadFromJSONOptions } from "../base-interfaces";
4
+ export interface IMaskLiteral {
5
+ type: "const" | "regex" | "fixed";
6
+ value: any;
7
+ }
8
+ export declare function getLiterals(pattern: string): Array<IMaskLiteral>;
9
+ export declare function getMaskedValueByPattern(src: string, pattern: string | Array<IMaskLiteral>, matchWholeMask: boolean): string;
10
+ export declare function getUnmaskedValueByPattern(str: string, pattern: string | Array<IMaskLiteral>, matchWholeMask: boolean, skipFixedChar?: boolean): string;
11
+ /**
12
+ * A class that describes an input mask of the `"pattern"` [`maskType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#maskType).
13
+ *
14
+ * The following code shows how to specify the properties of this class within a survey JSON schema:
15
+ *
16
+ * ```js
17
+ * const surveyJson = {
18
+ * "elements": [{
19
+ * "name": "textquestion1"
20
+ * "type": "text",
21
+ * "maskType": "pattern",
22
+ * "maskSettings": {
23
+ * // Specify the properties of a pattern input mask here
24
+ * }
25
+ * }]
26
+ * }
27
+ * ```
28
+ *
29
+ * [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
30
+ */
31
+ export declare class InputMaskPattern extends InputMaskBase {
32
+ private literals;
33
+ /**
34
+ * A pattern for the input value.
35
+ *
36
+ * If you set the [`maskType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#maskType) to `"pattern"`, the mask can contain string literals and the following placeholders:
37
+ *
38
+ * - `9` - A digit.
39
+ * - `a` - An upper- or lower-case letter.
40
+ * - `#` - A digit or an upper- or lower-case letter.
41
+ *
42
+ * Use backslash `\` to escape a character.
43
+ *
44
+ * Example: `+1(999)-999-99-99`
45
+ *
46
+ * If you set the [`maskType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#maskType) to `"datetime"`, the mask can contain separator characters and the following placeholders:
47
+ *
48
+ * - `m` - Month number.
49
+ * - `mm` - Month number, with leading zero for single-digit values.
50
+ * - `d` - Day of the month.
51
+ * - `dd` - Day of the month, with leading zero for single-digit values.
52
+ * - `yy` - Last two digits of the year.
53
+ * - `yyyy` - A four-digit year.
54
+ *
55
+ * Example: `mm/dd/yyyy`
56
+ *
57
+ * [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
58
+ * @see [settings.maskSettings](https://surveyjs.io/form-library/documentation/api-reference/settings#maskSettings)
59
+ */
60
+ pattern: string;
61
+ protected updateLiterals(): void;
62
+ protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
63
+ getType(): string;
64
+ fromJSON(json: any, options?: ILoadFromJSONOptions): void;
65
+ _getMaskedValue(src: string, matchWholeMask?: boolean): string;
66
+ _getUnmaskedValue(src: string, matchWholeMask?: boolean): string;
67
+ processInput(args: ITextInputParams): IMaskedInputResult;
68
+ getMaskedValue(src: any): string;
69
+ getUnmaskedValue(src: string): any;
70
+ }
@@ -0,0 +1,18 @@
1
+ export declare var numberDefinition: RegExp;
2
+ export interface IMaskedInputResult {
3
+ value: string;
4
+ caretPosition: number;
5
+ cancelPreventDefault?: boolean;
6
+ }
7
+ export interface ITextInputParams {
8
+ prevValue: string;
9
+ selectionStart: number;
10
+ selectionEnd: number;
11
+ insertedChars: string | null;
12
+ inputDirection?: "forward" | "backward";
13
+ }
14
+ export interface IInputMask {
15
+ getMaskedValue(src: any): string;
16
+ getUnmaskedValue(src: string): any;
17
+ processInput(args: ITextInputParams): IMaskedInputResult;
18
+ }
@@ -211,6 +211,7 @@ export declare class QuestionSelectBase extends Question {
211
211
  protected updateSelectedItemValues(): void;
212
212
  private setCustomValuesIntoItems;
213
213
  protected hasUnknownValue(val: any, includeOther?: boolean, isFilteredChoices?: boolean, checkEmptyValue?: boolean): boolean;
214
+ protected hasUnknownValueItem(val: any, includeOther?: boolean, isFilteredChoices?: boolean, checkEmptyValue?: boolean): boolean;
214
215
  protected isValueDisabled(val: any): boolean;
215
216
  /**
216
217
  * If the clearIncorrectValuesCallback is set, it is used to clear incorrect values instead of default behaviour.
@@ -101,6 +101,14 @@ export declare class QuestionDropdownModel extends QuestionSelectBase {
101
101
  * @see [SurveyModel.onChoicesSearch](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onChoicesSearch)
102
102
  */
103
103
  searchMode: "contains" | "startsWith";
104
+ /**
105
+ * Specifies whether to wrap long texts in choice options onto a new line.
106
+ *
107
+ * Default value: `true`
108
+ *
109
+ * Disable this property if you want the texts to be truncated with ellipsis.
110
+ */
111
+ textWrapEnabled: boolean;
104
112
  inputHasValue: boolean;
105
113
  readOnlyText: string;
106
114
  /**
@@ -22,4 +22,5 @@ export declare class QuestionHtmlModel extends QuestionNonValue {
22
22
  get processedHtml(): string;
23
23
  private processHtml;
24
24
  get isNewA11yStructure(): boolean;
25
+ get renderCssRoot(): string;
25
26
  }
@@ -55,6 +55,7 @@ export declare class QuestionTagboxModel extends QuestionCheckboxModel {
55
55
  * Specifies whether to close the drop-down menu after a user selects a value.
56
56
  */
57
57
  closeOnSelect: number;
58
+ textWrapEnabled: boolean;
58
59
  /**
59
60
  * A text displayed in the input field when it doesn't have a value.
60
61
  */
@@ -3,6 +3,8 @@ import { HashTable } from "./helpers";
3
3
  import { SurveyError } from "./survey-error";
4
4
  import { QuestionTextBase } from "./question_textbase";
5
5
  import { CssClassBuilder } from "./utils/cssClassBuilder";
6
+ import { InputMaskBase } from "./mask/mask_base";
7
+ import { IInputMask } from "./mask/mask_utils";
6
8
  /**
7
9
  * A class that describes the Single-Line Input question type.
8
10
  *
@@ -12,6 +14,45 @@ export declare class QuestionTextModel extends QuestionTextBase {
12
14
  private locDataListValue;
13
15
  private minValueRunner;
14
16
  private maxValueRunner;
17
+ private maskInputAdapter;
18
+ private createMaskAdapter;
19
+ private deleteMaskAdapter;
20
+ private updateMaskAdapter;
21
+ onSetMaskType(newValue: string): void;
22
+ /**
23
+ * Specifies the type of a mask applied to the input.
24
+ *
25
+ * Possible values:
26
+ *
27
+ * - `"none"` (default)
28
+ * - `"numeric"`
29
+ * - `"currency"`
30
+ * - `"datetime"`
31
+ * - `"pattern"`
32
+ *
33
+ * [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
34
+ * @see maskSettings
35
+ */
36
+ maskType: string;
37
+ get maskTypeIsEmpty(): boolean;
38
+ /**
39
+ * An object with properties that configure the mask applied to the input.
40
+ *
41
+ * Available properties depend on the specified [`maskType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#maskType) and belong to corresponding classes. Refer to the class APIs for a full list of properties:
42
+ *
43
+ * | `maskType` | Class |
44
+ * | ---------- | ----- |
45
+ * | `"numeric"` | [`InputMaskNumeric`](https://surveyjs.io/form-library/documentation/api-reference/inputmasknumeric) |
46
+ * | `"currency"` | [`InputMaskCurrency`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskcurrency) |
47
+ * | `"datetime"` | [`InputMaskDateTime`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskdatetime) |
48
+ * | `"pattern"` | [`InputMaskPattern`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskpattern) |
49
+ *
50
+ * [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
51
+ */
52
+ get maskSettings(): InputMaskBase;
53
+ set maskSettings(val: InputMaskBase);
54
+ private setNewMaskSettingsProperty;
55
+ protected createMaskSettings(): InputMaskBase;
15
56
  constructor(name: string);
16
57
  protected isTextValue(): boolean;
17
58
  getType(): string;
@@ -88,6 +129,12 @@ export declare class QuestionTextModel extends QuestionTextBase {
88
129
  * @see max
89
130
  */
90
131
  get isMinMaxType(): boolean;
132
+ _inputValue: string;
133
+ get maskInstance(): IInputMask;
134
+ get inputValue(): string;
135
+ set inputValue(val: string);
136
+ protected onChangeQuestionValue(newValue: any): void;
137
+ private updateInputValue;
91
138
  protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
92
139
  protected canSetValueToSurvey(): boolean;
93
140
  protected convertFuncValuetoQuestionValue(val: any): any;
@@ -127,5 +174,7 @@ export declare class QuestionTextModel extends QuestionTextBase {
127
174
  onChange: (event: any) => void;
128
175
  onBlur: (event: any) => void;
129
176
  onFocus: (event: any) => void;
177
+ afterRenderQuestionElement(el: HTMLElement): void;
178
+ beforeDestroyQuestionElement(el: HTMLElement): void;
130
179
  }
131
180
  export declare function isMinMaxType(obj: any): boolean;
@@ -42,7 +42,7 @@ export declare var settings: {
42
42
  * Nested properties:
43
43
  *
44
44
  * - `useLocalTimeZone`: `boolean`\
45
- * 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`.
45
+ * 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`.
46
46
  *
47
47
  * - `defaultLocaleName`: `string`\
48
48
  * A property key that stores a translation for the default locale. Default value: `"default"`.
@@ -168,7 +168,8 @@ export declare var settings: {
168
168
  * - `enabled`: `boolean`\
169
169
  * Specifies whether to add questions to the DOM only when they get into the viewport. Default value: `false`.
170
170
  *
171
- * > Lazy rendering is an experimental feature that may not work as expected in all use cases.
171
+ * [View Demo](https://surveyjs.io/form-library/examples/survey-lazy/ (linkStyle))
172
+ * @see [SurveyModel.lazyRendering](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#lazyRendering)
172
173
  */
173
174
  lazyRender: {
174
175
  enabled: boolean;
@@ -550,4 +551,25 @@ export declare var settings: {
550
551
  dataList: string[];
551
552
  };
552
553
  legacyProgressBarView: boolean;
554
+ /**
555
+ * An object with properties that configure input masks.
556
+ *
557
+ * Nested properties:
558
+ *
559
+ * - `patternPlaceholderChar`: `string`\
560
+ * A symbol used as a placeholder for characters to be entered in [pattern masks](https://surveyjs.io/form-library/documentation/api-reference/inputmaskpattern). Default value: `"_"`.
561
+ *
562
+ * - `patternEscapeChar`: `string`\
563
+ * A symbol used to insert literal representations of special characters in [pattern masks](https://surveyjs.io/form-library/documentation/api-reference/inputmaskpattern). Default value: `"\\"`.
564
+ *
565
+ * - `patternDefinitions`: `<{ [key: string]: RegExp }>`\
566
+ * An object that maps placeholder symbols to regular expressions in [pattern masks](https://surveyjs.io/form-library/documentation/api-reference/inputmaskpattern). Default value: `{ "9": /[0-9]/, "a": /[a-zA-Z]/, "#": /[a-zA-Z0-9]/ }`.
567
+ */
568
+ maskSettings: {
569
+ patternPlaceholderChar: string;
570
+ patternEscapeChar: string;
571
+ patternDefinitions: {
572
+ [key: string]: RegExp;
573
+ };
574
+ };
553
575
  };
@@ -84,6 +84,7 @@ export declare class SurveyElement<E = any> extends SurveyElementCore implements
84
84
  isDragMe: boolean;
85
85
  readOnlyChangedCallback: () => void;
86
86
  static ScrollElementToTop(elementId: string, scrollIfVisible?: boolean): boolean;
87
+ private static ScrollElementToViewCore;
87
88
  static GetFirstNonTextElement(elements: any, removeSpaces?: boolean): any;
88
89
  static FocusElement(elementId: string): boolean;
89
90
  private static focusElementCore;
@@ -514,9 +514,18 @@ export interface OpenFileChooserEvent {
514
514
  */
515
515
  input: HTMLInputElement;
516
516
  /**
517
- * A question, panel, page, or survey for which this event is raised.
517
+ * A survey element (question, panel, page, or survey) or a theme JSON schema for which this event is raised.
518
518
  */
519
519
  element: Base;
520
+ /**
521
+ * The type of the element passed as the `options.element` parameter.\
522
+ * Possible values: `"theme"`, `"header"`, or any value returned from the [`getType()`](https://surveyjs.io/form-library/documentation/api-reference/question#getType) method.
523
+ */
524
+ elementType: String;
525
+ /**
526
+ * The name of the survey element property or theme property for which files are being selected.
527
+ */
528
+ propertyName: String;
520
529
  /**
521
530
  * A choice item for which the event is raised. This parameter has a value only when the dialog window is opened to select images for an [Image Picker](https://surveyjs.io/form-library/documentation/api-reference/image-picker-question-model) question.
522
531
  */
@@ -725,6 +734,24 @@ export interface MatrixAllowRemoveRowEvent extends MatrixDynamicQuestionEventMix
725
734
  */
726
735
  allow: boolean;
727
736
  }
737
+ export interface MatrixDetailPanelVisibleChangedEvent extends MatrixDropdownQuestionEventMixin {
738
+ /**
739
+ * A matrix row to which the detail section belongs.
740
+ */
741
+ row: MatrixDropdownRowModelBase;
742
+ /**
743
+ * A zero-based row index.
744
+ */
745
+ rowIndex: number;
746
+ /**
747
+ * A [PanelModel](https://surveyjs.io/form-library/documentation/panelmodel) that represents the detail section.
748
+ */
749
+ detailPanel: PanelModel;
750
+ /**
751
+ * Indicates whether the detail section is visible now.
752
+ */
753
+ visible: boolean;
754
+ }
728
755
  export interface MatrixCellCreatingBaseEvent extends MatrixDropdownQuestionEventMixin {
729
756
  /**
730
757
  * A [matrix column](https://surveyjs.io/form-library/documentation/api-reference/multi-select-matrix-column-values) to which the cell belongs.
@@ -18,7 +18,7 @@ import { IAction, Action } from "./actions/action";
18
18
  import { ActionContainer } from "./actions/container";
19
19
  import { QuestionPanelDynamicModel } from "./question_paneldynamic";
20
20
  import { Notifier } from "./notifier";
21
- import { TriggerExecutedEvent, CompletingEvent, CompleteEvent, ShowingPreviewEvent, NavigateToUrlEvent, CurrentPageChangingEvent, CurrentPageChangedEvent, ValueChangingEvent, ValueChangedEvent, VariableChangedEvent, QuestionVisibleChangedEvent, PageVisibleChangedEvent, PanelVisibleChangedEvent, QuestionCreatedEvent, QuestionAddedEvent, QuestionRemovedEvent, PanelAddedEvent, PanelRemovedEvent, PageAddedEvent, ValidateQuestionEvent, SettingQuestionErrorsEvent, ValidatePanelEvent, ErrorCustomTextEvent, ValidatedErrorsOnCurrentPageEvent, ProcessHtmlEvent, GetQuestionTitleEvent, GetTitleTagNameEvent, GetQuestionNoEvent, ProgressTextEvent, TextMarkdownEvent, TextRenderAsEvent, SendResultEvent, GetResultEvent, UploadFilesEvent, DownloadFileEvent, ClearFilesEvent, LoadChoicesFromServerEvent, ProcessTextValueEvent, UpdateQuestionCssClassesEvent, UpdatePanelCssClassesEvent, UpdatePageCssClassesEvent, UpdateChoiceItemCssEvent, AfterRenderSurveyEvent, AfterRenderHeaderEvent, AfterRenderPageEvent, AfterRenderQuestionEvent, AfterRenderQuestionInputEvent, AfterRenderPanelEvent, FocusInQuestionEvent, FocusInPanelEvent, ShowingChoiceItemEvent, ChoicesLazyLoadEvent, GetChoiceDisplayValueEvent, MatrixRowAddedEvent, MatrixBeforeRowAddedEvent, MatrixRowRemovingEvent, MatrixRowRemovedEvent, MatrixAllowRemoveRowEvent, MatrixCellCreatingEvent, MatrixCellCreatedEvent, MatrixAfterCellRenderEvent, MatrixCellValueChangedEvent, MatrixCellValueChangingEvent, MatrixCellValidateEvent, DynamicPanelModifiedEvent, DynamicPanelRemovingEvent, TimerPanelInfoTextEvent, DynamicPanelItemValueChangedEvent, DynamicPanelGetTabTitleEvent, DynamicPanelCurrentIndexChangedEvent, IsAnswerCorrectEvent, DragDropAllowEvent, ScrollingElementToTopEvent, GetQuestionTitleActionsEvent, GetPanelTitleActionsEvent, GetPageTitleActionsEvent, GetPanelFooterActionsEvent, GetMatrixRowActionsEvent, ElementContentVisibilityChangedEvent, GetExpressionDisplayValueEvent, ServerValidateQuestionsEvent, MultipleTextItemAddedEvent, MatrixColumnAddedEvent, GetQuestionDisplayValueEvent, PopupVisibleChangedEvent, ChoicesSearchEvent, OpenFileChooserEvent } from "./survey-events-api";
21
+ import { TriggerExecutedEvent, CompletingEvent, CompleteEvent, ShowingPreviewEvent, NavigateToUrlEvent, CurrentPageChangingEvent, CurrentPageChangedEvent, ValueChangingEvent, ValueChangedEvent, VariableChangedEvent, QuestionVisibleChangedEvent, PageVisibleChangedEvent, PanelVisibleChangedEvent, QuestionCreatedEvent, QuestionAddedEvent, QuestionRemovedEvent, PanelAddedEvent, PanelRemovedEvent, PageAddedEvent, ValidateQuestionEvent, SettingQuestionErrorsEvent, ValidatePanelEvent, ErrorCustomTextEvent, ValidatedErrorsOnCurrentPageEvent, ProcessHtmlEvent, GetQuestionTitleEvent, GetTitleTagNameEvent, GetQuestionNoEvent, ProgressTextEvent, TextMarkdownEvent, TextRenderAsEvent, SendResultEvent, GetResultEvent, UploadFilesEvent, DownloadFileEvent, ClearFilesEvent, LoadChoicesFromServerEvent, ProcessTextValueEvent, UpdateQuestionCssClassesEvent, UpdatePanelCssClassesEvent, UpdatePageCssClassesEvent, UpdateChoiceItemCssEvent, AfterRenderSurveyEvent, AfterRenderHeaderEvent, AfterRenderPageEvent, AfterRenderQuestionEvent, AfterRenderQuestionInputEvent, AfterRenderPanelEvent, FocusInQuestionEvent, FocusInPanelEvent, ShowingChoiceItemEvent, ChoicesLazyLoadEvent, GetChoiceDisplayValueEvent, MatrixRowAddedEvent, MatrixBeforeRowAddedEvent, MatrixRowRemovingEvent, MatrixRowRemovedEvent, MatrixAllowRemoveRowEvent, MatrixDetailPanelVisibleChangedEvent, MatrixCellCreatingEvent, MatrixCellCreatedEvent, MatrixAfterCellRenderEvent, MatrixCellValueChangedEvent, MatrixCellValueChangingEvent, MatrixCellValidateEvent, DynamicPanelModifiedEvent, DynamicPanelRemovingEvent, TimerPanelInfoTextEvent, DynamicPanelItemValueChangedEvent, DynamicPanelGetTabTitleEvent, DynamicPanelCurrentIndexChangedEvent, IsAnswerCorrectEvent, DragDropAllowEvent, ScrollingElementToTopEvent, GetQuestionTitleActionsEvent, GetPanelTitleActionsEvent, GetPageTitleActionsEvent, GetPanelFooterActionsEvent, GetMatrixRowActionsEvent, ElementContentVisibilityChangedEvent, GetExpressionDisplayValueEvent, ServerValidateQuestionsEvent, MultipleTextItemAddedEvent, MatrixColumnAddedEvent, GetQuestionDisplayValueEvent, PopupVisibleChangedEvent, ChoicesSearchEvent, OpenFileChooserEvent } from "./survey-events-api";
22
22
  import { QuestionMatrixDropdownModelBase } from "./question_matrixdropdownbase";
23
23
  import { QuestionMatrixDynamicModel } from "./question_matrixdynamic";
24
24
  import { QuestionFileModel } from "./question_file";
@@ -163,7 +163,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
163
163
  * Refer to the following help topic for information on how to implement conditional visibility: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility).
164
164
  */
165
165
  onQuestionVisibleChanged: EventBase<SurveyModel, QuestionVisibleChangedEvent>;
166
- onVisibleChanged: EventBase<SurveyModel, QuestionVisibleChangedEvent>;
166
+ onVisibleChanged: EventBase<SurveyModel, any>;
167
167
  /**
168
168
  * An event that is raised after page visibility is changed.
169
169
  *
@@ -173,7 +173,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
173
173
  */
174
174
  onPageVisibleChanged: EventBase<SurveyModel, PageVisibleChangedEvent>;
175
175
  /**
176
- * An event that is raised after page visibility is changed.
176
+ * An event that is raised after panel visibility is changed.
177
177
  *
178
178
  * For information on event handler parameters, refer to descriptions within the interface.
179
179
  *
@@ -568,6 +568,10 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
568
568
  * This event is obsolete. Use the [`onMatrixRenderRemoveButton`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead.
569
569
  */
570
570
  onMatrixAllowRemoveRow: EventBase<SurveyModel, MatrixAllowRemoveRowEvent>;
571
+ /**
572
+ * An event that is raised after the visibility of an [expandable detail section](https://surveyjs.io/form-library/examples/add-expandable-details-section-under-matrix-rows/) is changed. This event can be raised for [Multi-Select](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) questions.
573
+ */
574
+ onMatrixDetailPanelVisibleChanged: EventBase<SurveyModel, MatrixDetailPanelVisibleChangedEvent>;
571
575
  /**
572
576
  * An event that is raised before a cell in a [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) or [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/) is created. Use this event to change the type of individual matrix cells.
573
577
  * @see onAfterRenderMatrixCell
@@ -772,13 +776,12 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
772
776
  /**
773
777
  * Specifies whether to enable lazy rendering.
774
778
  *
775
- * In default mode, a survey renders the entire current page. With lazy rendering, the survey renders the page gradually as a user scrolls it. This helps reduce survey startup time and oprimizes large surveys for low-end devices.
779
+ * In default mode, a survey renders the entire current page. With lazy rendering, the survey renders the page gradually as a user scrolls it. This helps reduce survey startup time and optimizes large surveys for low-end devices.
776
780
  *
777
781
  * Default value: `false`
778
782
  *
779
783
  * [View Demo](https://surveyjs.io/form-library/examples/survey-lazy/ (linkStyle))
780
- *
781
- * > This is an experimental feature that may not work properly in certain cases.
784
+ * @see [settings.lazyRender](https://surveyjs.io/form-library/documentation/api-reference/settings#lazyRender)
782
785
  */
783
786
  get lazyRendering(): boolean;
784
787
  set lazyRendering(val: boolean);
@@ -1435,7 +1438,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
1435
1438
  * - `"belowHeader"` - Displays the progress bar below the survey header.
1436
1439
  * - `"bottom"` - Displays the progress bar below survey content.
1437
1440
  * - `"topBottom"` - Displays the progress bar above and below survey content.
1438
- * - `"auto"` - Automatically selects between `"aboveHeader"` and `"belowHeader"`.
1441
+ * - `"auto"` - Displays the progress bar below the survey header if the header has a [background image](https://surveyjs.io/form-library/documentation/api-reference/iheader#backgroundImage) or color. Otherwise, the progress bar is displayed above the header.
1439
1442
  * - `"top"` - *(Obsolete)* Use the `"aboveHeader"` or `"belowHeader"` property value instead.
1440
1443
  * - `"both"` - *(Obsolete)* Use the `"topBottom"` property value instead.
1441
1444
  *
@@ -2004,10 +2007,10 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
2004
2007
  private onShowingPreviewChanged;
2005
2008
  private changeCurrentPageFromPreview;
2006
2009
  private originalPages;
2007
- protected onQuestionsOnPageModeChanged(oldValue: string): void;
2010
+ protected onQuestionsOnPageModeChanged(oldValue: string, isFirstLoad?: boolean): void;
2008
2011
  private restoreOriginalPages;
2009
2012
  private getPageStartIndex;
2010
- private isCreatingPagesForPreview;
2013
+ private isLockingUpdateOnPageModes;
2011
2014
  private setupPagesForPageModes;
2012
2015
  private createPagesForQuestionOnPageMode;
2013
2016
  private createSinglePage;
@@ -2152,6 +2155,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
2152
2155
  matrixRowRemoved(question: QuestionMatrixDynamicModel, rowIndex: number, row: any): void;
2153
2156
  matrixRowRemoving(question: QuestionMatrixDynamicModel, rowIndex: number, row: any): boolean;
2154
2157
  matrixAllowRemoveRow(question: QuestionMatrixDynamicModel, rowIndex: number, row: any): boolean;
2158
+ matrixDetailPanelVisibleChanged(question: QuestionMatrixDropdownModelBase, rowIndex: number, row: any, visible: boolean): void;
2155
2159
  matrixCellCreating(question: QuestionMatrixDropdownModelBase, options: any): void;
2156
2160
  matrixCellCreated(question: QuestionMatrixDropdownModelBase, options: any): void;
2157
2161
  matrixAfterCellRender(question: QuestionMatrixDropdownModelBase, options: any): void;
@@ -2184,8 +2188,10 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
2184
2188
  * @see onUploadFile
2185
2189
  */
2186
2190
  chooseFiles(input: HTMLInputElement, callback: (files: File[]) => void, context?: {
2187
- element: ISurveyElement;
2191
+ element: Base;
2188
2192
  item?: any;
2193
+ elementType?: string;
2194
+ propertyName?: string;
2189
2195
  }): void;
2190
2196
  /**
2191
2197
  * Uploads files to a server.
@@ -2,7 +2,7 @@ import { Event } from "./base";
2
2
  export declare var surveyTimerFunctions: {
3
3
  setTimeout: (func: () => any) => number;
4
4
  clearTimeout: (timerId: number) => void;
5
- safeTimeOut: (func: () => any, delay: number) => number;
5
+ safeTimeOut: (func: () => any, delay: number) => number | any;
6
6
  };
7
7
  export declare class SurveyTimer {
8
8
  private static instanceValue;