survey-react 1.9.13 → 1.9.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/survey.react.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  /*
2
- * Type definition for Survey JavaScript library for React v1.9.13
2
+ * Type definition for Survey JavaScript library for React v1.9.16
3
3
  * Copyright (c) 2015-2022 Devsoft Baltic OÜ - https://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
6
6
  import * as React from "react";
7
7
 
8
+ export { SurveyModel as Model };
9
+
8
10
  export enum DragTypeOverMeEnum {
9
11
  InsideEmptyPanel = 1,
10
12
  MultilineRight,
@@ -1246,6 +1248,7 @@ export declare class SurveyError {
1246
1248
  text: string;
1247
1249
  locTextValue: LocalizableString;
1248
1250
  visible: boolean;
1251
+ equalsTo(error: SurveyError): boolean;
1249
1252
  get locText(): LocalizableString;
1250
1253
  getText(): string;
1251
1254
  getErrorType(): string;
@@ -1301,11 +1304,6 @@ export declare class SurveyTimer {
1301
1304
  stop(func?: any): void;
1302
1305
  doTimer(): void;
1303
1306
  }
1304
- export declare class SurveyTimerPanel extends React.Component<any, any> {
1305
- constructor(props: any);
1306
- protected get survey(): any;
1307
- render(): any;
1308
- }
1309
1307
  export declare class SvgIcon extends React.Component<any, any> {
1310
1308
  constructor(props: any);
1311
1309
  svgIconRef: any;
@@ -1703,6 +1701,9 @@ export declare class ExceedSizeError extends SurveyError {
1703
1701
  getErrorType(): string;
1704
1702
  getDefaultText(): string;
1705
1703
  }
1704
+ /*
1705
+ * Base class for HtmlConditionItem and UrlConditionItem classes.
1706
+ */
1706
1707
  export declare class ExpressionItem extends Base implements ILocalizableOwner {
1707
1708
  constructor(expression?: string);
1708
1709
  locOwner: ILocalizableOwner;
@@ -2107,6 +2108,7 @@ export declare class MatrixDropdownColumn extends Base implements ILocalizableOw
2107
2108
  protected calcCellQuestionType(row: MatrixDropdownRowModelBase): string;
2108
2109
  protected updateTemplateQuestion(): void;
2109
2110
  protected createNewQuestion(cellType: string): Question;
2111
+ previousChoicesId: string;
2110
2112
  protected setQuestionProperties(question: Question, onUpdateJson?: any): void;
2111
2113
  protected propertyValueChanged(name: string, oldValue: any, newValue: any): void;
2112
2114
  }
