survey-core 1.9.129 → 1.9.131

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 (253) hide show
  1. package/defaultV2.css +30 -5
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +30 -5
  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 +6 -6
  24. package/i18n/english.js.map +1 -1
  25. package/i18n/english.min.js +2 -2
  26. package/i18n/estonian.js +1 -1
  27. package/i18n/estonian.min.js +1 -1
  28. package/i18n/finnish.js +1 -1
  29. package/i18n/finnish.min.js +1 -1
  30. package/i18n/french.js +1 -1
  31. package/i18n/french.min.js +1 -1
  32. package/i18n/georgian.js +1 -1
  33. package/i18n/georgian.min.js +1 -1
  34. package/i18n/german.js +1 -1
  35. package/i18n/german.min.js +1 -1
  36. package/i18n/greek.js +1 -1
  37. package/i18n/greek.min.js +1 -1
  38. package/i18n/hebrew.js +1 -1
  39. package/i18n/hebrew.min.js +1 -1
  40. package/i18n/hindi.js +1 -1
  41. package/i18n/hindi.min.js +1 -1
  42. package/i18n/hungarian.js +1 -1
  43. package/i18n/hungarian.min.js +1 -1
  44. package/i18n/icelandic.js +1 -1
  45. package/i18n/icelandic.min.js +1 -1
  46. package/i18n/index.js +2 -2
  47. package/i18n/index.js.map +1 -1
  48. package/i18n/index.min.js +2 -2
  49. package/i18n/indonesian.js +1 -1
  50. package/i18n/indonesian.min.js +1 -1
  51. package/i18n/italian.js +1 -1
  52. package/i18n/italian.min.js +1 -1
  53. package/i18n/japanese.js +1 -1
  54. package/i18n/japanese.min.js +1 -1
  55. package/i18n/kazakh.js +1 -1
  56. package/i18n/kazakh.min.js +1 -1
  57. package/i18n/korean.js +1 -1
  58. package/i18n/korean.min.js +1 -1
  59. package/i18n/latvian.js +1 -1
  60. package/i18n/latvian.min.js +1 -1
  61. package/i18n/lithuanian.js +1 -1
  62. package/i18n/lithuanian.min.js +1 -1
  63. package/i18n/macedonian.js +1 -1
  64. package/i18n/macedonian.min.js +1 -1
  65. package/i18n/malay.js +1 -1
  66. package/i18n/malay.min.js +1 -1
  67. package/i18n/nl-BE.js +1 -1
  68. package/i18n/nl-BE.min.js +1 -1
  69. package/i18n/norwegian.js +1 -1
  70. package/i18n/norwegian.min.js +1 -1
  71. package/i18n/persian.js +1 -1
  72. package/i18n/persian.min.js +1 -1
  73. package/i18n/polish.js +1 -1
  74. package/i18n/polish.min.js +1 -1
  75. package/i18n/portuguese-br.js +1 -1
  76. package/i18n/portuguese-br.min.js +1 -1
  77. package/i18n/portuguese.js +1 -1
  78. package/i18n/portuguese.min.js +1 -1
  79. package/i18n/romanian.js +1 -1
  80. package/i18n/romanian.min.js +1 -1
  81. package/i18n/russian.js +1 -1
  82. package/i18n/russian.min.js +1 -1
  83. package/i18n/serbian.js +1 -1
  84. package/i18n/serbian.min.js +1 -1
  85. package/i18n/simplified-chinese.js +1 -1
  86. package/i18n/simplified-chinese.min.js +1 -1
  87. package/i18n/slovak.js +1 -1
  88. package/i18n/slovak.min.js +1 -1
  89. package/i18n/spanish.js +2 -2
  90. package/i18n/spanish.js.map +1 -1
  91. package/i18n/spanish.min.js +2 -2
  92. package/i18n/swahili.js +1 -1
  93. package/i18n/swahili.min.js +1 -1
  94. package/i18n/swedish.js +1 -1
  95. package/i18n/swedish.min.js +1 -1
  96. package/i18n/tajik.js +1 -1
  97. package/i18n/tajik.min.js +1 -1
  98. package/i18n/telugu.js +1 -1
  99. package/i18n/telugu.min.js +1 -1
  100. package/i18n/thai.js +1 -1
  101. package/i18n/thai.min.js +1 -1
  102. package/i18n/traditional-chinese.js +1 -1
  103. package/i18n/traditional-chinese.min.js +1 -1
  104. package/i18n/turkish.js +1 -1
  105. package/i18n/turkish.min.js +1 -1
  106. package/i18n/ukrainian.js +1 -1
  107. package/i18n/ukrainian.min.js +1 -1
  108. package/i18n/urdu.js +1 -1
  109. package/i18n/urdu.min.js +1 -1
  110. package/i18n/vietnamese.js +1 -1
  111. package/i18n/vietnamese.min.js +1 -1
  112. package/i18n/welsh.js +1 -1
  113. package/i18n/welsh.min.js +1 -1
  114. package/modern.css +19 -3
  115. package/modern.css.map +1 -1
  116. package/modern.fontless.css +19 -3
  117. package/modern.fontless.css.map +1 -1
  118. package/modern.fontless.min.css +2 -2
  119. package/modern.min.css +2 -2
  120. package/package.json +1 -1
  121. package/plugins/bootstrap-integration.js +1 -1
  122. package/plugins/bootstrap-integration.min.js +1 -1
  123. package/plugins/bootstrap-material-integration.js +1 -1
  124. package/plugins/bootstrap-material-integration.min.js +1 -1
  125. package/survey.core.js +498 -146
  126. package/survey.core.js.map +1 -1
  127. package/survey.core.min.js +3 -3
  128. package/survey.css +3 -2
  129. package/survey.css.map +1 -1
  130. package/survey.i18n.js +2 -2
  131. package/survey.i18n.js.map +1 -1
  132. package/survey.i18n.min.js +2 -2
  133. package/survey.min.css +2 -2
  134. package/themes/borderless-dark-panelless.js +1 -1
  135. package/themes/borderless-dark-panelless.min.js +1 -1
  136. package/themes/borderless-dark.js +1 -1
  137. package/themes/borderless-dark.min.js +1 -1
  138. package/themes/borderless-light-panelless..js +1 -1
  139. package/themes/borderless-light-panelless..min.js +1 -1
  140. package/themes/borderless-light.js +1 -1
  141. package/themes/borderless-light.min.js +1 -1
  142. package/themes/contrast-dark-panelless.js +1 -1
  143. package/themes/contrast-dark-panelless.min.js +1 -1
  144. package/themes/contrast-dark.js +1 -1
  145. package/themes/contrast-dark.min.js +1 -1
  146. package/themes/contrast-light-panelless.js +1 -1
  147. package/themes/contrast-light-panelless.min.js +1 -1
  148. package/themes/contrast-light.js +1 -1
  149. package/themes/contrast-light.min.js +1 -1
  150. package/themes/default-dark-panelless.js +1 -1
  151. package/themes/default-dark-panelless.min.js +1 -1
  152. package/themes/default-dark.js +1 -1
  153. package/themes/default-dark.min.js +1 -1
  154. package/themes/default-light-panelless.js +1 -1
  155. package/themes/default-light-panelless.min.js +1 -1
  156. package/themes/default-light.js +1 -1
  157. package/themes/default-light.min.js +1 -1
  158. package/themes/doubleborder-dark-panelless.js +1 -1
  159. package/themes/doubleborder-dark-panelless.min.js +1 -1
  160. package/themes/doubleborder-dark.js +1 -1
  161. package/themes/doubleborder-dark.min.js +1 -1
  162. package/themes/doubleborder-light-panelles.js +1 -1
  163. package/themes/doubleborder-light-panelles.min.js +1 -1
  164. package/themes/doubleborder-light.js +1 -1
  165. package/themes/doubleborder-light.min.js +1 -1
  166. package/themes/flat-dark-panelless.js +1 -1
  167. package/themes/flat-dark-panelless.min.js +1 -1
  168. package/themes/flat-dark.js +1 -1
  169. package/themes/flat-dark.min.js +1 -1
  170. package/themes/flat-light-panelless.js +1 -1
  171. package/themes/flat-light-panelless.min.js +1 -1
  172. package/themes/flat-light.js +1 -1
  173. package/themes/flat-light.min.js +1 -1
  174. package/themes/index.js +1 -1
  175. package/themes/index.min.js +1 -1
  176. package/themes/layered-dark-panelless.js +1 -1
  177. package/themes/layered-dark-panelless.min.js +1 -1
  178. package/themes/layered-dark.js +1 -1
  179. package/themes/layered-dark.min.js +1 -1
  180. package/themes/layered-light-panelless.js +1 -1
  181. package/themes/layered-light-panelless.min.js +1 -1
  182. package/themes/layered-light.js +1 -1
  183. package/themes/layered-light.min.js +1 -1
  184. package/themes/plain-dark-panelless.js +1 -1
  185. package/themes/plain-dark-panelless.min.js +1 -1
  186. package/themes/plain-dark.js +1 -1
  187. package/themes/plain-dark.min.js +1 -1
  188. package/themes/plain-light-panelless.js +1 -1
  189. package/themes/plain-light-panelless.min.js +1 -1
  190. package/themes/plain-light.js +1 -1
  191. package/themes/plain-light.min.js +1 -1
  192. package/themes/sharp-dark-panelless.js +1 -1
  193. package/themes/sharp-dark-panelless.min.js +1 -1
  194. package/themes/sharp-dark.js +1 -1
  195. package/themes/sharp-dark.min.js +1 -1
  196. package/themes/sharp-light-panelless.js +1 -1
  197. package/themes/sharp-light-panelless.min.js +1 -1
  198. package/themes/sharp-light.js +1 -1
  199. package/themes/sharp-light.min.js +1 -1
  200. package/themes/solid-dark-panelless.js +1 -1
  201. package/themes/solid-dark-panelless.min.js +1 -1
  202. package/themes/solid-dark.js +1 -1
  203. package/themes/solid-dark.min.js +1 -1
  204. package/themes/solid-light-panelless.js +1 -1
  205. package/themes/solid-light-panelless.min.js +1 -1
  206. package/themes/solid-light.js +1 -1
  207. package/themes/solid-light.min.js +1 -1
  208. package/themes/three-dimensional-dark-panelless.js +1 -1
  209. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  210. package/themes/three-dimensional-dark.js +1 -1
  211. package/themes/three-dimensional-dark.min.js +1 -1
  212. package/themes/three-dimensional-light-panelless.js +1 -1
  213. package/themes/three-dimensional-light-panelless.min.js +1 -1
  214. package/themes/three-dimensional-light.js +1 -1
  215. package/themes/three-dimensional-light.min.js +1 -1
  216. package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +1 -0
  217. package/ts3.4/typings/dragdrop/dom-adapter.d.ts +2 -1
  218. package/ts3.4/typings/dropdownListModel.d.ts +1 -0
  219. package/ts3.4/typings/entries/chunks/model.d.ts +2 -2
  220. package/ts3.4/typings/jsonobject.d.ts +59 -5
  221. package/ts3.4/typings/localizablestring.d.ts +2 -0
  222. package/ts3.4/typings/panel.d.ts +7 -1
  223. package/ts3.4/typings/popup-survey.d.ts +1 -2
  224. package/ts3.4/typings/question.d.ts +1 -0
  225. package/ts3.4/typings/questionCustomWidgets.d.ts +1 -0
  226. package/ts3.4/typings/question_boolean.d.ts +3 -0
  227. package/ts3.4/typings/question_file.d.ts +2 -2
  228. package/ts3.4/typings/question_matrixdropdownbase.d.ts +11 -8
  229. package/ts3.4/typings/question_matrixdynamic.d.ts +2 -3
  230. package/ts3.4/typings/question_paneldynamic.d.ts +1 -1
  231. package/ts3.4/typings/question_tagbox.d.ts +10 -0
  232. package/ts3.4/typings/settings.d.ts +26 -10
  233. package/ts3.4/typings/survey.d.ts +1 -0
  234. package/ts3.4/typings/utils/utils.d.ts +1 -1
  235. package/typings/defaultCss/defaultV2Css.d.ts +1 -0
  236. package/typings/dragdrop/dom-adapter.d.ts +2 -1
  237. package/typings/dropdownListModel.d.ts +1 -0
  238. package/typings/entries/chunks/model.d.ts +2 -2
  239. package/typings/jsonobject.d.ts +59 -5
  240. package/typings/localizablestring.d.ts +2 -0
  241. package/typings/panel.d.ts +7 -1
  242. package/typings/popup-survey.d.ts +1 -2
  243. package/typings/question.d.ts +1 -0
  244. package/typings/questionCustomWidgets.d.ts +1 -0
  245. package/typings/question_boolean.d.ts +3 -0
  246. package/typings/question_file.d.ts +2 -2
  247. package/typings/question_matrixdropdownbase.d.ts +12 -8
  248. package/typings/question_matrixdynamic.d.ts +2 -3
  249. package/typings/question_paneldynamic.d.ts +1 -1
  250. package/typings/question_tagbox.d.ts +10 -0
  251. package/typings/settings.d.ts +26 -10
  252. package/typings/survey.d.ts +1 -0
  253. package/typings/utils/utils.d.ts +1 -1
