survey-core 1.9.133 → 1.9.134

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 (236) hide show
  1. package/defaultV2.css +6 -1
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +6 -1
  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 +1 -1
  112. package/modern.fontless.css +1 -1
  113. package/modern.fontless.min.css +1 -1
  114. package/modern.min.css +1 -1
  115. package/package.json +1 -1
  116. package/plugins/bootstrap-integration.js +1 -1
  117. package/plugins/bootstrap-integration.min.js +1 -1
  118. package/plugins/bootstrap-material-integration.js +1 -1
  119. package/plugins/bootstrap-material-integration.min.js +1 -1
  120. package/survey.core.js +1452 -49
  121. package/survey.core.js.map +1 -1
  122. package/survey.core.min.js +3 -3
  123. package/survey.css +1 -1
  124. package/survey.i18n.js +1 -1
  125. package/survey.i18n.min.js +1 -1
  126. package/survey.min.css +1 -1
  127. package/themes/borderless-dark-panelless.js +1 -1
  128. package/themes/borderless-dark-panelless.min.js +1 -1
  129. package/themes/borderless-dark.js +1 -1
  130. package/themes/borderless-dark.min.js +1 -1
  131. package/themes/borderless-light-panelless..js +1 -1
  132. package/themes/borderless-light-panelless..min.js +1 -1
  133. package/themes/borderless-light.js +1 -1
  134. package/themes/borderless-light.min.js +1 -1
  135. package/themes/contrast-dark-panelless.js +1 -1
  136. package/themes/contrast-dark-panelless.min.js +1 -1
  137. package/themes/contrast-dark.js +1 -1
  138. package/themes/contrast-dark.min.js +1 -1
  139. package/themes/contrast-light-panelless.js +1 -1
  140. package/themes/contrast-light-panelless.min.js +1 -1
  141. package/themes/contrast-light.js +1 -1
  142. package/themes/contrast-light.min.js +1 -1
  143. package/themes/default-dark-panelless.js +1 -1
  144. package/themes/default-dark-panelless.min.js +1 -1
  145. package/themes/default-dark.js +1 -1
  146. package/themes/default-dark.min.js +1 -1
  147. package/themes/default-light-panelless.js +1 -1
  148. package/themes/default-light-panelless.min.js +1 -1
  149. package/themes/default-light.js +1 -1
  150. package/themes/default-light.min.js +1 -1
  151. package/themes/doubleborder-dark-panelless.js +1 -1
  152. package/themes/doubleborder-dark-panelless.min.js +1 -1
  153. package/themes/doubleborder-dark.js +1 -1
  154. package/themes/doubleborder-dark.min.js +1 -1
  155. package/themes/doubleborder-light-panelles.js +1 -1
  156. package/themes/doubleborder-light-panelles.min.js +1 -1
  157. package/themes/doubleborder-light.js +1 -1
  158. package/themes/doubleborder-light.min.js +1 -1
  159. package/themes/flat-dark-panelless.js +1 -1
  160. package/themes/flat-dark-panelless.min.js +1 -1
  161. package/themes/flat-dark.js +1 -1
  162. package/themes/flat-dark.min.js +1 -1
  163. package/themes/flat-light-panelless.js +1 -1
  164. package/themes/flat-light-panelless.min.js +1 -1
  165. package/themes/flat-light.js +1 -1
  166. package/themes/flat-light.min.js +1 -1
  167. package/themes/index.js +1 -1
  168. package/themes/index.min.js +1 -1
  169. package/themes/layered-dark-panelless.js +1 -1
  170. package/themes/layered-dark-panelless.min.js +1 -1
  171. package/themes/layered-dark.js +1 -1
  172. package/themes/layered-dark.min.js +1 -1
  173. package/themes/layered-light-panelless.js +1 -1
  174. package/themes/layered-light-panelless.min.js +1 -1
  175. package/themes/layered-light.js +1 -1
  176. package/themes/layered-light.min.js +1 -1
  177. package/themes/plain-dark-panelless.js +1 -1
  178. package/themes/plain-dark-panelless.min.js +1 -1
  179. package/themes/plain-dark.js +1 -1
  180. package/themes/plain-dark.min.js +1 -1
  181. package/themes/plain-light-panelless.js +1 -1
  182. package/themes/plain-light-panelless.min.js +1 -1
  183. package/themes/plain-light.js +1 -1
  184. package/themes/plain-light.min.js +1 -1
  185. package/themes/sharp-dark-panelless.js +1 -1
  186. package/themes/sharp-dark-panelless.min.js +1 -1
  187. package/themes/sharp-dark.js +1 -1
  188. package/themes/sharp-dark.min.js +1 -1
  189. package/themes/sharp-light-panelless.js +1 -1
  190. package/themes/sharp-light-panelless.min.js +1 -1
  191. package/themes/sharp-light.js +1 -1
  192. package/themes/sharp-light.min.js +1 -1
  193. package/themes/solid-dark-panelless.js +1 -1
  194. package/themes/solid-dark-panelless.min.js +1 -1
  195. package/themes/solid-dark.js +1 -1
  196. package/themes/solid-dark.min.js +1 -1
  197. package/themes/solid-light-panelless.js +1 -1
  198. package/themes/solid-light-panelless.min.js +1 -1
  199. package/themes/solid-light.js +1 -1
  200. package/themes/solid-light.min.js +1 -1
  201. package/themes/three-dimensional-dark-panelless.js +1 -1
  202. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  203. package/themes/three-dimensional-dark.js +1 -1
  204. package/themes/three-dimensional-dark.min.js +1 -1
  205. package/themes/three-dimensional-light-panelless.js +1 -1
  206. package/themes/three-dimensional-light-panelless.min.js +1 -1
  207. package/themes/three-dimensional-light.js +1 -1
  208. package/themes/three-dimensional-light.min.js +1 -1
  209. package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +1 -0
  210. package/ts3.4/typings/dragdrop/core.d.ts +1 -0
  211. package/ts3.4/typings/entries/chunks/model.d.ts +5 -0
  212. package/ts3.4/typings/mask/input_element_adapter.d.ts +15 -0
  213. package/ts3.4/typings/mask/mask_base.d.ts +11 -0
  214. package/ts3.4/typings/mask/mask_currency.d.ts +11 -0
  215. package/ts3.4/typings/mask/mask_datetime.d.ts +37 -0
  216. package/ts3.4/typings/mask/mask_numeric.d.ts +30 -0
  217. package/ts3.4/typings/mask/mask_pattern.d.ts +23 -0
  218. package/ts3.4/typings/mask/mask_utils.d.ts +18 -0
  219. package/ts3.4/typings/question_text.d.ts +16 -0
  220. package/ts3.4/typings/settings.d.ts +7 -0
  221. package/ts3.4/typings/survey-element.d.ts +1 -0
  222. package/ts3.4/typings/survey.d.ts +2 -2
  223. package/typings/defaultCss/defaultV2Css.d.ts +1 -0
  224. package/typings/dragdrop/core.d.ts +1 -0
  225. package/typings/entries/chunks/model.d.ts +5 -0
  226. package/typings/mask/input_element_adapter.d.ts +15 -0
  227. package/typings/mask/mask_base.d.ts +11 -0
  228. package/typings/mask/mask_currency.d.ts +11 -0
  229. package/typings/mask/mask_datetime.d.ts +37 -0
  230. package/typings/mask/mask_numeric.d.ts +30 -0
  231. package/typings/mask/mask_pattern.d.ts +23 -0
  232. package/typings/mask/mask_utils.d.ts +18 -0
  233. package/typings/question_text.d.ts +18 -0
  234. package/typings/settings.d.ts +7 -0
  235. package/typings/survey-element.d.ts +1 -0
  236. package/typings/survey.d.ts +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.133
