survey-react 1.9.96 → 1.9.97

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/survey.react.d.ts CHANGED
@@ -645,8 +645,8 @@ declare module "localization/english" {
645
645
  noEntriesReadonlyText: string;
646
646
  more: string;
647
647
  tagboxDoneButtonCaption: string;
648
- selectToRankFromContainerPlaceholder: string;
649
- selectToRankToContainerPlaceholder: string;
648
+ selectToRankEmptyRankedAreaText: string;
649
+ selectToRankEmptyUnrankedAreaText: string;
650
650
  };
651
651
  }
652
652
  declare module "surveyStrings" {
@@ -756,8 +756,8 @@ declare module "surveyStrings" {
756
756
  noEntriesReadonlyText: string;
757
757
  more: string;
758
758
  tagboxDoneButtonCaption: string;
759
- selectToRankFromContainerPlaceholder: string;
760
- selectToRankToContainerPlaceholder: string;
759
+ selectToRankEmptyRankedAreaText: string;
760
+ selectToRankEmptyUnrankedAreaText: string;
761
761
  };
762
762
  }
763
763
  declare module "localizablestring" {
@@ -1094,7 +1094,10 @@ declare module "jsonobject" {
1094
1094
  type: string;
1095
1095
  message: string;
1096
1096
  description: string;
1097
- at: Number;
1097
+ at: number;
1098
+ end: number;
1099
+ jsonObj: any;
1100
+ element: Base;
1098
1101
  constructor(type: string, message: string);
1099
1102
  getFullDescription(): string;
1100
1103
  }
@@ -2163,6 +2166,7 @@ declare module "defaultCss/defaultV2Css" {
2163
2166
  root: string;
2164
2167
  rootMobile: string;
2165
2168
  rootReadOnly: string;
2169
+ rootBackgroundImage: string;
2166
2170
  container: string;
2167
2171
  header: string;
2168
2172
  bodyContainer: string;
@@ -2476,6 +2480,9 @@ declare module "defaultCss/defaultV2Css" {
2476
2480
  cleanButton: string;
2477
2481
  cleanButtonSvg: string;
2478
2482
  cleanButtonIconId: string;
2483
+ chevronButton: string;
2484
+ chevronButtonSvg: string;
2485
+ chevronButtonIconId: string;
2479
2486
  control: string;
2480
2487
  controlInputFieldComponent: string;
2481
2488
  controlValue: string;
@@ -2634,10 +2641,14 @@ declare module "defaultCss/defaultV2Css" {
2634
2641
  itemFixedSize: string;
2635
2642
  control: string;
2636
2643
  itemSmall: string;
2644
+ selectWrapper: string;
2637
2645
  controlValue: string;
2638
2646
  controlDisabled: string;
2639
2647
  controlEmpty: string;
2640
2648
  filterStringInput: string;
2649
+ chevronButton: string;
2650
+ chevronButtonSvg: string;
2651
+ chevronButtonIconId: string;
2641
2652
  popup: string;
2642
2653
  onError: string;
2643
2654
  };
@@ -2731,6 +2742,7 @@ declare module "defaultCss/defaultV2Css" {
2731
2742
  itemContent: string;
2732
2743
  itemIndex: string;
2733
2744
  itemIndexEmptyMode: string;
2745
+ itemDisabled: string;
2734
2746
  controlLabel: string;
2735
2747
  itemGhostNode: string;
2736
2748
  itemIconContainer: string;
@@ -2801,6 +2813,9 @@ declare module "defaultCss/defaultV2Css" {
2801
2813
  cleanItemButton: string;
2802
2814
  cleanItemButtonSvg: string;
2803
2815
  cleanItemButtonIconId: string;
2816
+ chevronButton: string;
2817
+ chevronButtonSvg: string;
2818
+ chevronButtonIconId: string;
2804
2819
  control: string;
2805
2820
  controlValue: string;
2806
2821
  controlValueItems: string;
@@ -2867,7 +2882,7 @@ declare module "trigger" {
2867
2882
  }
2868
2883
  export interface ISurveyTriggerOwner {
2869
2884
  getObjects(pages: string[], questions: string[]): any[];
2870
- setCompleted(): void;
2885
+ setCompleted(trigger: Trigger): void;
2871
2886
  canBeCompleted(trigger: Trigger, isCompleted: boolean): void;
2872
2887
  triggerExecuted(trigger: Trigger): void;
2873
2888
  setTriggerValue(name: string, value: any, isVariable: boolean): any;
@@ -3703,6 +3718,12 @@ declare module "question_file" {
3703
3718
  currentState: string;
3704
3719
  indexToShow: number;
3705
3720
  containsMultiplyFiles: boolean;
3721
+ /**
3722
+ * Specifies whether users can capture and upload a photo. Applies only to mobile devices.
3723
+ *
3724
+ * Default value: `false`
3725
+ */
3726
+ allowCameraAccess: boolean;
3706
3727
  mobileFileNavigator: ActionContainer;
3707
3728
  protected prevFileAction: Action;
3708
3729
  protected nextFileAction: Action;
@@ -3790,6 +3811,7 @@ declare module "question_file" {
3790
3811
  dragAreaPlaceholder: string;
3791
3812
  get inputTitle(): string;
3792
3813
  clear(doneCallback?: () => void): void;
3814
+ get renderCapture(): string;
3793
3815
  get multipleRendered(): string;
3794
3816
  get showRemoveButton(): any;
3795
3817
  get showRemoveButtonBottom(): any;
@@ -4388,7 +4410,7 @@ declare module "question_baseselect" {
4388
4410
  protected isItemSelectedCore(item: ItemValue): boolean;
4389
4411
  private clearDisabledValues;
4390
4412
  protected clearIncorrectValuesCore(): void;
4391
- protected canClearValueAnUnknow(val: any): boolean;
4413
+ protected canClearValueAnUnknown(val: any): boolean;
4392
4414
  protected clearDisabledValuesCore(): void;
4393
4415
  clearUnusedValues(): void;
4394
4416
  getColumnClass(): string;
@@ -4769,7 +4791,7 @@ declare module "dragdrop/core" {
4769
4791
  constructor(surveyValue?: ISurvey, creator?: any, longTap?: boolean, domAdapter?: IDragDropDOMAdapter);
4770
4792
  startDrag(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement, preventSaveTargetNode?: boolean): void;
4771
4793
  dragInit(event: PointerEvent, draggedElement: any, parentElement?: any, draggedElementNode?: HTMLElement): void;
4772
- protected onStartDrag(): void;
4794
+ protected onStartDrag(event?: PointerEvent): void;
4773
4795
  protected isDropTargetDoesntChanged(newIsBottom: boolean): boolean;
4774
4796
  protected getShortcutText(draggedElement: IShortcutText): string;
4775
4797
  protected createDraggedElementShortcut(text: string, draggedElementNode?: HTMLElement, event?: PointerEvent): HTMLElement;
@@ -5984,6 +6006,7 @@ declare module "survey-events-api" {
5984
6006
  * Returns `true` if survey completion is caused by the ["complete" trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete).
5985
6007
  */
5986
6008
  isCompleteOnTrigger: boolean;
6009
+ completeTrigger?: Trigger;
5987
6010
  }
5988
6011
  export interface CompletingEvent extends CompleteBaseEvent {
5989
6012
  /**
@@ -7614,13 +7637,15 @@ declare module "question_multipletext" {
7614
7637
  }
7615
7638
  }
7616
7639
  declare module "themes" {
7640
+ export type ImageFit = "auto" | "contain" | "cover";
7641
+ export type ImageAttachment = "fixed" | "scroll";
7617
7642
  export interface ITheme {
7618
7643
  cssVariables?: {
7619
7644
  [index: string]: string;
7620
7645
  };
7621
7646
  backgroundImage?: string;
7622
- backgroundImageFit?: string;
7623
- backgroundImagePosition?: string;
7647
+ backgroundImageFit?: ImageFit;
7648
+ backgroundImageAttachment?: ImageAttachment;
7624
7649
  backgroundOpacity?: number;
7625
7650
  isCompact?: boolean;
7626
7651
  }
@@ -7651,7 +7676,7 @@ declare module "survey" {
7651
7676
  import { QuestionMatrixDynamicModel } from "question_matrixdynamic";
7652
7677
  import { QuestionFileModel } from "question_file";
7653
7678
  import { QuestionMultipleTextModel } from "question_multipletext";
7654
- import { ITheme } from "themes";
7679
+ import { ITheme, ImageFit, ImageAttachment } from "themes";
7655
7680
  import { PopupModel } from "popup";
7656
7681
  /**
7657
7682
  * The `SurveyModel` object contains properties and methods that allow you to control the survey and access its elements.
@@ -8799,7 +8824,6 @@ declare module "survey" {
8799
8824
  get themeVariables(): {
8800
8825
  [index: string]: string;
8801
8826
  };
8802
- backgroundImagePosition: string;
8803
8827
  _isMobile: boolean;
8804
8828
  setIsMobile(newVal?: boolean): void;
8805
8829
  private get isMobile();
@@ -8817,13 +8841,19 @@ declare module "survey" {
8817
8841
  get locBackgroundImage(): LocalizableString;
8818
8842
  renderBackgroundImage: string;
8819
8843
  private updateRenderBackgroundImage;
8820
- backgroundImageFit: string;
8844
+ backgroundImageFit: ImageFit;
8845
+ backgroundImageAttachment: ImageAttachment;
8821
8846
  /**
8822
8847
  * A value from 0 to 1 that specifies how transparent the [background image](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#backgroundImage) should be: 0 makes the image completely transparent, and 1 makes it opaque.
8823
8848
  */
8824
8849
  get backgroundOpacity(): number;
8825
8850
  set backgroundOpacity(val: number);
8826
- get renderBackgroundOpacity(): string;
8851
+ get backgroundImageStyle(): {
8852
+ opacity: number;
8853
+ backgroundImage: string;
8854
+ backgroundSize: ImageFit;
8855
+ backgroundAttachment: ImageAttachment;
8856
+ };
8827
8857
  /**
8828
8858
  * HTML content displayed on the [complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page).
8829
8859
  *
@@ -9334,6 +9364,7 @@ declare module "survey" {
9334
9364
  private updateAllElementsVisibility;
9335
9365
  get areInvisibleElementsShowing(): boolean;
9336
9366
  get areEmptyElementsHidden(): boolean;
9367
+ private get isAnyQuestionAnswered();
9337
9368
  /**
9338
9369
  * Returns `true`, if a user has already completed the survey in this browser and there is a cookie about it. Survey goes to `completedbefore` state if the function returns `true`.
9339
9370
  * @see cookieName
@@ -9564,7 +9595,7 @@ declare module "survey" {
9564
9595
  * @returns `false` if survey completion is cancelled within the [`onCompleting`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onCompleting) event handler; otherwise, `true`.
9565
9596
  * @see surveyPostId
9566
9597
  */
9567
- doComplete(isCompleteOnTrigger?: boolean): boolean;
9598
+ doComplete(isCompleteOnTrigger?: boolean, completeTrigger?: Trigger): boolean;
9568
9599
  private saveDataOnComplete;
9569
9600
  private checkOnCompletingEvent;
9570
9601
  /**
@@ -9584,7 +9615,7 @@ declare module "survey" {
9584
9615
  protected doServerValidation(doComplete: boolean, isPreview?: boolean): boolean;
9585
9616
  private completeServerValidation;
9586
9617
  protected doNextPage(): void;
9587
- setCompleted(): void;
9618
+ setCompleted(trigger: Trigger): void;
9588
9619
  canBeCompleted(trigger: Trigger, isCompleted: boolean): void;
9589
9620
  private completedByTriggers;
9590
9621
  private get canBeCompletedByTrigger();
@@ -11031,6 +11062,7 @@ declare module "question" {
11031
11062
  * @param onError Pass `true` if you want to focus an input field with the first validation error. Default value: `false` (focuses the first input field). Applies to question types with multiple input fields.
11032
11063
  */
11033
11064
  focus(onError?: boolean): void;
11065
+ private focuscore;
11034
11066
  private expandAllParents;
11035
11067
  focusIn(): void;
11036
11068
  protected fireCallback(callback: () => void): void;
@@ -13756,6 +13788,7 @@ declare module "dragdrop/ranking-select-to-rank" {
13756
13788
  import { DragDropRankingChoices } from "dragdrop/ranking-choices";
13757
13789
  import { QuestionRankingModel } from "question_ranking";
13758
13790
  export class DragDropRankingSelectToRank extends DragDropRankingChoices {
13791
+ protected onStartDrag(event: PointerEvent): void;
13759
13792
  protected findDropTargetNodeByDragOverNode(dragOverNode: HTMLElement): HTMLElement;
13760
13793
  protected getDropTargetByDataAttributeValue(dataAttributeValue: string): ItemValue;
13761
13794
  protected getDropTargetByNode(dropTargetNode: HTMLElement, event: PointerEvent): any;
@@ -13815,6 +13848,8 @@ declare module "question_ranking" {
13815
13848
  handlePointerDown: (event: PointerEvent, choice: ItemValue, node: HTMLElement) => void;
13816
13849
  private isDragStartNodeValid;
13817
13850
  private get allowStartDrag();
13851
+ private canStartDragDueMaxSelectedChoices;
13852
+ checkMaxSelectedChoicesUnreached(): boolean;
13818
13853
  afterRenderQuestionElement(el: HTMLElement): void;
13819
13854
  beforeDestroyQuestionElement(el: HTMLElement): void;
13820
13855
  handleKeydown: (event: KeyboardEvent, choice: ItemValue) => void;
@@ -13859,8 +13894,8 @@ declare module "question_ranking" {
13859
13894
  */
13860
13895
  get selectToRankAreasLayout(): string;
13861
13896
  set selectToRankAreasLayout(val: string);
13862
- selectToRankFromContainerPlaceholder: string;
13863
- selectToRankToContainerPlaceholder: string;
13897
+ selectToRankEmptyRankedAreaText: string;
13898
+ selectToRankEmptyUnrankedAreaText: string;
13864
13899
  get useFullItemSizeForShortcut(): boolean;
13865
13900
  set useFullItemSizeForShortcut(val: boolean);
13866
13901
  }
@@ -14805,6 +14840,10 @@ declare module "question_custom" {
14805
14840
  * @see questionJSON
14806
14841
  */
14807
14842
  createQuestion?: any;
14843
+ valueToQuestion?: (val: any) => any;
14844
+ valueFromQuestion?: (val: any) => any;
14845
+ getValue?: (val: any) => any;
14846
+ setValue?: (val: any) => any;
14808
14847
  }
14809
14848
  export class ComponentQuestionJSON {
14810
14849
  name: string;
@@ -14821,6 +14860,8 @@ declare module "question_custom" {
14821
14860
  onValueChanging(question: Question, name: string, newValue: any): any;
14822
14861
  onItemValuePropertyChanged(question: Question, item: ItemValue, propertyName: string, name: string, newValue: any): void;
14823
14862
  getDisplayValue(keyAsText: boolean, value: any, question: Question): any;
14863
+ setValueToQuestion(val: any): any;
14864
+ getValueFromQuestion(val: any): any;
14824
14865
  get isComposite(): boolean;
14825
14866
  }
14826
14867
  export class ComponentCollection {
@@ -14902,6 +14943,8 @@ declare module "question_custom" {
14902
14943
  runCondition(values: HashTable<any>, properties: HashTable<any>): void;
14903
14944
  protected convertDataName(name: string): string;
14904
14945
  protected convertDataValue(name: string, newValue: any): any;
14946
+ protected getContentQuestionValue(): any;
14947
+ protected setContentQuestionValue(val: any): void;
14905
14948
  protected canSetValueToSurvey(): boolean;
14906
14949
  protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
14907
14950
  onSurveyValueChanged(newValue: any): void;
@@ -14939,6 +14982,8 @@ declare module "question_custom" {
14939
14982
  private settingNewValue;
14940
14983
  setValue(name: string, newValue: any, locNotification: any, allowNotifyValueChanged?: boolean): any;
14941
14984
  private updateValueCoreWithPanelValue;
14985
+ private getContentPanelValue;
14986
+ private getValueForContentPanel;
14942
14987
  private setNewValueIntoQuestion;
14943
14988
  addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
14944
14989
  protected convertDataValue(name: string, newValue: any): any;
@@ -14956,6 +15001,7 @@ declare module "popup-view-model" {
14956
15001
  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^=\"-\"])";
14957
15002
  export class PopupBaseViewModel extends Base {
14958
15003
  protected popupSelector: string;
15004
+ protected fixedPopupContainer: string;
14959
15005
  protected containerSelector: string;
14960
15006
  protected scrollingContentSelector: string;
14961
15007
  protected prevActiveElement: HTMLElement;
@@ -21969,6 +22015,7 @@ declare module "react/dropdown-base" {
21969
22015
  renderValueElement(dropdownListModel: DropdownListModel): JSX.Element | null;
21970
22016
  protected renderInput(dropdownListModel: DropdownListModel): JSX.Element;
21971
22017
  createClearButton(): JSX.Element | null;
22018
+ createChevronButton(): JSX.Element | null;
21972
22019
  protected renderOther(cssClasses: any): JSX.Element;
21973
22020
  componentDidUpdate(prevProps: any, prevState: any): void;
21974
22021
  componentDidMount(): void;