@@ -21,6 +21,52 @@ export declare function propertyArray(options?: IArrayPropertyDecoratorOptions):
21
21
  export interface IObject {
22
22
  [key: string]: any;
23
23
  }
24
+ export interface IJsonPropertyInfo {
25
+ name: string;
26
+ type?: string;
27
+ className?: string;
28
+ classNamePart?: string;
29
+ baseClassName?: string;
30
+ isRequired?: boolean;
31
+ isUnique?: boolean;
32
+ uniqueProperty?: string;
33
+ choices?: any;
34
+ visible?: boolean;
35
+ alternativeName?: string;
36
+ oldName?: string;
37
+ version?: string;
38
+ dataList?: Array<string>;
39
+ isLocalizable?: boolean;
40
+ isSerializable?: boolean;
41
+ isLightSerializable?: boolean;
42
+ readOnly?: boolean;
43
+ serializationProperty?: string;
44
+ dependsOn?: Array<string> | string;
45
+ isBindable?: boolean;
46
+ isArray?: boolean;
47
+ layout?: string;
48
+ default?: any;
49
+ defaultFunc?: (obj: Base) => any;
50
+ baseValue?: any;
51
+ onSerializeValue?: (obj: any) => any;
52
+ onGetValue?: (obj: any) => any;
53
+ onSettingValue?: (obj: any, value: any) => any;
54
+ onSetValue?: (obj: any, value: any, jsonConv: JsonObject) => any;
55
+ visibleIf?: (obj: any) => boolean;
56
+ enableIf?: (obj: any) => boolean;
57
+ onExecuteExpression?: (obj: any, res: any) => any;
58
+ onPropertyEditorUpdate?: (obj: any, propEditor: any) => any;
59
+ displayName?: string;
60
+ category?: string;
61
+ categoryIndex?: number;
62
+ visibleIndex?: number;
63
+ nextToProperty?: string;
64
+ overridingProperty?: string;
65
+ showMode?: string;
66
+ maxLength?: number;
67
+ maxValue?: any;
68
+ minValue?: any;
69
+ }
24
70
  /**
25
71
  * Contains information about a property of a survey element (page, panel, questions, and etc).
26
72
  * @see addProperty
@@ -28,7 +74,7 @@ export interface IObject {
28
74
  * @see [Add Properties](https://surveyjs.io/Documentation/Survey-Creator#addproperties)
29
75
  * @see [Remove Properties](https://surveyjs.io/Documentation/Survey-Creator#removeproperties)
30
76
  */