2
+ * surveyjs - Survey JavaScript library v1.9.134
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.133
2
+ * surveyjs - Survey JavaScript library v1.9.134
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.133
2
+ * surveyjs - Survey JavaScript library v1.9.134
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.133
2
+ * surveyjs - Survey JavaScript library v1.9.134
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.133
2
+ * surveyjs - Survey JavaScript library v1.9.134
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.133
2
+ * surveyjs - Survey JavaScript library v1.9.134
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.133
2
+ * surveyjs - Survey JavaScript library v1.9.134
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.133
2
+ * surveyjs - Survey JavaScript library v1.9.134
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.133
2
+ * surveyjs - Survey JavaScript library v1.9.134
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.133
2
+ * surveyjs - Survey JavaScript library v1.9.134
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.133
2
+ * surveyjs - Survey JavaScript library v1.9.134
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.133
2
+ * surveyjs - Survey JavaScript library v1.9.134
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -592,6 +592,7 @@ export declare var defaultV2Css: {
592
592
  chooseFileAsIcon: string;
593
593
  chooseFileIconId: string;
594
594
  disabled: string;
595
+ controlDisabled: string;
595
596
  removeButton: string;
596
597
  removeButtonBottom: string;
597
598
  removeButtonIconId: string;
@@ -25,6 +25,7 @@ export declare abstract class DragDropCore<T> implements IDragDropEngine {
25
25
  protected domAdapter: IDragDropDOMAdapter;
26
26
  constructor(surveyValue?: ISurvey, creator?: any, longTap?: boolean, domAdapter?: IDragDropDOMAdapter);
27
27
  startDrag(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement, preventSaveTargetNode?: boolean): void;
28
+ private getRootElement;
28
29
  dragInit(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement): void;
29
30
  protected onStartDrag(event?: PointerEvent): void;
30
31
  protected isDropTargetDoesntChanged(newIsBottom: boolean): boolean;
@@ -89,6 +89,11 @@ export { DropdownMultiSelectListModel } from "../../dropdownMultiSelectListModel
89
89
  export { QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue } from "../../question_buttongroup";
90
90
  export { IsMobile, IsTouch, _setIsTouch } from "../../utils/devices";
91
91
  export { confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, IAttachKey2clickOptions } from "../../utils/utils";
92
+ export { InputMaskBase } from "../../mask/mask_base";
93
+ export { InputMaskPattern } from "../../mask/mask_pattern";
94
+ export { InputMaskNumeric } from "../../mask/mask_numeric";
95
+ export { InputMaskDateTime } from "../../mask/mask_datetime";
96
+ export { InputMaskCurrency } from "../../mask/mask_currency";
92
97
  export * from "../../utils/cssClassBuilder";
93
98
  export { surveyCss, defaultV2Css, defaultV2ThemeName } from "../../defaultCss/defaultV2Css";
94
99
  export { DragDropCore } from "../../dragdrop/core";
@@ -0,0 +1,15 @@
1
+ import { InputMaskBase } from "./mask_base";
2
+ import { ITextInputParams } from "./mask_utils";
3
+ export declare class InputElementAdapter {
4
+ private inputMaskInstance;
5
+ private inputElement;
6
+ private prevUnmaskedValue;
7
+ constructor(inputMaskInstance: InputMaskBase, inputElement: HTMLInputElement, value?: string);
8
+ inputMaskInstancePropertyChangedHandler: (sender: any, options: any) => void;
9
+ beforeInputHandler: (event: any) => void;
10
+ blurInputHandler: (event: any) => void;
11
+ createArgs(event: any): ITextInputParams;
12
+ addInputEventListener(): void;
13
+ removeInputEventListener(): void;
14
+ dispose(): void;
15
+ }
@@ -0,0 +1,11 @@
1
+ import { Base } from "../base";
2
+ import { IInputMask, IMaskedInputResult, ITextInputParams } from "./mask_utils";
3
+ export declare class InputMaskBase extends Base implements IInputMask {
4
+ saveMaskedValue: boolean;
5
+ getType(): string;
6
+ setData(json: any): void;
7
+ getData(): any;
8
+ processInput(args: ITextInputParams): IMaskedInputResult;
9
+ getUnmaskedValue(src: string): any;
10
+ getMaskedValue(src: any): string;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { InputMaskNumeric } from "./mask_numeric";
2
+ import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
3
+ export declare class InputMaskCurrency extends InputMaskNumeric {
4
+ prefix: string;
5
+ suffix: string;
6
+ getType(): string;
7
+ private wrapText;
8
+ unwrapInputArgs(args: ITextInputParams): void;
9
+ processInput(args: ITextInputParams): IMaskedInputResult;
10
+ getMaskedValue(src: any): string;
11
+ }
@@ -0,0 +1,37 @@
1
+ import { InputMaskPattern } from "./mask_pattern";
2
+ import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
3
+ export interface IDateTimeMaskLexem {
4
+ type: "month" | "day" | "year" | "separator";
5
+ value: any;
6
+ count: number;
7
+ maxCount: number;
8
+ }
9
+ export declare function getDateTimeLexems(pattern: string): Array<IDateTimeMaskLexem>;
10
+ export declare class InputMaskDateTime extends InputMaskPattern {
11
+ private turnOfTheCentury;
12
+ private lexems;
13
+ private inputDateTimeData;
14
+ min: string;
15
+ max: string;
16
+ getType(): string;
17
+ protected updateLiterals(): void;
18
+ private leaveOnlyNumbers;
19
+ private getMaskedStrFromISO;
20
+ private initInputDateTimeData;
21
+ private getISO_8601Format;
22
+ private isYearValid;
23
+ private isDateValid;
24
+ private getPlaceholder;
25
+ private updateInputDateTimeData;
26
+ private getCorrectDatePartFormat;
27
+ private createIDateTimeComposition;
28
+ private parseTwoDigitYear;
29
+ private getFormatedString;
30
+ private setInputDateTimeData;
31
+ _getMaskedValue(src: string, matchWholeMask?: boolean): string;
32
+ private getPartsOld;
33
+ private getParts;
34
+ getUnmaskedValue(src: string): any;
35
+ getMaskedValue(src: string): string;
36
+ processInput(args: ITextInputParams): IMaskedInputResult;
37
+ }
@@ -0,0 +1,30 @@
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
+ export declare class InputMaskNumeric extends InputMaskBase {
11
+ allowNegativeValues: boolean;
12
+ decimalSeparator: string;
13
+ precision: number;
14
+ thousandsSeparator: string;
15
+ min: number;
16
+ max: number;
17
+ private calccaretPosition;
18
+ displayNumber(parsedNumber: INumericalComposition, insertThousandsSeparator?: boolean, matchWholeMask?: boolean): string;
19
+ convertNumber(parsedNumber: INumericalComposition): number;
20
+ validateNumber(number: INumericalComposition): boolean;
21
+ parseNumber(src: string | number): INumericalComposition;
22
+ getNumberMaskedValue(src: string | number, matchWholeMask?: boolean): string;
23
+ private getNumberUnmaskedValue;
24
+ getMaskedValue(src: any): string;
25
+ getUnmaskedValue(src: string): any;
26
+ processInput(args: ITextInputParams): IMaskedInputResult;
27
+ getType(): string;
28
+ protected isPropertyEmpty(value: any): boolean;
29
+ }
30
+ export {};
@@ -0,0 +1,23 @@
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
+ export declare class InputMaskPattern extends InputMaskBase {
12
+ private literals;
13
+ pattern: string;
14
+ protected updateLiterals(): void;
15
+ protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
16
+ getType(): string;
17
+ fromJSON(json: any, options?: ILoadFromJSONOptions): void;
18
+ _getMaskedValue(src: string, matchWholeMask?: boolean): string;
19
+ _getUnmaskedValue(src: string, matchWholeMask?: boolean): string;
20
+ processInput(args: ITextInputParams): IMaskedInputResult;
21
+ getMaskedValue(src: any): string;
22
+ getUnmaskedValue(src: string): any;
23
+ }
@@ -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
+ }
@@ -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,16 @@ 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
+ maskType: string;
23
+ readonly maskTypeIsEmpty: boolean;
24
+ maskSettings: InputMaskBase;
25
+ private setNewMaskSettingsProperty;
26
+ protected createMaskSettings(): InputMaskBase;
15
27
  constructor(name: string);
16
28
  protected isTextValue(): boolean;
17
29
  getType(): string;
@@ -79,6 +91,8 @@ export declare class QuestionTextModel extends QuestionTextBase {
79
91
  * @see max
80
92
  */
81
93
  readonly isMinMaxType: boolean;
94
+ readonly maskInstance: IInputMask;
95
+ inputValue: string;
82
96
  protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
83
97
  protected canSetValueToSurvey(): boolean;
84
98
  protected convertFuncValuetoQuestionValue(val: any): any;
@@ -116,5 +130,7 @@ export declare class QuestionTextModel extends QuestionTextBase {
116
130
  onChange: (event: any) => void;
117
131
  onBlur: (event: any) => void;
118
132
  onFocus: (event: any) => void;
133
+ afterRenderQuestionElement(el: HTMLElement): void;
134
+ beforeDestroyQuestionElement(el: HTMLElement): void;
119
135
  }
120
136
  export declare function isMinMaxType(obj: any): boolean;
@@ -550,4 +550,11 @@ export declare var settings: {
550
550
  dataList: string[];
551
551
  };
552
552
  legacyProgressBarView: boolean;
553
+ maskSettings: {
554
+ patternPlaceholderChar: string;
555
+ patternEscapeChar: string;
556
+ patternDefinitions: {
557
+ [key: string]: RegExp;
558
+ };
559
+ };
553
560
  };
@@ -83,6 +83,7 @@ export declare class SurveyElement<E = any> extends SurveyElementCore implements
83
83
  isDragMe: boolean;
84
84
  readOnlyChangedCallback: () => void;
85
85
  static ScrollElementToTop(elementId: string, scrollIfVisible?: boolean): boolean;
86
+ private static ScrollElementToViewCore;
86
87
  static GetFirstNonTextElement(elements: any, removeSpaces?: boolean): any;
87
88
  static FocusElement(elementId: string): boolean;
88
89
  private static focusElementCore;
@@ -1919,10 +1919,10 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
1919
1919
  private onShowingPreviewChanged;
1920
1920
  private changeCurrentPageFromPreview;
1921
1921
  private originalPages;
1922
- protected onQuestionsOnPageModeChanged(oldValue: string): void;
1922
+ protected onQuestionsOnPageModeChanged(oldValue: string, isFirstLoad?: boolean): void;
1923
1923
  private restoreOriginalPages;
1924
1924
  private getPageStartIndex;
1925
- private isCreatingPagesForPreview;
1925
+ private isLockingUpdateOnPageModes;
1926
1926
  private setupPagesForPageModes;
1927
1927
  private createPagesForQuestionOnPageMode;
1928
1928
  private createSinglePage;
@@ -592,6 +592,7 @@ export declare var defaultV2Css: {
592
592
  chooseFileAsIcon: string;
593
593
  chooseFileIconId: string;
594
594
  disabled: string;
595
+ controlDisabled: string;
595
596
  removeButton: string;
596
597
  removeButtonBottom: string;
597
598
  removeButtonIconId: string;
@@ -26,6 +26,7 @@ export declare abstract class DragDropCore<T> implements IDragDropEngine {
26
26
  protected domAdapter: IDragDropDOMAdapter;
27
27
  constructor(surveyValue?: ISurvey, creator?: any, longTap?: boolean, domAdapter?: IDragDropDOMAdapter);
28
28
  startDrag(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement, preventSaveTargetNode?: boolean): void;
29
+ private getRootElement;
29
30
  dragInit(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement): void;
30
31
  protected onStartDrag(event?: PointerEvent): void;
31
32
  protected isDropTargetDoesntChanged(newIsBottom: boolean): boolean;
@@ -89,6 +89,11 @@ export { DropdownMultiSelectListModel } from "../../dropdownMultiSelectListModel
89
89
  export { QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue } from "../../question_buttongroup";
90
90
  export { IsMobile, IsTouch, _setIsTouch } from "../../utils/devices";
91
91
  export { confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, IAttachKey2clickOptions } from "../../utils/utils";
92
+ export { InputMaskBase } from "../../mask/mask_base";
93
+ export { InputMaskPattern } from "../../mask/mask_pattern";
94
+ export { InputMaskNumeric } from "../../mask/mask_numeric";
95
+ export { InputMaskDateTime } from "../../mask/mask_datetime";
96
+ export { InputMaskCurrency } from "../../mask/mask_currency";
92
97
  export * from "../../utils/cssClassBuilder";
93
98
  export { surveyCss, defaultV2Css, defaultV2ThemeName } from "../../defaultCss/defaultV2Css";
94
99
  export { DragDropCore } from "../../dragdrop/core";
@@ -0,0 +1,15 @@
1
+ import { InputMaskBase } from "./mask_base";
2
+ import { ITextInputParams } from "./mask_utils";
3
+ export declare class InputElementAdapter {
4
+ private inputMaskInstance;
5
+ private inputElement;
6
+ private prevUnmaskedValue;
7
+ constructor(inputMaskInstance: InputMaskBase, inputElement: HTMLInputElement, value?: string);
8
+ inputMaskInstancePropertyChangedHandler: (sender: any, options: any) => void;
9
+ beforeInputHandler: (event: any) => void;
10
+ blurInputHandler: (event: any) => void;
11
+ createArgs(event: any): ITextInputParams;
12
+ addInputEventListener(): void;
13
+ removeInputEventListener(): void;
14
+ dispose(): void;
15
+ }
@@ -0,0 +1,11 @@
1
+ import { Base } from "../base";
2
+ import { IInputMask, IMaskedInputResult, ITextInputParams } from "./mask_utils";
3
+ export declare class InputMaskBase extends Base implements IInputMask {
4
+ saveMaskedValue: boolean;
5
+ getType(): string;
6
+ setData(json: any): void;
7
+ getData(): any;
8
+ processInput(args: ITextInputParams): IMaskedInputResult;
9
+ getUnmaskedValue(src: string): any;
10
+ getMaskedValue(src: any): string;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { InputMaskNumeric } from "./mask_numeric";
2
+ import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
3
+ export declare class InputMaskCurrency extends InputMaskNumeric {
4
+ prefix: string;
5
+ suffix: string;
6
+ getType(): string;
7
+ private wrapText;
8
+ unwrapInputArgs(args: ITextInputParams): void;
9
+ processInput(args: ITextInputParams): IMaskedInputResult;
10
+ getMaskedValue(src: any): string;
11
+ }
@@ -0,0 +1,37 @@
1
+ import { InputMaskPattern } from "./mask_pattern";
2
+ import { IMaskedInputResult, ITextInputParams } from "./mask_utils";
3
+ export interface IDateTimeMaskLexem {
4
+ type: "month" | "day" | "year" | "separator";
5
+ value: any;
6
+ count: number;
7
+ maxCount: number;
8
+ }
9
+ export declare function getDateTimeLexems(pattern: string): Array<IDateTimeMaskLexem>;
10
+ export declare class InputMaskDateTime extends InputMaskPattern {
11
+ private turnOfTheCentury;
12
+ private lexems;
13
+ private inputDateTimeData;
14
+ min: string;
15
+ max: string;
16
+ getType(): string;
17
+ protected updateLiterals(): void;
18
+ private leaveOnlyNumbers;
19
+ private getMaskedStrFromISO;
20
+ private initInputDateTimeData;
21
+ private getISO_8601Format;
22
+ private isYearValid;
23
+ private isDateValid;
24
+ private getPlaceholder;
25
+ private updateInputDateTimeData;
26
+ private getCorrectDatePartFormat;
27
+ private createIDateTimeComposition;
28
+ private parseTwoDigitYear;
29
+ private getFormatedString;
30
+ private setInputDateTimeData;
31
+ _getMaskedValue(src: string, matchWholeMask?: boolean): string;
32
+ private getPartsOld;
33
+ private getParts;
34
+ getUnmaskedValue(src: string): any;
35
+ getMaskedValue(src: string): string;
36
+ processInput(args: ITextInputParams): IMaskedInputResult;
37
+ }
@@ -0,0 +1,30 @@
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
+ export declare class InputMaskNumeric extends InputMaskBase {
11
+ allowNegativeValues: boolean;
12
+ decimalSeparator: string;
13
+ precision: number;
14
+ thousandsSeparator: string;
15
+ min: number;
16
+ max: number;
17
+ private calccaretPosition;
18
+ displayNumber(parsedNumber: INumericalComposition, insertThousandsSeparator?: boolean, matchWholeMask?: boolean): string;
19
+ convertNumber(parsedNumber: INumericalComposition): number;
20
+ validateNumber(number: INumericalComposition): boolean;
21
+ parseNumber(src: string | number): INumericalComposition;
22
+ getNumberMaskedValue(src: string | number, matchWholeMask?: boolean): string;
23
+ private getNumberUnmaskedValue;
24
+ getMaskedValue(src: any): string;
25
+ getUnmaskedValue(src: string): any;
26
+ processInput(args: ITextInputParams): IMaskedInputResult;
27
+ getType(): string;
28
+ protected isPropertyEmpty(value: any): boolean;
29
+ }
30
+ export {};
@@ -0,0 +1,23 @@
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
+ export declare class InputMaskPattern extends InputMaskBase {
12
+ private literals;
13
+ pattern: string;
14
+ protected updateLiterals(): void;
15
+ protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
16
+ getType(): string;
17
+ fromJSON(json: any, options?: ILoadFromJSONOptions): void;
18
+ _getMaskedValue(src: string, matchWholeMask?: boolean): string;
19
+ _getUnmaskedValue(src: string, matchWholeMask?: boolean): string;
20
+ processInput(args: ITextInputParams): IMaskedInputResult;
21
+ getMaskedValue(src: any): string;
22
+ getUnmaskedValue(src: string): any;
23
+ }
@@ -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
+ }
@@ -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,17 @@ 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
+ maskType: string;
23
+ get maskTypeIsEmpty(): boolean;
24
+ get maskSettings(): InputMaskBase;
25
+ set maskSettings(val: InputMaskBase);
26
+ private setNewMaskSettingsProperty;
27
+ protected createMaskSettings(): InputMaskBase;
15
28
  constructor(name: string);
16
29
  protected isTextValue(): boolean;
17
30
  getType(): string;
@@ -88,6 +101,9 @@ export declare class QuestionTextModel extends QuestionTextBase {
88
101
  * @see max
89
102
  */
90
103
  get isMinMaxType(): boolean;
104
+ get maskInstance(): IInputMask;
105
+ get inputValue(): string;
106
+ set inputValue(val: string);
91
107
  protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
92
108
  protected canSetValueToSurvey(): boolean;
93
109
  protected convertFuncValuetoQuestionValue(val: any): any;
@@ -127,5 +143,7 @@ export declare class QuestionTextModel extends QuestionTextBase {
127
143
  onChange: (event: any) => void;
128
144
  onBlur: (event: any) => void;
129
145
  onFocus: (event: any) => void;
146
+ afterRenderQuestionElement(el: HTMLElement): void;
147
+ beforeDestroyQuestionElement(el: HTMLElement): void;
130
148
  }
131
149
  export declare function isMinMaxType(obj: any): boolean;
@@ -550,4 +550,11 @@ export declare var settings: {
550
550
  dataList: string[];
551
551
  };
552
552
  legacyProgressBarView: boolean;
553
+ maskSettings: {
554
+ patternPlaceholderChar: string;
555
+ patternEscapeChar: string;
556
+ patternDefinitions: {
557
+ [key: string]: RegExp;
558
+ };
559
+ };
553
560
  };
@@ -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;
@@ -2004,10 +2004,10 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
2004
2004
  private onShowingPreviewChanged;
2005
2005
  private changeCurrentPageFromPreview;
2006
2006
  private originalPages;
2007
- protected onQuestionsOnPageModeChanged(oldValue: string): void;
2007
+ protected onQuestionsOnPageModeChanged(oldValue: string, isFirstLoad?: boolean): void;
2008
2008
  private restoreOriginalPages;
2009
2009
  private getPageStartIndex;
2010
- private isCreatingPagesForPreview;
2010
+ private isLockingUpdateOnPageModes;
2011
2011
  private setupPagesForPageModes;
2012
2012
  private createPagesForQuestionOnPageMode;
2013
2013
  private createSinglePage;