survey-core 1.12.1 → 1.12.2

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 (251) hide show
  1. package/defaultV2.css +3 -1
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +3 -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 +45 -45
  46. package/i18n/index.js.map +1 -1
  47. package/i18n/index.min.js +2 -2
  48. package/i18n/indonesian.js +1 -1
  49. package/i18n/indonesian.min.js +1 -1
  50. package/i18n/italian.js +1 -1
  51. package/i18n/italian.min.js +1 -1
  52. package/i18n/japanese.js +45 -45
  53. package/i18n/japanese.js.map +1 -1
  54. package/i18n/japanese.min.js +2 -2
  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/philippines.js +1 -1
  74. package/i18n/philippines.min.js +1 -1
  75. package/i18n/polish.js +1 -1
  76. package/i18n/polish.min.js +1 -1
  77. package/i18n/portuguese-br.js +1 -1
  78. package/i18n/portuguese-br.min.js +1 -1
  79. package/i18n/portuguese.js +1 -1
  80. package/i18n/portuguese.min.js +1 -1
  81. package/i18n/romanian.js +1 -1
  82. package/i18n/romanian.min.js +1 -1
  83. package/i18n/russian.js +1 -1
  84. package/i18n/russian.min.js +1 -1
  85. package/i18n/serbian.js +1 -1
  86. package/i18n/serbian.min.js +1 -1
  87. package/i18n/simplified-chinese.js +1 -1
  88. package/i18n/simplified-chinese.min.js +1 -1
  89. package/i18n/slovak.js +1 -1
  90. package/i18n/slovak.min.js +1 -1
  91. package/i18n/spanish.js +1 -1
  92. package/i18n/spanish.min.js +1 -1
  93. package/i18n/swahili.js +1 -1
  94. package/i18n/swahili.min.js +1 -1
  95. package/i18n/swedish.js +1 -1
  96. package/i18n/swedish.min.js +1 -1
  97. package/i18n/tajik.js +1 -1
  98. package/i18n/tajik.min.js +1 -1
  99. package/i18n/telugu.js +1 -1
  100. package/i18n/telugu.min.js +1 -1
  101. package/i18n/thai.js +1 -1
  102. package/i18n/thai.min.js +1 -1
  103. package/i18n/traditional-chinese.js +1 -1
  104. package/i18n/traditional-chinese.min.js +1 -1
  105. package/i18n/turkish.js +1 -1
  106. package/i18n/turkish.min.js +1 -1
  107. package/i18n/ukrainian.js +1 -1
  108. package/i18n/ukrainian.min.js +1 -1
  109. package/i18n/urdu.js +1 -1
  110. package/i18n/urdu.min.js +1 -1
  111. package/i18n/vietnamese.js +1 -1
  112. package/i18n/vietnamese.min.js +1 -1
  113. package/i18n/welsh.js +1 -1
  114. package/i18n/welsh.min.js +1 -1
  115. package/modern.css +1 -1
  116. package/modern.fontless.css +1 -1
  117. package/modern.fontless.min.css +1 -1
  118. package/modern.min.css +1 -1
  119. package/package.json +1 -1
  120. package/plugins/bootstrap-integration/index.js +1 -1
  121. package/plugins/bootstrap-integration/index.min.js +1 -1
  122. package/plugins/bootstrap-material-integration/index.js +1 -1
  123. package/plugins/bootstrap-material-integration/index.min.js +1 -1
  124. package/survey.core.js +831 -235
  125. package/survey.core.js.map +1 -1
  126. package/survey.core.min.js +3 -3
  127. package/survey.css +1 -1
  128. package/survey.i18n.js +45 -45
  129. package/survey.i18n.js.map +1 -1
  130. package/survey.i18n.min.js +2 -2
  131. package/survey.min.css +1 -1
  132. package/themes/borderless-dark-panelless.js +1 -1
  133. package/themes/borderless-dark-panelless.min.js +1 -1
  134. package/themes/borderless-dark.js +1 -1
  135. package/themes/borderless-dark.min.js +1 -1
  136. package/themes/borderless-light-panelless..js +1 -1
  137. package/themes/borderless-light-panelless..min.js +1 -1
  138. package/themes/borderless-light.js +1 -1
  139. package/themes/borderless-light.min.js +1 -1
  140. package/themes/contrast-dark-panelless.js +1 -1
  141. package/themes/contrast-dark-panelless.min.js +1 -1
  142. package/themes/contrast-dark.js +1 -1
  143. package/themes/contrast-dark.min.js +1 -1
  144. package/themes/contrast-light-panelless.js +1 -1
  145. package/themes/contrast-light-panelless.min.js +1 -1
  146. package/themes/contrast-light.js +1 -1
  147. package/themes/contrast-light.min.js +1 -1
  148. package/themes/default-dark-panelless.js +1 -1
  149. package/themes/default-dark-panelless.min.js +1 -1
  150. package/themes/default-dark.js +1 -1
  151. package/themes/default-dark.min.js +1 -1
  152. package/themes/default-light-panelless.js +1 -1
  153. package/themes/default-light-panelless.min.js +1 -1
  154. package/themes/default-light.js +1 -1
  155. package/themes/default-light.min.js +1 -1
  156. package/themes/doubleborder-dark-panelless.js +1 -1
  157. package/themes/doubleborder-dark-panelless.min.js +1 -1
  158. package/themes/doubleborder-dark.js +1 -1
  159. package/themes/doubleborder-dark.min.js +1 -1
  160. package/themes/doubleborder-light-panelles.js +1 -1
  161. package/themes/doubleborder-light-panelles.min.js +1 -1
  162. package/themes/doubleborder-light.js +1 -1
  163. package/themes/doubleborder-light.min.js +1 -1
  164. package/themes/flat-dark-panelless.js +1 -1
  165. package/themes/flat-dark-panelless.min.js +1 -1
  166. package/themes/flat-dark.js +1 -1
  167. package/themes/flat-dark.min.js +1 -1
  168. package/themes/flat-light-panelless.js +1 -1
  169. package/themes/flat-light-panelless.min.js +1 -1
  170. package/themes/flat-light.js +1 -1
  171. package/themes/flat-light.min.js +1 -1
  172. package/themes/index.js +1 -1
  173. package/themes/index.min.js +1 -1
  174. package/themes/layered-dark-panelless.js +1 -1
  175. package/themes/layered-dark-panelless.min.js +1 -1
  176. package/themes/layered-dark.js +1 -1
  177. package/themes/layered-dark.min.js +1 -1
  178. package/themes/layered-light-panelless.js +1 -1
  179. package/themes/layered-light-panelless.min.js +1 -1
  180. package/themes/layered-light.js +1 -1
  181. package/themes/layered-light.min.js +1 -1
  182. package/themes/plain-dark-panelless.js +1 -1
  183. package/themes/plain-dark-panelless.min.js +1 -1
  184. package/themes/plain-dark.js +1 -1
  185. package/themes/plain-dark.min.js +1 -1
  186. package/themes/plain-light-panelless.js +1 -1
  187. package/themes/plain-light-panelless.min.js +1 -1
  188. package/themes/plain-light.js +1 -1
  189. package/themes/plain-light.min.js +1 -1
  190. package/themes/sharp-dark-panelless.js +1 -1
  191. package/themes/sharp-dark-panelless.min.js +1 -1
  192. package/themes/sharp-dark.js +1 -1
  193. package/themes/sharp-dark.min.js +1 -1
  194. package/themes/sharp-light-panelless.js +1 -1
  195. package/themes/sharp-light-panelless.min.js +1 -1
  196. package/themes/sharp-light.js +1 -1
  197. package/themes/sharp-light.min.js +1 -1
  198. package/themes/solid-dark-panelless.js +1 -1
  199. package/themes/solid-dark-panelless.min.js +1 -1
  200. package/themes/solid-dark.js +1 -1
  201. package/themes/solid-dark.min.js +1 -1
  202. package/themes/solid-light-panelless.js +1 -1
  203. package/themes/solid-light-panelless.min.js +1 -1
  204. package/themes/solid-light.js +1 -1
  205. package/themes/solid-light.min.js +1 -1
  206. package/themes/three-dimensional-dark-panelless.js +1 -1
  207. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  208. package/themes/three-dimensional-dark.js +1 -1
  209. package/themes/three-dimensional-dark.min.js +1 -1
  210. package/themes/three-dimensional-light-panelless.js +1 -1
  211. package/themes/three-dimensional-light-panelless.min.js +1 -1
  212. package/themes/three-dimensional-light.js +1 -1
  213. package/themes/three-dimensional-light.min.js +1 -1
  214. package/ts3.4/typings/packages/survey-core/entries/chunks/model.d.ts +1 -0
  215. package/ts3.4/typings/packages/survey-core/src/base-interfaces.d.ts +2 -0
  216. package/ts3.4/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
  217. package/ts3.4/typings/packages/survey-core/src/martixBase.d.ts +7 -6
  218. package/ts3.4/typings/packages/survey-core/src/page.d.ts +3 -0
  219. package/ts3.4/typings/packages/survey-core/src/panel.d.ts +3 -1
  220. package/ts3.4/typings/packages/survey-core/src/question.d.ts +9 -6
  221. package/ts3.4/typings/packages/survey-core/src/question_baseselect.d.ts +3 -0
  222. package/ts3.4/typings/packages/survey-core/src/question_comment.d.ts +4 -0
  223. package/ts3.4/typings/packages/survey-core/src/question_matrix.d.ts +9 -1
  224. package/ts3.4/typings/packages/survey-core/src/question_matrixdropdown.d.ts +4 -1
  225. package/ts3.4/typings/packages/survey-core/src/question_matrixdropdownbase.d.ts +23 -2
  226. package/ts3.4/typings/packages/survey-core/src/question_matrixdropdowncolumn.d.ts +1 -0
  227. package/ts3.4/typings/packages/survey-core/src/question_matrixdynamic.d.ts +1 -0
  228. package/ts3.4/typings/packages/survey-core/src/survey-element.d.ts +1 -0
  229. package/ts3.4/typings/packages/survey-core/src/survey.d.ts +1 -1
  230. package/ts3.4/typings/packages/survey-core/src/utils/text-area.d.ts +56 -0
  231. package/ts3.4/typings/packages/survey-core/src/validator.d.ts +59 -16
  232. package/ts3.4/typings/src/defaultCss/cssmodern.d.ts +1 -0
  233. package/typings/packages/survey-core/entries/chunks/model.d.ts +1 -0
  234. package/typings/packages/survey-core/src/base-interfaces.d.ts +2 -0
  235. package/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
  236. package/typings/packages/survey-core/src/martixBase.d.ts +7 -6
  237. package/typings/packages/survey-core/src/page.d.ts +3 -0
  238. package/typings/packages/survey-core/src/panel.d.ts +3 -1
  239. package/typings/packages/survey-core/src/question.d.ts +9 -6
  240. package/typings/packages/survey-core/src/question_baseselect.d.ts +3 -0
  241. package/typings/packages/survey-core/src/question_comment.d.ts +4 -0
  242. package/typings/packages/survey-core/src/question_matrix.d.ts +9 -1
  243. package/typings/packages/survey-core/src/question_matrixdropdown.d.ts +4 -1
  244. package/typings/packages/survey-core/src/question_matrixdropdownbase.d.ts +24 -2
  245. package/typings/packages/survey-core/src/question_matrixdropdowncolumn.d.ts +1 -0
  246. package/typings/packages/survey-core/src/question_matrixdynamic.d.ts +1 -0
  247. package/typings/packages/survey-core/src/survey-element.d.ts +1 -0
  248. package/typings/packages/survey-core/src/survey.d.ts +1 -1
  249. package/typings/packages/survey-core/src/utils/text-area.d.ts +56 -0
  250. package/typings/packages/survey-core/src/validator.d.ts +60 -16
  251. package/typings/src/defaultCss/cssmodern.d.ts +1 -0