31
- export declare class JsonObjectProperty implements IObject {
77
+ export declare class JsonObjectProperty implements IObject, IJsonPropertyInfo {
32
78
  name: string;
33
79
  static getItemValuesDefaultValue: (val: any, type: string) => any;
34
80
  [key: string]: any;
@@ -38,7 +84,7 @@ export declare class JsonObjectProperty implements IObject {
38
84
  private classInfoValue;
39
85
  private typeValue;
40
86
  private choicesValue;
41
- private baseValue;
87
+ baseValue: any;
42
88
  private isRequiredValue;
43
89
  private isUniqueValue;
44
90
  private uniquePropertyValue;
@@ -54,6 +100,7 @@ export declare class JsonObjectProperty implements IObject {
54
100
  isBindable: boolean;
55
101
  className: string;
56
102
  alternativeName: string;
103
+ oldName: string;
57
104
  classNamePart: string;
58
105
  baseClassName: string;
59
106
  defaultValueValue: any;
@@ -81,6 +128,10 @@ export declare class JsonObjectProperty implements IObject {
81
128
  onExecuteExpression: (obj: any, res: any) => any;
82
129
  onPropertyEditorUpdate: (obj: any, propEditor: any) => any;
83
130
  constructor(classInfo: JsonMetadataClass, name: string, isRequired?: boolean);
131
+ uniqueProperty?: string;
132
+ dependsOn?: string | string[];
133
+ default?: any;
134
+ defaultFunc?: (obj: Base) => any;
84
135
  readonly id: number;
85
136
  readonly classInfo: JsonMetadataClass;
86
137
  type: string;
@@ -117,6 +168,7 @@ export declare class JsonObjectProperty implements IObject {
117
168
  visible: boolean;
118
169
  isAvailableInVersion(ver: string): boolean;
119
170
  getSerializedName(ver: string): string;
171
+ getSerializedProperty(obj: any, ver: string): JsonObjectProperty;
120
172
  private isAvailableInVersionCore;
121
173
  isLocalizable: boolean;
122
174
  dataList: Array<string>;
@@ -183,7 +235,8 @@ export declare class JsonMetadata {
183
235
  setObjPropertyValue(obj: any, name: string, val: any): void;
184
236
  private getObjPropertyValueCore;
185
237
  private isObjWrapper;
186
- addClass(name: string, properties: Array<any>, creator?: (json?: any) => any, parentName?: string): JsonMetadataClass;
238
+ private isNeedUseObjWrapper;
239
+ addClass(name: string, properties: Array<IJsonPropertyInfo | string>, creator?: (json?: any) => any, parentName?: string): JsonMetadataClass;
187
240
  removeClass(name: string): void;
188
241
  overrideClassCreatore(name: string, creator: () => any): void;
189
242
  overrideClassCreator(name: string, creator: () => any): void;
@@ -204,8 +257,8 @@ export declare class JsonMetadata {
204
257
  private createCustomType;
205
258
  getChildrenClasses(name: string, canBeCreated?: boolean): Array<JsonMetadataClass>;
206
259
  getRequiredProperties(name: string): Array<string>;
207
- addProperties(className: string, propertiesInfos: Array<any>): void;
208
- addProperty(className: string, propertyInfo: any): JsonObjectProperty;
260
+ addProperties(className: string, propertiesInfos: Array<IJsonPropertyInfo | string>): void;
261
+ addProperty(className: string, propertyInfo: IJsonPropertyInfo | string): JsonObjectProperty;
209
262
  private addCustomPropertyCore;
210
263
  removeProperty(className: string, propertyName: string): boolean;
211
264
  private clearDynamicPropsCache;
@@ -285,6 +338,7 @@ export declare class JsonObject {
285
338
  private addDynamicProperties;
286
339
  private propertiesToJson;
287
340
  valueToJson(obj: any, result: any, prop: JsonObjectProperty, options?: ISaveToJSONOptions): void;
341
+ private valueToJsonCore;
288
342
  valueToObj(value: any, obj: any, property: JsonObjectProperty, jsonObj?: any, options?: ILoadFromJSONOptions): void;
289
343
  private removePosOnValueToJson;
290
344
  private removePos;
@@ -31,6 +31,8 @@ export declare class LocalizableString implements ILocalizableString {
31
31
  private calculatedTextValue;
32
32
  private _localizationName;
33
33
  localizationName: string;
34
+ private _allowLineBreaks;
35
+ readonly allowLineBreaks: boolean;
34
36
  onGetTextCallback: (str: string) => string;
35
37
  storeDefaultText: boolean;
36
38
  onGetLocalizationTextCallback: (str: string) => string;
@@ -276,6 +276,11 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
276
276
  readonly rows: Array<QuestionRowModel>;
277
277
  ensureRowsVisibility(): void;
278
278
  protected onRowsChanged(): void;
279
+ private locCountRowUpdates;
280
+ private blockRowsUpdates;
281
+ private releaseRowsUpdates;
282
+ private updateRowsBeforeElementRemoved;
283
+ private updateRowsOnElementAdded;
279
284
  protected onAddElement(element: IElement, index: number): void;
280
285
  protected onRemoveElement(element: IElement): void;
281
286
  private onElementVisibilityChanged;
@@ -340,6 +345,7 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
340
345
  * @see addNewPanel
341
346
  */
342
347
  addElement(element: IElement, index?: number): boolean;
348
+ insertElement(element: IElement, dest?: IElement, location?: "bottom" | "top" | "left" | "right"): void;
343
349
  insertElementAfter(element: IElement, after: IElement): void;
344
350
  insertElementBefore(element: IElement, before: IElement): void;
345
351
  protected canAddElement(element: IElement): boolean;
@@ -362,7 +368,7 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
362
368
  *
363
369
  * This method returns `null` if the panel cannot be created or added to this panel/page; otherwise, the method returns the created panel.
364
370
  * @param name A panel name.
365
- * @see elements
371
+ * @see elementsup
366
372
  * @see addElement
367
373
  */
368
374
  addNewPanel(name?: string): PanelModel;
@@ -92,10 +92,9 @@ export declare class PopupSurveyModel extends Base {
92
92
  */
93
93
  allowClose: boolean;
94
94
  /*
95
- * Specifies whether to display a button that allow showing pop-up in full-screen mode.
95
+ * Specifies whether to display a button that allows respondents to show the pop-up survey in full screen mode.
96
96
  *
97
97
  * Default value: `false`
98
- *
99
98
  */
100
99
  allowFullScreen: boolean;
101
100
  readonly css: any;
@@ -736,6 +736,7 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
736
736
  */
737
737
  readonly requiredText: string;
738
738
  addError(error: SurveyError | string): void;
739
+ private addCustomError;
739
740
  removeError(error: SurveyError): void;
740
741
  private checkForErrors;
741
742
  protected canCollectErrors(): boolean;
@@ -8,6 +8,7 @@ export declare class QuestionCustomWidget {
8
8
  afterRender(question: IQuestion, el: any): void;
9
9
  willUnmount(question: IQuestion, el: any): void;
10
10
  getDisplayValue(question: IQuestion, value?: any): string;
11
+ validate(question: IQuestion): string;
11
12
  isFit(question: IQuestion): boolean;
12
13
  readonly canShowInToolbox: boolean;
13
14
  showInToolbox: boolean;
@@ -42,6 +42,9 @@ export declare class QuestionBooleanModel extends Question {
42
42
  labelTrue: string;
43
43
  readonly locLabelTrue: LocalizableString;
44
44
  readonly isDeterminated: boolean;
45
+ swapOrder: boolean;
46
+ readonly locLabelLeft: LocalizableString;
47
+ readonly locLabelRight: LocalizableString;
45
48
  /*
46
49
  * Gets or sets a text label that corresponds to a negative answer.
47
50
  *
@@ -139,7 +139,7 @@ export declare class QuestionFileModel extends QuestionFileModelBase {
139
139
  * Default value: 0 (unlimited)
140
140
  */
141
141
  maxSize: number;
142
- chooseFile(): void;
142
+ chooseFile(event: MouseEvent): void;
143
143
  /*
144
144
  * Specifies whether users should confirm file deletion.
145
145
  *
@@ -228,7 +228,7 @@ export declare class QuestionFileModel extends QuestionFileModelBase {
228
228
  protected onChangeQuestionValue(newValue: any): void;
229
229
  protected calcCssClasses(css: any): any;
230
230
  updateElementCss(reNew?: boolean): void;
231
- endLoadingFromJson(): void;
231
+ onSurveyLoad(): void;
232
232
  protected needResponsiveness(): boolean;
233
233
  protected supportResponsiveness(): boolean;
234
234
  protected getObservedElementSelector(): string;
@@ -190,12 +190,15 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
190
190
  protected updateColumnsAndRows(): void;
191
191
  itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
192
192
  /*
193
- * Specifies the matrix layout. Set this property to `"vertical"` if you want to display columns instead of rows and rows instead of columns.
193
+ * Specifies whether to display [`columns`](#columns) as rows and [`rows`](#rows) as columns.
194
194
  *
195
- * Default value: `"horizontal"`
196
- * @see columns
197
- * @see rows
198
- * @see isColumnLayoutHorizontal
195
+ * Default value: `false`
196
+ *
197
+ * [View Demo](https://surveyjs.io/form-library/examples/transpose-dynamic-rows-to-columns-in-matrix/ (linkStyle))
198
+ */
199
+ transposeData: boolean;
200
+ /*
201
+ * This property is obsolete. Use the [`transposeData`](#transposeData) property instead.
199
202
  */
200
203
  columnLayout: string;
201
204
  columnsLocation: string;
@@ -223,10 +226,10 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
223
226
  cellErrorLocation: string;
224
227
  getChildErrorLocation(child: Question): string;
225
228
  /*
226
- * Returns `true` if columns are placed in the horizontal direction and rows in the vertical direction.
229
+ * Returns `true` if [`columns`](#columns) are placed in the horizontal direction and [`rows`](#columns) in the vertical direction.
227
230
  *
228
- * To specify the layout, use the `columnLayout` property. If you set it to `"vertical"`, the survey applies it only when the screen has enough space. Otherwise, the survey falls back to the horizontal layout, but the `columnLayout` property remains set to `"vertical"`. Unlike `columnLayout`, the `isColumnLayoutHorizontal` property always indicates the current layout.
229
- * @see columnLayout
231
+ * To specify the layout, use the [`transposeData`](#transposeData) property. If you set it to `true`, the survey applies it only when the screen has enough space. Otherwise, the survey falls back to the original layout, but the `transposeData` property remains set to `true`. Unlike `transposeData`, the `isColumnLayoutHorizontal` property always indicates the current layout.
232
+ * @see transposeData
230
233
  */
231
234
  readonly isColumnLayoutHorizontal: boolean;
232
235
  /*
@@ -79,7 +79,7 @@ export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownMo
79
79
  protected updateProgressInfoByValues(res: IProgressInfo): void;
80
80
  private getValueForNewRow;
81
81
  /*
82
- * Specifies whether users can drag and drop matrix rows to reorder them. Applies only if [`columnLayout`](#columnLayout) is `"horizontal"`.
82
+ * Specifies whether users can drag and drop matrix rows to reorder them. Applies only if [`transposeData`](#transposeData) is `false`.
83
83
  *
84
84
  * Default value: `false`
85
85
  */
@@ -203,8 +203,7 @@ export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownMo
203
203
  * - `"bottom"` - Displays the Add Row button at the bottom of the matrix.
204
204
  * - `"topBottom"` - Displays the Add Row button at the top and bottom of the matrix.
205
205
  *
206
- * Default value: `"top"` if `columnLayout` is `vertical`; `"bottom"` if `columnLayout` is `"horizontal"` or the matrix is in compact mode.
207
- * @see columnLayout
206
+ * Default value: `"top"` if [`transposeData`](#transposeData) is `true`; `"bottom"` if `transposeData` is `false` or the matrix is in compact mode.
208
207
  * @see addRowText
209
208
  */
210
209
  addRowLocation: string;
@@ -582,7 +582,7 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
582
582
  getPrevButtonCss(): string;
583
583
  getNextButtonCss(): string;
584
584
  /*
585
- * A text displayed when Dynamic Panel contains no entries. Applies only in the Default V2 theme.
585
+ * A text displayed when Dynamic Panel contains no entries.
586
586
  */
587
587
  noEntriesText: string;
588
588
  readonly locNoEntriesText: LocalizableString;
@@ -17,6 +17,16 @@ export declare class QuestionTagboxModel extends QuestionCheckboxModel {
17
17
  private updateReadOnlyText;
18
18
  protected getDefaultItemComponent(): string;
19
19
  onSurveyLoad(): void;
20
+ /**
21
+ * Specifies a comparison operation used to filter the drop-down list. Applies only if [`searchEnabled`](#searchEnabled) is `true`.
22
+ *
23
+ * Possible values:
24
+ *
25
+ * - `"contains"` (default)
26
+ * - `"startsWith"`
27
+ * @see [SurveyModel.onChoicesSearch](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onChoicesSearch)
28
+ */
29
+ searchMode: "contains" | "startsWith";
20
30
  /**
21
31
  * Specifies whether to display a button that clears the selected value.
22
32
  */
@@ -339,27 +339,43 @@ export declare var settings: {
339
339
  */
340
340
  tagboxCloseOnSelect: boolean;
341
341
  /**
342
- * A property that allows you to display a custom confirm dialog.
342
+ * A function that activates a browser confirm dialog.
343
343
  *
344
- * Set this property to a function that renders your custom dialog window. This function should return `true` if a user confirms an action or `false` otherwise.
344
+ * Use the following code to execute this function:
345
+ *
346
+ * ```js
347
+ * import { settings } from "survey-core";
348
+ *
349
+ * // `result` contains `true` if the action was confirmed or `false` otherwise
350
+ * const result = settings.confirmActionFunc("Are you sure?");
351
+ * ```
352
+ *
353
+ * You can redefine the `confirmActionFunc` function if you want to display a custom dialog window. Your function should return `true` if a user confirms an action or `false` otherwise.
345
354
  * @param message A message to be displayed in the confirm dialog window.
346
355
  */
347
356
  confirmActionFunc: (message: string) => boolean;
348
357
  /**
349
- * A property that allows you to display a custom confirm dialog in async mode or activate the standard browser dialog.
358
+ * A function that activates a proprietary SurveyJS confirm dialog.
350
359
  *
351
- * To display a custom confirm dialog, set this property to a function that renders it. This function should return `true` to be enabled; otherwise, a survey executes the [`confirmActionFunc`](#confirmActionFunc) function. Pass the dialog result as the `callback` parameter: `true` if a user confirms an action, `false` otherwise.
352
- *
353
- * To activate the standard browser dialog, set the `confirmActionAsync` property to a function that returns `false`. With this configuration, a survey falls back to the [`confirmActionFunc`](#confirmActionFunc) function, which renders the standard browser dialog by default.
360
+ * Use the following code to execute this function:
354
361
  *
355
362
  * ```js
356
363
  * import { settings } from "survey-core";
357
364
  *
358
- * // Display the standard browser dialog
359
- * settings.confirmActionAsync = () => {
360
- * return false;
361
- * }
365
+ * settings.confirmActionAsync("Are you sure?", (confirmed) => {
366
+ * if (confirmed) {
367
+ * // ...
368
+ * // Proceed with the action
369
+ * // ...
370
+ * } else {
371
+ * // ...
372
+ * // Cancel the action
373
+ * // ...
374
+ * }
375
+ * });
362
376
  * ```
377
+ *
378
+ * You can redefine the `confirmActionAsync` function if you want to display a custom dialog window. Your function should return `true` to be enabled; otherwise, a survey executes the [`confirmActionFunc`](#confirmActionFunc) function. Pass the dialog result as the `callback` parameter: `true` if a user confirms an action, `false` otherwise.
363
379
  * @param message A message to be displayed in the confirm dialog window.
364
380
  * @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
365
381
  */
@@ -1177,6 +1177,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
1177
1177
  readonly isLogoBefore: boolean;
1178
1178
  readonly isLogoAfter: boolean;
1179
1179
  readonly logoClassNames: string;
1180
+ private titleIsEmpty;
1180
1181
  readonly renderedHasTitle: boolean;
1181
1182
  readonly renderedHasDescription: boolean;
1182
1183
  readonly hasTitle: boolean;
@@ -33,7 +33,7 @@ declare function getElementWidth(el: HTMLElement): number;
33
33
  declare function isContainerVisible(el: HTMLElement): boolean;
34
34
  declare function getFirstVisibleChild(el: HTMLElement): any;
35
35
  declare function findParentByClassNames(element: HTMLElement, classNames: Array<string>): Element;
36
- export declare function sanitizeEditableContent(element: any): void;
36
+ export declare function sanitizeEditableContent(element: any, cleanLineBreaks?: boolean): void;
37
37
  declare function mergeValues(src: any, dest: any): void;
38
38
  export declare class Logger {
39
39
  private _result;
@@ -276,6 +276,7 @@ export declare var defaultV2Css: {
276
276
  itemOnError: string;
277
277
  control: string;
278
278
  itemChecked: string;
279
+ itemExchanged: string;
279
280
  itemIndeterminate: string;
280
281
  itemDisabled: string;
281
282
  itemHover: string;
@@ -7,6 +7,7 @@ export interface IDragDropDOMAdapter {
7
7
  export declare class DragDropDOMAdapter implements IDragDropDOMAdapter {
8
8
  private dd;
9
9
  private longTap;
10
+ private fitToContainer;
10
11
  static PreventScrolling: boolean;
11
12
  private timeoutID;
12
13
  private startX;
@@ -17,7 +18,7 @@ export declare class DragDropDOMAdapter implements IDragDropDOMAdapter {
17
18
  private savedTargetNodeParent;
18
19
  private savedTargetNodeIndex;
19
20
  private scrollIntervalId;
20
- constructor(dd: IDragDropEngine, longTap?: boolean);
21
+ constructor(dd: IDragDropEngine, longTap?: boolean, fitToContainer?: boolean);
21
22
  private get rootElement();
22
23
  private stopLongTapIfMoveEnough;
23
24
  private get isMicroMovement();
@@ -32,6 +32,7 @@ export declare class DropdownListModel extends Base {
32
32
  protected popupRecalculatePosition(isResetHeight: boolean): void;
33
33
  protected onHidePopup(): void;
34
34
  protected getAvailableItems(): Array<ItemValue>;
35
+ protected setOnTextSearchCallbackForListModel(listModel: ListModel<ItemValue>): void;
35
36
  protected createListModel(): ListModel<ItemValue>;
36
37
  protected updateAfterListModelCreated(model: ListModel<ItemValue>): void;
37
38
  updateCssClasses(popupCssClass: string, listCssClasses: any): void;
@@ -22,10 +22,10 @@ export { ConditionRunner, ExpressionRunner, IExpresionExecutor, ExpressionExecut
22
22
  export { Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand } from "../../expressions/expressions";
23
23
  export { ConditionsParser } from "../../conditionsParser";
24
24
  export { ProcessValue } from "../../conditionProcessValue";
25
- export { JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray } from "../../jsonobject";
25
+ export { JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, IJsonPropertyInfo, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray } from "../../jsonobject";
26
26
  export { IMatrixDropdownData, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase } from "../../question_matrixdropdownbase";
27
27
  export { MatrixDropdownColumn, matrixDropdownColumnTypes } from "../../question_matrixdropdowncolumn";
28
- export { QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable } from "../../question_matrixdropdownrendered";
28
+ export { QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable } from "../../question_matrixdropdownrendered";
29
29
  export { MatrixDropdownRowModel, QuestionMatrixDropdownModel } from "../../question_matrixdropdown";
30
30
  export { MatrixDynamicRowModel, QuestionMatrixDynamicModel } from "../../question_matrixdynamic";
31
31
  export { MatrixRowModel, MatrixCells, QuestionMatrixModel, IMatrixData } from "../../question_matrix";
@@ -21,6 +21,52 @@ export declare function propertyArray(options?: IArrayPropertyDecoratorOptions):
21
21
  export interface IObject {
22
22
  [key: string]: any;
23
23
  }
24
+ export interface IJsonPropertyInfo {
25
+ name: string;
26
+ type?: string;
27
+ className?: string;
28
+ classNamePart?: string;
29
+ baseClassName?: string;
30
+ isRequired?: boolean;
31
+ isUnique?: boolean;
32
+ uniqueProperty?: string;
33
+ choices?: any;
34
+ visible?: boolean;
35
+ alternativeName?: string;
36
+ oldName?: string;
37
+ version?: string;
38
+ dataList?: Array<string>;
39
+ isLocalizable?: boolean;
40
+ isSerializable?: boolean;
41
+ isLightSerializable?: boolean;
42
+ readOnly?: boolean;
43
+ serializationProperty?: string;
44
+ dependsOn?: Array<string> | string;
45
+ isBindable?: boolean;
46
+ isArray?: boolean;
47
+ layout?: string;
48
+ default?: any;
49
+ defaultFunc?: (obj: Base) => any;
50
+ baseValue?: any;
51
+ onSerializeValue?: (obj: any) => any;
52
+ onGetValue?: (obj: any) => any;
53
+ onSettingValue?: (obj: any, value: any) => any;
54
+ onSetValue?: (obj: any, value: any, jsonConv: JsonObject) => any;
55
+ visibleIf?: (obj: any) => boolean;
56
+ enableIf?: (obj: any) => boolean;
57
+ onExecuteExpression?: (obj: any, res: any) => any;
58
+ onPropertyEditorUpdate?: (obj: any, propEditor: any) => any;
59
+ displayName?: string;
60
+ category?: string;
61
+ categoryIndex?: number;
62
+ visibleIndex?: number;
63
+ nextToProperty?: string;
64
+ overridingProperty?: string;
65
+ showMode?: string;
66
+ maxLength?: number;
67
+ maxValue?: any;
68
+ minValue?: any;
69
+ }
24
70
  /**
25
71
  * Contains information about a property of a survey element (page, panel, questions, and etc).
26
72
  * @see addProperty
@@ -28,7 +74,7 @@ export interface IObject {
28
74
  * @see [Add Properties](https://surveyjs.io/Documentation/Survey-Creator#addproperties)
29
75
  * @see [Remove Properties](https://surveyjs.io/Documentation/Survey-Creator#removeproperties)
30
76
  */
31
- export declare class JsonObjectProperty implements IObject {
77
+ export declare class JsonObjectProperty implements IObject, IJsonPropertyInfo {
32
78
  name: string;
33
79
  static getItemValuesDefaultValue: (val: any, type: string) => any;
34
80
  [key: string]: any;
@@ -38,7 +84,7 @@ export declare class JsonObjectProperty implements IObject {
38
84
  private classInfoValue;
39
85
  private typeValue;
40
86
  private choicesValue;
41
- private baseValue;
87
+ baseValue: any;
42
88
  private isRequiredValue;
43
89
  private isUniqueValue;
44
90
  private uniquePropertyValue;
@@ -54,6 +100,7 @@ export declare class JsonObjectProperty implements IObject {
54
100
  isBindable: boolean;
55
101
  className: string;
56
102
  alternativeName: string;
103
+ oldName: string;
57
104
  classNamePart: string;
58
105
  baseClassName: string;
59
106
  defaultValueValue: any;
@@ -81,6 +128,10 @@ export declare class JsonObjectProperty implements IObject {
81
128
  onExecuteExpression: (obj: any, res: any) => any;
82
129
  onPropertyEditorUpdate: (obj: any, propEditor: any) => any;
83
130
  constructor(classInfo: JsonMetadataClass, name: string, isRequired?: boolean);
131
+ uniqueProperty?: string;
132
+ dependsOn?: string | string[];
133
+ default?: any;
134
+ defaultFunc?: (obj: Base) => any;
84
135
  get id(): number;
85
136
  get classInfo(): JsonMetadataClass;
86
137
  get type(): string;
@@ -124,6 +175,7 @@ export declare class JsonObjectProperty implements IObject {
124
175
  set visible(val: boolean);
125
176
  isAvailableInVersion(ver: string): boolean;
126
177
  getSerializedName(ver: string): string;
178
+ getSerializedProperty(obj: any, ver: string): JsonObjectProperty;
127
179
  private isAvailableInVersionCore;
128
180
  get isLocalizable(): boolean;
129
181
  set isLocalizable(val: boolean);
@@ -192,7 +244,8 @@ export declare class JsonMetadata {
192
244
  setObjPropertyValue(obj: any, name: string, val: any): void;
193
245
  private getObjPropertyValueCore;
194
246
  private isObjWrapper;
195
- addClass(name: string, properties: Array<any>, creator?: (json?: any) => any, parentName?: string): JsonMetadataClass;
247
+ private isNeedUseObjWrapper;
248
+ addClass(name: string, properties: Array<IJsonPropertyInfo | string>, creator?: (json?: any) => any, parentName?: string): JsonMetadataClass;
196
249
  removeClass(name: string): void;
197
250
  overrideClassCreatore(name: string, creator: () => any): void;
198
251
  overrideClassCreator(name: string, creator: () => any): void;
@@ -213,8 +266,8 @@ export declare class JsonMetadata {
213
266
  private createCustomType;
214
267
  getChildrenClasses(name: string, canBeCreated?: boolean): Array<JsonMetadataClass>;
215
268
  getRequiredProperties(name: string): Array<string>;
216
- addProperties(className: string, propertiesInfos: Array<any>): void;
217
- addProperty(className: string, propertyInfo: any): JsonObjectProperty;
269
+ addProperties(className: string, propertiesInfos: Array<IJsonPropertyInfo | string>): void;
270
+ addProperty(className: string, propertyInfo: IJsonPropertyInfo | string): JsonObjectProperty;
218
271
  private addCustomPropertyCore;
219
272
  removeProperty(className: string, propertyName: string): boolean;
220
273
  private clearDynamicPropsCache;
@@ -294,6 +347,7 @@ export declare class JsonObject {
294
347
  private addDynamicProperties;
295
348
  private propertiesToJson;
296
349
  valueToJson(obj: any, result: any, prop: JsonObjectProperty, options?: ISaveToJSONOptions): void;
350
+ private valueToJsonCore;
297
351
  valueToObj(value: any, obj: any, property: JsonObjectProperty, jsonObj?: any, options?: ILoadFromJSONOptions): void;
298
352
  private removePosOnValueToJson;
299
353
  private removePos;
@@ -33,6 +33,8 @@ export declare class LocalizableString implements ILocalizableString {
33
33
  private _localizationName;
34
34
  get localizationName(): string;
35
35
  set localizationName(val: string);
36
+ private _allowLineBreaks;
37
+ get allowLineBreaks(): boolean;
36
38
  onGetTextCallback: (str: string) => string;
37
39
  storeDefaultText: boolean;
38
40
  onGetLocalizationTextCallback: (str: string) => string;
@@ -286,6 +286,11 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
286
286
  get rows(): Array<QuestionRowModel>;
287
287
  ensureRowsVisibility(): void;
288
288
  protected onRowsChanged(): void;
289
+ private locCountRowUpdates;
290
+ private blockRowsUpdates;
291
+ private releaseRowsUpdates;
292
+ private updateRowsBeforeElementRemoved;
293
+ private updateRowsOnElementAdded;
289
294
  protected onAddElement(element: IElement, index: number): void;
290
295
  protected onRemoveElement(element: IElement): void;
291
296
  private onElementVisibilityChanged;
@@ -352,6 +357,7 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
352
357
  * @see addNewPanel
353
358
  */
354
359
  addElement(element: IElement, index?: number): boolean;
360
+ insertElement(element: IElement, dest?: IElement, location?: "bottom" | "top" | "left" | "right"): void;
355
361
  insertElementAfter(element: IElement, after: IElement): void;
356
362
  insertElementBefore(element: IElement, before: IElement): void;
357
363
  protected canAddElement(element: IElement): boolean;
@@ -374,7 +380,7 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
374
380
  *
375
381
  * This method returns `null` if the panel cannot be created or added to this panel/page; otherwise, the method returns the created panel.
376
382
  * @param name A panel name.
377
- * @see elements
383
+ * @see elementsup
378
384
  * @see addElement
379
385
  */
380
386
  addNewPanel(name?: string): PanelModel;
@@ -97,10 +97,9 @@ export declare class PopupSurveyModel extends Base {
97
97
  get allowClose(): boolean;
98
98
  set allowClose(val: boolean);
99
99
  /**
100
- * Specifies whether to display a button that allow showing pop-up in full-screen mode.
100
+ * Specifies whether to display a button that allows respondents to show the pop-up survey in full screen mode.
101
101
  *
102
102
  * Default value: `false`
103
- *
104
103
  */
105
104
  get allowFullScreen(): boolean;
106
105
  set allowFullScreen(val: boolean);
@@ -771,6 +771,7 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
771
771
  */
772
772
  get requiredText(): string;
773
773
  addError(error: SurveyError | string): void;
774
+ private addCustomError;
774
775
  removeError(error: SurveyError): void;
775
776
  private checkForErrors;
776
777
  protected canCollectErrors(): boolean;
@@ -8,6 +8,7 @@ export declare class QuestionCustomWidget {
8
8
  afterRender(question: IQuestion, el: any): void;
9
9
  willUnmount(question: IQuestion, el: any): void;
10
10
  getDisplayValue(question: IQuestion, value?: any): string;
11
+ validate(question: IQuestion): string;
11
12
  isFit(question: IQuestion): boolean;
12
13
  get canShowInToolbox(): boolean;
13
14
  get showInToolbox(): boolean;
@@ -46,6 +46,9 @@ export declare class QuestionBooleanModel extends Question {
46
46
  set labelTrue(val: string);
47
47
  get locLabelTrue(): LocalizableString;
48
48
  get isDeterminated(): boolean;
49
+ swapOrder: boolean;
50
+ get locLabelLeft(): LocalizableString;
51
+ get locLabelRight(): LocalizableString;
49
52
  /**
50
53
  * Gets or sets a text label that corresponds to a negative answer.
51
54
  *