@@ -2776,6 +2778,7 @@ export declare class SurveyTimerModel extends Base {
2776
2778
  text: string;
2777
2779
  spent: number;
2778
2780
  get survey(): ISurvey;
2781
+ onCreating(): void;
2779
2782
  timerFunc: any;
2780
2783
  start(): void;
2781
2784
  stop(): void;
@@ -3877,10 +3880,14 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
3877
3880
  */
3878
3881
  onFocusInPanel: EventBase<SurveyModel>;
3879
3882
  /*
3880
- * You can use this event to decide whether show or hide choice item in checkbox, dropdown and radiogroup like questions
3881
- * <br/> `sender` - the survey object that fires the event
3882
- * <br/> `options.question` - a question that contains choices.
3883
- * <br/> `options.item` - an item of the question.
3883
+ * Use this event to change the visibility of an individual choice item in [Checkbox](https://surveyjs.io/Documentation/Library?id=questioncheckboxmodel), [Dropdown](https://surveyjs.io/Documentation/Library?id=questiondropdownmodel), [Radiogroup](https://surveyjs.io/Documentation/Library?id=questionradiogroupmodel), and other similar question types.
3884
+ *
3885
+ * The event handler accepts the following arguments:
3886
+ *
3887
+ * - `sender` - A Survey instance that raised the event.
3888
+ * - `options.question` - A Question instance to which the choice item belongs.
3889
+ * - `options.item` - The choice item as specified in the [choices](https://surveyjs.io/Documentation/Library?id=QuestionSelectBase#choices) array.
3890
+ * - `options.visible` - A Boolean value that specifies the item visibility. Set it to `false` to hide the item.
3884
3891
  */
3885
3892
  onShowingChoiceItem: EventBase<SurveyModel>;
3886
3893
  /*
@@ -5047,6 +5054,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
5047
5054
  protected updateQuestionValue(valueName: string, newValue: any): void;
5048
5055
  protected notifyQuestionOnValueChanged(valueName: string, newValue: any): void;
5049
5056
  isRunningElementsBindings: boolean;
5057
+ updateVisibleIndexAfterBindings: boolean;
5050
5058
  isTriggerIsRunning: boolean;
5051
5059
  triggerValues: any;
5052
5060
  triggerKeys: any;
@@ -5076,6 +5084,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
5076
5084
  endLoadingFromJson(): void;
5077
5085
  protected onBeforeCreating(): void;
5078
5086
  protected onCreating(): void;
5087
+ getBuiltInVariableValue(name: string): number;
5079
5088
  hasVisibleQuestionByValueName(valueName: string): boolean;
5080
5089
  questionCountByValueName(valueName: string): number;
5081
5090
  /*
@@ -5508,7 +5517,6 @@ export declare class SurveyQuestionRating extends SurveyQuestionElementBase {
5508
5517
  handleOnClick(event: any): void;
5509
5518
  protected renderElement(): any;
5510
5519
  protected renderItem(key: string, item: any, index: number, cssClasses: any): any;
5511
- protected renderOther(cssClasses: any): any;
5512
5520
  }
5513
5521
  export declare class SurveyQuestionSignaturePad extends SurveyQuestionElementBase {
5514
5522
  constructor(props: any);
@@ -5523,6 +5531,12 @@ export declare class SurveyQuestionUncontrolledElement<T> extends SurveyQuestion
5523
5531
  protected getValueCore(): any;
5524
5532
  protected updateDomElement(): void;
5525
5533
  }
5534
+ export declare class SurveyTimerPanel extends ReactSurveyElement {
5535
+ constructor(props: any);
5536
+ protected getStateElement(): Base;
5537
+ protected get timerModel(): any;
5538
+ render(): any;
5539
+ }
5526
5540
  /*
5527
5541
  * It extends the Trigger base class and add properties required for SurveyJS classes.
5528
5542
  */
@@ -5630,8 +5644,10 @@ export declare class PanelModelBase extends SurveyElement implements IPanel, ICo
5630
5644
  getType(): string;
5631
5645
  setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
5632
5646
  endLoadingFromJson(): void;
5647
+ showTitle: boolean;
5633
5648
  get hasTitle(): boolean;
5634
5649
  protected canShowTitle(): boolean;
5650
+ showDescription: boolean;
5635
5651
  get _showDescription(): boolean;
5636
5652
  localeChanged(): void;
5637
5653
  locStrsChanged(): void;
@@ -5909,6 +5925,7 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
5909
5925
  */
5910
5926
  onReadyChanged: EventBase<Question>;
5911
5927
  isReadOnlyRenderDiv(): boolean;
5928
+ isMobile: boolean;
5912
5929
  protected createLocTitleProperty(): LocalizableString;
5913
5930
  getSurvey(live?: boolean): ISurvey;
5914
5931
  getValueName(): string;
@@ -6395,7 +6412,14 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
6395
6412
  get validatedValue(): any;
6396
6413
  set validatedValue(val: any);
6397
6414
  getAllValues(): any;
6415
+ transformToMobileView(): void;
6416
+ transformToDesktopView(): void;
6398
6417
  needResponsiveWidth(): boolean;
6418
+ protected supportResponsiveness(): boolean;
6419
+ resizeObserver: any;
6420
+ protected getCompactRenderAs(): string;
6421
+ protected processResponsiveness(requiredWidth: number, availableWidth: number): void;
6422
+ dispose(): void;
6399
6423
  }
6400
6424
  export declare class SurveyFlowPanel extends SurveyPanel {
6401
6425
  constructor(props: any);
@@ -6429,6 +6453,11 @@ export declare class SurveyQuestionBooleanCheckbox extends SurveyQuestionBoolean
6429
6453
  constructor(props: any);
6430
6454
  protected renderElement(): any;
6431
6455
  }
6456
+ export declare class SurveyQuestionBooleanRadio extends SurveyQuestionBoolean {
6457
+ constructor(props: any);
6458
+ handleOnChange: any;
6459
+ protected renderElement(): any;
6460
+ }
6432
6461
  export declare class SurveyQuestionComment extends SurveyQuestionUncontrolledElement<QuestionCommentModel> {
6433
6462
  constructor(props: any);
6434
6463
  protected renderElement(): any;
@@ -6443,13 +6472,11 @@ export declare class SurveyQuestionCustom extends SurveyQuestionUncontrolledElem
6443
6472
  protected getStateElements(): Array<Base>;
6444
6473
  protected renderElement(): any;
6445
6474
  }
