survey-core 1.12.15 → 1.12.16-patch.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/defaultV2.css +8 -8
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +8 -8
  4. package/defaultV2.fontless.css.map +1 -1
  5. package/defaultV2.fontless.min.css +2 -2
  6. package/defaultV2.min.css +2 -2
  7. package/i18n/arabic.js +1 -1
  8. package/i18n/arabic.min.js +1 -1
  9. package/i18n/basque.js +1 -1
  10. package/i18n/basque.min.js +1 -1
  11. package/i18n/bulgarian.js +1 -1
  12. package/i18n/bulgarian.min.js +1 -1
  13. package/i18n/catalan.js +1 -1
  14. package/i18n/catalan.min.js +1 -1
  15. package/i18n/croatian.js +1 -1
  16. package/i18n/croatian.min.js +1 -1
  17. package/i18n/czech.js +1 -1
  18. package/i18n/czech.min.js +1 -1
  19. package/i18n/danish.js +1 -1
  20. package/i18n/danish.min.js +1 -1
  21. package/i18n/dutch.js +1 -1
  22. package/i18n/dutch.min.js +1 -1
  23. package/i18n/english.js +1 -1
  24. package/i18n/english.min.js +1 -1
  25. package/i18n/estonian.js +1 -1
  26. package/i18n/estonian.min.js +1 -1
  27. package/i18n/finnish.js +1 -1
  28. package/i18n/finnish.min.js +1 -1
  29. package/i18n/french.js +1 -1
  30. package/i18n/french.min.js +1 -1
  31. package/i18n/georgian.js +1 -1
  32. package/i18n/georgian.min.js +1 -1
  33. package/i18n/german.js +1 -1
  34. package/i18n/german.min.js +1 -1
  35. package/i18n/greek.js +1 -1
  36. package/i18n/greek.min.js +1 -1
  37. package/i18n/hebrew.js +1 -1
  38. package/i18n/hebrew.min.js +1 -1
  39. package/i18n/hindi.js +1 -1
  40. package/i18n/hindi.min.js +1 -1
  41. package/i18n/hungarian.js +1 -1
  42. package/i18n/hungarian.min.js +1 -1
  43. package/i18n/icelandic.js +1 -1
  44. package/i18n/icelandic.min.js +1 -1
  45. package/i18n/index.js +1 -1
  46. package/i18n/index.min.js +1 -1
  47. package/i18n/indonesian.js +1 -1
  48. package/i18n/indonesian.min.js +1 -1
  49. package/i18n/italian.js +1 -1
  50. package/i18n/italian.min.js +1 -1
  51. package/i18n/japanese.js +1 -1
  52. package/i18n/japanese.min.js +1 -1
  53. package/i18n/kazakh.js +1 -1
  54. package/i18n/kazakh.min.js +1 -1
  55. package/i18n/korean.js +1 -1
  56. package/i18n/korean.min.js +1 -1
  57. package/i18n/latvian.js +1 -1
  58. package/i18n/latvian.min.js +1 -1
  59. package/i18n/lithuanian.js +1 -1
  60. package/i18n/lithuanian.min.js +1 -1
  61. package/i18n/macedonian.js +1 -1
  62. package/i18n/macedonian.min.js +1 -1
  63. package/i18n/malay.js +1 -1
  64. package/i18n/malay.min.js +1 -1
  65. package/i18n/nl-BE.js +1 -1
  66. package/i18n/nl-BE.min.js +1 -1
  67. package/i18n/norwegian.js +1 -1
  68. package/i18n/norwegian.min.js +1 -1
  69. package/i18n/persian.js +1 -1
  70. package/i18n/persian.min.js +1 -1
  71. package/i18n/philippines.js +1 -1
  72. package/i18n/philippines.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 +1 -1
  90. package/i18n/spanish.min.js +1 -1
  91. package/i18n/swahili.js +1 -1
  92. package/i18n/swahili.min.js +1 -1
  93. package/i18n/swedish.js +1 -1
  94. package/i18n/swedish.min.js +1 -1
  95. package/i18n/tajik.js +1 -1
  96. package/i18n/tajik.min.js +1 -1
  97. package/i18n/telugu.js +1 -1
  98. package/i18n/telugu.min.js +1 -1
  99. package/i18n/thai.js +1 -1
  100. package/i18n/thai.min.js +1 -1
  101. package/i18n/traditional-chinese.js +1 -1
  102. package/i18n/traditional-chinese.min.js +1 -1
  103. package/i18n/turkish.js +1 -1
  104. package/i18n/turkish.min.js +1 -1
  105. package/i18n/ukrainian.js +1 -1
  106. package/i18n/ukrainian.min.js +1 -1
  107. package/i18n/urdu.js +1 -1
  108. package/i18n/urdu.min.js +1 -1
  109. package/i18n/vietnamese.js +1 -1
  110. package/i18n/vietnamese.min.js +1 -1
  111. package/i18n/welsh.js +1 -1
  112. package/i18n/welsh.min.js +1 -1
  113. package/icons/iconsV1.js +1 -1
  114. package/icons/iconsV1.min.js +1 -1
  115. package/icons/iconsV2.js +1 -1
  116. package/icons/iconsV2.min.js +1 -1
  117. package/modern.css +15 -15
  118. package/modern.css.map +1 -1
  119. package/modern.fontless.css +15 -15
  120. package/modern.fontless.css.map +1 -1
  121. package/modern.fontless.min.css +2 -2
  122. package/modern.min.css +2 -2
  123. package/package.json +1 -1
  124. package/plugins/bootstrap-integration/index.js +1 -1
  125. package/plugins/bootstrap-integration/index.min.js +1 -1
  126. package/plugins/bootstrap-material-integration/index.js +1 -1
  127. package/plugins/bootstrap-material-integration/index.min.js +1 -1
  128. package/survey.core.js +425 -244
  129. package/survey.core.js.map +1 -1
  130. package/survey.core.min.js +3 -3
  131. package/survey.css +1 -1
  132. package/survey.i18n.js +1 -1
  133. package/survey.i18n.min.js +1 -1
  134. package/survey.min.css +1 -1
  135. package/themes/borderless-dark-panelless.js +1 -1
  136. package/themes/borderless-dark-panelless.min.js +1 -1
  137. package/themes/borderless-dark.js +1 -1
  138. package/themes/borderless-dark.min.js +1 -1
  139. package/themes/borderless-light-panelless..js +1 -1
  140. package/themes/borderless-light-panelless..min.js +1 -1
  141. package/themes/borderless-light.js +1 -1
  142. package/themes/borderless-light.min.js +1 -1
  143. package/themes/contrast-dark-panelless.js +1 -1
  144. package/themes/contrast-dark-panelless.min.js +1 -1
  145. package/themes/contrast-dark.js +1 -1
  146. package/themes/contrast-dark.min.js +1 -1
  147. package/themes/contrast-light-panelless.js +1 -1
  148. package/themes/contrast-light-panelless.min.js +1 -1
  149. package/themes/contrast-light.js +1 -1
  150. package/themes/contrast-light.min.js +1 -1
  151. package/themes/default-dark-panelless.js +1 -1
  152. package/themes/default-dark-panelless.min.js +1 -1
  153. package/themes/default-dark.js +1 -1
  154. package/themes/default-dark.min.js +1 -1
  155. package/themes/default-light-panelless.js +1 -1
  156. package/themes/default-light-panelless.min.js +1 -1
  157. package/themes/default-light.js +1 -1
  158. package/themes/default-light.min.js +1 -1
  159. package/themes/doubleborder-dark-panelless.js +1 -1
  160. package/themes/doubleborder-dark-panelless.min.js +1 -1
  161. package/themes/doubleborder-dark.js +1 -1
  162. package/themes/doubleborder-dark.min.js +1 -1
  163. package/themes/doubleborder-light-panelles.js +1 -1
  164. package/themes/doubleborder-light-panelles.min.js +1 -1
  165. package/themes/doubleborder-light.js +1 -1
  166. package/themes/doubleborder-light.min.js +1 -1
  167. package/themes/flat-dark-panelless.js +1 -1
  168. package/themes/flat-dark-panelless.min.js +1 -1
  169. package/themes/flat-dark.js +1 -1
  170. package/themes/flat-dark.min.js +1 -1
  171. package/themes/flat-light-panelless.js +1 -1
  172. package/themes/flat-light-panelless.min.js +1 -1
  173. package/themes/flat-light.js +1 -1
  174. package/themes/flat-light.min.js +1 -1
  175. package/themes/index.js +1 -1
  176. package/themes/index.min.js +1 -1
  177. package/themes/layered-dark-panelless.js +1 -1
  178. package/themes/layered-dark-panelless.min.js +1 -1
  179. package/themes/layered-dark.js +1 -1
  180. package/themes/layered-dark.min.js +1 -1
  181. package/themes/layered-light-panelless.js +1 -1
  182. package/themes/layered-light-panelless.min.js +1 -1
  183. package/themes/layered-light.js +1 -1
  184. package/themes/layered-light.min.js +1 -1
  185. package/themes/plain-dark-panelless.js +1 -1
  186. package/themes/plain-dark-panelless.min.js +1 -1
  187. package/themes/plain-dark.js +1 -1
  188. package/themes/plain-dark.min.js +1 -1
  189. package/themes/plain-light-panelless.js +1 -1
  190. package/themes/plain-light-panelless.min.js +1 -1
  191. package/themes/plain-light.js +1 -1
  192. package/themes/plain-light.min.js +1 -1
  193. package/themes/sharp-dark-panelless.js +1 -1
  194. package/themes/sharp-dark-panelless.min.js +1 -1
  195. package/themes/sharp-dark.js +1 -1
  196. package/themes/sharp-dark.min.js +1 -1
  197. package/themes/sharp-light-panelless.js +1 -1
  198. package/themes/sharp-light-panelless.min.js +1 -1
  199. package/themes/sharp-light.js +1 -1
  200. package/themes/sharp-light.min.js +1 -1
  201. package/themes/solid-dark-panelless.js +1 -1
  202. package/themes/solid-dark-panelless.min.js +1 -1
  203. package/themes/solid-dark.js +1 -1
  204. package/themes/solid-dark.min.js +1 -1
  205. package/themes/solid-light-panelless.js +1 -1
  206. package/themes/solid-light-panelless.min.js +1 -1
  207. package/themes/solid-light.js +1 -1
  208. package/themes/solid-light.min.js +1 -1
  209. package/themes/three-dimensional-dark-panelless.js +1 -1
  210. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  211. package/themes/three-dimensional-dark.js +1 -1
  212. package/themes/three-dimensional-dark.min.js +1 -1
  213. package/themes/three-dimensional-light-panelless.js +1 -1
  214. package/themes/three-dimensional-light-panelless.min.js +1 -1
  215. package/themes/three-dimensional-light.js +1 -1
  216. package/themes/three-dimensional-light.min.js +1 -1
  217. package/ts3.4/typings/packages/survey-core/entries/chunks/model.d.ts +1 -1
  218. package/ts3.4/typings/packages/survey-core/src/base-interfaces.d.ts +1 -0
  219. package/ts3.4/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
  220. package/ts3.4/typings/packages/survey-core/src/page.d.ts +11 -3
  221. package/ts3.4/typings/packages/survey-core/src/panel.d.ts +11 -7
  222. package/ts3.4/typings/packages/survey-core/src/settings.d.ts +2 -1
  223. package/ts3.4/typings/packages/survey-core/src/survey-element.d.ts +15 -5
  224. package/ts3.4/typings/packages/survey-core/src/survey.d.ts +15 -8
  225. package/ts3.4/typings/packages/survey-core/src/surveyStrings.d.ts +1 -0
  226. package/ts3.4/typings/packages/survey-core/src/utils/utils.d.ts +11 -2
  227. package/typings/packages/survey-core/entries/chunks/model.d.ts +1 -1
  228. package/typings/packages/survey-core/src/base-interfaces.d.ts +1 -0
  229. package/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
  230. package/typings/packages/survey-core/src/page.d.ts +11 -3
  231. package/typings/packages/survey-core/src/panel.d.ts +11 -7
  232. package/typings/packages/survey-core/src/settings.d.ts +2 -1
  233. package/typings/packages/survey-core/src/survey-element.d.ts +15 -5
  234. package/typings/packages/survey-core/src/survey.d.ts +16 -8
  235. package/typings/packages/survey-core/src/surveyStrings.d.ts +1 -0
  236. package/typings/packages/survey-core/src/utils/utils.d.ts +11 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.15
