survey-react 1.12.15 → 1.12.16
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 +8 -8
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +15 -15
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +75 -28
- package/survey.react.js +513 -278
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/package.json
CHANGED
package/survey.css
CHANGED
package/survey.min.css
CHANGED
package/survey.react.d.ts
CHANGED
@@ -223,6 +223,7 @@ declare module "packages/survey-core/src/surveyStrings" {
|
|
223
223
|
onGetExternalString: (name: string, locale: string) => string;
|
224
224
|
};
|
225
225
|
export function getLocaleString(strName: string, locale?: string): string;
|
226
|
+
export function getLocaleStrings(locale: string): any;
|
226
227
|
export function setupLocale(localeConfig: {
|
227
228
|
localeCode: string;
|
228
229
|
strings: any;
|
@@ -917,7 +918,7 @@ declare module "packages/survey-core/src/utils/utils" {
|
|
917
918
|
import { PopupBaseViewModel } from "packages/survey-core/src/popup-view-model";
|
918
919
|
function compareVersions(a: any, b: any): number;
|
919
920
|
function confirmAction(message: string): boolean;
|
920
|
-
function confirmActionAsync(
|
921
|
+
function confirmActionAsync(options: IConfirmDialogOptions): void;
|
921
922
|
function detectIEBrowser(): boolean;
|
922
923
|
function detectIEOrEdge(): boolean;
|
923
924
|
function loadFileFromBase64(b64Data: string, fileName: string): void;
|
@@ -963,7 +964,16 @@ declare module "packages/survey-core/src/utils/utils" {
|
|
963
964
|
log(action: string): void;
|
964
965
|
get result(): string;
|
965
966
|
}
|
966
|
-
export
|
967
|
+
export interface IConfirmDialogOptions {
|
968
|
+
message?: string;
|
969
|
+
funcOnYes?: () => void;
|
970
|
+
funcOnNo?: () => void;
|
971
|
+
applyTitle?: string;
|
972
|
+
locale?: string;
|
973
|
+
rootElement?: HTMLElement;
|
974
|
+
cssClass?: string;
|
975
|
+
}
|
976
|
+
export function showConfirmDialog(message: string, callback: (res: boolean) => void, options: IConfirmDialogOptions): boolean;
|
967
977
|
export function configConfirmDialog(popupViewModel: PopupBaseViewModel): void;
|
968
978
|
function chooseFiles(input: HTMLInputElement, callback: (files: File[]) => void): void;
|
969
979
|
export function compareArrays<T>(oldValue: Array<T>, newValue: Array<T>, getKey: (item: T) => any): {
|
@@ -1833,6 +1843,7 @@ declare module "packages/survey-core/src/defaultCss/defaultV2Css" {
|
|
1833
1843
|
errorsContainer: string;
|
1834
1844
|
errorsContainerTop: string;
|
1835
1845
|
errorsContainerBottom: string;
|
1846
|
+
confirmDialog: string;
|
1836
1847
|
};
|
1837
1848
|
image: {
|
1838
1849
|
mainRoot: string;
|
@@ -3464,9 +3475,14 @@ declare module "packages/survey-core/src/panel" {
|
|
3464
3475
|
*/
|
3465
3476
|
get areQuestionsRandomized(): boolean;
|
3466
3477
|
/**
|
3467
|
-
* Returns a survey element (panel or page) that contains this panel and allows you to move
|
3478
|
+
* Returns a survey element (panel or page) that contains this panel and allows you to move the panel to a different survey element.
|
3468
3479
|
*
|
3469
|
-
*
|
3480
|
+
* For `PageModel` objects, the `parent` property is `null`, except in the following cases:
|
3481
|
+
*
|
3482
|
+
* - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
|
3483
|
+
* - 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).
|
3484
|
+
*
|
3485
|
+
* In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and the `parent` property contains this object.
|
3470
3486
|
*/
|
3471
3487
|
get parent(): PanelModelBase;
|
3472
3488
|
set parent(val: PanelModelBase);
|
@@ -3488,10 +3504,6 @@ declare module "packages/survey-core/src/panel" {
|
|
3488
3504
|
*/
|
3489
3505
|
get id(): string;
|
3490
3506
|
set id(val: string);
|
3491
|
-
/**
|
3492
|
-
* Returns `true` if the survey element is a panel.
|
3493
|
-
* @see Base.getType
|
3494
|
-
*/
|
3495
3507
|
get isPanel(): boolean;
|
3496
3508
|
getPanel(): IPanel;
|
3497
3509
|
getLayoutType(): string;
|
@@ -3669,12 +3681,14 @@ declare module "packages/survey-core/src/panel" {
|
|
3669
3681
|
private canFireAddRemoveNotifications;
|
3670
3682
|
protected onAddElement(element: IElement, index: number): void;
|
3671
3683
|
protected onRemoveElement(element: IElement): void;
|
3684
|
+
protected unregisterElementPropertiesChanged(element: IElement): void;
|
3672
3685
|
private onRemoveElementNotifySurvey;
|
3673
3686
|
private onElementVisibilityChanged;
|
3674
3687
|
private onElementStartWithNewLineChanged;
|
3675
3688
|
private updateRowsVisibility;
|
3676
3689
|
canBuildRows(): boolean;
|
3677
3690
|
private buildRows;
|
3691
|
+
protected getElementsForRows(): Array<IElement>;
|
3678
3692
|
getDragDropInfo(): any;
|
3679
3693
|
private updateRowsOnElementRemoved;
|
3680
3694
|
updateRowsRemoveElementFromRow(element: IElement, row: QuestionRowModel): void;
|
@@ -3807,6 +3821,7 @@ declare module "packages/survey-core/src/panel" {
|
|
3807
3821
|
getSerializableColumnsValue(): Array<PanelLayoutColumnModel>;
|
3808
3822
|
afterRender(el: HTMLElement): void;
|
3809
3823
|
dispose(): void;
|
3824
|
+
protected disposeElements(): void;
|
3810
3825
|
}
|
3811
3826
|
/**
|
3812
3827
|
* A class that describes the Panel container element.
|
@@ -3917,8 +3932,8 @@ declare module "packages/survey-core/src/panel" {
|
|
3917
3932
|
getFooterToolbar(): ActionContainer;
|
3918
3933
|
get hasEditButton(): boolean;
|
3919
3934
|
cancelPreview(): void;
|
3920
|
-
protected canShowTitle(survey: ISurvey): boolean;
|
3921
3935
|
get cssTitle(): string;
|
3936
|
+
protected getCssPanelTitle(): string;
|
3922
3937
|
getCssTitleExpandableSvg(): string;
|
3923
3938
|
get showErrorsAbovePanel(): boolean;
|
3924
3939
|
protected getCssError(cssClasses: any): string;
|
@@ -5255,7 +5270,7 @@ declare module "packages/survey-core/src/validator" {
|
|
5255
5270
|
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
|
5256
5271
|
protected generateError(res: boolean, value: any, name: string): ValidatorResult;
|
5257
5272
|
protected getDefaultErrorText(name: string): string;
|
5258
|
-
|
5273
|
+
private ensureConditionRunner;
|
5259
5274
|
/**
|
5260
5275
|
* A Boolean [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions). If it evaluates to `false`, validation fails.
|
5261
5276
|
*
|
@@ -8533,20 +8548,28 @@ declare module "packages/survey-core/src/drag-drop-page-helper-v1" {
|
|
8533
8548
|
}
|
8534
8549
|
declare module "packages/survey-core/src/page" {
|
8535
8550
|
import { IPage, IPanel, IElement, ISurveyElement, ISurvey } from "packages/survey-core/src/base-interfaces";
|
8536
|
-
import {
|
8551
|
+
import { PanelModel } from "packages/survey-core/src/panel";
|
8537
8552
|
import { LocalizableString } from "packages/survey-core/src/localizablestring";
|
8538
8553
|
/**
|
8539
8554
|
* 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).
|
8540
8555
|
*
|
8541
8556
|
* [View Demo](https://surveyjs.io/form-library/examples/nps-question/ (linkStyle))
|
8542
8557
|
*/
|
8543
|
-
export class PageModel extends
|
8558
|
+
export class PageModel extends PanelModel implements IPage {
|
8544
8559
|
private hasShownValue;
|
8545
8560
|
private dragDropPageHelper;
|
8561
|
+
isPageContainer: boolean;
|
8546
8562
|
constructor(name?: string);
|
8547
8563
|
getType(): string;
|
8548
8564
|
toString(): string;
|
8549
8565
|
get isPage(): boolean;
|
8566
|
+
get isPanel(): boolean;
|
8567
|
+
get showPanelAsPage(): boolean;
|
8568
|
+
get hasEditButton(): boolean;
|
8569
|
+
protected getElementsForRows(): Array<IElement>;
|
8570
|
+
protected disposeElements(): void;
|
8571
|
+
protected onRemoveElement(element: IElement): void;
|
8572
|
+
getTemplate(): string;
|
8550
8573
|
get no(): string;
|
8551
8574
|
get cssTitleNumber(): string;
|
8552
8575
|
getCssTitleExpandableSvg(): string;
|
@@ -8588,7 +8611,7 @@ declare module "packages/survey-core/src/page" {
|
|
8588
8611
|
get isStartPage(): boolean;
|
8589
8612
|
get isStarted(): boolean;
|
8590
8613
|
protected calcCssClasses(css: any): any;
|
8591
|
-
|
8614
|
+
protected getCssPanelTitle(): string;
|
8592
8615
|
get cssRoot(): string;
|
8593
8616
|
protected getCssError(cssClasses: any): string;
|
8594
8617
|
num: number;
|
@@ -11677,6 +11700,8 @@ declare module "packages/survey-core/src/survey" {
|
|
11677
11700
|
* @see completeLastPage
|
11678
11701
|
*/
|
11679
11702
|
nextPage(): boolean;
|
11703
|
+
performNext(): boolean;
|
11704
|
+
performPrevious(): boolean;
|
11680
11705
|
private hasErrorsOnNavigate;
|
11681
11706
|
private asyncValidationQuesitons;
|
11682
11707
|
private checkForAsyncQuestionValidation;
|
@@ -11778,6 +11803,8 @@ declare module "packages/survey-core/src/survey" {
|
|
11778
11803
|
private doCurrentPageCompleteCore;
|
11779
11804
|
get isSinglePage(): boolean;
|
11780
11805
|
set isSinglePage(val: boolean);
|
11806
|
+
get isSingleVisibleQuestion(): boolean;
|
11807
|
+
private isSingleVisibleQuestionVal;
|
11781
11808
|
/**
|
11782
11809
|
* Specifies how to distribute survey elements between pages.
|
11783
11810
|
*
|
@@ -11817,17 +11844,17 @@ declare module "packages/survey-core/src/survey" {
|
|
11817
11844
|
get isShowPreviewBeforeComplete(): boolean;
|
11818
11845
|
protected onFirstPageIsStartedChanged(): void;
|
11819
11846
|
private runningPages;
|
11847
|
+
private pageContainerValue;
|
11820
11848
|
private onShowingPreviewChanged;
|
11849
|
+
private createRootPage;
|
11850
|
+
private disposeContainerPage;
|
11851
|
+
private updatePagesContainer;
|
11852
|
+
private currentSingleQuestionValue;
|
11853
|
+
get currentSingleQuestion(): Question;
|
11854
|
+
set currentSingleQuestion(val: Question);
|
11821
11855
|
private changeCurrentPageFromPreview;
|
11822
|
-
|
11823
|
-
protected onQuestionsOnPageModeChanged(oldValue: string, isFirstLoad?: boolean): void;
|
11824
|
-
private restoreOriginalPages;
|
11856
|
+
protected onQuestionsOnPageModeChanged(oldValue: string): void;
|
11825
11857
|
private getPageStartIndex;
|
11826
|
-
private isLockingUpdateOnPageModes;
|
11827
|
-
private setupPagesForPageModes;
|
11828
|
-
private createPagesForQuestionOnPageMode;
|
11829
|
-
private createSinglePage;
|
11830
|
-
private createPagesForEveryQuestion;
|
11831
11858
|
/**
|
11832
11859
|
* Indicates whether the [current page](#currentPage) is the first page.
|
11833
11860
|
*
|
@@ -11844,7 +11871,11 @@ declare module "packages/survey-core/src/survey" {
|
|
11844
11871
|
get isCompleteButtonVisible(): boolean;
|
11845
11872
|
get isPreviewButtonVisible(): boolean;
|
11846
11873
|
get isCancelPreviewButtonVisible(): boolean;
|
11874
|
+
get isFirstElement(): boolean | undefined;
|
11875
|
+
get isLastElement(): boolean | undefined;
|
11847
11876
|
private updateIsFirstLastPageState;
|
11877
|
+
private get isLastPageOrElement();
|
11878
|
+
private get isFirstPageOrElement();
|
11848
11879
|
private calcIsShowPrevButton;
|
11849
11880
|
private calcIsShowNextButton;
|
11850
11881
|
calcIsCompleteButtonVisible(): boolean;
|
@@ -12701,22 +12732,32 @@ declare module "packages/survey-core/src/survey-element" {
|
|
12701
12732
|
protected createLocTitleProperty(): LocalizableString;
|
12702
12733
|
/**
|
12703
12734
|
* Returns `true` if the survey element is a page.
|
12704
|
-
*
|
12735
|
+
*
|
12736
|
+
* This property returns `false` for [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model) objects in the following cases:
|
12737
|
+
*
|
12738
|
+
* - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
|
12739
|
+
* - 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).
|
12740
|
+
*
|
12741
|
+
* In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and all regular pages become panels.
|
12705
12742
|
*/
|
12706
12743
|
get isPage(): boolean;
|
12707
12744
|
/**
|
12708
|
-
* Returns `true` if the survey element is a panel.
|
12709
|
-
*
|
12745
|
+
* Returns `true` if the survey element is a panel or acts as one.
|
12746
|
+
*
|
12747
|
+
* This property returns `true` for `PageModel` objects in the following cases:
|
12748
|
+
*
|
12749
|
+
* - `SurveyModel`'s [`questionsOnPageMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#questionsOnPageMode) is set to `"singlePage"`.
|
12750
|
+
* - 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).
|
12751
|
+
*
|
12752
|
+
* In those cases, the survey creates an internal `PageModel` object to show all questions on one page, and all regular pages become panels.
|
12710
12753
|
*/
|
12711
12754
|
get isPanel(): boolean;
|
12712
12755
|
/**
|
12713
12756
|
* Returns `true` if the survey element is a question.
|
12714
|
-
* @see Base.getType
|
12715
12757
|
*/
|
12716
12758
|
get isQuestion(): boolean;
|
12717
12759
|
/**
|
12718
12760
|
* Returns `true` if the element is a survey.
|
12719
|
-
* @see Base.getType
|
12720
12761
|
*/
|
12721
12762
|
get isSurvey(): boolean;
|
12722
12763
|
/**
|
@@ -12942,6 +12983,7 @@ declare module "packages/survey-core/src/survey-element" {
|
|
12942
12983
|
get cssClassesValue(): any;
|
12943
12984
|
private ensureCssClassesValue;
|
12944
12985
|
private createCssClassesValue;
|
12986
|
+
protected onCalcCssClasses(classes: any): void;
|
12945
12987
|
/**
|
12946
12988
|
* Returns an object in which keys are UI elements and values are CSS classes applied to them.
|
12947
12989
|
*
|
@@ -13599,6 +13641,7 @@ declare module "packages/survey-core/src/question" {
|
|
13599
13641
|
get startWithNewLine(): boolean;
|
13600
13642
|
set startWithNewLine(val: boolean);
|
13601
13643
|
protected calcCssClasses(css: any): any;
|
13644
|
+
protected onCalcCssClasses(classes: any): void;
|
13602
13645
|
get cssRoot(): string;
|
13603
13646
|
protected setCssRoot(val: string): void;
|
13604
13647
|
protected getCssRoot(cssClasses: {
|
@@ -13629,7 +13672,9 @@ declare module "packages/survey-core/src/question" {
|
|
13629
13672
|
protected hasCssError(): boolean;
|
13630
13673
|
getRootCss(): string;
|
13631
13674
|
getQuestionRootCss(): string;
|
13675
|
+
private isRequireUpdateElements;
|
13632
13676
|
updateElementCss(reNew?: boolean): void;
|
13677
|
+
protected onFirstRenderingCore(): void;
|
13633
13678
|
protected updateQuestionCss(reNew?: boolean): void;
|
13634
13679
|
private ensureElementCss;
|
13635
13680
|
protected updateElementCssCore(cssClasses: any): void;
|
@@ -15025,6 +15070,7 @@ declare module "packages/survey-core/src/base-interfaces" {
|
|
15025
15070
|
isDisplayMode: boolean;
|
15026
15071
|
isDesignMode: boolean;
|
15027
15072
|
areInvisibleElementsShowing: boolean;
|
15073
|
+
currentSingleQuestion: IQuestion;
|
15028
15074
|
areEmptyElementsHidden: boolean;
|
15029
15075
|
isLoadingFromJson: boolean;
|
15030
15076
|
isUpdateValueTextOnTyping: boolean;
|
@@ -16257,6 +16303,7 @@ declare module "packages/survey-core/src/popup" {
|
|
16257
16303
|
}
|
16258
16304
|
declare module "packages/survey-core/src/settings" {
|
16259
16305
|
import { IDialogOptions } from "packages/survey-core/src/popup";
|
16306
|
+
import { IConfirmDialogOptions } from "packages/survey-core/src/utils/utils";
|
16260
16307
|
export type ISurveyEnvironment = {
|
16261
16308
|
root: Document | ShadowRoot;
|
16262
16309
|
rootElement: HTMLElement | ShadowRoot;
|
@@ -16638,7 +16685,7 @@ declare module "packages/survey-core/src/settings" {
|
|
16638
16685
|
* @param message A message to be displayed in the confirm dialog window.
|
16639
16686
|
* @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
|
16640
16687
|
*/
|
16641
|
-
confirmActionAsync: (message: string, callback: (res: boolean) => void,
|
16688
|
+
confirmActionAsync: (message: string, callback: (res: boolean) => void, options?: IConfirmDialogOptions) => boolean;
|
16642
16689
|
/**
|
16643
16690
|
* A minimum width value for all survey elements.
|
16644
16691
|
*
|
@@ -19437,7 +19484,7 @@ declare module "packages/survey-core/entries/chunks/model" {
|
|
19437
19484
|
export { Cover, CoverCell } from "packages/survey-core/src/header";
|
19438
19485
|
export { dxSurveyService } from "packages/survey-core/src/dxSurveyService";
|
19439
19486
|
export { englishStrings } from "packages/survey-core/src/localization/english";
|
19440
|
-
export { surveyLocalization, surveyStrings, getLocaleString, setupLocale } from "packages/survey-core/src/surveyStrings";
|
19487
|
+
export { surveyLocalization, surveyStrings, getLocaleString, getLocaleStrings, setupLocale } from "packages/survey-core/src/surveyStrings";
|
19441
19488
|
export { QuestionCustomWidget, CustomWidgetCollection, } from "packages/survey-core/src/questionCustomWidgets";
|
19442
19489
|
export { QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ICustomQuestionTypeConfiguration } from "packages/survey-core/src/question_custom";
|
19443
19490
|
export { ListModel } from "packages/survey-core/src/list";
|