survey-react 1.12.21 → 1.12.23
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 +51 -5
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- 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 +55 -22
- package/survey.react.js +254 -151
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
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
@@ -1723,6 +1723,8 @@ declare module "packages/survey-core/src/defaultCss/defaultV2Css" {
|
|
1723
1723
|
progressBtnIcon: string;
|
1724
1724
|
noEntriesPlaceholder: string;
|
1725
1725
|
compact: string;
|
1726
|
+
tabsContainer: string;
|
1727
|
+
tabsContainerWithHeader: string;
|
1726
1728
|
tabsRoot: string;
|
1727
1729
|
tabsLeft: string;
|
1728
1730
|
tabsRight: string;
|
@@ -2719,10 +2721,13 @@ declare module "packages/survey-core/src/textPreProcessor" {
|
|
2719
2721
|
private get hasAllValuesOnLastRunValue();
|
2720
2722
|
private set hasAllValuesOnLastRunValue(value);
|
2721
2723
|
onProcess: (textValue: TextPreProcessorValue) => void;
|
2722
|
-
process(text: string, returnDisplayValue?: boolean, doEncoding?: boolean): string;
|
2724
|
+
process(text: string, returnDisplayValue?: boolean, doEncoding?: boolean, replaceUndefinedValues?: boolean): string;
|
2723
2725
|
processValue(name: string, returnDisplayValue: boolean): TextPreProcessorValue;
|
2724
2726
|
get hasAllValuesOnLastRun(): boolean;
|
2727
|
+
processText(text: string, returnDisplayValue: boolean): string;
|
2728
|
+
processTextEx(params: ITextProcessorProp): ITextProcessorResult;
|
2725
2729
|
private getItems;
|
2730
|
+
private isValidItemName;
|
2726
2731
|
private getName;
|
2727
2732
|
}
|
2728
2733
|
export class QuestionTextProcessor implements ITextProcessor {
|
@@ -2740,7 +2745,7 @@ declare module "packages/survey-core/src/textPreProcessor" {
|
|
2740
2745
|
private getProcessedTextValue;
|
2741
2746
|
processText(text: string, returnDisplayValue: boolean): string;
|
2742
2747
|
processTextEx(params: ITextProcessorProp): ITextProcessorResult;
|
2743
|
-
private
|
2748
|
+
private addTextPreProcessor;
|
2744
2749
|
}
|
2745
2750
|
}
|
2746
2751
|
declare module "packages/survey-core/src/error" {
|
@@ -3263,6 +3268,9 @@ declare module "packages/survey-core/src/question_custom" {
|
|
3263
3268
|
protected getQuestionByName(name: string): IQuestion;
|
3264
3269
|
private settingNewValue;
|
3265
3270
|
setValue(name: string, newValue: any, locNotification: any, allowNotifyValueChanged?: boolean): any;
|
3271
|
+
setComment(name: string, newValue: string, locNotification: any): any;
|
3272
|
+
getComment(name: string): string;
|
3273
|
+
private getCommentName;
|
3266
3274
|
private runPanelTriggers;
|
3267
3275
|
getFilteredValues(): any;
|
3268
3276
|
private updateValueCoreWithPanelValue;
|
@@ -3469,7 +3477,7 @@ declare module "packages/survey-core/src/panel" {
|
|
3469
3477
|
set questionsOrder(val: string);
|
3470
3478
|
private canRandomize;
|
3471
3479
|
protected isRandomizing: boolean;
|
3472
|
-
randomizeElements(isRandom: boolean):
|
3480
|
+
randomizeElements(isRandom: boolean): boolean;
|
3473
3481
|
/**
|
3474
3482
|
* Returns `true` if elements in this panel/page are arranged in random order.
|
3475
3483
|
* @see questionsOrder
|
@@ -3606,6 +3614,7 @@ declare module "packages/survey-core/src/panel" {
|
|
3606
3614
|
protected getContainsErrors(): boolean;
|
3607
3615
|
updateElementVisibility(): void;
|
3608
3616
|
getFirstQuestionToFocus(withError?: boolean, ignoreCollapseState?: boolean): Question;
|
3617
|
+
getFirstVisibleQuestion(): Question;
|
3609
3618
|
/**
|
3610
3619
|
* Focuses the first question in this panel/page.
|
3611
3620
|
* @see focusFirstErrorQuestion
|
@@ -6595,7 +6604,7 @@ declare module "packages/survey-core/src/question_paneldynamic" {
|
|
6595
6604
|
import { PanelModel } from "packages/survey-core/src/panel";
|
6596
6605
|
import { SurveyError } from "packages/survey-core/src/survey-error";
|
6597
6606
|
import { ActionContainer } from "packages/survey-core/src/actions/container";
|
6598
|
-
import { IAction } from "packages/survey-core/src/actions/action";
|
6607
|
+
import { Action, IAction } from "packages/survey-core/src/actions/action";
|
6599
6608
|
import { AdaptiveActionContainer } from "packages/survey-core/src/actions/adaptive-container";
|
6600
6609
|
import { ITheme } from "packages/survey-core/src/themes";
|
6601
6610
|
import { AnimationProperty, IAnimationGroupConsumer } from "packages/survey-core/src/utils/animation";
|
@@ -6608,6 +6617,13 @@ declare module "packages/survey-core/src/question_paneldynamic" {
|
|
6608
6617
|
getSurvey(): ISurvey;
|
6609
6618
|
getRootData(): ISurveyData;
|
6610
6619
|
}
|
6620
|
+
interface IPanelDynamicTabbedMenuItem extends IAction {
|
6621
|
+
panelId: string;
|
6622
|
+
}
|
6623
|
+
class PanelDynamicTabbedMenuItem extends Action {
|
6624
|
+
panelId: string;
|
6625
|
+
constructor(innerItem: IPanelDynamicTabbedMenuItem);
|
6626
|
+
}
|
6611
6627
|
export class QuestionPanelDynamicItem implements ISurveyData, ISurveyImpl {
|
6612
6628
|
static ItemVariableName: string;
|
6613
6629
|
static ParentItemVariableName: string;
|
@@ -7063,7 +7079,6 @@ declare module "packages/survey-core/src/question_paneldynamic" {
|
|
7063
7079
|
set tabAlign(val: "center" | "left" | "right");
|
7064
7080
|
get isRenderModeList(): boolean;
|
7065
7081
|
get isRenderModeTab(): boolean;
|
7066
|
-
get hasTitleOnLeftTop(): boolean;
|
7067
7082
|
setVisibleIndex(value: number): number;
|
7068
7083
|
private setPanelVisibleIndex;
|
7069
7084
|
/**
|
@@ -7237,6 +7252,7 @@ declare module "packages/survey-core/src/question_paneldynamic" {
|
|
7237
7252
|
get progress(): string;
|
7238
7253
|
getRootCss(): string;
|
7239
7254
|
get cssHeader(): string;
|
7255
|
+
getTabsContainerCss(): string;
|
7240
7256
|
getPanelWrapperCss(panel: PanelModel): string;
|
7241
7257
|
getPanelRemoveButtonCss(): string;
|
7242
7258
|
getAddButtonCss(): string;
|
@@ -7250,9 +7266,9 @@ declare module "packages/survey-core/src/question_paneldynamic" {
|
|
7250
7266
|
get locNoEntriesText(): LocalizableString;
|
7251
7267
|
getShowNoEntriesPlaceholder(): boolean;
|
7252
7268
|
needResponsiveWidth(): boolean;
|
7253
|
-
private
|
7254
|
-
get
|
7255
|
-
|
7269
|
+
private tabbedMenuValue;
|
7270
|
+
get hasTabbedMenu(): boolean;
|
7271
|
+
get tabbedMenu(): AdaptiveActionContainer<PanelDynamicTabbedMenuItem> | null;
|
7256
7272
|
private footerToolbarValue;
|
7257
7273
|
get footerToolbar(): ActionContainer;
|
7258
7274
|
legacyNavigation: boolean;
|
@@ -7260,7 +7276,7 @@ declare module "packages/survey-core/src/question_paneldynamic" {
|
|
7260
7276
|
private updateFooterActions;
|
7261
7277
|
private initFooterToolbar;
|
7262
7278
|
private createTabByPanel;
|
7263
|
-
private
|
7279
|
+
private getTabbedMenuCss;
|
7264
7280
|
private updateTabToolbarItemsPressedState;
|
7265
7281
|
private updateTabToolbar;
|
7266
7282
|
private addTabFromToolbar;
|
@@ -7607,7 +7623,7 @@ declare module "packages/survey-core/src/survey-events-api" {
|
|
7607
7623
|
*/
|
7608
7624
|
isNextPage: boolean;
|
7609
7625
|
/**
|
7610
|
-
* Returns `true` if the respondent is going backward, that is, `newCurrentPage` is earlier in the survey than `oldCurrentPage`.
|
7626
|
+
* Returns `true` if the respondent is going backward, that is, `newCurrentPage` or `newCurrentQuestion` is earlier in the survey than `oldCurrentPage` or `oldCurrentQuestion`.
|
7611
7627
|
*/
|
7612
7628
|
isGoingBackward: boolean;
|
7613
7629
|
/**
|
@@ -7623,9 +7639,20 @@ declare module "packages/survey-core/src/survey-events-api" {
|
|
7623
7639
|
*/
|
7624
7640
|
newCurrentPage: PageModel;
|
7625
7641
|
/**
|
7626
|
-
* A page that used to be current
|
7642
|
+
* A page that used to be current.\
|
7643
|
+
* 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
7644
|
*/
|
7628
7645
|
oldCurrentPage: PageModel;
|
7646
|
+
/**
|
7647
|
+
* The current question.\
|
7648
|
+
* This parameter has a value only in [question-per-page mode](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode).
|
7649
|
+
*/
|
7650
|
+
oldCurrentQuestion?: Question;
|
7651
|
+
/**
|
7652
|
+
* A question that used to be current.\
|
7653
|
+
* This parameter has a value only in [question-per-page mode](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode).
|
7654
|
+
*/
|
7655
|
+
newCurrentQuestion?: Question;
|
7629
7656
|
}
|
7630
7657
|
export interface CurrentPageChangingEvent extends CurrentPageChangedEvent {
|
7631
7658
|
/**
|
@@ -8328,10 +8355,6 @@ declare module "packages/survey-core/src/survey-events-api" {
|
|
8328
8355
|
* The panel's index within Dynamic Panel.
|
8329
8356
|
*/
|
8330
8357
|
panelIndex: number;
|
8331
|
-
/**
|
8332
|
-
* The item's new value.
|
8333
|
-
*/
|
8334
|
-
value: any;
|
8335
8358
|
/**
|
8336
8359
|
* The item's name.
|
8337
8360
|
*/
|
@@ -8340,6 +8363,10 @@ declare module "packages/survey-core/src/survey-events-api" {
|
|
8340
8363
|
* A panel that nests the item with a changed value.
|
8341
8364
|
*/
|
8342
8365
|
panel: PanelModel;
|
8366
|
+
/**
|
8367
|
+
* The item's new value.
|
8368
|
+
*/
|
8369
|
+
value: any;
|
8343
8370
|
}
|
8344
8371
|
export interface DynamicPanelValueChangingEvent extends DynamicPanelValueChangedEvent {
|
8345
8372
|
/**
|
@@ -9790,7 +9817,7 @@ declare module "packages/survey-core/src/survey" {
|
|
9790
9817
|
import { ActionContainer } from "packages/survey-core/src/actions/container";
|
9791
9818
|
import { QuestionPanelDynamicModel } from "packages/survey-core/src/question_paneldynamic";
|
9792
9819
|
import { Notifier } from "packages/survey-core/src/notifier";
|
9793
|
-
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";
|
9820
|
+
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";
|
9794
9821
|
import { QuestionMatrixDropdownModelBase } from "packages/survey-core/src/question_matrixdropdownbase";
|
9795
9822
|
import { QuestionMatrixDynamicModel } from "packages/survey-core/src/question_matrixdynamic";
|
9796
9823
|
import { QuestionFileModel } from "packages/survey-core/src/question_file";
|
@@ -10441,14 +10468,17 @@ declare module "packages/survey-core/src/survey" {
|
|
10441
10468
|
onTimer: EventBase<SurveyModel, {}>;
|
10442
10469
|
onTimerPanelInfoText: EventBase<SurveyModel, any>;
|
10443
10470
|
/**
|
10444
|
-
* An event that is raised after
|
10471
|
+
* 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.
|
10445
10472
|
*/
|
10446
10473
|
onDynamicPanelValueChanged: EventBase<SurveyModel, DynamicPanelItemValueChangedEvent>;
|
10474
|
+
/**
|
10475
|
+
* @deprecated Use the [`onDynamicPanelValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelValueChanged) event instead.
|
10476
|
+
*/
|
10447
10477
|
onDynamicPanelItemValueChanged: EventBase<SurveyModel, DynamicPanelItemValueChangedEvent>;
|
10448
10478
|
/**
|
10449
|
-
* An event that is raised
|
10479
|
+
* 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.
|
10450
10480
|
*/
|
10451
|
-
onDynamicPanelValueChanging: EventBase<SurveyModel,
|
10481
|
+
onDynamicPanelValueChanging: EventBase<SurveyModel, DynamicPanelValueChangingEvent>;
|
10452
10482
|
/**
|
10453
10483
|
* 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.
|
10454
10484
|
*
|
@@ -11680,7 +11710,8 @@ declare module "packages/survey-core/src/survey" {
|
|
11680
11710
|
mergeValues(src: any, dest: any): void;
|
11681
11711
|
private updateValuesWithDefaults;
|
11682
11712
|
protected updateCustomWidgets(page: PageModel): void;
|
11683
|
-
protected currentPageChanging(newValue: PageModel, oldValue: PageModel): boolean;
|
11713
|
+
protected currentPageChanging(newValue: PageModel, oldValue: PageModel, newQuestion?: Question, oldQuestion?: Question): boolean;
|
11714
|
+
private currentPageChangingFromOptions;
|
11684
11715
|
protected currentPageChanged(newValue: PageModel, oldValue: PageModel): void;
|
11685
11716
|
private notifyQuestionsOnHidingContent;
|
11686
11717
|
private createPageChangeEventOptions;
|
@@ -11775,6 +11806,7 @@ declare module "packages/survey-core/src/survey" {
|
|
11775
11806
|
performNext(): boolean;
|
11776
11807
|
performPrevious(): boolean;
|
11777
11808
|
private hasErrorsOnNavigate;
|
11809
|
+
private canGoTroughValidation;
|
11778
11810
|
private asyncValidationQuesitons;
|
11779
11811
|
private checkForAsyncQuestionValidation;
|
11780
11812
|
private clearAsyncValidationQuesitons;
|
@@ -11888,7 +11920,7 @@ declare module "packages/survey-core/src/survey" {
|
|
11888
11920
|
* Possible values:
|
11889
11921
|
*
|
11890
11922
|
* - `"singlePage"` - Combines all survey pages into a single page.
|
11891
|
-
* - `"questionPerPage"` -
|
11923
|
+
* - `"questionPerPage"` - Displays each question on a separate page.
|
11892
11924
|
* - `"standard"` (default) - Retains the original structure specified in the JSON schema.
|
11893
11925
|
*/
|
11894
11926
|
get questionsOnPageMode(): string;
|
@@ -15090,6 +15122,7 @@ declare module "packages/survey-core/src/base-interfaces" {
|
|
15090
15122
|
returnDisplayValue?: boolean;
|
15091
15123
|
doEncoding?: boolean;
|
15092
15124
|
runAtDesign?: boolean;
|
15125
|
+
replaceUndefinedValues?: boolean;
|
15093
15126
|
}
|
15094
15127
|
export interface ITextProcessorResult {
|
15095
15128
|
text: string;
|
@@ -15834,7 +15867,7 @@ declare module "packages/survey-core/src/localizablestring" {
|
|
15834
15867
|
set localizationName(val: string);
|
15835
15868
|
private _allowLineBreaks;
|
15836
15869
|
get allowLineBreaks(): boolean;
|
15837
|
-
onGetTextCallback: (str: string) => string;
|
15870
|
+
onGetTextCallback: (str: string, nonProcessedText?: string) => string;
|
15838
15871
|
storeDefaultText: boolean;
|
15839
15872
|
serializeCallBackText: boolean;
|
15840
15873
|
onGetLocalizationTextCallback: (str: string) => string;
|