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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.1
2
+ * surveyjs - Survey JavaScript library v1.12.2
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.12.1
2
+ * surveyjs - Survey JavaScript library v1.12.2
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.12.1
2
+ * surveyjs - Survey JavaScript library v1.12.2
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.12.1
2
+ * surveyjs - Survey JavaScript library v1.12.2
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.12.1
2
+ * surveyjs - Survey JavaScript library v1.12.2
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.12.1
2
+ * surveyjs - Survey JavaScript library v1.12.2
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.12.1
2
+ * surveyjs - Survey JavaScript library v1.12.2
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.12.1
2
+ * surveyjs - Survey JavaScript library v1.12.2
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
  */
@@ -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;
@@ -34,6 +34,7 @@ export declare class QuestionMatrixBaseModel<TRow, TColumn> extends Question {
34
34
  */
35
35
  columns: Array<any>;
36
36
  readonly visibleColumns: Array<any>;
37
+ protected isColumnVisible(column: any): boolean;
37
38
  /*
38
39
  * An array of matrix rows.
39
40
  *
@@ -73,20 +74,20 @@ export declare class QuestionMatrixBaseModel<TRow, TColumn> extends Question {
73
74
  */
74
75
  columnsVisibleIf: string;
75
76
  runCondition(values: HashTable<any>, properties: HashTable<any>): void;
76
- protected filterItems(): boolean;
77
77
  protected onColumnsChanged(): void;
78
78
  protected onRowsChanged(): void;
79
79
  protected updateVisibilityBasedOnRows(): void;
80
80
  protected isVisibleCore(): boolean;
81
81
  protected shouldRunColumnExpression(): boolean;
82
82
  protected hasRowsAsItems(): boolean;
83
- protected runItemsCondition(values: HashTable<any>, properties: HashTable<any>): boolean;
83
+ protected runItemsCondition(values: HashTable<any>, properties: HashTable<any>): void;
84
+ protected isRowsFiltered(): boolean;
84
85
  protected clearGeneratedRows(): void;
86
+ protected createRowsVisibleIfRunner(): ConditionRunner;
85
87
  private runConditionsForRows;
86
- private runConditionsForColumns;
87
- clearIncorrectValues(): void;
88
+ protected runConditionsForColumns(values: HashTable<any>, properties: HashTable<any>): boolean;
89
+ protected clearInvisibleColumnValues(): void;
88
90
  protected clearInvisibleValuesInRows(): void;
89
- private restoreNewVisibleRowsValues;
90
91
  needResponsiveWidth(): boolean;
91
92
  protected readonly columnsAutoWidth: boolean;
92
93
  getTableCss(): string;
@@ -13,6 +13,9 @@ export declare class PageModel extends PanelModelBase implements IPage {
13
13
  getType(): string;
14
14
  toString(): string;
15
15
  readonly isPage: boolean;
16
+ readonly no: string;
17
+ readonly cssTitleNumber: string;
18
+ readonly cssRequiredText: string;
16
19
  protected canShowPageNumber(): boolean;
17
20
  protected canShowTitle(): boolean;
18
21
  /*
@@ -446,7 +446,10 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
446
446
  */
447
447
  questionErrorLocation: string;
448
448
  getQuestionErrorLocation(): string;
449
+ getTitleOwner(): ITitleOwner;
449
450
  readonly no: string;
451
+ readonly cssTitleNumber: string;
452
+ readonly cssRequiredText: string;
450
453
  readonly cssError: string;
451
454
  protected getCssError(cssClasses: any): string;
452
455
  getSerializableColumnsValue(): Array<PanelLayoutColumnModel>;
@@ -483,7 +486,6 @@ export declare class PanelModel extends PanelModelBase implements IElement {
483
486
  * @see showNumber
484
487
  */
485
488
  readonly visibleIndex: number;
486
- getTitleOwner(): ITitleOwner;
487
489
  /*
488
490
  * Specifies whether to show the panel number in the title.
489
491
  *
@@ -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
  *
@@ -635,29 +638,29 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
635
638
  */
636
639
  defaultValueExpression: any;
637
640
  /*
638
- * A Boolean expression. If it evaluates to `true`, the question value is reset to [default](#defaultValue).
641
+ * 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).
639
642
  *
640
643
  * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
641
644
  *
642
- * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
645
+ * [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
643
646
  * @see setValueIf
644
647
  */
645
648
  resetValueIf: string;
646
649
  /*
647
- * A Boolean expression. If it evaluates to `true`, the question value is set to a value calculated using the [`setValueExpression`](#setValueExpression).
650
+ * 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).
648
651
  *
649
652
  * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
650
653
  *
651
- * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
654
+ * [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
652
655
  * @see resetValueIf
653
656
  */
654
657
  setValueIf: string;
655
658
  /*
656
- * An expression used to calculate the question value.
659
+ * An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the question value.
657
660
  *
658
661
  * 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`.
659
662
  *
660
- * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
663
+ * [View Demo](https://surveyjs.io/form-library/examples/trigger-setvalue/ (linkStyle))
661
664
  * @see defaultValueExpression
662
665
  * @see resetValueIf
663
666
  */
@@ -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 readonly waitingChoicesByURL: any;
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;
@@ -114,7 +115,9 @@ export declare class QuestionMatrixModel extends QuestionMatrixBaseModel<MatrixR
114
115
  locStrsChanged(): void;
115
116
  protected getQuizQuestionCount(): number;
116
117
  protected getCorrectAnswerCount(): number;
117
- protected runItemsCondition(values: HashTable<any>, properties: HashTable<any>): boolean;
118
+ runCondition(values: HashTable<any>, properties: HashTable<any>): void;
119
+ protected createRowsVisibleIfRunner(): ConditionRunner;
120
+ protected onRowsChanged(): void;
118
121
  protected getVisibleRows(): Array<MatrixRowModel>;
119
122
  protected sortVisibleRows(array: Array<MatrixRowModel>): Array<MatrixRowModel>;
120
123
  endLoadingFromJson(): void;
@@ -151,7 +154,12 @@ export declare class QuestionMatrixModel extends QuestionMatrixBaseModel<MatrixR
151
154
  getPlainData(options?: IPlainDataOptions): IQuestionPlainData;
152
155
  addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
153
156
  getConditionJson(operator?: string, path?: string): any;
157
+ clearIncorrectValues(): void;
154
158
  protected clearValueIfInvisibleCore(reason: string): void;
159
+ protected clearInvisibleColumnValues(): void;
160
+ protected clearInvisibleValuesInRows(): void;
161
+ protected clearInvisibleValuesInRowsAndColumns(inRows: boolean, inColumns: boolean, inCorrectRows: boolean): void;
162
+ private getVisibleColumnByValue;
155
163
  protected getFirstInputElementId(): string;
156
164
  onMatrixRowChanged(row: MatrixRowModel): void;
157
165
  getCorrectedRowValue(value: any): any;
@@ -9,8 +9,10 @@ export declare class MatrixDropdownRowModel extends MatrixDropdownRowModelBase {
9
9
  readonly rowName: string;
10
10
  readonly text: string;
11
11
  readonly 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.
@@ -40,12 +42,13 @@ export declare class QuestionMatrixDropdownModel extends QuestionMatrixDropdownM
40
42
  protected getConditionObjectsRowIndeces(): Array<number>;
41
43
  protected isNewValueCorrect(val: any): boolean;
42
44
  clearIncorrectValues(): void;
43
- protected clearValueIfInvisibleCore(reason: string): void;
45
+ private getRowByKey;
44
46
  private defaultValuesInRows;
45
47
  protected clearGeneratedRows(): void;
46
48
  private getRowValueForCreation;
47
49
  protected generateRows(): Array<MatrixDropdownRowModel>;
48
50
  protected createMatrixRow(item: ItemValue, value: any): MatrixDropdownRowModel;
51
+ protected getFilteredDataCore(): any;
49
52
  protected getSearchableItemValueKeys(keys: Array<string>): void;
50
53
  protected updateProgressInfoByValues(res: IProgressInfo): void;
51
54
  }
@@ -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;
@@ -74,6 +76,7 @@ export declare class MatrixDropdownRowModelBase implements ISurveyData, ISurveyI
74
76
  private idValue;
75
77
  private textPreProcessor;
76
78
  private detailPanelValue;
79
+ private visibleValue;
77
80
  cells: Array<MatrixDropdownCell>;
78
81
  showHideDetailPanelClick: any;
79
82
  onDetailPanelShowingChanged: () => void;
@@ -84,6 +87,9 @@ export declare class MatrixDropdownRowModelBase implements ISurveyData, ISurveyI
84
87
  readonly text: any;
85
88
  isRowEnabled(): boolean;
86
89
  protected isRowHasEnabledCondition(): boolean;
90
+ readonly isVisible: boolean;
91
+ visible: boolean;
92
+ protected isItemVisible(): boolean;
87
93
  value: any;
88
94
  readonly locText: LocalizableString;
89
95
  getAccessbilityText(): string;
@@ -101,7 +107,8 @@ export declare class MatrixDropdownRowModelBase implements ISurveyData, ISurveyI
101
107
  getFilteredValues(): any;
102
108
  getFilteredProperties(): any;
103
109
  private applyRowVariablesToValues;
104
- runCondition(values: HashTable<any>, properties: HashTable<any>): void;
110
+ runCondition(values: HashTable<any>, properties: HashTable<any>, rowsVisibleIf?: string): void;
111
+ protected setRowsVisibleIfValues(values: any): void;
105
112
  getNamesWithDefaultValues(): Array<string>;
106
113
  clearValue(keepComment?: boolean): void;
107
114
  onAnyValueChanged(name: string, questionName: string): void;
@@ -162,7 +169,7 @@ export declare class MatrixDropdownTotalRowModel extends MatrixDropdownRowModelB
162
169
  constructor(data: IMatrixDropdownData);
163
170
  protected createCell(column: MatrixDropdownColumn): MatrixDropdownCell;
164
171
  setValue(name: string, newValue: any): void;
165
- runCondition(values: HashTable<any>, properties: HashTable<any>): void;
172
+ runCondition(values: HashTable<any>, properties: HashTable<any>, rowsVisibleIf?: string): void;
166
173
  protected updateCellOnColumnChanged(cell: MatrixDropdownCell, name: string, newValue: any): void;
167
174
  }
168
175
  /**
@@ -357,6 +364,7 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
357
364
  runTriggers(name: string, value: any): void;
358
365
  protected shouldRunColumnExpression(): boolean;
359
366
  protected runCellsCondition(values: HashTable<any>, properties: HashTable<any>): void;
367
+ protected runConditionsForColumns(values: HashTable<any>, properties: HashTable<any>): boolean;
360
368
  private checkColumnsVisibility;
361
369
  private checkColumnsRenderedRequired;
362
370
  private isColumnVisibilityChanged;
@@ -410,7 +418,13 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
410
418
  readonly locKeyDuplicationError: LocalizableString;
411
419
  readonly storeOthersAsComment: boolean;
412
420
  addColumn(name: string, title?: string): MatrixDropdownColumn;
421
+ private visibleRowsArray;
422
+ protected clearVisibleRows(): void;
423
+ protected isColumnVisible(column: any): boolean;
424
+ private isGenereatingRows;
413
425
  protected getVisibleRows(): Array<MatrixDropdownRowModelBase>;
426
+ private generateVisibleRowsIfNeeded;
427
+ private getVisibleFromGenerated;
414
428
  private updateValueOnRowsGeneration;
415
429
  readonly totalValue: any;
416
430
  protected getVisibleTotalRow(): MatrixDropdownRowModelBase;
@@ -484,6 +498,9 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
484
498
  protected onCellValueChanged(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): void;
485
499
  validateCell(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): SurveyError;
486
500
  readonly isValidateOnValueChanging: boolean;
501
+ protected readonly hasInvisibleRows: boolean;
502
+ getFilteredData(): any;
503
+ protected getFilteredDataCore(): any;
487
504
  onRowChanging(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): any;
488
505
  onRowChanged(row: MatrixDropdownRowModelBase, columnName: string, newRowValue: any, isDeletingValue: boolean): void;
489
506
  private getNewValueOnRowChanged;
@@ -502,6 +519,10 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
502
519
  getDataFilteredValues(): any;
503
520
  getParentTextProcessor(): ITextProcessor;
504
521
  isMatrixReadOnly(): boolean;
522
+ onRowVisibilityChanged(row: MatrixDropdownRowModelBase): void;
523
+ protected clearValueIfInvisibleCore(reason: string): void;
524
+ protected clearInvisibleValuesInRows(): void;
525
+ protected isRowsFiltered(): boolean;
505
526
  getQuestionFromArray(name: string, index: number): IQuestion;
506
527
  private isMatrixValueEmpty;
507
528
  private readonly SurveyModel: any;
@@ -77,6 +77,7 @@ export declare class MatrixDropdownColumn extends Base implements ILocalizableOw
77
77
  */
78
78
  visible: boolean;
79
79
  hasVisibleCell: boolean;
80
+ isColumnsVisibleIf: boolean;
80
81
  getVisibleMultipleChoices(): Array<ItemValue>;
81
82
  readonly getVisibleChoicesInCell: Array<any>;
82
83
  setVisibleChoicesInCell(val: Array<any>): void;
@@ -240,6 +240,7 @@ export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownMo
240
240
  private getInsertedDeletedIndex;
241
241
  private isEditingObjectValueChanged;
242
242
  updateValueFromSurvey(newValue: any, clearData?: boolean): void;
243
+ protected getFilteredDataCore(): any;
243
244
  protected onBeforeValueChanged(val: any): void;
244
245
  protected createNewValue(): any;
245
246
  protected deleteRowValue(newValue: any, row: MatrixDropdownRowModelBase): any;
@@ -254,6 +254,7 @@ export declare class SurveyElement<E = any> extends SurveyElementCore implements
254
254
  */
255
255
  readonly cssClasses: any;
256
256
  readonly cssTitleNumber: any;
257
+ readonly cssRequiredText: any;
257
258
  protected calcCssClasses(css: any): any;
258
259
  protected updateElementCssCore(cssClasses: any): void;
259
260
  readonly cssError: string;
@@ -62,7 +62,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
62
62
  *
63
63
  * For information on event handler parameters, refer to descriptions within the interface.
64
64
  *
65
- * [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers (linkStyle)).
65
+ * [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers (linkStyle))
66
66
  * @see triggers
67
67
  * @see runTriggers
68
68
  */
@@ -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
+ readonly question: Question;
40
+ readonly id: string;
41
+ readonly placeholder: string;
42
+ readonly className: string;
43
+ readonly maxLength: number;
44
+ readonly autoGrow: boolean;
45
+ readonly rows: number;
46
+ readonly cols: number | undefined;
47
+ readonly isDisabledAttr: boolean;
48
+ readonly isReadOnlyAttr: boolean | undefined;
49
+ readonly ariaRequired: "true" | "false";
50
+ readonly ariaLabel: string;
51
+ readonly ariaInvalid: "true" | "false";
52
+ readonly ariaLabelledBy: string;
53
+ readonly ariaDescribedBy: string;
54
+ readonly ariaErrormessage: string;
55
+ dispose(): void;
56
+ }