@@ -8,13 +8,18 @@ export declare class ValidatorResult {
8
8
  constructor(value: any, error?: SurveyError);
9
9
  }
10
10
  /**
11
- * Base SurveyJS validator class.
11
+ * A base class for all classes that implement validators.
12
+ *
13
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
12
14
  */
13
15
  export declare class SurveyValidator extends Base {
14
16
  errorOwner: ISurveyErrorOwner;
15
17
  onAsyncCompleted: (result: ValidatorResult) => void;
16
18
  constructor();
17
19
  getSurvey(live?: boolean): ISurvey;
20
+ /*
21
+ * An error message to display when a value fails validation.
22
+ */
18
23
  text: string;
19
24
  readonly isValidateAllValues: boolean;
20
25
  readonly locText: LocalizableString;
@@ -45,7 +50,9 @@ export declare class ValidatorRunner {
45
50
  private prepareAsyncValidators;
46
51
  }
47
52
  /**
48
- * Validate numeric values.
53
+ * A class that implements a validator for numeric values.
54
+ *
55
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
49
56
  */
50
57
  export declare class NumericValidator extends SurveyValidator {
51
58
  constructor(minValue?: number, maxValue?: number);
@@ -53,16 +60,22 @@ export declare class NumericValidator extends SurveyValidator {
53
60
  validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
54
61
  protected getDefaultErrorText(name: string): string;
55
62
  /*
56
- * The minValue property.
63
+ * A minimum allowed numeric value.
64
+ *
65
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
57
66
  */
58
67
  minValue: number;
59
68
  /*
60
- * The maxValue property.
69
+ * A maximum allowed numeric value.
70
+ *
71
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
61
72
  */
62
73
  maxValue: number;
63
74
  }
64
75
  /**
65
- * Validate text values.
76
+ * A class that implements a validator for text values.
77
+ *
78
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
66
79
  */
67
80
  export declare class TextValidator extends SurveyValidator {
68
81
  constructor();
@@ -70,20 +83,32 @@ export declare class TextValidator extends SurveyValidator {
70
83
  validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
71
84
  protected getDefaultErrorText(name: string): string;
72
85
  /*
73
- * The minLength property.
86
+ * The minimum length of a text value measured in characters.
87
+ *
88
+ * Default value: 0
89
+ *
90
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
74
91
  */
75
92
  minLength: number;
76
93
  /*
77
- * The maxLength property.
94
+ * The maximum length of a text value measured in characters.
95
+ *
96
+ * Default value: 0 (unlimited)
97
+ *
98
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
78
99
  */
79
100
  maxLength: number;
80
101
  /*
81
- * The allowDigits property.
102
+ * Specifies whether a text value can include numerical digits.
103
+ *
104
+ * Default value: `true`
82
105
  */
83
106
  allowDigits: boolean;
84
107
  }
85
108
  /**
86
- * Validates the number of answers.
109
+ * A class that implements answer count validation in the question types that can have multiple values (for instance, [Checkboxes](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model)).
110
+ *
111
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
87
112
  */
88
113
  export declare class AnswerCountValidator extends SurveyValidator {
89
114
  constructor(minCount?: number, maxCount?: number);
@@ -91,16 +116,20 @@ export declare class AnswerCountValidator extends SurveyValidator {
91
116
  validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
92
117
  protected getDefaultErrorText(name: string): string;
93
118
  /*
94
- * The minCount property.
119
+ * A minimum number of selected answers.
120
+ *
121
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
95
122
  */
96
123
  minCount: number;
97
124
  /*
98
- * The maxCount property.
125
+ * A maximum number of selected answers.
126
+ *
127
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
99
128
  */
100
129
  maxCount: number;
101
130
  }
102
131
  /**
103
- * Use it to validate the text by regular expressions.
132
+ * A class that implements validation using regular expressions.
104
133
  *
105
134
  * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
106
135
  */
@@ -110,14 +139,24 @@ export declare class RegexValidator extends SurveyValidator {
110
139
  validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
111
140
  private hasError;
112
141
  /*
113
- * The regex property.
142
+ * A regular expression used to validate values.
143
+ *
144
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
114
145
  */
115
146
  regex: string;
147
+ /*
148
+ * Specifies whether uppercase and lowercase letters must be treated as distinct or equivalent when validating values.
149
+ *
150
+ * Default value: `false` (uppercase and lowercase letters are treated as distinct)
151
+ */
152
+ caseInsensitive: boolean;
116
153
  insensitive: boolean;
117
154
  private createRegExp;
118
155
  }
119
156
  /**
120
- * Validate e-mail address in the text input
157
+ * A class that implements a validator for e-mail addresses.
158
+ *
159
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
121
160
  */
122
161
  export declare class EmailValidator extends SurveyValidator {
123
162
  private re;
@@ -127,7 +166,9 @@ export declare class EmailValidator extends SurveyValidator {
127
166
  protected getDefaultErrorText(name: string): string;
128
167
  }
129
168
  /**
130
- * Show error if expression returns false
169
+ * A class that implements validation using [expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions).
170
+ *
171
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
131
172
  */
132
173
  export declare class ExpressionValidator extends SurveyValidator {
133
174
  private conditionRunner;
@@ -142,7 +183,9 @@ export declare class ExpressionValidator extends SurveyValidator {
142
183
  protected getDefaultErrorText(name: string): string;
143
184
  protected ensureConditionRunner(): boolean;
144
185
  /*
145
- * The expression property.
186
+ * A Boolean [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions). If it evaluates to `false`, validation fails.
187
+ *
188
+ * [View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
146
189
  */
147
190
  expression: string;
148
191
  }
@@ -82,6 +82,7 @@ export declare var modernCss: {
82
82
  page: {
83
83
  root: string;
84
84
  title: string;
85
+ number: string;
85
86
  description: string;
86
87
  };
87
88
  pageTitle: string;
@@ -94,6 +94,7 @@ export { InputMaskNumeric } from "../../src/mask/mask_numeric";
94
94
  export { InputMaskDateTime } from "../../src/mask/mask_datetime";
95
95
  export { InputMaskCurrency } from "../../src/mask/mask_currency";
96
96
  export * from "../../src/utils/cssClassBuilder";
97
+ export * from "../../src/utils/text-area";
97
98
  export { surveyCss, defaultV2Css, defaultV2ThemeName } from "../../src/defaultCss/defaultV2Css";
98
99
  export { DragDropCore } from "../../src/dragdrop/core";
99
100
  export { DragDropChoices } from "../../src/dragdrop/choices";
@@ -279,6 +279,8 @@ export interface ITitleOwner {
279
279
  name: string;
280
280
  no: string;
281
281
  requiredText: string;
282
+ cssTitleNumber: string;
283
+ cssRequiredText?: string;
282
284
  isRequireTextOnStart: boolean;
283
285
  isRequireTextBeforeTitle: boolean;
284
286
  isRequireTextAfterTitle: boolean;
@@ -161,6 +161,7 @@ export declare var defaultV2Css: {
161
161
  emptyHeaderRoot: string;
162
162
  title: string;
163
163
  description: string;
164
+ number: string;
164
165
  errorsContainer: string;
165
166
  };
166
167
  pageTitle: string;
@@ -1,11 +1,11 @@
1
1
  import { HashTable } from "./helpers";
2
2
  import { ItemValue } from "./itemvalue";
3
3
  import { Question } from "./question";
4
+ import { ConditionRunner } from "./conditions";
4
5
  /**
5
6
  * A base class for all matrix question types.
6
7
  */
7
8
  export declare class QuestionMatrixBaseModel<TRow, TColumn> extends Question {
8
- protected filteredColumns: Array<TColumn>;
9
9
  protected filteredRows: Array<ItemValue>;
10
10
  protected generatedVisibleRows: Array<TRow>;
11
11
  protected generatedTotalRow: TRow;
@@ -36,6 +36,7 @@ export declare class QuestionMatrixBaseModel<TRow, TColumn> extends Question {
36
36
  get columns(): Array<any>;
37
37
  set columns(newValue: Array<any>);
38
38
  get visibleColumns(): Array<any>;
39
+ protected isColumnVisible(column: any): boolean;
39
40
  /**
40
41
  * An array of matrix rows.
41
42
  *
@@ -78,20 +79,20 @@ export declare class QuestionMatrixBaseModel<TRow, TColumn> extends Question {
78
79
  get columnsVisibleIf(): string;
79
80
  set columnsVisibleIf(val: string);
80
81
  runCondition(values: HashTable<any>, properties: HashTable<any>): void;
81
- protected filterItems(): boolean;
82
82
  protected onColumnsChanged(): void;
83
83
  protected onRowsChanged(): void;
84
84
  protected updateVisibilityBasedOnRows(): void;
85
85
  protected isVisibleCore(): boolean;
86
86
  protected shouldRunColumnExpression(): boolean;
87
87
  protected hasRowsAsItems(): boolean;
88
- protected runItemsCondition(values: HashTable<any>, properties: HashTable<any>): boolean;
88
+ protected runItemsCondition(values: HashTable<any>, properties: HashTable<any>): void;
89
+ protected isRowsFiltered(): boolean;
89
90
  protected clearGeneratedRows(): void;
91
+ protected createRowsVisibleIfRunner(): ConditionRunner;
90
92
  private runConditionsForRows;
91
- private runConditionsForColumns;
92
- clearIncorrectValues(): void;
93
+ protected runConditionsForColumns(values: HashTable<any>, properties: HashTable<any>): boolean;
94
+ protected clearInvisibleColumnValues(): void;
93
95
  protected clearInvisibleValuesInRows(): void;
94
- private restoreNewVisibleRowsValues;
95
96
  needResponsiveWidth(): boolean;
96
97
  protected get columnsAutoWidth(): boolean;
97
98
  getTableCss(): string;
@@ -13,6 +13,9 @@ export declare class PageModel extends PanelModelBase implements IPage {
13
13
  getType(): string;
14
14
  toString(): string;
15
15
  get isPage(): boolean;
16
+ get no(): string;
17
+ get cssTitleNumber(): string;
18
+ get cssRequiredText(): string;
16
19
  protected canShowPageNumber(): boolean;
17
20
  protected canShowTitle(): boolean;
18
21
  /**
@@ -461,7 +461,10 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
461
461
  get questionErrorLocation(): string;
462
462
  set questionErrorLocation(val: string);
463
463
  getQuestionErrorLocation(): string;
464
+ getTitleOwner(): ITitleOwner;
464
465
  get no(): string;
466
+ get cssTitleNumber(): string;
467
+ get cssRequiredText(): string;
465
468
  get cssError(): string;
466
469
  protected getCssError(cssClasses: any): string;
467
470
  getSerializableColumnsValue(): Array<PanelLayoutColumnModel>;
@@ -499,7 +502,6 @@ export declare class PanelModel extends PanelModelBase implements IElement {
499
502
  * @see showNumber
500
503
  */
501
504
  get visibleIndex(): number;
502
- getTitleOwner(): ITitleOwner;
503
505
  /**
504
506
  * Specifies whether to show the panel number in the title.
505
507
  *
@@ -10,6 +10,7 @@ import { QuestionCustomWidget } from "./questionCustomWidgets";
10
10
  import { SurveyError } from "./survey-error";
11
11
  import { PopupModel } from "./popup";
12
12
  import { ITheme } from "./themes";
13
+ import { TextAreaModel } from "./utils/text-area";
13
14
  export interface IConditionObject {
14
15
  name: string;
15
16
  text: string;
@@ -63,6 +64,8 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
63
64
  private isReadyValue;
64
65
  private commentElements;
65
66
  private dependedQuestions;
67
+ commentTextAreaModel: TextAreaModel;
68
+ private getCommentTextAreaOptions;
66
69
  /**
67
70
  * An event that is raised when the question's ready state has changed (expressions are evaluated, choices are loaded from a web resource specified by the `choicesByUrl` property, etc.).
68
71
  *
@@ -664,31 +667,31 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
664
667
  get defaultValueExpression(): any;
665
668
  set defaultValueExpression(val: any);
666
669
  /**
667
- * A Boolean expression. If it evaluates to `true`, the question value is reset to [default](#defaultValue).
670
+ * A Boolean [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions). If it evaluates to `true`, the question value is reset to [default](#defaultValue).
668
671
  *
669
672
  * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
670
673
  *
671
- * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
674
+ * [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
672
675
  * @see setValueIf
673
676
  */
674
677
  get resetValueIf(): string;
675
678
  set resetValueIf(val: string);
676
679
  /**
677
- * A Boolean expression. If it evaluates to `true`, the question value is set to a value calculated using the [`setValueExpression`](#setValueExpression).
680
+ * A Boolean [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions). If it evaluates to `true`, the question value is set to a value calculated using the [`setValueExpression`](#setValueExpression).
678
681
  *
679
682
  * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
680
683
  *
681
- * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
684
+ * [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
682
685
  * @see resetValueIf
683
686
  */
684
687
  get setValueIf(): string;
685
688
  set setValueIf(val: string);
686
689
  /**
687
- * An expression used to calculate the question value.
690
+ * An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the question value.
688
691
  *
689
692
  * You can use `setValueExpression` as a standalone property or in conjunction with the [`setValueIf`](#setValueIf) expression, in which case the calculated question value applies only when `setValueIf` evaluates to `true`.
690
693
  *
691
- * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
694
+ * [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
692
695
  * @see defaultValueExpression
693
696
  * @see resetValueIf
694
697
  */
@@ -5,12 +5,14 @@ import { ItemValue } from "./itemvalue";
5
5
  import { ChoicesRestful } from "./choicesRestful";
6
6
  import { LocalizableString } from "./localizablestring";
7
7
  import { HashTable } from "./helpers";
8
+ import { TextAreaModel } from "./utils/text-area";
8
9
  /**
9
10
  * A base class for multiple-choice question types ([Checkboxes](https://surveyjs.io/form-library/documentation/questioncheckboxmodel), [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel), [Radio Button Group](https://surveyjs.io/form-library/documentation/questionradiogroupmodel), etc.).
10
11
  */
11
12
  export declare class QuestionSelectBase extends Question {
12
13
  visibleChoicesChangedCallback: () => void;
13
14
  loadedChoicesFromServerCallback: () => void;
15
+ otherTextAreaModel: TextAreaModel;
14
16
  renderedChoicesChangedCallback: () => void;
15
17
  private filteredChoicesValue;
16
18
  private conditionChoicesVisibleIfRunner;
@@ -29,6 +31,7 @@ export declare class QuestionSelectBase extends Question {
29
31
  private waitingGetChoiceDisplayValueResponse;
30
32
  private get waitingChoicesByURL();
31
33
  protected selectedItemValues: any;
34
+ private getOtherTextAreaOptions;
32
35
  constructor(name: string);
33
36
  getType(): string;
34
37
  dispose(): void;
@@ -1,4 +1,5 @@
1
1
  import { QuestionTextBase } from "./question_textbase";
2
+ import { TextAreaModel } from "./utils/text-area";
2
3
  /**
3
4
  * A class that describes the Long Text question type.
4
5
  *
@@ -6,6 +7,9 @@ import { QuestionTextBase } from "./question_textbase";
6
7
  */
7
8
  export declare class QuestionCommentModel extends QuestionTextBase {
8
9
  private element;
10
+ textAreaModel: TextAreaModel;
11
+ private getTextAreaOptions;
12
+ constructor(name: string);
9
13
  /**
10
14
  * Specifies the visible height of the comment area, measured in lines.
11
15
  *
@@ -6,6 +6,7 @@ import { SurveyError } from "./survey-error";
6
6
  import { LocalizableString, ILocalizableOwner } from "./localizablestring";
7
7
  import { IConditionObject, IQuestionPlainData } from "./question";
8
8
  import { IPlainDataOptions } from "./base-interfaces";
9
+ import { ConditionRunner } from "./conditions";
9
10
  export interface IMatrixData {
10
11
  onMatrixRowChanged(row: MatrixRowModel): void;
11
12
  getCorrectedRowValue(value: any): any;
@@ -120,7 +121,9 @@ export declare class QuestionMatrixModel extends QuestionMatrixBaseModel<MatrixR
120
121
  locStrsChanged(): void;
121
122
  protected getQuizQuestionCount(): number;
122
123
  protected getCorrectAnswerCount(): number;
123
- protected runItemsCondition(values: HashTable<any>, properties: HashTable<any>): boolean;
124
+ runCondition(values: HashTable<any>, properties: HashTable<any>): void;
125
+ protected createRowsVisibleIfRunner(): ConditionRunner;
126
+ protected onRowsChanged(): void;
124
127
  protected getVisibleRows(): Array<MatrixRowModel>;
125
128
  protected sortVisibleRows(array: Array<MatrixRowModel>): Array<MatrixRowModel>;
126
129
  endLoadingFromJson(): void;
@@ -158,7 +161,12 @@ export declare class QuestionMatrixModel extends QuestionMatrixBaseModel<MatrixR
158
161
  getPlainData(options?: IPlainDataOptions): IQuestionPlainData;
159
162
  addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
160
163
  getConditionJson(operator?: string, path?: string): any;
164
+ clearIncorrectValues(): void;
161
165
  protected clearValueIfInvisibleCore(reason: string): void;
166
+ protected clearInvisibleColumnValues(): void;
167
+ protected clearInvisibleValuesInRows(): void;
168
+ protected clearInvisibleValuesInRowsAndColumns(inRows: boolean, inColumns: boolean, inCorrectRows: boolean): void;
169
+ private getVisibleColumnByValue;
162
170
  protected getFirstInputElementId(): string;
163
171
  onMatrixRowChanged(row: MatrixRowModel): void;
164
172
  getCorrectedRowValue(value: any): any;
@@ -9,8 +9,10 @@ export declare class MatrixDropdownRowModel extends MatrixDropdownRowModelBase {
9
9
  get rowName(): string;
10
10
  get text(): string;
11
11
  get locText(): LocalizableString;
12
+ protected isItemVisible(): boolean;
12
13
  isRowEnabled(): boolean;
13
14
  protected isRowHasEnabledCondition(): boolean;
15
+ protected setRowsVisibleIfValues(values: any): void;
14
16
  }
15
17
  /**
16
18
  * A class that describes the Multi-Select Matrix question type. Multi-Select Matrix allows you to use the [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel), [Checkbox](https://surveyjs.io/form-library/documentation/questioncheckboxmodel), [Radiogroup](https://surveyjs.io/form-library/documentation/questionradiogroupmodel), [Text](https://surveyjs.io/form-library/documentation/questiontextmodel), and [Comment](https://surveyjs.io/form-library/documentation/questioncommentmodel) question types as cell editors.
@@ -42,12 +44,13 @@ export declare class QuestionMatrixDropdownModel extends QuestionMatrixDropdownM
42
44
  protected getConditionObjectsRowIndeces(): Array<number>;
43
45
  protected isNewValueCorrect(val: any): boolean;
44
46
  clearIncorrectValues(): void;
45
- protected clearValueIfInvisibleCore(reason: string): void;
47
+ private getRowByKey;
46
48
  private defaultValuesInRows;
47
49
  protected clearGeneratedRows(): void;
48
50
  private getRowValueForCreation;
49
51
  protected generateRows(): Array<MatrixDropdownRowModel>;
50
52
  protected createMatrixRow(item: ItemValue, value: any): MatrixDropdownRowModel;
53
+ protected getFilteredDataCore(): any;
51
54
  protected getSearchableItemValueKeys(keys: Array<string>): void;
52
55
  protected updateProgressInfoByValues(res: IProgressInfo): void;
53
56
  }
@@ -11,6 +11,7 @@ import { IMatrixColumnOwner, MatrixDropdownColumn } from "./question_matrixdropd
11
11
  import { QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable } from "./question_matrixdropdownrendered";
12
12
  export interface IMatrixDropdownData {
13
13
  value: any;
14
+ getFilteredData(): any;
14
15
  onRowChanged(row: MatrixDropdownRowModelBase, columnName: string, newRowValue: any, isDeletingValue: boolean): void;
15
16
  onRowChanging(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): any;
16
17
  isValidateOnValueChanging: boolean;
@@ -36,6 +37,7 @@ export interface IMatrixDropdownData {
36
37
  getSurvey(): ISurvey;
37
38
  getDataFilteredValues(): any;
38
39
  isMatrixReadOnly(): boolean;
40
+ onRowVisibilityChanged(row: MatrixDropdownRowModelBase): void;
39
41
  }
40
42
  export declare class MatrixDropdownCell {
41
43
  column: MatrixDropdownColumn;
@@ -75,6 +77,7 @@ export declare class MatrixDropdownRowModelBase implements ISurveyData, ISurveyI
75
77
  private idValue;
76
78
  private textPreProcessor;
77
79
  private detailPanelValue;
80
+ private visibleValue;
78
81
  cells: Array<MatrixDropdownCell>;
79
82
  showHideDetailPanelClick: any;
80
83
  onDetailPanelShowingChanged: () => void;
@@ -85,6 +88,10 @@ export declare class MatrixDropdownRowModelBase implements ISurveyData, ISurveyI
85
88
  get text(): any;
86
89
  isRowEnabled(): boolean;
87
90
  protected isRowHasEnabledCondition(): boolean;
91
+ get isVisible(): boolean;
92
+ get visible(): boolean;
93
+ set visible(val: boolean);
94
+ protected isItemVisible(): boolean;
88
95
  get value(): any;
89
96
  set value(value: any);
90
97
  get locText(): LocalizableString;
@@ -103,7 +110,8 @@ export declare class MatrixDropdownRowModelBase implements ISurveyData, ISurveyI
103
110
  getFilteredValues(): any;
104
111
  getFilteredProperties(): any;
105
112
  private applyRowVariablesToValues;
106
- runCondition(values: HashTable<any>, properties: HashTable<any>): void;
113
+ runCondition(values: HashTable<any>, properties: HashTable<any>, rowsVisibleIf?: string): void;
114
+ protected setRowsVisibleIfValues(values: any): void;
107
115
  getNamesWithDefaultValues(): Array<string>;
108
116
  clearValue(keepComment?: boolean): void;
109
117
  onAnyValueChanged(name: string, questionName: string): void;
@@ -164,7 +172,7 @@ export declare class MatrixDropdownTotalRowModel extends MatrixDropdownRowModelB
164
172
  constructor(data: IMatrixDropdownData);
165
173
  protected createCell(column: MatrixDropdownColumn): MatrixDropdownCell;
166
174
  setValue(name: string, newValue: any): void;
167
- runCondition(values: HashTable<any>, properties: HashTable<any>): void;
175
+ runCondition(values: HashTable<any>, properties: HashTable<any>, rowsVisibleIf?: string): void;
168
176
  protected updateCellOnColumnChanged(cell: MatrixDropdownCell, name: string, newValue: any): void;
169
177
  }
170
178
  /**
@@ -372,6 +380,7 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
372
380
  runTriggers(name: string, value: any): void;
373
381
  protected shouldRunColumnExpression(): boolean;
374
382
  protected runCellsCondition(values: HashTable<any>, properties: HashTable<any>): void;
383
+ protected runConditionsForColumns(values: HashTable<any>, properties: HashTable<any>): boolean;
375
384
  private checkColumnsVisibility;
376
385
  private checkColumnsRenderedRequired;
377
386
  private isColumnVisibilityChanged;
@@ -429,7 +438,13 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
429
438
  get locKeyDuplicationError(): LocalizableString;
430
439
  get storeOthersAsComment(): boolean;
431
440
  addColumn(name: string, title?: string): MatrixDropdownColumn;
441
+ private visibleRowsArray;
442
+ protected clearVisibleRows(): void;
443
+ protected isColumnVisible(column: any): boolean;
444
+ private isGenereatingRows;
432
445
  protected getVisibleRows(): Array<MatrixDropdownRowModelBase>;
446
+ private generateVisibleRowsIfNeeded;
447
+ private getVisibleFromGenerated;
433
448
  private updateValueOnRowsGeneration;
434
449
  get totalValue(): any;
435
450
  protected getVisibleTotalRow(): MatrixDropdownRowModelBase;
@@ -503,6 +518,9 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
503
518
  protected onCellValueChanged(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): void;
504
519
  validateCell(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): SurveyError;
505
520
  get isValidateOnValueChanging(): boolean;
521
+ protected get hasInvisibleRows(): boolean;
522
+ getFilteredData(): any;
523
+ protected getFilteredDataCore(): any;
506
524
  onRowChanging(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): any;
507
525
  onRowChanged(row: MatrixDropdownRowModelBase, columnName: string, newRowValue: any, isDeletingValue: boolean): void;
508
526
  private getNewValueOnRowChanged;
@@ -521,6 +539,10 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
521
539
  getDataFilteredValues(): any;
522
540
  getParentTextProcessor(): ITextProcessor;
523
541
  isMatrixReadOnly(): boolean;
542
+ onRowVisibilityChanged(row: MatrixDropdownRowModelBase): void;
543
+ protected clearValueIfInvisibleCore(reason: string): void;
544
+ protected clearInvisibleValuesInRows(): void;
545
+ protected isRowsFiltered(): boolean;
524
546
  getQuestionFromArray(name: string, index: number): IQuestion;
525
547
  private isMatrixValueEmpty;
526
548
  private get SurveyModel();
@@ -81,6 +81,7 @@ export declare class MatrixDropdownColumn extends Base implements ILocalizableOw
81
81
  set visible(val: boolean);
82
82
  get hasVisibleCell(): boolean;
83
83
  set hasVisibleCell(newVal: boolean);
84
+ isColumnsVisibleIf: boolean;
84
85
  getVisibleMultipleChoices(): Array<ItemValue>;
85
86
  get getVisibleChoicesInCell(): Array<any>;
86
87
  setVisibleChoicesInCell(val: Array<any>): void;
@@ -259,6 +259,7 @@ export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownMo
259
259
  private getInsertedDeletedIndex;
260
260
  private isEditingObjectValueChanged;
261
261
  updateValueFromSurvey(newValue: any, clearData?: boolean): void;
262
+ protected getFilteredDataCore(): any;
262
263
  protected onBeforeValueChanged(val: any): void;
263
264
  protected createNewValue(): any;
264
265
  protected deleteRowValue(newValue: any, row: MatrixDropdownRowModelBase): any;
@@ -259,6 +259,7 @@ export declare class SurveyElement<E = any> extends SurveyElementCore implements
259
259
  */
260
260
  get cssClasses(): any;
261
261
  get cssTitleNumber(): any;
262
+ get cssRequiredText(): any;
262
263
  protected calcCssClasses(css: any): any;
263
264
  protected updateElementCssCore(cssClasses: any): void;
264
265
  get cssError(): string;
@@ -64,7 +64,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
64
64
  *
65
65
  * For information on event handler parameters, refer to descriptions within the interface.
66
66
  *
67
- * [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers (linkStyle)).
67
+ * [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers (linkStyle))
68
68
  * @see triggers
69
69
  * @see runTriggers
70
70
  */
@@ -0,0 +1,56 @@
1
+ import { Question } from "../question";
2
+ export interface ITextArea {
3
+ question: any;
4
+ id: () => string;
5
+ propertyName: string;
6
+ className: () => string;
7
+ isDisabledAttr: () => boolean;
8
+ isReadOnlyAttr?: () => boolean;
9
+ placeholder: () => string;
10
+ autoGrow: () => boolean;
11
+ maxLength: () => number;
12
+ rows: () => number;
13
+ cols?: () => number;
14
+ getTextValue?: () => any;
15
+ onTextAreaChange?: (event: any) => void;
16
+ onTextAreaInput?: (event: any) => void;
17
+ onTextAreaKeyDown?: (event: any) => void;
18
+ onTextAreaBlur?: (event: any) => void;
19
+ onTextAreaFocus?: (event: any) => void;
20
+ ariaRequired: () => "true" | "false";
21
+ ariaLabel: () => string;
22
+ ariaInvalid?: () => "true" | "false";
23
+ ariaLabelledBy?: () => string;
24
+ ariaDescribedBy?: () => string;
25
+ ariaErrormessage?: () => string;
26
+ }
27
+ export declare class TextAreaModel {
28
+ private options;
29
+ private element;
30
+ private onPropertyChangedCallback;
31
+ constructor(options: ITextArea);
32
+ setElement(element: HTMLTextAreaElement | null): void;
33
+ getTextValue(): string;
34
+ onTextAreaChange(event: any): void;
35
+ onTextAreaInput(event: any): void;
36
+ onTextAreaKeyDown(event: any): void;
37
+ onTextAreaBlur(event: any): void;
38
+ onTextAreaFocus(event: any): void;
39
+ get question(): Question;
40
+ get id(): string;
41
+ get placeholder(): string;
42
+ get className(): string;
43
+ get maxLength(): number;
44
+ get autoGrow(): boolean;
45
+ get rows(): number;
46
+ get cols(): number | undefined;
47
+ get isDisabledAttr(): boolean;
48
+ get isReadOnlyAttr(): boolean | undefined;
49
+ get ariaRequired(): "true" | "false";
50
+ get ariaLabel(): string;
51
+ get ariaInvalid(): "true" | "false";
52
+ get ariaLabelledBy(): string;
53
+ get ariaDescribedBy(): string;
54
+ get ariaErrormessage(): string;
55
+ dispose(): void;
56
+ }