survey-react 1.9.14 → 1.9.17

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.14
2
+ * Type definition for Survey JavaScript library for React v1.9.17
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;
@@ -2780,6 +2778,7 @@ export declare class SurveyTimerModel extends Base {
2780
2778
  text: string;
2781
2779
  spent: number;
2782
2780
  get survey(): ISurvey;
2781
+ onCreating(): void;
2783
2782
  timerFunc: any;
2784
2783
  start(): void;
2785
2784
  stop(): void;
@@ -3881,10 +3880,14 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
3881
3880
  */
3882
3881
  onFocusInPanel: EventBase<SurveyModel>;
3883
3882
  /*
3884
- * You can use this event to decide whether show or hide choice item in checkbox, dropdown and radiogroup like questions
3885
- * <br/> `sender` - the survey object that fires the event
3886
- * <br/> `options.question` - a question that contains choices.
3887
- * <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.
3888
3891
  */
3889
3892
  onShowingChoiceItem: EventBase<SurveyModel>;
3890
3893
  /*
@@ -5081,6 +5084,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
5081
5084
  endLoadingFromJson(): void;
5082
5085
  protected onBeforeCreating(): void;
5083
5086
  protected onCreating(): void;
5087
+ getBuiltInVariableValue(name: string): number;
5084
5088
  hasVisibleQuestionByValueName(valueName: string): boolean;
5085
5089
  questionCountByValueName(valueName: string): number;
5086
5090
  /*
@@ -5513,7 +5517,6 @@ export declare class SurveyQuestionRating extends SurveyQuestionElementBase {
5513
5517
  handleOnClick(event: any): void;
5514
5518
  protected renderElement(): any;
5515
5519
  protected renderItem(key: string, item: any, index: number, cssClasses: any): any;
5516
- protected renderOther(cssClasses: any): any;
5517
5520
  }
5518
5521
  export declare class SurveyQuestionSignaturePad extends SurveyQuestionElementBase {
5519
5522
  constructor(props: any);
@@ -5528,6 +5531,12 @@ export declare class SurveyQuestionUncontrolledElement<T> extends SurveyQuestion
5528
5531
  protected getValueCore(): any;
5529
5532
  protected updateDomElement(): void;
5530
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
+ }
5531
5540
  /*
5532
5541
  * It extends the Trigger base class and add properties required for SurveyJS classes.
5533
5542
  */
@@ -5635,8 +5644,10 @@ export declare class PanelModelBase extends SurveyElement implements IPanel, ICo
5635
5644
  getType(): string;
5636
5645
  setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
5637
5646
  endLoadingFromJson(): void;
5647
+ showTitle: boolean;
5638
5648
  get hasTitle(): boolean;
5639
5649
  protected canShowTitle(): boolean;
5650
+ showDescription: boolean;
5640
5651
  get _showDescription(): boolean;
5641
5652
  localeChanged(): void;
5642
5653
  locStrsChanged(): void;
@@ -6401,7 +6412,14 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
6401
6412
  get validatedValue(): any;
6402
6413
  set validatedValue(val: any);
6403
6414
  getAllValues(): any;
6415
+ transformToMobileView(): void;
6416
+ transformToDesktopView(): void;
6404
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;
6405
6423
  }
6406
6424
  export declare class SurveyFlowPanel extends SurveyPanel {
6407
6425
  constructor(props: any);
@@ -6454,13 +6472,11 @@ export declare class SurveyQuestionCustom extends SurveyQuestionUncontrolledElem
6454
6472
  protected getStateElements(): Array<Base>;
6455
6473
  protected renderElement(): any;
6456
6474
  }
