survey-react 1.12.20 → 1.12.22
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.
- package/defaultV2.css +1 -1
- package/defaultV2.min.css +1 -1
- package/modern.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +50 -14
- package/survey.react.js +155 -59
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/defaultV2.css
CHANGED
package/defaultV2.min.css
CHANGED
package/modern.css
CHANGED
package/modern.min.css
CHANGED
package/package.json
CHANGED
package/survey.css
CHANGED
package/survey.min.css
CHANGED
package/survey.react.d.ts
CHANGED
@@ -2723,6 +2723,7 @@ declare module "packages/survey-core/src/textPreProcessor" {
|
|
2723
2723
|
processValue(name: string, returnDisplayValue: boolean): TextPreProcessorValue;
|
2724
2724
|
get hasAllValuesOnLastRun(): boolean;
|
2725
2725
|
private getItems;
|
2726
|
+
private isValidItemName;
|
2726
2727
|
private getName;
|
2727
2728
|
}
|
2728
2729
|
export class QuestionTextProcessor implements ITextProcessor {
|
@@ -3263,6 +3264,9 @@ declare module "packages/survey-core/src/question_custom" {
|
|
3263
3264
|
protected getQuestionByName(name: string): IQuestion;
|
3264
3265
|
private settingNewValue;
|
3265
3266
|
setValue(name: string, newValue: any, locNotification: any, allowNotifyValueChanged?: boolean): any;
|
3267
|
+
setComment(name: string, newValue: string, locNotification: any): any;
|
3268
|
+
getComment(name: string): string;
|
3269
|
+
private getCommentName;
|
3266
3270
|
private runPanelTriggers;
|
3267
3271
|
getFilteredValues(): any;
|
3268
3272
|
private updateValueCoreWithPanelValue;
|
@@ -3469,7 +3473,7 @@ declare module "packages/survey-core/src/panel" {
|
|
3469
3473
|
set questionsOrder(val: string);
|
3470
3474
|
private canRandomize;
|
3471
3475
|
protected isRandomizing: boolean;
|
3472
|
-
randomizeElements(isRandom: boolean):
|
3476
|
+
randomizeElements(isRandom: boolean): boolean;
|
3473
3477
|
/**
|
3474
3478
|
* Returns `true` if elements in this panel/page are arranged in random order.
|
3475
3479
|
* @see questionsOrder
|
@@ -3606,6 +3610,7 @@ declare module "packages/survey-core/src/panel" {
|
|
3606
3610
|
protected getContainsErrors(): boolean;
|
3607
3611
|
updateElementVisibility(): void;
|
3608
3612
|
getFirstQuestionToFocus(withError?: boolean, ignoreCollapseState?: boolean): Question;
|
3613
|
+
getFirstVisibleQuestion(): Question;
|
3609
3614
|
/**
|
3610
3615
|
* Focuses the first question in this panel/page.
|
3611
3616
|
* @see focusFirstErrorQuestion
|
@@ -7607,7 +7612,7 @@ declare module "packages/survey-core/src/survey-events-api" {
|
|
7607
7612
|
*/
|
7608
7613
|
isNextPage: boolean;
|
7609
7614
|
/**
|
7610
|
-
* Returns `true` if the respondent is going backward, that is, `newCurrentPage` is earlier in the survey than `oldCurrentPage`.
|
7615
|
+
* Returns `true` if the respondent is going backward, that is, `newCurrentPage` or `newCurrentQuestion` is earlier in the survey than `oldCurrentPage` or `oldCurrentQuestion`.
|
7611
7616
|
*/
|
7612
7617
|
isGoingBackward: boolean;
|
7613
7618
|
/**
|
@@ -7623,9 +7628,20 @@ declare module "packages/survey-core/src/survey-events-api" {
|
|
7623
7628
|
*/
|
7624
7629
|
newCurrentPage: PageModel;
|
7625
7630
|
/**
|
7626
|
-
* A page that used to be current
|
7631
|
+
* A page that used to be current.\
|
7632
|
+
* In [question-per-page mode](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode), the `oldCurrentPage` and `newCurrentPage` parameters may contain the same `PageModel` instance. This is because the survey doesn't create artificial pages to display only one question per page. If both the previous and current questions belong to the same page in the survey JSON schema, they have the same parent `PageModel` instance.
|
7627
7633
|
*/
|
7628
7634
|
oldCurrentPage: PageModel;
|
7635
|
+
/**
|
7636
|
+
* The current question.\
|
7637
|
+
* This parameter has a value only in [question-per-page mode](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode).
|
7638
|
+
*/
|
7639
|
+
oldCurrentQuestion?: Question;
|
7640
|
+
/**
|
7641
|
+
* A question that used to be current.\
|
7642
|
+
* This parameter has a value only in [question-per-page mode](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode).
|
7643
|
+
*/
|
7644
|
+
newCurrentQuestion?: Question;
|
7629
7645
|
}
|
7630
7646
|
export interface CurrentPageChangingEvent extends CurrentPageChangedEvent {
|
7631
7647
|
/**
|
@@ -8317,7 +8333,7 @@ declare module "packages/survey-core/src/survey-events-api" {
|
|
8317
8333
|
*/
|
8318
8334
|
text: string;
|
8319
8335
|
}
|
8320
|
-
export interface
|
8336
|
+
export interface DynamicPanelValueChangedEvent extends PanelDynamicQuestionEventMixin {
|
8321
8337
|
/**
|
8322
8338
|
* The panel's data object that includes all item values.
|
8323
8339
|
*/
|
@@ -8328,10 +8344,6 @@ declare module "packages/survey-core/src/survey-events-api" {
|
|
8328
8344
|
* The panel's index within Dynamic Panel.
|
8329
8345
|
*/
|
8330
8346
|
panelIndex: number;
|
8331
|
-
/**
|
8332
|
-
* The item's new value.
|
8333
|
-
*/
|
8334
|
-
value: any;
|
8335
8347
|
/**
|
8336
8348
|
* The item's name.
|
8337
8349
|
*/
|
@@ -8340,6 +8352,18 @@ declare module "packages/survey-core/src/survey-events-api" {
|
|
8340
8352
|
* A panel that nests the item with a changed value.
|
8341
8353
|
*/
|
8342
8354
|
panel: PanelModel;
|
8355
|
+
/**
|
8356
|
+
* The item's new value.
|
8357
|
+
*/
|
8358
|
+
value: any;
|
8359
|
+
}
|
8360
|
+
export interface DynamicPanelValueChangingEvent extends DynamicPanelValueChangedEvent {
|
8361
|
+
/**
|
8362
|
+
* The item's old value.
|
8363
|
+
*/
|
8364
|
+
oldValue: any;
|
8365
|
+
}
|
8366
|
+
export interface DynamicPanelItemValueChangedEvent extends DynamicPanelValueChangedEvent {
|
8343
8367
|
}
|
8344
8368
|
export interface DynamicPanelCurrentIndexChangedEvent extends PanelDynamicQuestionEventMixin {
|
8345
8369
|
/**
|
@@ -9782,7 +9806,7 @@ declare module "packages/survey-core/src/survey" {
|
|
9782
9806
|
import { ActionContainer } from "packages/survey-core/src/actions/container";
|
9783
9807
|
import { QuestionPanelDynamicModel } from "packages/survey-core/src/question_paneldynamic";
|
9784
9808
|
import { Notifier } from "packages/survey-core/src/notifier";
|
9785
|
-
import { TriggerExecutedEvent, CompletingEvent, CompleteEvent, ShowingPreviewEvent, NavigateToUrlEvent, CurrentPageChangingEvent, CurrentPageChangedEvent, ValueChangingEvent, ValueChangedEvent, VariableChangedEvent, QuestionVisibleChangedEvent, PageVisibleChangedEvent, PanelVisibleChangedEvent, QuestionCreatedEvent, QuestionAddedEvent, QuestionRemovedEvent, PanelAddedEvent, PanelRemovedEvent, PageAddedEvent, ValidateQuestionEvent, SettingQuestionErrorsEvent, ValidatePanelEvent, ErrorCustomTextEvent, ValidatedErrorsOnCurrentPageEvent, ProcessHtmlEvent, GetQuestionTitleEvent, GetTitleTagNameEvent, GetQuestionNumberEvent, GetPageNumberEvent, GetPanelNumberEvent, GetProgressTextEvent, TextMarkdownEvent, SendResultEvent, GetResultEvent, UploadFilesEvent, DownloadFileEvent, ClearFilesEvent, LoadChoicesFromServerEvent, ProcessTextValueEvent, UpdateQuestionCssClassesEvent, UpdatePanelCssClassesEvent, UpdatePageCssClassesEvent, UpdateChoiceItemCssEvent, AfterRenderSurveyEvent, AfterRenderPageEvent, AfterRenderQuestionEvent, AfterRenderQuestionInputEvent, AfterRenderPanelEvent, FocusInQuestionEvent, FocusInPanelEvent, ShowingChoiceItemEvent, ChoicesLazyLoadEvent, GetChoiceDisplayValueEvent, MatrixRowAddedEvent, MatrixBeforeRowAddedEvent, MatrixRowRemovingEvent, MatrixRowRemovedEvent, MatrixAllowRemoveRowEvent, MatrixDetailPanelVisibleChangedEvent, MatrixCellCreatingEvent, MatrixCellCreatedEvent, MatrixAfterCellRenderEvent, MatrixCellValueChangedEvent, MatrixCellValueChangingEvent, MatrixCellValidateEvent, DynamicPanelModifiedEvent, DynamicPanelRemovingEvent, DynamicPanelItemValueChangedEvent, DynamicPanelGetTabTitleEvent, DynamicPanelCurrentIndexChangedEvent, CheckAnswerCorrectEvent, DragDropAllowEvent, ScrollToTopEvent, GetQuestionTitleActionsEvent, GetPanelTitleActionsEvent, GetPageTitleActionsEvent, GetPanelFooterActionsEvent, GetMatrixRowActionsEvent, GetExpressionDisplayValueEvent, ServerValidateQuestionsEvent, MultipleTextItemAddedEvent, MatrixColumnAddedEvent, GetQuestionDisplayValueEvent, PopupVisibleChangedEvent, ChoicesSearchEvent, OpenFileChooserEvent, OpenDropdownMenuEvent, ResizeEvent, ProgressTextEvent, ScrollingElementToTopEvent, IsAnswerCorrectEvent } from "packages/survey-core/src/survey-events-api";
|
9809
|
+
import { TriggerExecutedEvent, CompletingEvent, CompleteEvent, ShowingPreviewEvent, NavigateToUrlEvent, CurrentPageChangingEvent, CurrentPageChangedEvent, ValueChangingEvent, ValueChangedEvent, VariableChangedEvent, QuestionVisibleChangedEvent, PageVisibleChangedEvent, PanelVisibleChangedEvent, QuestionCreatedEvent, QuestionAddedEvent, QuestionRemovedEvent, PanelAddedEvent, PanelRemovedEvent, PageAddedEvent, ValidateQuestionEvent, SettingQuestionErrorsEvent, ValidatePanelEvent, ErrorCustomTextEvent, ValidatedErrorsOnCurrentPageEvent, ProcessHtmlEvent, GetQuestionTitleEvent, GetTitleTagNameEvent, GetQuestionNumberEvent, GetPageNumberEvent, GetPanelNumberEvent, GetProgressTextEvent, TextMarkdownEvent, SendResultEvent, GetResultEvent, UploadFilesEvent, DownloadFileEvent, ClearFilesEvent, LoadChoicesFromServerEvent, ProcessTextValueEvent, UpdateQuestionCssClassesEvent, UpdatePanelCssClassesEvent, UpdatePageCssClassesEvent, UpdateChoiceItemCssEvent, AfterRenderSurveyEvent, AfterRenderPageEvent, AfterRenderQuestionEvent, AfterRenderQuestionInputEvent, AfterRenderPanelEvent, FocusInQuestionEvent, FocusInPanelEvent, ShowingChoiceItemEvent, ChoicesLazyLoadEvent, GetChoiceDisplayValueEvent, MatrixRowAddedEvent, MatrixBeforeRowAddedEvent, MatrixRowRemovingEvent, MatrixRowRemovedEvent, MatrixAllowRemoveRowEvent, MatrixDetailPanelVisibleChangedEvent, MatrixCellCreatingEvent, MatrixCellCreatedEvent, MatrixAfterCellRenderEvent, MatrixCellValueChangedEvent, MatrixCellValueChangingEvent, MatrixCellValidateEvent, DynamicPanelModifiedEvent, DynamicPanelRemovingEvent, DynamicPanelItemValueChangedEvent, DynamicPanelValueChangingEvent, DynamicPanelGetTabTitleEvent, DynamicPanelCurrentIndexChangedEvent, CheckAnswerCorrectEvent, DragDropAllowEvent, ScrollToTopEvent, GetQuestionTitleActionsEvent, GetPanelTitleActionsEvent, GetPageTitleActionsEvent, GetPanelFooterActionsEvent, GetMatrixRowActionsEvent, GetExpressionDisplayValueEvent, ServerValidateQuestionsEvent, MultipleTextItemAddedEvent, MatrixColumnAddedEvent, GetQuestionDisplayValueEvent, PopupVisibleChangedEvent, ChoicesSearchEvent, OpenFileChooserEvent, OpenDropdownMenuEvent, ResizeEvent, ProgressTextEvent, ScrollingElementToTopEvent, IsAnswerCorrectEvent } from "packages/survey-core/src/survey-events-api";
|
9786
9810
|
import { QuestionMatrixDropdownModelBase } from "packages/survey-core/src/question_matrixdropdownbase";
|
9787
9811
|
import { QuestionMatrixDynamicModel } from "packages/survey-core/src/question_matrixdynamic";
|
9788
9812
|
import { QuestionFileModel } from "packages/survey-core/src/question_file";
|
@@ -9905,7 +9929,7 @@ declare module "packages/survey-core/src/survey" {
|
|
9905
9929
|
*
|
9906
9930
|
* For information on event handler parameters, refer to descriptions within the interface.
|
9907
9931
|
*
|
9908
|
-
* To handle value changes in matrix cells or panels within a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model), use the [`onMatrixCellValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixCellValueChanged) or [`
|
9932
|
+
* To handle value changes in matrix cells or panels within a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model), use the [`onMatrixCellValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixCellValueChanged) or [`onDynamicPanelValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelValueChanged) event.
|
9909
9933
|
* @see setValue
|
9910
9934
|
*/
|
9911
9935
|
onValueChanged: EventBase<SurveyModel, ValueChangedEvent>;
|
@@ -10433,9 +10457,17 @@ declare module "packages/survey-core/src/survey" {
|
|
10433
10457
|
onTimer: EventBase<SurveyModel, {}>;
|
10434
10458
|
onTimerPanelInfoText: EventBase<SurveyModel, any>;
|
10435
10459
|
/**
|
10436
|
-
* An event that is raised after
|
10460
|
+
* An event that is raised after a value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
10461
|
+
*/
|
10462
|
+
onDynamicPanelValueChanged: EventBase<SurveyModel, DynamicPanelItemValueChangedEvent>;
|
10463
|
+
/**
|
10464
|
+
* @deprecated Use the [`onDynamicPanelValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelValueChanged) event instead.
|
10437
10465
|
*/
|
10438
10466
|
onDynamicPanelItemValueChanged: EventBase<SurveyModel, DynamicPanelItemValueChangedEvent>;
|
10467
|
+
/**
|
10468
|
+
* An event that is raised before a value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
10469
|
+
*/
|
10470
|
+
onDynamicPanelValueChanging: EventBase<SurveyModel, DynamicPanelValueChangingEvent>;
|
10439
10471
|
/**
|
10440
10472
|
* An event that is raised before a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) renders [tab titles](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle). Use this event to change individual tab titles.
|
10441
10473
|
*
|
@@ -11667,7 +11699,8 @@ declare module "packages/survey-core/src/survey" {
|
|
11667
11699
|
mergeValues(src: any, dest: any): void;
|
11668
11700
|
private updateValuesWithDefaults;
|
11669
11701
|
protected updateCustomWidgets(page: PageModel): void;
|
11670
|
-
protected currentPageChanging(newValue: PageModel, oldValue: PageModel): boolean;
|
11702
|
+
protected currentPageChanging(newValue: PageModel, oldValue: PageModel, newQuestion?: Question, oldQuestion?: Question): boolean;
|
11703
|
+
private currentPageChangingFromOptions;
|
11671
11704
|
protected currentPageChanged(newValue: PageModel, oldValue: PageModel): void;
|
11672
11705
|
private notifyQuestionsOnHidingContent;
|
11673
11706
|
private createPageChangeEventOptions;
|
@@ -11762,6 +11795,7 @@ declare module "packages/survey-core/src/survey" {
|
|
11762
11795
|
performNext(): boolean;
|
11763
11796
|
performPrevious(): boolean;
|
11764
11797
|
private hasErrorsOnNavigate;
|
11798
|
+
private canGoTroughValidation;
|
11765
11799
|
private asyncValidationQuesitons;
|
11766
11800
|
private checkForAsyncQuestionValidation;
|
11767
11801
|
private clearAsyncValidationQuesitons;
|
@@ -11875,7 +11909,7 @@ declare module "packages/survey-core/src/survey" {
|
|
11875
11909
|
* Possible values:
|
11876
11910
|
*
|
11877
11911
|
* - `"singlePage"` - Combines all survey pages into a single page.
|
11878
|
-
* - `"questionPerPage"` -
|
11912
|
+
* - `"questionPerPage"` - Displays each question on a separate page.
|
11879
11913
|
* - `"standard"` (default) - Retains the original structure specified in the JSON schema.
|
11880
11914
|
*/
|
11881
11915
|
get questionsOnPageMode(): string;
|
@@ -12085,6 +12119,7 @@ declare module "packages/survey-core/src/survey" {
|
|
12085
12119
|
private hasQuestionVisibleIndeces;
|
12086
12120
|
dynamicPanelRemoving(question: QuestionPanelDynamicModel, panelIndex: number, panel: PanelModel): boolean;
|
12087
12121
|
dynamicPanelItemValueChanged(question: IQuestion, options: any): void;
|
12122
|
+
dynamicPanelItemValueChanging(question: IQuestion, options: any): void;
|
12088
12123
|
dynamicPanelGetTabTitle(question: IQuestion, options: any): void;
|
12089
12124
|
dynamicPanelCurrentIndexChanged(question: IQuestion, options: any): void;
|
12090
12125
|
dragAndDropAllow(options: DragDropAllowEvent): boolean;
|
@@ -15216,7 +15251,8 @@ declare module "packages/survey-core/src/base-interfaces" {
|
|
15216
15251
|
dynamicPanelAdded(question: IQuestion, panelIndex?: number, panel?: IPanel): void;
|
15217
15252
|
dynamicPanelRemoved(question: IQuestion, panelIndex: number, panel: IPanel): void;
|
15218
15253
|
dynamicPanelRemoving(question: IQuestion, panelIndex: number, panel: IPanel): boolean;
|
15219
|
-
dynamicPanelItemValueChanged(question: IQuestion, options: any):
|
15254
|
+
dynamicPanelItemValueChanged(question: IQuestion, options: any): void;
|
15255
|
+
dynamicPanelItemValueChanging(question: IQuestion, options: any): void;
|
15220
15256
|
dynamicPanelGetTabTitle(question: IQuestion, options: any): any;
|
15221
15257
|
dynamicPanelCurrentIndexChanged(question: IQuestion, options: any): void;
|
15222
15258
|
dragAndDropAllow(options: DragDropAllowEvent): boolean;
|