survey-react 1.9.136 → 1.9.137
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 +333 -9
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +187 -1
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.css.map +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +337 -124
- package/survey.react.js +1170 -207
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.d.ts
CHANGED
@@ -650,15 +650,95 @@ declare module "utils/cssClassBuilder" {
|
|
650
650
|
toString(): string;
|
651
651
|
}
|
652
652
|
}
|
653
|
+
declare module "utils/taskmanager" {
|
654
|
+
export interface IExecutable {
|
655
|
+
id?: string;
|
656
|
+
execute: () => void;
|
657
|
+
isCompleted: boolean;
|
658
|
+
dispose?: () => void;
|
659
|
+
}
|
660
|
+
export class Task implements IExecutable {
|
661
|
+
private func;
|
662
|
+
private isMultiple;
|
663
|
+
private _isCompleted;
|
664
|
+
constructor(func: () => void, isMultiple?: boolean);
|
665
|
+
execute: () => void;
|
666
|
+
discard(): void;
|
667
|
+
get isCompleted(): boolean;
|
668
|
+
}
|
669
|
+
export class TaskManger {
|
670
|
+
private interval;
|
671
|
+
private static instance;
|
672
|
+
private static tasks;
|
673
|
+
private constructor();
|
674
|
+
static Instance(): TaskManger;
|
675
|
+
private tick;
|
676
|
+
static schedule(task: IExecutable): void;
|
677
|
+
}
|
678
|
+
export function debounce<T extends (...args: any) => void>(func: T): {
|
679
|
+
run: T;
|
680
|
+
cancel: () => void;
|
681
|
+
};
|
682
|
+
}
|
683
|
+
declare module "utils/animation" {
|
684
|
+
export interface AnimationOptions {
|
685
|
+
cssClass: string;
|
686
|
+
onBeforeRunAnimation?: (element: HTMLElement) => void;
|
687
|
+
onAfterRunAnimation?: (element: HTMLElement) => void;
|
688
|
+
}
|
689
|
+
export interface IAnimationConsumer<T extends Array<any> = []> {
|
690
|
+
getLeaveOptions(...args: T): AnimationOptions;
|
691
|
+
getEnterOptions(...args: T): AnimationOptions;
|
692
|
+
getAnimatedElement(...args: T): HTMLElement;
|
693
|
+
isAnimationEnabled(): boolean;
|
694
|
+
}
|
695
|
+
export class AnimationUtils {
|
696
|
+
private getMsFromRule;
|
697
|
+
private getAnimationsCount;
|
698
|
+
private getAnimationDuration;
|
699
|
+
private cancelQueue;
|
700
|
+
protected onAnimationEnd(element: HTMLElement, callback: (isCancel?: boolean) => void, options: AnimationOptions): void;
|
701
|
+
protected beforeAnimationRun(element: HTMLElement, options: AnimationOptions | AnimationOptions): void;
|
702
|
+
protected runLeaveAnimation(element: HTMLElement, options: AnimationOptions, callback: () => void): void;
|
703
|
+
protected runEnterAnimation(element: HTMLElement, options: AnimationOptions): void;
|
704
|
+
cancel(): void;
|
705
|
+
}
|
706
|
+
export class AnimationPropertyUtils extends AnimationUtils {
|
707
|
+
onEnter(getElement: () => HTMLElement, options: AnimationOptions): void;
|
708
|
+
onLeave(getElement: () => HTMLElement, callback: () => void, options: AnimationOptions): void;
|
709
|
+
}
|
710
|
+
export class AnimationGroupUtils<T> extends AnimationUtils {
|
711
|
+
onEnter(getElement: (el: T) => HTMLElement, getOptions: (el: T) => AnimationOptions, elements: Array<T>): void;
|
712
|
+
onLeave(getElement: (el: T) => HTMLElement, callback: () => void, getOptions: (el: T) => AnimationOptions, elements: Array<T>): void;
|
713
|
+
}
|
714
|
+
abstract class AnimationProperty<T, S extends Array<any> = []> {
|
715
|
+
protected animationOptions: IAnimationConsumer<S>;
|
716
|
+
protected update: (val: T) => void;
|
717
|
+
protected getCurrentValue: () => T;
|
718
|
+
constructor(animationOptions: IAnimationConsumer<S>, update: (val: T) => void, getCurrentValue: () => T);
|
719
|
+
protected animation: AnimationUtils;
|
720
|
+
protected abstract _sync(newValue: T): void;
|
721
|
+
private _debouncedSync;
|
722
|
+
sync(newValue: T): void;
|
723
|
+
cancel(): void;
|
724
|
+
}
|
725
|
+
export class AnimationBoolean extends AnimationProperty<boolean> {
|
726
|
+
protected animation: AnimationPropertyUtils;
|
727
|
+
protected _sync(newValue: boolean): void;
|
728
|
+
}
|
729
|
+
export class AnimationGroup<T> extends AnimationProperty<Array<T>, [T]> {
|
730
|
+
protected animation: AnimationGroupUtils<T>;
|
731
|
+
protected _sync(newValue: Array<T>): void;
|
732
|
+
}
|
733
|
+
}
|
653
734
|
declare module "popup-view-model" {
|
654
|
-
import { Base } from "base";
|
735
|
+
import { Base, EventBase } from "base";
|
655
736
|
import { PopupModel } from "popup";
|
656
737
|
import { CssClassBuilder } from "utils/cssClassBuilder";
|
657
738
|
import { ActionContainer } from "actions/container";
|
739
|
+
import { AnimationOptions, IAnimationConsumer } from "utils/animation";
|
658
740
|
export const FOCUS_INPUT_SELECTOR = "input:not(:disabled):not([readonly]):not([type=hidden]),select:not(:disabled):not([readonly]),textarea:not(:disabled):not([readonly]), button:not(:disabled):not([readonly]), [tabindex]:not([tabindex^=\"-\"])";
|
659
|
-
export class PopupBaseViewModel extends Base {
|
660
|
-
private static SubscriptionId;
|
661
|
-
private subscriptionId;
|
741
|
+
export class PopupBaseViewModel extends Base implements IAnimationConsumer {
|
662
742
|
protected popupSelector: string;
|
663
743
|
protected fixedPopupContainer: string;
|
664
744
|
protected containerSelector: string;
|
@@ -670,8 +750,18 @@ declare module "popup-view-model" {
|
|
670
750
|
height: string;
|
671
751
|
width: string;
|
672
752
|
minWidth: string;
|
673
|
-
|
753
|
+
_isVisible: boolean;
|
674
754
|
locale: string;
|
755
|
+
private updateIsVisible;
|
756
|
+
private visibilityAnimation;
|
757
|
+
getLeaveOptions(): AnimationOptions;
|
758
|
+
getEnterOptions(): AnimationOptions;
|
759
|
+
getAnimatedElement(): HTMLElement;
|
760
|
+
isAnimationEnabled(): boolean;
|
761
|
+
private getAnimationContainer;
|
762
|
+
set isVisible(val: boolean);
|
763
|
+
get isVisible(): boolean;
|
764
|
+
onVisibilityChanged: EventBase<PopupBaseViewModel, any>;
|
675
765
|
get container(): HTMLElement;
|
676
766
|
private containerElement;
|
677
767
|
private createdContainer;
|
@@ -684,6 +774,7 @@ declare module "popup-view-model" {
|
|
684
774
|
protected createFooterActionBar(): void;
|
685
775
|
protected resetDimensionsAndPositionStyleProperties(): void;
|
686
776
|
protected onModelChanging(newModel: PopupModel): void;
|
777
|
+
private onModelIsVisibleChangedCallback;
|
687
778
|
private setupModel;
|
688
779
|
private _model;
|
689
780
|
get model(): PopupModel;
|
@@ -1357,6 +1448,10 @@ declare module "defaultCss/defaultV2Css" {
|
|
1357
1448
|
edit: string;
|
1358
1449
|
};
|
1359
1450
|
panel: {
|
1451
|
+
contentFadeIn: string;
|
1452
|
+
contentFadeOut: string;
|
1453
|
+
fadeIn: string;
|
1454
|
+
fadeOut: string;
|
1360
1455
|
asPage: string;
|
1361
1456
|
number: string;
|
1362
1457
|
title: string;
|
@@ -1379,6 +1474,8 @@ declare module "defaultCss/defaultV2Css" {
|
|
1379
1474
|
header: string;
|
1380
1475
|
collapsed: string;
|
1381
1476
|
expanded: string;
|
1477
|
+
expandable: string;
|
1478
|
+
expandableAnimating: string;
|
1382
1479
|
nested: string;
|
1383
1480
|
invisible: string;
|
1384
1481
|
navigationButton: string;
|
@@ -1466,8 +1563,14 @@ declare module "defaultCss/defaultV2Css" {
|
|
1466
1563
|
row: string;
|
1467
1564
|
rowMultiple: string;
|
1468
1565
|
rowCompact: string;
|
1566
|
+
rowFadeIn: string;
|
1567
|
+
rowFadeOut: string;
|
1469
1568
|
pageRow: string;
|
1470
1569
|
question: {
|
1570
|
+
contentFadeIn: string;
|
1571
|
+
contentFadeOut: string;
|
1572
|
+
fadeIn: string;
|
1573
|
+
fadeOut: string;
|
1471
1574
|
mainRoot: string;
|
1472
1575
|
flowRoot: string;
|
1473
1576
|
withFrame: string;
|
@@ -1510,6 +1613,8 @@ declare module "defaultCss/defaultV2Css" {
|
|
1510
1613
|
hasErrorTop: string;
|
1511
1614
|
hasErrorBottom: string;
|
1512
1615
|
collapsed: string;
|
1616
|
+
expandable: string;
|
1617
|
+
expandableAnimating: string;
|
1513
1618
|
expanded: string;
|
1514
1619
|
nested: string;
|
1515
1620
|
invisible: string;
|
@@ -2334,6 +2439,89 @@ declare module "textPreProcessor" {
|
|
2334
2439
|
private processTextCore;
|
2335
2440
|
}
|
2336
2441
|
}
|
2442
|
+
declare module "error" {
|
2443
|
+
import { SurveyError } from "survey-error";
|
2444
|
+
import { ISurveyErrorOwner } from "base-interfaces";
|
2445
|
+
export class AnswerRequiredError extends SurveyError {
|
2446
|
+
text: string;
|
2447
|
+
constructor(text?: string, errorOwner?: ISurveyErrorOwner);
|
2448
|
+
getErrorType(): string;
|
2449
|
+
protected getDefaultText(): string;
|
2450
|
+
}
|
2451
|
+
export class OneAnswerRequiredError extends SurveyError {
|
2452
|
+
text: string;
|
2453
|
+
constructor(text?: string, errorOwner?: ISurveyErrorOwner);
|
2454
|
+
getErrorType(): string;
|
2455
|
+
protected getDefaultText(): string;
|
2456
|
+
}
|
2457
|
+
export class RequreNumericError extends SurveyError {
|
2458
|
+
text: string;
|
2459
|
+
constructor(text?: string, errorOwner?: ISurveyErrorOwner);
|
2460
|
+
getErrorType(): string;
|
2461
|
+
protected getDefaultText(): string;
|
2462
|
+
}
|
2463
|
+
export class ExceedSizeError extends SurveyError {
|
2464
|
+
private maxSize;
|
2465
|
+
constructor(maxSize: number, errorOwner?: ISurveyErrorOwner);
|
2466
|
+
getErrorType(): string;
|
2467
|
+
getDefaultText(): string;
|
2468
|
+
private getTextSize;
|
2469
|
+
}
|
2470
|
+
export class WebRequestError extends SurveyError {
|
2471
|
+
status: string;
|
2472
|
+
response: string;
|
2473
|
+
constructor(status: string, response: string, errorOwner?: ISurveyErrorOwner);
|
2474
|
+
getErrorType(): string;
|
2475
|
+
protected getDefaultText(): string;
|
2476
|
+
}
|
2477
|
+
export class WebRequestEmptyError extends SurveyError {
|
2478
|
+
text: string;
|
2479
|
+
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2480
|
+
getErrorType(): string;
|
2481
|
+
protected getDefaultText(): string;
|
2482
|
+
}
|
2483
|
+
export class OtherEmptyError extends SurveyError {
|
2484
|
+
text: string;
|
2485
|
+
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2486
|
+
getErrorType(): string;
|
2487
|
+
protected getDefaultText(): string;
|
2488
|
+
}
|
2489
|
+
export class UploadingFileError extends SurveyError {
|
2490
|
+
text: string;
|
2491
|
+
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2492
|
+
getErrorType(): string;
|
2493
|
+
protected getDefaultText(): string;
|
2494
|
+
}
|
2495
|
+
export class RequiredInAllRowsError extends SurveyError {
|
2496
|
+
text: string;
|
2497
|
+
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2498
|
+
getErrorType(): string;
|
2499
|
+
protected getDefaultText(): string;
|
2500
|
+
}
|
2501
|
+
export class EachRowUniqueError extends SurveyError {
|
2502
|
+
text: string;
|
2503
|
+
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2504
|
+
getErrorType(): string;
|
2505
|
+
protected getDefaultText(): string;
|
2506
|
+
}
|
2507
|
+
export class MinRowCountError extends SurveyError {
|
2508
|
+
minRowCount: number;
|
2509
|
+
constructor(minRowCount: number, errorOwner?: ISurveyErrorOwner);
|
2510
|
+
getErrorType(): string;
|
2511
|
+
protected getDefaultText(): string;
|
2512
|
+
}
|
2513
|
+
export class KeyDuplicationError extends SurveyError {
|
2514
|
+
text: string;
|
2515
|
+
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2516
|
+
getErrorType(): string;
|
2517
|
+
protected getDefaultText(): string;
|
2518
|
+
}
|
2519
|
+
export class CustomError extends SurveyError {
|
2520
|
+
text: string;
|
2521
|
+
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2522
|
+
getErrorType(): string;
|
2523
|
+
}
|
2524
|
+
}
|
2337
2525
|
declare module "question_custom" {
|
2338
2526
|
import { Question, IConditionObject } from "question";
|
2339
2527
|
import { JsonObjectProperty } from "jsonobject";
|
@@ -2343,6 +2531,7 @@ declare module "question_custom" {
|
|
2343
2531
|
import { PanelModel } from "panel";
|
2344
2532
|
import { HashTable } from "helpers";
|
2345
2533
|
import { ItemValue } from "itemvalue";
|
2534
|
+
import { SurveyError } from "survey-error";
|
2346
2535
|
/**
|
2347
2536
|
* An interface used to create custom question types.
|
2348
2537
|
*
|
@@ -2561,6 +2750,12 @@ declare module "question_custom" {
|
|
2561
2750
|
* @see questionJSON
|
2562
2751
|
*/
|
2563
2752
|
createQuestion?: any;
|
2753
|
+
/**
|
2754
|
+
* A function that allows you to display different error texts based on conditions.
|
2755
|
+
* @param question A custom question. Use the `question.value` property to access the question's value.
|
2756
|
+
* @returns An error text.
|
2757
|
+
*/
|
2758
|
+
getErrorText?: (question: Question) => string;
|
2564
2759
|
valueToQuestion?: (val: any) => any;
|
2565
2760
|
valueFromQuestion?: (val: any) => any;
|
2566
2761
|
getValue?: (val: any) => any;
|
@@ -2580,6 +2775,7 @@ declare module "question_custom" {
|
|
2580
2775
|
onPropertyChanged(question: Question, propertyName: string, newValue: any): void;
|
2581
2776
|
onValueChanged(question: Question, name: string, newValue: any): void;
|
2582
2777
|
onValueChanging(question: Question, name: string, newValue: any): any;
|
2778
|
+
onGetErrorText(question: Question): string;
|
2583
2779
|
onItemValuePropertyChanged(question: Question, item: ItemValue, propertyName: string, name: string, newValue: any): void;
|
2584
2780
|
getDisplayValue(keyAsText: boolean, value: any, question: Question): any;
|
2585
2781
|
get defaultQuestionTitle(): any;
|
@@ -2632,6 +2828,7 @@ declare module "question_custom" {
|
|
2632
2828
|
protected onUpdateQuestionCssClasses(element: Question, css: any): void;
|
2633
2829
|
protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
|
2634
2830
|
protected setNewValue(newValue: any): void;
|
2831
|
+
protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
|
2635
2832
|
getSurveyData(): ISurveyData;
|
2636
2833
|
getTextProcessor(): ITextProcessor;
|
2637
2834
|
getValue(name: string): any;
|
@@ -2771,89 +2968,6 @@ declare module "questionfactory" {
|
|
2771
2968
|
createElement(elementType: string, name: string): IElement;
|
2772
2969
|
}
|
2773
2970
|
}
|
2774
|
-
declare module "error" {
|
2775
|
-
import { SurveyError } from "survey-error";
|
2776
|
-
import { ISurveyErrorOwner } from "base-interfaces";
|
2777
|
-
export class AnswerRequiredError extends SurveyError {
|
2778
|
-
text: string;
|
2779
|
-
constructor(text?: string, errorOwner?: ISurveyErrorOwner);
|
2780
|
-
getErrorType(): string;
|
2781
|
-
protected getDefaultText(): string;
|
2782
|
-
}
|
2783
|
-
export class OneAnswerRequiredError extends SurveyError {
|
2784
|
-
text: string;
|
2785
|
-
constructor(text?: string, errorOwner?: ISurveyErrorOwner);
|
2786
|
-
getErrorType(): string;
|
2787
|
-
protected getDefaultText(): string;
|
2788
|
-
}
|
2789
|
-
export class RequreNumericError extends SurveyError {
|
2790
|
-
text: string;
|
2791
|
-
constructor(text?: string, errorOwner?: ISurveyErrorOwner);
|
2792
|
-
getErrorType(): string;
|
2793
|
-
protected getDefaultText(): string;
|
2794
|
-
}
|
2795
|
-
export class ExceedSizeError extends SurveyError {
|
2796
|
-
private maxSize;
|
2797
|
-
constructor(maxSize: number, errorOwner?: ISurveyErrorOwner);
|
2798
|
-
getErrorType(): string;
|
2799
|
-
getDefaultText(): string;
|
2800
|
-
private getTextSize;
|
2801
|
-
}
|
2802
|
-
export class WebRequestError extends SurveyError {
|
2803
|
-
status: string;
|
2804
|
-
response: string;
|
2805
|
-
constructor(status: string, response: string, errorOwner?: ISurveyErrorOwner);
|
2806
|
-
getErrorType(): string;
|
2807
|
-
protected getDefaultText(): string;
|
2808
|
-
}
|
2809
|
-
export class WebRequestEmptyError extends SurveyError {
|
2810
|
-
text: string;
|
2811
|
-
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2812
|
-
getErrorType(): string;
|
2813
|
-
protected getDefaultText(): string;
|
2814
|
-
}
|
2815
|
-
export class OtherEmptyError extends SurveyError {
|
2816
|
-
text: string;
|
2817
|
-
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2818
|
-
getErrorType(): string;
|
2819
|
-
protected getDefaultText(): string;
|
2820
|
-
}
|
2821
|
-
export class UploadingFileError extends SurveyError {
|
2822
|
-
text: string;
|
2823
|
-
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2824
|
-
getErrorType(): string;
|
2825
|
-
protected getDefaultText(): string;
|
2826
|
-
}
|
2827
|
-
export class RequiredInAllRowsError extends SurveyError {
|
2828
|
-
text: string;
|
2829
|
-
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2830
|
-
getErrorType(): string;
|
2831
|
-
protected getDefaultText(): string;
|
2832
|
-
}
|
2833
|
-
export class EachRowUniqueError extends SurveyError {
|
2834
|
-
text: string;
|
2835
|
-
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2836
|
-
getErrorType(): string;
|
2837
|
-
protected getDefaultText(): string;
|
2838
|
-
}
|
2839
|
-
export class MinRowCountError extends SurveyError {
|
2840
|
-
minRowCount: number;
|
2841
|
-
constructor(minRowCount: number, errorOwner?: ISurveyErrorOwner);
|
2842
|
-
getErrorType(): string;
|
2843
|
-
protected getDefaultText(): string;
|
2844
|
-
}
|
2845
|
-
export class KeyDuplicationError extends SurveyError {
|
2846
|
-
text: string;
|
2847
|
-
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2848
|
-
getErrorType(): string;
|
2849
|
-
protected getDefaultText(): string;
|
2850
|
-
}
|
2851
|
-
export class CustomError extends SurveyError {
|
2852
|
-
text: string;
|
2853
|
-
constructor(text: string, errorOwner?: ISurveyErrorOwner);
|
2854
|
-
getErrorType(): string;
|
2855
|
-
}
|
2856
|
-
}
|
2857
2971
|
declare module "drag-drop-helper-v1" {
|
2858
2972
|
import { IElement, ISurveyElement } from "base-interfaces";
|
2859
2973
|
export class DragDropInfo {
|
@@ -2896,6 +3010,7 @@ declare module "panel" {
|
|
2896
3010
|
import { IAction } from "actions/action";
|
2897
3011
|
import { ActionContainer } from "actions/container";
|
2898
3012
|
import { DragDropInfo } from "drag-drop-helper-v1";
|
3013
|
+
import { AnimationGroup } from "utils/animation";
|
2899
3014
|
export class QuestionRowModel extends Base {
|
2900
3015
|
panel: PanelModelBase;
|
2901
3016
|
private static rowCounter;
|
@@ -2911,8 +3026,13 @@ declare module "panel" {
|
|
2911
3026
|
setIsLazyRendering(val: boolean): void;
|
2912
3027
|
isLazyRendering(): boolean;
|
2913
3028
|
get id(): string;
|
3029
|
+
protected equalsCore(obj: Base): boolean;
|
2914
3030
|
get elements(): Array<IElement>;
|
3031
|
+
private getVisibleElementsAnimationOptions;
|
3032
|
+
visibleElementsAnimation: AnimationGroup<IElement>;
|
3033
|
+
set visibleElements(val: Array<IElement>);
|
2915
3034
|
get visibleElements(): Array<IElement>;
|
3035
|
+
onVisibleChangedCallback: () => void;
|
2916
3036
|
get visible(): boolean;
|
2917
3037
|
set visible(val: boolean);
|
2918
3038
|
get isNeedRender(): boolean;
|
@@ -2924,11 +3044,12 @@ declare module "panel" {
|
|
2924
3044
|
private getRenderedCalcWidth;
|
2925
3045
|
private getElementWidth;
|
2926
3046
|
private getRenderedWidthFromWidth;
|
2927
|
-
private calcVisible;
|
2928
|
-
private needToUpdateVisibleElements;
|
2929
3047
|
dragTypeOverMe: DragTypeOverMeEnum;
|
2930
3048
|
dispose(): void;
|
2931
3049
|
getRowCss(): string;
|
3050
|
+
private rootElement?;
|
3051
|
+
setRootElement(element?: HTMLElement): void;
|
3052
|
+
getRootElement(): HTMLElement;
|
2932
3053
|
}
|
2933
3054
|
/**
|
2934
3055
|
* A base class for the [PanelModel](https://surveyjs.io/form-library/documentation/panelmodel) and [PageModel](https://surveyjs.io/form-library/documentation/pagemodel) classes.
|
@@ -2943,6 +3064,13 @@ declare module "panel" {
|
|
2943
3064
|
removeElementCallback: (element: IElement) => void;
|
2944
3065
|
onGetQuestionTitleLocation: () => string;
|
2945
3066
|
private dragDropPanelHelper;
|
3067
|
+
onAddRow(row: QuestionRowModel): void;
|
3068
|
+
private getRowsAnimationOptions;
|
3069
|
+
private rowsAnimation;
|
3070
|
+
get visibleRows(): Array<QuestionRowModel>;
|
3071
|
+
set visibleRows(val: Array<QuestionRowModel>);
|
3072
|
+
onRemoveRow(row: QuestionRowModel): void;
|
3073
|
+
onRowVisibleChanged(): void;
|
2946
3074
|
constructor(name?: string);
|
2947
3075
|
getType(): string;
|
2948
3076
|
setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
|
@@ -3214,7 +3342,8 @@ declare module "panel" {
|
|
3214
3342
|
* @see visible
|
3215
3343
|
*/
|
3216
3344
|
get isVisible(): boolean;
|
3217
|
-
|
3345
|
+
getIsContentVisible(exceptionQuestion?: IQuestion): boolean;
|
3346
|
+
getIsPageVisible(exceptionQuestion?: IQuestion): boolean;
|
3218
3347
|
private lastVisibleIndex;
|
3219
3348
|
setVisibleIndex(index: number): number;
|
3220
3349
|
private updateVisibleIndexes;
|
@@ -4833,10 +4962,9 @@ declare module "question_matrixdropdowncolumn" {
|
|
4833
4962
|
get locTitle(): LocalizableString;
|
4834
4963
|
get fullTitle(): string;
|
4835
4964
|
/**
|
4836
|
-
* Marks the column as required. If a respondent skips any cell in a required column, the matrix displays a validation error.
|
4965
|
+
* Marks the column as required. If a respondent skips any cell in a required column, the matrix displays a [validation error](#requiredErrorText).
|
4837
4966
|
*
|
4838
4967
|
* If you want to mark the column as required based on a condition, specify the [`requiredIf`](#requiredIf) property.
|
4839
|
-
* @see requiredErrorText
|
4840
4968
|
* @see visible
|
4841
4969
|
* @see readOnly
|
4842
4970
|
*/
|
@@ -8260,6 +8388,8 @@ declare module "question_text" {
|
|
8260
8388
|
onSurveyLoad(): void;
|
8261
8389
|
/**
|
8262
8390
|
* A value passed on to the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types) attribute of the underlying `<input>` element.
|
8391
|
+
*
|
8392
|
+
* Default value: `"text"`
|
8263
8393
|
*/
|
8264
8394
|
get inputType(): string;
|
8265
8395
|
set inputType(val: string);
|
@@ -8390,6 +8520,7 @@ declare module "question_multipletext" {
|
|
8390
8520
|
import { SurveyError } from "survey-error";
|
8391
8521
|
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
8392
8522
|
import { HashTable } from "helpers";
|
8523
|
+
import { InputMaskBase } from "mask/mask_base";
|
8393
8524
|
export interface IMultipleTextData extends ILocalizableOwner, IPanel {
|
8394
8525
|
getSurvey(): ISurvey;
|
8395
8526
|
getTextProcessor(): ITextProcessor;
|
@@ -8405,9 +8536,9 @@ declare module "question_multipletext" {
|
|
8405
8536
|
get a11y_input_ariaDescribedBy(): string;
|
8406
8537
|
}
|
8407
8538
|
/**
|
8408
|
-
* A class that describes an item
|
8539
|
+
* A class that describes an [item](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model#items) in a Multiple Textboxes question.
|
8409
8540
|
*
|
8410
|
-
* [View Demo](https://surveyjs.io/form-library/examples/multiple-text-box-question/)
|
8541
|
+
* [View Demo](https://surveyjs.io/form-library/examples/multiple-text-box-question/ (linkStyle))
|
8411
8542
|
*/
|
8412
8543
|
export class MultipleTextItemModel extends Base implements IValidatorOwner, ISurveyData, ISurveyImpl {
|
8413
8544
|
private editorValue;
|
@@ -8418,7 +8549,10 @@ declare module "question_multipletext" {
|
|
8418
8549
|
get id(): string;
|
8419
8550
|
getOriginalObj(): Base;
|
8420
8551
|
/**
|
8421
|
-
*
|
8552
|
+
* An item ID that is not visible to respondents.
|
8553
|
+
*
|
8554
|
+
* > Item IDs must be unique.
|
8555
|
+
* @see title
|
8422
8556
|
*/
|
8423
8557
|
get name(): string;
|
8424
8558
|
set name(val: string);
|
@@ -8431,33 +8565,34 @@ declare module "question_multipletext" {
|
|
8431
8565
|
setData(data: IMultipleTextData): void;
|
8432
8566
|
focusIn: () => void;
|
8433
8567
|
/**
|
8434
|
-
*
|
8568
|
+
* Marks the item as required. If a respondent leaves this item empty, the question displays a [validation error](#requiredErrorText).
|
8435
8569
|
*/
|
8436
8570
|
get isRequired(): boolean;
|
8437
8571
|
set isRequired(val: boolean);
|
8438
8572
|
/**
|
8439
|
-
*
|
8573
|
+
* A value passed on to the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types) attribute of the underlying `<input>` element.
|
8574
|
+
*
|
8575
|
+
* Default value: `"text"`
|
8440
8576
|
*/
|
8441
8577
|
get inputType(): string;
|
8442
8578
|
set inputType(val: string);
|
8443
8579
|
/**
|
8444
|
-
*
|
8445
|
-
* @see name
|
8580
|
+
* A user-friendly item label to display. If `title` is undefined, [`name`](https://surveyjs.io/form-library/documentation/api-reference/multipletextitemmodel#name) is displayed instead.
|
8446
8581
|
*/
|
8447
8582
|
get title(): string;
|
8448
8583
|
set title(val: string);
|
8449
8584
|
get locTitle(): LocalizableString;
|
8450
8585
|
get fullTitle(): string;
|
8451
8586
|
/**
|
8452
|
-
* The maximum text length
|
8453
|
-
*
|
8454
|
-
*
|
8587
|
+
* The maximum text length measured in characters. Assign 0 if the length should be unlimited.
|
8588
|
+
*
|
8589
|
+
* Default value: -1 (inherits the actual value from the `SurveyModel`'s [`maxTextLength`](https://surveyjs.io/form-library/documentation/surveymodel#maxTextLength) property).
|
8455
8590
|
*/
|
8456
8591
|
get maxLength(): number;
|
8457
8592
|
set maxLength(val: number);
|
8458
8593
|
getMaxLength(): any;
|
8459
8594
|
/**
|
8460
|
-
*
|
8595
|
+
* A placeholder for the input field.
|
8461
8596
|
*/
|
8462
8597
|
get placeholder(): string;
|
8463
8598
|
set placeholder(val: string);
|
@@ -8466,39 +8601,83 @@ declare module "question_multipletext" {
|
|
8466
8601
|
set placeHolder(val: string);
|
8467
8602
|
get locPlaceHolder(): LocalizableString;
|
8468
8603
|
/**
|
8469
|
-
*
|
8604
|
+
* Specifies a custom error message for a [required item](#isRequired).
|
8470
8605
|
*/
|
8471
8606
|
get requiredErrorText(): string;
|
8472
8607
|
set requiredErrorText(val: string);
|
8473
8608
|
get locRequiredErrorText(): LocalizableString;
|
8474
8609
|
/**
|
8475
|
-
*
|
8610
|
+
* A value passed on to the [`size`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/size) attribute of the underlying `<input>` element.
|
8611
|
+
*
|
8612
|
+
* If you want to set a uniform `size` for all text box items, use the [`itemSize`](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model#itemSize) within the Multiple Textboxes configuration.
|
8476
8613
|
*/
|
8477
8614
|
get size(): number;
|
8478
8615
|
set size(val: number);
|
8479
8616
|
/**
|
8480
|
-
* An expression
|
8617
|
+
* An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the default item value.
|
8618
|
+
* @see minValueExpression
|
8619
|
+
* @see maxValueExpression
|
8481
8620
|
*/
|
8482
8621
|
get defaultValueExpression(): string;
|
8483
8622
|
set defaultValueExpression(val: string);
|
8484
8623
|
/**
|
8485
|
-
*
|
8624
|
+
* An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the minimum item value.
|
8625
|
+
* @see maxValueExpression
|
8626
|
+
* @see defaultValueExpression
|
8486
8627
|
*/
|
8487
8628
|
get minValueExpression(): string;
|
8488
8629
|
set minValueExpression(val: string);
|
8489
8630
|
/**
|
8490
|
-
*
|
8631
|
+
* An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the maximum item value.
|
8632
|
+
* @see minValueExpression
|
8633
|
+
* @see defaultValueExpression
|
8491
8634
|
*/
|
8492
8635
|
get maxValueExpression(): string;
|
8493
8636
|
set maxValueExpression(val: string);
|
8494
8637
|
/**
|
8495
|
-
*
|
8638
|
+
* Item validators.
|
8639
|
+
*
|
8640
|
+
* [Data Validation](https://surveyjs.io/form-library/documentation/data-validation (linkStyle))
|
8496
8641
|
*/
|
8497
8642
|
get validators(): Array<SurveyValidator>;
|
8498
8643
|
set validators(val: Array<SurveyValidator>);
|
8499
8644
|
getValidators(): Array<SurveyValidator>;
|
8500
8645
|
/**
|
8501
|
-
*
|
8646
|
+
* Specifies the type of a mask applied to the input.
|
8647
|
+
*
|
8648
|
+
* Possible values:
|
8649
|
+
*
|
8650
|
+
* - `"none"` (default)
|
8651
|
+
* - `"numeric"`
|
8652
|
+
* - `"currency"`
|
8653
|
+
* - `"datetime"`
|
8654
|
+
* - `"pattern"`
|
8655
|
+
*
|
8656
|
+
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
|
8657
|
+
* @see maskSettings
|
8658
|
+
*/
|
8659
|
+
get maskType(): string;
|
8660
|
+
set maskType(val: string);
|
8661
|
+
/**
|
8662
|
+
* An object with properties that configure the mask applied to the input.
|
8663
|
+
*
|
8664
|
+
* Available properties depend on the specified [`maskType`](#maskType) and belong to corresponding classes. Refer to the class APIs for a full list of properties:
|
8665
|
+
*
|
8666
|
+
* | `maskType` | Class |
|
8667
|
+
* | ---------- | ----- |
|
8668
|
+
* | `"numeric"` | [`InputMaskNumeric`](https://surveyjs.io/form-library/documentation/api-reference/inputmasknumeric) |
|
8669
|
+
* | `"currency"` | [`InputMaskCurrency`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskcurrency) |
|
8670
|
+
* | `"datetime"` | [`InputMaskDateTime`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskdatetime) |
|
8671
|
+
* | `"pattern"` | [`InputMaskPattern`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskpattern) |
|
8672
|
+
*
|
8673
|
+
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
|
8674
|
+
*/
|
8675
|
+
get maskSettings(): InputMaskBase;
|
8676
|
+
set maskSettings(val: InputMaskBase);
|
8677
|
+
get inputTextAlignment(): "left" | "right" | "auto";
|
8678
|
+
set inputTextAlignment(val: "left" | "right" | "auto");
|
8679
|
+
/**
|
8680
|
+
* An item value.
|
8502
8681
|
*/
|
8503
8682
|
get value(): any;
|
8504
8683
|
set value(value: any);
|
@@ -8545,9 +8724,9 @@ declare module "question_multipletext" {
|
|
8545
8724
|
private editorsOnSurveyLoad;
|
8546
8725
|
private performForEveryEditor;
|
8547
8726
|
/**
|
8548
|
-
* Gets or sets an array of `MultipleTextItemModel` objects that represent input items.
|
8727
|
+
* Gets or sets an array of [`MultipleTextItemModel`](https://surveyjs.io/form-library/documentation/api-reference/multipletextitemmodel) objects that represent input items.
|
8549
8728
|
*
|
8550
|
-
*
|
8729
|
+
* Each object in this array should have at least the following properties:
|
8551
8730
|
*
|
8552
8731
|
* ```js
|
8553
8732
|
* {
|
@@ -8570,6 +8749,7 @@ declare module "question_multipletext" {
|
|
8570
8749
|
*/
|
8571
8750
|
addItem(name: string, title?: string): MultipleTextItemModel;
|
8572
8751
|
getItemByName(name: string): MultipleTextItemModel;
|
8752
|
+
getElementsInDesign(includeHidden?: boolean): Array<IElement>;
|
8573
8753
|
addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
|
8574
8754
|
protected collectNestedQuestionsCore(questions: Question[], visibleOnly: boolean): void;
|
8575
8755
|
getConditionJson(operator?: string, path?: string): any;
|
@@ -12007,7 +12187,7 @@ declare module "survey-element" {
|
|
12007
12187
|
protected setPage(parent: IPanel, newPage: IPage): void;
|
12008
12188
|
protected getSearchableLocKeys(keys: Array<string>): void;
|
12009
12189
|
get isDefaultV2Theme(): boolean;
|
12010
|
-
get hasParent():
|
12190
|
+
get hasParent(): boolean;
|
12011
12191
|
isSingleInRow: boolean;
|
12012
12192
|
private shouldAddRunnerStyles;
|
12013
12193
|
protected get isCompact(): boolean;
|
@@ -12082,6 +12262,20 @@ declare module "survey-element" {
|
|
12082
12262
|
protected getAdditionalTitleToolbar(): ActionContainer | null;
|
12083
12263
|
protected getCssTitle(cssClasses: any): string;
|
12084
12264
|
localeChanged(): void;
|
12265
|
+
private wrapperElement?;
|
12266
|
+
setWrapperElement(element?: HTMLElement): void;
|
12267
|
+
getWrapperElement(): HTMLElement;
|
12268
|
+
private _renderedIsExpanded;
|
12269
|
+
private _isAnimatingCollapseExpand;
|
12270
|
+
private set isAnimatingCollapseExpand(value);
|
12271
|
+
private get isAnimatingCollapseExpand();
|
12272
|
+
private getExpandCollapseAnimationOptions;
|
12273
|
+
private animationCollapsed;
|
12274
|
+
set renderedIsExpanded(val: boolean);
|
12275
|
+
get renderedIsExpanded(): boolean;
|
12276
|
+
private animationAllowedValue;
|
12277
|
+
get animationAllowed(): boolean;
|
12278
|
+
set animationAllowed(val: boolean);
|
12085
12279
|
dispose(): void;
|
12086
12280
|
}
|
12087
12281
|
}
|
@@ -14895,12 +15089,12 @@ declare module "base" {
|
|
14895
15089
|
private getValueInLowCase;
|
14896
15090
|
getElementsInDesign(includeHidden?: boolean): Array<IElement>;
|
14897
15091
|
}
|
14898
|
-
export class ArrayChanges {
|
15092
|
+
export class ArrayChanges<T = any> {
|
14899
15093
|
index: number;
|
14900
15094
|
deleteCount: number;
|
14901
|
-
itemsToAdd:
|
14902
|
-
deletedItems:
|
14903
|
-
constructor(index: number, deleteCount: number, itemsToAdd:
|
15095
|
+
itemsToAdd: T[];
|
15096
|
+
deletedItems: T[];
|
15097
|
+
constructor(index: number, deleteCount: number, itemsToAdd: T[], deletedItems: T[]);
|
14904
15098
|
}
|
14905
15099
|
export class Event<CallbackFunction extends Function, Sender, Options> {
|
14906
15100
|
onCallbacksChanged: () => void;
|
@@ -16617,7 +16811,7 @@ declare module "dragdrop/ranking-choices" {
|
|
16617
16811
|
protected updateDraggedElementShortcut(newIndex: number): void;
|
16618
16812
|
protected ghostPositionChanged(): void;
|
16619
16813
|
protected doBanDropHere: () => any;
|
16620
|
-
protected doDrop
|
16814
|
+
protected doDrop(): any;
|
16621
16815
|
clear(): void;
|
16622
16816
|
}
|
16623
16817
|
}
|
@@ -16636,21 +16830,26 @@ declare module "dragdrop/ranking-select-to-rank" {
|
|
16636
16830
|
fromIndex: number;
|
16637
16831
|
toIndex: number;
|
16638
16832
|
};
|
16833
|
+
protected calculateIsBottom(clientY: number, dropTargetNode?: HTMLElement): boolean;
|
16639
16834
|
private doUIEffects;
|
16640
16835
|
private get isDraggedElementRanked();
|
16641
16836
|
private get isDropTargetRanked();
|
16642
16837
|
private get isDraggedElementUnranked();
|
16643
16838
|
private get isDropTargetUnranked();
|
16644
|
-
|
16645
|
-
|
16646
|
-
|
16839
|
+
private updateChoices;
|
16840
|
+
selectToRank: (questionModel: QuestionRankingModel, fromIndex: number, toIndex: number) => void;
|
16841
|
+
unselectFromRank: (questionModel: QuestionRankingModel, fromIndex: number, toIndex?: number) => void;
|
16842
|
+
reorderRankedItem: (questionModel: QuestionRankingModel, fromIndex: number, toIndex: number, dropTargetNode?: HTMLElement) => void;
|
16843
|
+
clear(): void;
|
16647
16844
|
}
|
16648
16845
|
}
|
16649
16846
|
declare module "question_ranking" {
|
16650
16847
|
import { ISurveyImpl } from "base-interfaces";
|
16651
16848
|
import { DragDropRankingChoices } from "dragdrop/ranking-choices";
|
16849
|
+
import { DragDropRankingSelectToRank } from "dragdrop/ranking-select-to-rank";
|
16652
16850
|
import { ItemValue } from "itemvalue";
|
16653
16851
|
import { QuestionCheckboxModel } from "question_checkbox";
|
16852
|
+
import { AnimationGroup } from "utils/animation";
|
16654
16853
|
/**
|
16655
16854
|
* A class that describes the Ranking question type.
|
16656
16855
|
*
|
@@ -16670,6 +16869,7 @@ declare module "question_ranking" {
|
|
16670
16869
|
get ghostPositionCssClass(): string;
|
16671
16870
|
getItemIndexClasses(item: ItemValue): string;
|
16672
16871
|
getNumberByIndex(index: number): string;
|
16872
|
+
private updateRankingChoicesSync;
|
16673
16873
|
setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
|
16674
16874
|
isAnswerCorrect(): boolean;
|
16675
16875
|
get requireStrictCompare(): boolean;
|
@@ -16678,16 +16878,24 @@ declare module "question_ranking" {
|
|
16678
16878
|
localeChanged: () => void;
|
16679
16879
|
private addToValueByVisibleChoices;
|
16680
16880
|
private removeFromValueByVisibleChoices;
|
16881
|
+
private getChoicesAnimation;
|
16882
|
+
private _rankingChoicesAnimation;
|
16883
|
+
get rankingChoicesAnimation(): AnimationGroup<ItemValue>;
|
16884
|
+
private _unRankingChoicesAnimation;
|
16885
|
+
get unRankingChoicesAnimation(): AnimationGroup<ItemValue>;
|
16681
16886
|
get rankingChoices(): Array<ItemValue>;
|
16887
|
+
set rankingChoices(val: Array<ItemValue>);
|
16682
16888
|
get unRankingChoices(): Array<ItemValue>;
|
16889
|
+
set unRankingChoices(val: Array<ItemValue>);
|
16683
16890
|
private updateRankingChoices;
|
16891
|
+
updateUnRankingChoices(newRankingChoices: Array<ItemValue>): void;
|
16684
16892
|
private updateRankingChoicesSelectToRankMode;
|
16685
16893
|
dragDropRankingChoices: DragDropRankingChoices;
|
16686
16894
|
currentDropTarget: ItemValue;
|
16687
16895
|
dropTargetNodeMove: string;
|
16688
16896
|
endLoadingFromJson(): void;
|
16689
16897
|
private setDragDropRankingChoices;
|
16690
|
-
protected createDragDropRankingChoices(): DragDropRankingChoices;
|
16898
|
+
protected createDragDropRankingChoices(): DragDropRankingChoices | DragDropRankingSelectToRank;
|
16691
16899
|
handlePointerDown: (event: PointerEvent, choice: ItemValue, node: HTMLElement) => void;
|
16692
16900
|
private isDragStartNodeValid;
|
16693
16901
|
private get allowStartDrag();
|
@@ -18863,6 +19071,7 @@ declare module "entries/core-wo-model" {
|
|
18863
19071
|
export * from "utils/responsivity-manager";
|
18864
19072
|
export { unwrap, getOriginalEvent, getElement } from "utils/utils";
|
18865
19073
|
export * from "actions/action";
|
19074
|
+
export * from "utils/animation";
|
18866
19075
|
export * from "actions/adaptive-container";
|
18867
19076
|
export * from "actions/container";
|
18868
19077
|
export * from "utils/dragOrClickHelper";
|
@@ -25574,7 +25783,7 @@ declare module "react/components/popup/popup" {
|
|
25574
25783
|
protected getStateElement(): Base;
|
25575
25784
|
clickInside: (ev: any) => void;
|
25576
25785
|
componentDidUpdate(prevProps: any, prevState: any): void;
|
25577
|
-
renderContainer(
|
25786
|
+
renderContainer(popupBaseViewModel: PopupBaseViewModel): JSX.Element;
|
25578
25787
|
renderHeaderContent(): JSX.Element;
|
25579
25788
|
renderContent(): JSX.Element;
|
25580
25789
|
protected renderHeaderPopup(popupModel: PopupBaseViewModel): JSX.Element | null;
|
@@ -25814,6 +26023,8 @@ declare module "react/element" {
|
|
25814
26023
|
private get survey();
|
25815
26024
|
private get creator();
|
25816
26025
|
protected get css(): any;
|
26026
|
+
componentDidMount(): void;
|
26027
|
+
componentWillUnmount(): void;
|
25817
26028
|
shouldComponentUpdate(nextProps: any, nextState: any): boolean;
|
25818
26029
|
protected renderElement(): JSX.Element;
|
25819
26030
|
protected createElement(element: IElement, elementIndex?: number): JSX.Element;
|
@@ -25862,6 +26073,7 @@ declare module "react/panel-base" {
|
|
25862
26073
|
componentWillUnmount(): void;
|
25863
26074
|
componentDidUpdate(prevProps: any, prevState: any): void;
|
25864
26075
|
private doAfterRender;
|
26076
|
+
protected getIsVisible(): boolean;
|
25865
26077
|
protected canRender(): boolean;
|
25866
26078
|
protected renderRows(css: any): Array<JSX.Element>;
|
25867
26079
|
protected createRow(row: QuestionRowModel, css: any): JSX.Element;
|
@@ -26027,6 +26239,7 @@ declare module "react/panel" {
|
|
26027
26239
|
protected renderTitle(): JSX.Element | null;
|
26028
26240
|
protected renderDescription(): JSX.Element | null;
|
26029
26241
|
protected renderBottom(): JSX.Element | null;
|
26242
|
+
protected getIsVisible(): boolean;
|
26030
26243
|
}
|
26031
26244
|
}
|
26032
26245
|
declare module "react/flow-panel" {
|