6457
- export declare class SurveyQuestionDropdown extends SurveyQuestionUncontrolledElement<QuestionDropdownModel> {
6475
+ export declare class SurveyQuestionDropdownBase<T> extends SurveyQuestionUncontrolledElement<T> {
6458
6476
  constructor(props: any);
6459
6477
  protected setValueCore(newValue: any): void;
6460
6478
  protected getValueCore(): any;
6461
- protected renderElement(): any;
6462
6479
  protected renderSelect(cssClasses: any): any;
6463
- protected renderOther(cssClasses: any): any;
6464
6480
  }
6465
6481
  export declare class SurveyQuestionMatrixDropdown extends SurveyQuestionMatrixDropdownBase {
6466
6482
  constructor(props: any);
@@ -6802,6 +6818,8 @@ export declare class QuestionBooleanModel extends Question {
6802
6818
  onLabelClick(event: any, value: boolean): boolean;
6803
6819
  onSwitchClickModel(event: any): boolean;
6804
6820
  getRadioItemClass(css: any, value: any): string;
6821
+ protected supportResponsiveness(): boolean;
6822
+ protected getCompactRenderAs(): string;
6805
6823
  }
6806
6824
  export declare class QuestionCustomModelBase extends Question implements ISurveyImpl, ISurveyData, IPanel {
6807
6825
  constructor(name: string, customQuestion: ComponentQuestionJSON);
@@ -7582,6 +7600,17 @@ export declare class QuestionRatingModel extends Question {
7582
7600
  */
7583
7601
  setValueFromClick(value: any): void;
7584
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;
7585
7614
  }
7586
7615
  /*
7587
7616
  * It is a base class for checkbox, dropdown and radiogroup questions.
@@ -7917,6 +7946,11 @@ export declare class QuestionTextBase extends Question {
7917
7946
  protected hasPlaceHolder(): boolean;
7918
7947
  getControlClass(): string;
7919
7948
  }
7949
+ export declare class SurveyQuestionDropdown extends SurveyQuestionDropdownBase<Question> {
7950
+ constructor(props: any);
7951
+ protected renderElement(): any;
7952
+ protected renderOther(cssClasses: any): any;
7953
+ }
7920
7954
  export declare class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndErrorsCell {
7921
7955
  constructor(props: any);
7922
7956
  protected getQuestion(): Question;
@@ -7926,6 +7960,10 @@ export declare class SurveyQuestionMatrixDropdownCell extends SurveyQuestionAndE
7926
7960
  protected getHeaderText(): string;
7927
7961
  protected renderQuestion(): any;
7928
7962
  }
7963
+ export declare class SurveyQuestionRatingDropdown extends SurveyQuestionDropdownBase<QuestionRatingModel> {
7964
+ constructor(props: any);
7965
+ protected renderElement(): any;
7966
+ }
7929
7967
  /*
7930
7968
  * The flow panel object. It is a container with flow layout where you can mix questions with markdown text.
7931
7969
  */
@@ -8343,6 +8381,8 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
8343
8381
  protected getConditionObjectRowText(index: number): string;
8344
8382
  protected getConditionObjectsRowIndeces(): Array<any>;
8345
8383
  getProgressInfo(): IProgressInfo;
8384
+ protected updateProgressInfoByValues(res: IProgressInfo): void;
8385
+ protected updateProgressInfoByRow(res: IProgressInfo, rowValue: any): void;
8346
8386
  protected onBeforeValueChanged(val: any): void;
8347
8387
  protected setQuestionValue(newValue: any): void;
8348
8388
  supportGoNextPageAutomatic(): boolean;
@@ -8734,6 +8774,7 @@ export declare class QuestionMatrixDropdownModel extends QuestionMatrixDropdownM
8734
8774
  protected generateRows(): Array<MatrixDropdownRowModel>;
8735
8775
  protected createMatrixRow(item: ItemValue, value: any): MatrixDropdownRowModel;
8736
8776
  protected getSearchableItemValueKeys(keys: any): void;
8777
+ protected updateProgressInfoByValues(res: IProgressInfo): void;
8737
8778
  }
8738
8779
  /*
8739
8780
  * A Model for a matrix dymanic question. You may use a dropdown, checkbox, radiogroup, text and comment questions as a cell editors.
@@ -8782,6 +8823,7 @@ export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownMo
8782
8823
  */
8783
8824
  get rowCount(): number;
8784
8825
  set rowCount(val: number);
8826
+ protected updateProgressInfoByValues(res: IProgressInfo): void;
8785
8827
  /*
8786
8828
  * Set this property to true, to allow rows drag and drop.
8787
8829
  */
@@ -9172,6 +9214,7 @@ export declare var surveyStrings: any;
9172
9214
  * An alias for the metadata object. It contains object properties' runtime information and allows you to modify it.
9173
9215
  */
9174
9216
  export declare var Serializer: JsonMetadata;
9217
+ export declare var surveyBuiltInVarible: string;
9175
9218
  export declare var registerFunction: any;
9176
9219
  export declare var parse: any;
9177
9220
  export declare var defaultActionBarCss: {
@@ -9283,6 +9326,7 @@ export declare var defaultStandardCss: {
9283
9326
  },
9284
9327
  boolean: {
9285
9328
  root: string,
9329
+ rootRadio: string,
9286
9330
  item: string,
9287
9331
  control: string,
9288
9332
  itemChecked: string,
@@ -9633,6 +9677,7 @@ export declare var defaultBootstrapCss: {
9633
9677
  },
9634
9678
  boolean: {
9635
9679
  root: string,
9680
+ rootRadio: string,
9636
9681
  item: string,
9637
9682
  control: string,
9638
9683
  itemChecked: string,
@@ -9949,6 +9994,7 @@ export declare var defaultBootstrapMaterialCss: {
9949
9994
  },
9950
9995
  boolean: {
9951
9996
  root: string,
9997
+ rootRadio: string,
9952
9998
  item: string,
9953
9999
  control: string,
9954
10000
  itemChecked: string,
@@ -10370,6 +10416,7 @@ export declare var defaultV2Css: {
10370
10416
  boolean: {
10371
10417
  mainRoot: string,
10372
10418
  root: string,
10419
+ rootRadio: string,
10373
10420
  item: string,
10374
10421
  radioItem: string,
10375
10422
  radioItemChecked: string,
@@ -10410,7 +10457,6 @@ export declare var defaultV2Css: {
10410
10457
  dropdown: {
10411
10458
  root: string,
10412
10459
  small: string,
10413
- control: string,
10414
10460
  selectWrapper: string,
10415
10461
  other: string,
10416
10462
  onError: string,
@@ -10421,9 +10467,10 @@ export declare var defaultV2Css: {
10421
10467
  itemHover: string,
10422
10468
  itemControl: string,
10423
10469
  itemDecorator: string,
10470
+ control: string,
10424
10471
  controlDisabled: string,
10425
- controlLabel: string,
10426
10472
  controlEmpty: string,
10473
+ controlLabel: string,
10427
10474
  materialDecorator: string,
10428
10475
  },
10429
10476
  imagepicker: {
@@ -10512,6 +10559,7 @@ export declare var defaultV2Css: {
10512
10559
  cellQuestionWrapper: string,
10513
10560
  },
10514
10561
  rating: {
10562
+ rootDropdown: string,
10515
10563
  root: string,
10516
10564
  item: string,
10517
10565
  itemOnError: string,
@@ -10521,6 +10569,10 @@ export declare var defaultV2Css: {
10521
10569
  itemText: string,
10522
10570
  maxText: string,
10523
10571
  itemDisabled: string,
10572
+ control: string,
10573
+ controlDisabled: string,
10574
+ controlEmpty: string,
10575
+ onError: string,
10524
10576
  },
10525
10577
  comment: {
10526
10578
  root: string,
@@ -10813,6 +10865,7 @@ export declare var modernCss: {
10813
10865
  },
10814
10866
  boolean: {
10815
10867
  root: string,
10868
+ rootRadio: string,
10816
10869
  small: string,
10817
10870
  item: string,
10818
10871
  control: string,