6446
- export declare class SurveyQuestionDropdown extends SurveyQuestionUncontrolledElement<QuestionDropdownModel> {
6475
+ export declare class SurveyQuestionDropdownBase<T> extends SurveyQuestionUncontrolledElement<T> {
6447
6476
  constructor(props: any);
6448
6477
  protected setValueCore(newValue: any): void;
6449
6478
  protected getValueCore(): any;
6450
- protected renderElement(): any;
6451
6479
  protected renderSelect(cssClasses: any): any;
6452
- protected renderOther(cssClasses: any): any;
6453
6480
  }
6454
6481
  export declare class SurveyQuestionMatrixDropdown extends SurveyQuestionMatrixDropdownBase {
6455
6482
  constructor(props: any);
@@ -6790,6 +6817,9 @@ export declare class QuestionBooleanModel extends Question {
6790
6817
  protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
6791
6818
  onLabelClick(event: any, value: boolean): boolean;
6792
6819
  onSwitchClickModel(event: any): boolean;
6820
+ getRadioItemClass(css: any, value: any): string;
6821
+ protected supportResponsiveness(): boolean;
6822
+ protected getCompactRenderAs(): string;
6793
6823
  }
6794
6824
  export declare class QuestionCustomModelBase extends Question implements ISurveyImpl, ISurveyData, IPanel {
6795
6825
  constructor(name: string, customQuestion: ComponentQuestionJSON);
@@ -6915,6 +6945,15 @@ export declare class QuestionFileModel extends Question {
6915
6945
  onStateChanged: EventBase<QuestionFileModel>;
6916
6946
  previewValue: any;
6917
6947
  currentState: string;
6948
+ indexToShow: number;
6949
+ containsMultiplyFiles: boolean;
6950
+ mobileFileNavigator: any;
6951
+ prevFileAction: Action;
6952
+ nextFileAction: Action;
6953
+ fileIndexAction: Action;
6954
+ get mobileFileNavigatorVisible(): boolean;
6955
+ protected updateElementCssCore(cssClasses: any): void;
6956
+ isPreviewVisible(index: number): boolean;
6918
6957
  getType(): string;
6919
6958
  clearOnDeletingContainer(): void;
6920
6959
  /*
@@ -7047,7 +7086,7 @@ export declare class QuestionFileModel extends Question {
7047
7086
  supportComment(): boolean;
7048
7087
  getChooseFileCss(): string;
7049
7088
  getReadOnlyFileCss(): string;
7050
- getFileRootCss(): string;
7089
+ get fileRootCss(): string;
7051
7090
  getFileDecoratorCss(): string;
7052
7091
  onDragOver: any;
7053
7092
  onDrop: any;
@@ -7561,6 +7600,17 @@ export declare class QuestionRatingModel extends Question {
7561
7600
  */
7562
7601
  setValueFromClick(value: any): void;
7563
7602
  getItemClass(item: ItemValue): string;
7603
+ getControlClass(): string;
7604
+ get optionsCaption(): string;
7605
+ set optionsCaption(val: string);
7606
+ get locOptionsCaption(): LocalizableString;
7607
+ get showOptionsCaption(): boolean;
7608
+ get renderedValue(): boolean;
7609
+ set renderedValue(val: boolean);
7610
+ get visibleChoices(): any;
7611
+ get readOnlyText(): any;
7612
+ protected supportResponsiveness(): boolean;
7613
+ protected getCompactRenderAs(): string;
7564
7614
  }
7565
7615
  /*
7566
7616
  * It is a base class for checkbox, dropdown and radiogroup questions.
@@ -7568,6 +7618,7 @@ export declare class QuestionRatingModel extends Question {
7568
7618
  export declare class QuestionSelectBase extends Question {
7569
7619
  constructor(name: string);
7570
7620
  visibleChoicesChangedCallback: any;
7621
+ loadedChoicesFromServerCallback: any;
7571
7622
  filteredChoicesValue: any;
7572
7623
  conditionChoicesVisibleIfRunner: ConditionRunner;
7573
7624
  conditionChoicesEnableIfRunner: ConditionRunner;
@@ -7895,6 +7946,11 @@ export declare class QuestionTextBase extends Question {
7895
7946
  protected hasPlaceHolder(): boolean;
7896
7947
  getControlClass(): string;
7897
7948
  }
7949
+ export declare class SurveyQuestionDropdown extends SurveyQuestionDropdownBase<Question> {
7950
+ constructor(props: any);
7951
+ protected renderElement(): any;
7952
+ protected renderOther(cssClasses: any): any;
7953
+ }
7898
7954
  export declare class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {
7899
7955
  constructor(props: any);
7900
7956
  protected getQuestion(): Question;
@@ -7904,6 +7960,10 @@ export declare class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndE
7904
7960
  protected getHeaderText(): string;
7905
7961
  protected renderQuestion(): any;
7906
7962
  }
7963
+ export declare class SurveyQuestionRatingDropdown extends SurveyQuestionDropdownBase<QuestionRatingModel> {
7964
+ constructor(props: any);
7965
+ protected renderElement(): any;
7966
+ }
7907
7967
  /*
7908
7968
  * The flow panel object. It is a container with flow layout where you can mix questions with markdown text.
7909
7969
  */
@@ -8321,6 +8381,8 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
8321
8381
  protected getConditionObjectRowText(index: number): string;
8322
8382
  protected getConditionObjectsRowIndeces(): Array<any>;
8323
8383
  getProgressInfo(): IProgressInfo;
8384
+ protected updateProgressInfoByValues(res: IProgressInfo): void;
8385
+ protected updateProgressInfoByRow(res: IProgressInfo, rowValue: any): void;
8324
8386
  protected onBeforeValueChanged(val: any): void;
8325
8387
  protected setQuestionValue(newValue: any): void;
8326
8388
  supportGoNextPageAutomatic(): boolean;
@@ -8365,6 +8427,8 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
8365
8427
  getColumnHeaderWrapperComponentData(cell: MatrixDropdownCell): any;
8366
8428
  getRowHeaderWrapperComponentName(cell: MatrixDropdownCell): string;
8367
8429
  getRowHeaderWrapperComponentData(cell: MatrixDropdownCell): any;
8430
+ get showHorizontalScroll(): boolean;
8431
+ getRootCss(): string;
8368
8432
  }
8369
8433
  /*
8370
8434
  * A Model for a simple matrix question.
@@ -8710,6 +8774,7 @@ export declare class QuestionMatrixDropdownModel extends QuestionMatrixDropdownM
8710
8774
  protected generateRows(): Array<MatrixDropdownRowModel>;
8711
8775
  protected createMatrixRow(item: ItemValue, value: any): MatrixDropdownRowModel;
8712
8776
  protected getSearchableItemValueKeys(keys: any): void;
8777
+ protected updateProgressInfoByValues(res: IProgressInfo): void;
8713
8778
  }
8714
8779
  /*
8715
8780
  * A Model for a matrix dymanic question. You may use a dropdown, checkbox, radiogroup, text and comment questions as a cell editors.
@@ -8758,6 +8823,7 @@ export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownMo
8758
8823
  */
8759
8824
  get rowCount(): number;
8760
8825
  set rowCount(val: number);
8826
+ protected updateProgressInfoByValues(res: IProgressInfo): void;
8761
8827
  /*
8762
8828
  * Set this property to true, to allow rows drag and drop.
8763
8829
  */
@@ -9148,6 +9214,7 @@ export declare var surveyStrings: any;
9148
9214
  * An alias for the metadata object. It contains object properties' runtime information and allows you to modify it.
9149
9215
  */
9150
9216
  export declare var Serializer: JsonMetadata;
9217
+ export declare var surveyBuiltInVarible: string;
9151
9218
  export declare var registerFunction: any;
9152
9219
  export declare var parse: any;
9153
9220
  export declare var defaultActionBarCss: {
@@ -9259,6 +9326,7 @@ export declare var defaultStandardCss: {
9259
9326
  },
9260
9327
  boolean: {
9261
9328
  root: string,
9329
+ rootRadio: string,
9262
9330
  item: string,
9263
9331
  control: string,
9264
9332
  itemChecked: string,
@@ -9609,6 +9677,7 @@ export declare var defaultBootstrapCss: {
9609
9677
  },
9610
9678
  boolean: {
9611
9679
  root: string,
9680
+ rootRadio: string,
9612
9681
  item: string,
9613
9682
  control: string,
9614
9683
  itemChecked: string,
@@ -9925,6 +9994,7 @@ export declare var defaultBootstrapMaterialCss: {
9925
9994
  },
9926
9995
  boolean: {
9927
9996
  root: string,
9997
+ rootRadio: string,
9928
9998
  item: string,
9929
9999
  control: string,
9930
10000
  itemChecked: string,
@@ -10346,7 +10416,13 @@ export declare var defaultV2Css: {
10346
10416
  boolean: {
10347
10417
  mainRoot: string,
10348
10418
  root: string,
10419
+ rootRadio: string,
10349
10420
  item: string,
10421
+ radioItem: string,
10422
+ radioItemChecked: string,
10423
+ radioLabel: string,
10424
+ radioControlLabel: string,
10425
+ radioFieldset: string,
10350
10426
  itemOnError: string,
10351
10427
  control: string,
10352
10428
  itemChecked: string,
@@ -10357,8 +10433,11 @@ export declare var defaultV2Css: {
10357
10433
  disabledLabel: string,
10358
10434
  itemDecorator: string,
10359
10435
  materialDecorator: string,
10436
+ itemRadioDecorator: string,
10437
+ materialRadioDecorator: string,
10360
10438
  sliderText: string,
10361
10439
  slider: string,
10440
+ itemControl: string,
10362
10441
  },
10363
10442
  text: {
10364
10443
  root: string,
@@ -10378,7 +10457,6 @@ export declare var defaultV2Css: {
10378
10457
  dropdown: {
10379
10458
  root: string,
10380
10459
  small: string,
10381
- control: string,
10382
10460
  selectWrapper: string,
10383
10461
  other: string,
10384
10462
  onError: string,
@@ -10389,9 +10467,10 @@ export declare var defaultV2Css: {
10389
10467
  itemHover: string,
10390
10468
  itemControl: string,
10391
10469
  itemDecorator: string,
10470
+ control: string,
10392
10471
  controlDisabled: string,
10393
- controlLabel: string,
10394
10472
  controlEmpty: string,
10473
+ controlLabel: string,
10395
10474
  materialDecorator: string,
10396
10475
  },
10397
10476
  imagepicker: {
@@ -10433,6 +10512,7 @@ export declare var defaultV2Css: {
10433
10512
  },
10434
10513
  matrixdropdown: {
10435
10514
  mainRoot: string,
10515
+ rootScroll: string,
10436
10516
  root: string,
10437
10517
  cell: string,
10438
10518
  headerCell: string,
@@ -10450,6 +10530,7 @@ export declare var defaultV2Css: {
10450
10530
  },
10451
10531
  matrixdynamic: {
10452
10532
  mainRoot: string,
10533
+ rootScroll: string,
10453
10534
  empty: string,
10454
10535
  root: string,
10455
10536
  cell: string,
@@ -10478,6 +10559,7 @@ export declare var defaultV2Css: {
10478
10559
  cellQuestionWrapper: string,
10479
10560
  },
10480
10561
  rating: {
10562
+ rootDropdown: string,
10481
10563
  root: string,
10482
10564
  item: string,
10483
10565
  itemOnError: string,
@@ -10487,6 +10569,10 @@ export declare var defaultV2Css: {
10487
10569
  itemText: string,
10488
10570
  maxText: string,
10489
10571
  itemDisabled: string,
10572
+ control: string,
10573
+ controlDisabled: string,
10574
+ controlEmpty: string,
10575
+ onError: string,
10490
10576
  },
10491
10577
  comment: {
10492
10578
  root: string,
@@ -10521,11 +10607,15 @@ export declare var defaultV2Css: {
10521
10607
  removeFileSvgIconId: string,
10522
10608
  wrapper: string,
10523
10609
  defaultImage: string,
10610
+ defaultImageIconId: string,
10611
+ leftIconId: string,
10612
+ rightIconId: string,
10524
10613
  removeFileButton: string,
10525
10614
  dragAreaPlaceholder: string,
10526
10615
  imageWrapper: string,
10527
10616
  single: string,
10528
10617
  singleImage: string,
10618
+ mobile: string,
10529
10619
  },
10530
10620
  signaturepad: {
10531
10621
  mainRoot: string,
@@ -10775,6 +10865,7 @@ export declare var modernCss: {
10775
10865
  },
10776
10866
  boolean: {
10777
10867
  root: string,
10868
+ rootRadio: string,
10778
10869
  small: string,
10779
10870
  item: string,
10780
10871
  control: string,