2
+ * surveyjs - Survey JavaScript library v1.12.16-patch.1
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.15
2
+ * surveyjs - Survey JavaScript library v1.12.16-patch.1
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.15
2
+ * surveyjs - Survey JavaScript library v1.12.16-patch.1
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.15
2
+ * surveyjs - Survey JavaScript library v1.12.16-patch.1
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.15
2
+ * surveyjs - Survey JavaScript library v1.12.16-patch.1
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.15
2
+ * surveyjs - Survey JavaScript library v1.12.16-patch.1
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.15
2
+ * surveyjs - Survey JavaScript library v1.12.16-patch.1
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.15
2
+ * surveyjs - Survey JavaScript library v1.12.16-patch.1
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.15
2
+ * surveyjs - Survey JavaScript library v1.12.16-patch.1
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.15
2
+ * surveyjs - Survey JavaScript library v1.12.16-patch.1
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.15
2
+ * surveyjs - Survey JavaScript library v1.12.16-patch.1
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.15
2
+ * surveyjs - Survey JavaScript library v1.12.16-patch.1
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
  */
@@ -73,7 +73,7 @@ export { Notifier } from "../../src/notifier";
73
73
  export { Cover, CoverCell } from "../../src/header";
74
74
  export { dxSurveyService } from "../../src/dxSurveyService";
75
75
  export { englishStrings } from "../../src/localization/english";
76
- export { surveyLocalization, surveyStrings, getLocaleString, setupLocale } from "../../src/surveyStrings";
76
+ export { surveyLocalization, surveyStrings, getLocaleString, getLocaleStrings, setupLocale } from "../../src/surveyStrings";
77
77
  export { QuestionCustomWidget, CustomWidgetCollection, } from "../../src/questionCustomWidgets";
78
78
  export { QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ICustomQuestionTypeConfiguration } from "../../src/question_custom";
79
79
  export { ListModel } from "../../src/list";
@@ -80,6 +80,7 @@ export interface ISurvey extends ITextProcessor, ISurveyErrorOwner {
80
80
  isDisplayMode: boolean;
81
81
  isDesignMode: boolean;
82
82
  areInvisibleElementsShowing: boolean;
83
+ currentSingleQuestion: IQuestion;
83
84
  areEmptyElementsHidden: boolean;
84
85
  isLoadingFromJson: boolean;
85
86
  isUpdateValueTextOnTyping: boolean;
@@ -236,6 +236,7 @@ export declare var defaultV2Css: {
236
236
  errorsContainer: string;
237
237
  errorsContainerTop: string;
238
238
  errorsContainerBottom: string;
239
+ confirmDialog: string;
239
240
  };
240
241
  image: {
241
242
  mainRoot: string;
@@ -1,18 +1,26 @@
1
1
  import { IPage, IPanel, IElement, ISurveyElement, ISurvey } from "./base-interfaces";
2
- import { PanelModelBase } from "./panel";
2
+ import { PanelModel } from "./panel";
3
3
  import { LocalizableString } from "./localizablestring";
4
4
  /**
5
5
  * The `PageModel` object describes a survey page and contains properties and methods that allow you to control the page and access its elements (panels and questions).
6
6
  *
7
7
  * [View Demo](https://surveyjs.io/form-library/examples/nps-question/ (linkStyle))
8
8
  */
9
- export declare class PageModel extends PanelModelBase implements IPage {
9
+ export declare class PageModel extends PanelModel implements IPage {
10
10
  private hasShownValue;
11
11
  private dragDropPageHelper;
12
+ isPageContainer: boolean;
12
13
  constructor(name?: string);
13
14
  getType(): string;
14
15
  toString(): string;
15
16
  readonly isPage: boolean;
17
+ readonly isPanel: boolean;
18
+ readonly showPanelAsPage: boolean;
19
+ readonly hasEditButton: boolean;
20
+ protected getElementsForRows(): Array<IElement>;
21
+ protected disposeElements(): void;
22
+ protected onRemoveElement(element: IElement): void;
23
+ getTemplate(): string;
16
24
  readonly no: string;
17
25
  readonly cssTitleNumber: string;
18
26
  getCssTitleExpandableSvg(): string;
@@ -50,7 +58,7 @@ export declare class PageModel extends PanelModelBase implements IPage {
50
58
  readonly isStartPage: boolean;
51
59
  readonly isStarted: boolean;
52
60
  protected calcCssClasses(css: any): any;
53
- readonly cssTitle: string;
61
+ protected getCssPanelTitle(): string;
54
62
  readonly cssRoot: string;
55
63
  protected getCssError(cssClasses: any): string;
56
64
  num: number;
@@ -129,9 +129,14 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
129
129
  */
130
130
  readonly areQuestionsRandomized: boolean;
131
131
  /*
132
- * Returns a survey element (panel or page) that contains this panel and allows you to move this question to a different survey element.
132
+ * Returns a survey element (panel or page) that contains this panel and allows you to move the panel to a different survey element.
133
133
  *
134
- * This property is always `null` for the `PageModel` object.
134
+ * For `PageModel` objects, the `parent` property is `null`, except in the following cases:
135
+ *
136
+ * - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
137
+ * - The page is included in a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
138
+ *
139
+ * In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and the `parent` property contains this object.
135
140
  */
136
141
  parent: PanelModelBase;
137
142
  readonly depth: number;
@@ -150,10 +155,6 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
150
155
  * An auto-generated unique element identifier.
151
156
  */
152
157
  id: string;
153
- /*
154
- * Returns `true` if the survey element is a panel.
155
- * @see Base.getType
156
- */
157
158
  readonly isPanel: boolean;
158
159
  getPanel(): IPanel;
159
160
  getLayoutType(): string;
@@ -328,12 +329,14 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
328
329
  private canFireAddRemoveNotifications;
329
330
  protected onAddElement(element: IElement, index: number): void;
330
331
  protected onRemoveElement(element: IElement): void;
332
+ protected unregisterElementPropertiesChanged(element: IElement): void;
331
333
  private onRemoveElementNotifySurvey;
332
334
  private onElementVisibilityChanged;
333
335
  private onElementStartWithNewLineChanged;
334
336
  private updateRowsVisibility;
335
337
  canBuildRows(): boolean;
336
338
  private buildRows;
339
+ protected getElementsForRows(): Array<IElement>;
337
340
  getDragDropInfo(): any;
338
341
  private updateRowsOnElementRemoved;
339
342
  updateRowsRemoveElementFromRow(element: IElement, row: QuestionRowModel): void;
@@ -463,6 +466,7 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
463
466
  getSerializableColumnsValue(): Array<PanelLayoutColumnModel>;
464
467
  afterRender(el: HTMLElement): void;
465
468
  dispose(): void;
469
+ protected disposeElements(): void;
466
470
  }
467
471
  /**
468
472
  * A class that describes the Panel container element.
@@ -565,8 +569,8 @@ export declare class PanelModel extends PanelModelBase implements IElement {
565
569
  getFooterToolbar(): ActionContainer;
566
570
  readonly hasEditButton: boolean;
567
571
  cancelPreview(): void;
568
- protected canShowTitle(survey: ISurvey): boolean;
569
572
  readonly cssTitle: string;
573
+ protected getCssPanelTitle(): string;
570
574
  getCssTitleExpandableSvg(): string;
571
575
  readonly showErrorsAbovePanel: boolean;
572
576
  protected getCssError(cssClasses: any): string;
@@ -1,4 +1,5 @@
1
1
  import { IDialogOptions } from "./popup";
2
+ import { IConfirmDialogOptions } from "./utils/utils";
2
3
  export declare type ISurveyEnvironment = {
3
4
  root: Document | ShadowRoot;
4
5
  rootElement: HTMLElement | ShadowRoot;
@@ -380,7 +381,7 @@ export declare var settings: {
380
381
  * @param message A message to be displayed in the confirm dialog window.
381
382
  * @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
382
383
  */
383
- confirmActionAsync: (message: string, callback: (res: boolean) => void, applyTitle?: string, locale?: string, rootElement?: HTMLElement) => boolean;
384
+ confirmActionAsync: (message: string, callback: (res: boolean) => void, options?: IConfirmDialogOptions) => boolean;
384
385
  /**
385
386
  * A minimum width value for all survey elements.
386
387
  *
@@ -13,22 +13,32 @@ export declare abstract class SurveyElementCore extends Base implements ILocaliz
13
13
  protected createLocTitleProperty(): LocalizableString;
14
14
  /*
15
15
  * Returns `true` if the survey element is a page.
16
- * @see Base.getType
16
+ *
17
+ * This property returns `false` for [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model) objects in the following cases:
18
+ *
19
+ * - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
20
+ * - The page is included in a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
21
+ *
22
+ * In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and all regular pages become panels.
17
23
  */
18
24
  readonly isPage: boolean;
19
25
  /*
20
- * Returns `true` if the survey element is a panel.
21
- * @see Base.getType
26
+ * Returns `true` if the survey element is a panel or acts as one.
27
+ *
28
+ * This property returns `true` for `PageModel` objects in the following cases:
29
+ *
30
+ * - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
31
+ * - The page is included in a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
32
+ *
33
+ * In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and all regular pages become panels.
22
34
  */
23
35
  readonly isPanel: boolean;
24
36
  /*
25
37
  * Returns `true` if the survey element is a question.
26
- * @see Base.getType
27
38
  */
28
39
  readonly isQuestion: boolean;
29
40
  /*
30
41
  * Returns `true` if the element is a survey.
31
- * @see Base.getType
32
42
  */
33
43
  readonly isSurvey: boolean;
34
44
  /*
@@ -1885,6 +1885,8 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
1885
1885
  * @see completeLastPage
1886
1886
  */
1887
1887
  nextPage(): boolean;
1888
+ performNext(): boolean;
1889
+ performPrevious(): boolean;
1888
1890
  private hasErrorsOnNavigate;
1889
1891
  private asyncValidationQuesitons;
1890
1892
  private checkForAsyncQuestionValidation;
@@ -1985,6 +1987,8 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
1985
1987
  protected doCurrentPageComplete(doComplete: boolean): boolean;
1986
1988
  private doCurrentPageCompleteCore;
1987
1989
  isSinglePage: boolean;
1990
+ readonly isSingleVisibleQuestion: boolean;
1991
+ private isSingleVisibleQuestionVal;
1988
1992
  /*
1989
1993
  * Specifies how to distribute survey elements between pages.
1990
1994
  *
@@ -2021,17 +2025,16 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
2021
2025
  readonly isShowPreviewBeforeComplete: boolean;
2022
2026
  protected onFirstPageIsStartedChanged(): void;
2023
2027
  private runningPages;
2028
+ private pageContainerValue;
2024
2029
  private onShowingPreviewChanged;
2030
+ private createRootPage;
2031
+ private disposeContainerPage;
2032
+ private updatePagesContainer;
2033
+ private currentSingleQuestionValue;
2034
+ currentSingleQuestion: Question;
2025
2035
  private changeCurrentPageFromPreview;
2026
- private originalPages;
2027
- protected onQuestionsOnPageModeChanged(oldValue: string, isFirstLoad?: boolean): void;
2028
- private restoreOriginalPages;
2036
+ protected onQuestionsOnPageModeChanged(oldValue: string): void;
2029
2037
  private getPageStartIndex;
2030
- private isLockingUpdateOnPageModes;
2031
- private setupPagesForPageModes;
2032
- private createPagesForQuestionOnPageMode;
2033
- private createSinglePage;
2034
- private createPagesForEveryQuestion;
2035
2038
  /*
2036
2039
  * Indicates whether the [current page](#currentPage) is the first page.
2037
2040
  *
@@ -2048,7 +2051,11 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
2048
2051
  readonly isCompleteButtonVisible: boolean;
2049
2052
  readonly isPreviewButtonVisible: boolean;
2050
2053
  readonly isCancelPreviewButtonVisible: boolean;
2054
+ readonly isFirstElement: boolean | undefined;
2055
+ readonly isLastElement: boolean | undefined;
2051
2056
  private updateIsFirstLastPageState;
2057
+ private readonly isLastPageOrElement: any;
2058
+ private readonly isFirstPageOrElement: any;
2052
2059
  private calcIsShowPrevButton;
2053
2060
  private calcIsShowNextButton;
2054
2061
  calcIsCompleteButtonVisible(): boolean;
@@ -32,6 +32,7 @@ export declare var surveyLocalization: {
32
32
  onGetExternalString: (name: string, locale: string) => string;
33
33
  };
34
34
  export declare function getLocaleString(strName: string, locale?: string): string;
35
+ export declare function getLocaleStrings(locale: string): any;
35
36
  export declare function setupLocale(localeConfig: {
36
37
  localeCode: string;
37
38
  strings: any;
@@ -1,7 +1,7 @@
1
1
  import { PopupBaseViewModel } from "../popup-view-model";
2
2
  declare function compareVersions(a: any, b: any): number;
3
3
  declare function confirmAction(message: string): boolean;
4
- declare function confirmActionAsync(message: string, funcOnYes: () => void, funcOnNo?: () => void, locale?: string, rootElement?: HTMLElement): void;
4
+ declare function confirmActionAsync(options: IConfirmDialogOptions): void;
5
5
  declare function detectIEBrowser(): boolean;
6
6
  declare function detectIEOrEdge(): boolean;
7
7
  declare function loadFileFromBase64(b64Data: string, fileName: string): void;
@@ -47,7 +47,16 @@ export declare class Logger {
47
47
  log(action: string): void;
48
48
  readonly result: string;
49
49
  }
50
- export declare function showConfirmDialog(message: string, callback: (res: boolean) => void, applyTitle?: string, locale?: string, rootElement?: HTMLElement): boolean;
50
+ export interface IConfirmDialogOptions {
51
+ message?: string;
52
+ funcOnYes?: () => void;
53
+ funcOnNo?: () => void;
54
+ applyTitle?: string;
55
+ locale?: string;
56
+ rootElement?: HTMLElement;
57
+ cssClass?: string;
58
+ }
59
+ export declare function showConfirmDialog(message: string, callback: (res: boolean) => void, options: IConfirmDialogOptions): boolean;
51
60
  export declare function configConfirmDialog(popupViewModel: PopupBaseViewModel): void;
52
61
  declare function chooseFiles(input: HTMLInputElement, callback: (files: File[]) => void): void;
53
62
  export declare function compareArrays<T>(oldValue: Array<T>, newValue: Array<T>, getKey: (item: T) => any): {
@@ -73,7 +73,7 @@ export { Notifier } from "../../src/notifier";
73
73
  export { Cover, CoverCell } from "../../src/header";
74
74
  export { dxSurveyService } from "../../src/dxSurveyService";
75
75
  export { englishStrings } from "../../src/localization/english";
76
- export { surveyLocalization, surveyStrings, getLocaleString, setupLocale } from "../../src/surveyStrings";
76
+ export { surveyLocalization, surveyStrings, getLocaleString, getLocaleStrings, setupLocale } from "../../src/surveyStrings";
77
77
  export { QuestionCustomWidget, CustomWidgetCollection, } from "../../src/questionCustomWidgets";
78
78
  export { QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ICustomQuestionTypeConfiguration } from "../../src/question_custom";
79
79
  export { ListModel } from "../../src/list";
@@ -80,6 +80,7 @@ export interface ISurvey extends ITextProcessor, ISurveyErrorOwner {
80
80
  isDisplayMode: boolean;
81
81
  isDesignMode: boolean;
82
82
  areInvisibleElementsShowing: boolean;
83
+ currentSingleQuestion: IQuestion;
83
84
  areEmptyElementsHidden: boolean;
84
85
  isLoadingFromJson: boolean;
85
86
  isUpdateValueTextOnTyping: boolean;
@@ -236,6 +236,7 @@ export declare var defaultV2Css: {
236
236
  errorsContainer: string;
237
237
  errorsContainerTop: string;
238
238
  errorsContainerBottom: string;
239
+ confirmDialog: string;
239
240
  };
240
241
  image: {
241
242
  mainRoot: string;
@@ -1,18 +1,26 @@
1
1
  import { IPage, IPanel, IElement, ISurveyElement, ISurvey } from "./base-interfaces";
2
- import { PanelModelBase } from "./panel";
2
+ import { PanelModel } from "./panel";
3
3
  import { LocalizableString } from "./localizablestring";
4
4
  /**
5
5
  * The `PageModel` object describes a survey page and contains properties and methods that allow you to control the page and access its elements (panels and questions).
6
6
  *
7
7
  * [View Demo](https://surveyjs.io/form-library/examples/nps-question/ (linkStyle))
8
8
  */
9
- export declare class PageModel extends PanelModelBase implements IPage {
9
+ export declare class PageModel extends PanelModel implements IPage {
10
10
  private hasShownValue;
11
11
  private dragDropPageHelper;
12
+ isPageContainer: boolean;
12
13
  constructor(name?: string);
13
14
  getType(): string;
14
15
  toString(): string;
15
16
  get isPage(): boolean;
17
+ get isPanel(): boolean;
18
+ get showPanelAsPage(): boolean;
19
+ get hasEditButton(): boolean;
20
+ protected getElementsForRows(): Array<IElement>;
21
+ protected disposeElements(): void;
22
+ protected onRemoveElement(element: IElement): void;
23
+ getTemplate(): string;
16
24
  get no(): string;
17
25
  get cssTitleNumber(): string;
18
26
  getCssTitleExpandableSvg(): string;
@@ -54,7 +62,7 @@ export declare class PageModel extends PanelModelBase implements IPage {
54
62
  get isStartPage(): boolean;
55
63
  get isStarted(): boolean;
56
64
  protected calcCssClasses(css: any): any;
57
- get cssTitle(): string;
65
+ protected getCssPanelTitle(): string;
58
66
  get cssRoot(): string;
59
67
  protected getCssError(cssClasses: any): string;
60
68
  num: number;
@@ -135,9 +135,14 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
135
135
  */
136
136
  get areQuestionsRandomized(): boolean;
137
137
  /**
138
- * Returns a survey element (panel or page) that contains this panel and allows you to move this question to a different survey element.
138
+ * Returns a survey element (panel or page) that contains this panel and allows you to move the panel to a different survey element.
139
139
  *
140
- * This property is always `null` for the `PageModel` object.
140
+ * For `PageModel` objects, the `parent` property is `null`, except in the following cases:
141
+ *
142
+ * - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
143
+ * - The page is included in a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
144
+ *
145
+ * In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and the `parent` property contains this object.
141
146
  */
142
147
  get parent(): PanelModelBase;
143
148
  set parent(val: PanelModelBase);
@@ -159,10 +164,6 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
159
164
  */
160
165
  get id(): string;
161
166
  set id(val: string);
162
- /**
163
- * Returns `true` if the survey element is a panel.
164
- * @see Base.getType
165
- */
166
167
  get isPanel(): boolean;
167
168
  getPanel(): IPanel;
168
169
  getLayoutType(): string;
@@ -340,12 +341,14 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
340
341
  private canFireAddRemoveNotifications;
341
342
  protected onAddElement(element: IElement, index: number): void;
342
343
  protected onRemoveElement(element: IElement): void;
344
+ protected unregisterElementPropertiesChanged(element: IElement): void;
343
345
  private onRemoveElementNotifySurvey;
344
346
  private onElementVisibilityChanged;
345
347
  private onElementStartWithNewLineChanged;
346
348
  private updateRowsVisibility;
347
349
  canBuildRows(): boolean;
348
350
  private buildRows;
351
+ protected getElementsForRows(): Array<IElement>;
349
352
  getDragDropInfo(): any;
350
353
  private updateRowsOnElementRemoved;
351
354
  updateRowsRemoveElementFromRow(element: IElement, row: QuestionRowModel): void;
@@ -478,6 +481,7 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
478
481
  getSerializableColumnsValue(): Array<PanelLayoutColumnModel>;
479
482
  afterRender(el: HTMLElement): void;
480
483
  dispose(): void;
484
+ protected disposeElements(): void;
481
485
  }
482
486
  /**
483
487
  * A class that describes the Panel container element.
@@ -588,8 +592,8 @@ export declare class PanelModel extends PanelModelBase implements IElement {
588
592
  getFooterToolbar(): ActionContainer;
589
593
  get hasEditButton(): boolean;
590
594
  cancelPreview(): void;
591
- protected canShowTitle(survey: ISurvey): boolean;
592
595
  get cssTitle(): string;
596
+ protected getCssPanelTitle(): string;
593
597
  getCssTitleExpandableSvg(): string;
594
598
  get showErrorsAbovePanel(): boolean;
595
599
  protected getCssError(cssClasses: any): string;
@@ -1,4 +1,5 @@
1
1
  import { IDialogOptions } from "./popup";
2
+ import { IConfirmDialogOptions } from "./utils/utils";
2
3
  export declare type ISurveyEnvironment = {
3
4
  root: Document | ShadowRoot;
4
5
  rootElement: HTMLElement | ShadowRoot;
@@ -380,7 +381,7 @@ export declare var settings: {
380
381
  * @param message A message to be displayed in the confirm dialog window.
381
382
  * @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
382
383
  */
383
- confirmActionAsync: (message: string, callback: (res: boolean) => void, applyTitle?: string, locale?: string, rootElement?: HTMLElement) => boolean;
384
+ confirmActionAsync: (message: string, callback: (res: boolean) => void, options?: IConfirmDialogOptions) => boolean;
384
385
  /**
385
386
  * A minimum width value for all survey elements.
386
387
  *
@@ -13,22 +13,32 @@ export declare abstract class SurveyElementCore extends Base implements ILocaliz
13
13
  protected createLocTitleProperty(): LocalizableString;
14
14
  /**
15
15
  * Returns `true` if the survey element is a page.
16
- * @see Base.getType
16
+ *
17
+ * This property returns `false` for [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model) objects in the following cases:
18
+ *
19
+ * - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
20
+ * - The page is included in a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
21
+ *
22
+ * In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and all regular pages become panels.
17
23
  */
18
24
  get isPage(): boolean;
19
25
  /**
20
- * Returns `true` if the survey element is a panel.
21
- * @see Base.getType
26
+ * Returns `true` if the survey element is a panel or acts as one.
27
+ *
28
+ * This property returns `true` for `PageModel` objects in the following cases:
29
+ *
30
+ * - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
31
+ * - The page is included in a [preview of given answers](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page).
32
+ *
33
+ * In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and all regular pages become panels.
22
34
  */
23
35
  get isPanel(): boolean;
24
36
  /**
25
37
  * Returns `true` if the survey element is a question.
26
- * @see Base.getType
27
38
  */
28
39
  get isQuestion(): boolean;
29
40
  /**
30
41
  * Returns `true` if the element is a survey.
31
- * @see Base.getType
32
42
  */
33
43
  get isSurvey(): boolean;
34
44
  /**
@@ -1967,6 +1967,8 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
1967
1967
  * @see completeLastPage
1968
1968
  */
1969
1969
  nextPage(): boolean;
1970
+ performNext(): boolean;
1971
+ performPrevious(): boolean;
1970
1972
  private hasErrorsOnNavigate;
1971
1973
  private asyncValidationQuesitons;
1972
1974
  private checkForAsyncQuestionValidation;
@@ -2068,6 +2070,8 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
2068
2070
  private doCurrentPageCompleteCore;
2069
2071
  get isSinglePage(): boolean;
2070
2072
  set isSinglePage(val: boolean);
2073
+ get isSingleVisibleQuestion(): boolean;
2074
+ private isSingleVisibleQuestionVal;
2071
2075
  /**
2072
2076
  * Specifies how to distribute survey elements between pages.
2073
2077
  *
@@ -2107,17 +2111,17 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
2107
2111
  get isShowPreviewBeforeComplete(): boolean;
2108
2112
  protected onFirstPageIsStartedChanged(): void;
2109
2113
  private runningPages;
2114
+ private pageContainerValue;
2110
2115
  private onShowingPreviewChanged;
2116
+ private createRootPage;
2117
+ private disposeContainerPage;
2118
+ private updatePagesContainer;
2119
+ private currentSingleQuestionValue;
2120
+ get currentSingleQuestion(): Question;
2121
+ set currentSingleQuestion(val: Question);
2111
2122
  private changeCurrentPageFromPreview;
2112
- private originalPages;
2113
- protected onQuestionsOnPageModeChanged(oldValue: string, isFirstLoad?: boolean): void;
2114
- private restoreOriginalPages;
2123
+ protected onQuestionsOnPageModeChanged(oldValue: string): void;
2115
2124
  private getPageStartIndex;
2116
- private isLockingUpdateOnPageModes;
2117
- private setupPagesForPageModes;
2118
- private createPagesForQuestionOnPageMode;
2119
- private createSinglePage;
2120
- private createPagesForEveryQuestion;
2121
2125
  /**
2122
2126
  * Indicates whether the [current page](#currentPage) is the first page.
2123
2127
  *
@@ -2134,7 +2138,11 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
2134
2138
  get isCompleteButtonVisible(): boolean;
2135
2139
  get isPreviewButtonVisible(): boolean;
2136
2140
  get isCancelPreviewButtonVisible(): boolean;
2141
+ get isFirstElement(): boolean | undefined;
2142
+ get isLastElement(): boolean | undefined;
2137
2143
  private updateIsFirstLastPageState;
2144
+ private get isLastPageOrElement();
2145
+ private get isFirstPageOrElement();
2138
2146
  private calcIsShowPrevButton;
2139
2147
  private calcIsShowNextButton;
2140
2148
  calcIsCompleteButtonVisible(): boolean;
@@ -32,6 +32,7 @@ export declare var surveyLocalization: {
32
32
  onGetExternalString: (name: string, locale: string) => string;
33
33
  };
34
34
  export declare function getLocaleString(strName: string, locale?: string): string;
35
+ export declare function getLocaleStrings(locale: string): any;
35
36
  export declare function setupLocale(localeConfig: {
36
37
  localeCode: string;
37
38
  strings: any;