survey-react 1.9.18 → 1.9.19

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,5 +1,5 @@
1
1
  /*
2
- * Type definition for Survey JavaScript library for React v1.9.18
2
+ * Type definition for Survey JavaScript library for React v1.9.19
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
  */
@@ -84,6 +84,40 @@ export interface IParseOptions {
84
84
  tracer?: any;
85
85
  }
86
86
  /*
87
+ * Base interface for expression execution
88
+ */
89
+ export interface IExpresionExecutor {
90
+ /*
91
+ * This call back runs on executing expression if there is at least one async function
92
+ */
93
+ onComplete: any;
94
+ /*
95
+ * The expression as string, property with get/set
96
+ */
97
+ expression: string;
98
+ /*
99
+ * Returns true if the expression is valid and can be executed
100
+ */
101
+ canRun(): boolean;
102
+ /*
103
+ * Run the expression. Returns the result of execution.
104
+ * The result can be undefined if there is an asyn function. In this case result will be returned onComplete callback.
105
+ */
106
+ run(values: any, properties: any): any;
107
+ /*
108
+ * Returns the list of variables that used in the expression. They defined as: {variableName} in default parser.
109
+ */
110
+ getVariables(): Array<any>;
111
+ /*
112
+ * Returns true if there is a function in the expression
113
+ */
114
+ hasFunction(): boolean;
115
+ /*
116
+ * Returns true if there is an async function in the expression
117
+ */
118
+ isAsync: boolean;
119
+ }
120
+ /*
87
121
  * Defines an individual action. Action items can be displayed in certain survey elements - in Toolbar (or action bar), in titles (of pages, panels, questions), in matrix rows (as 'expand details' or 'remove row' buttons), and etc.
88
122
  */
89
123
  export interface IAction {
@@ -176,6 +210,7 @@ export interface IAction {
176
210
  */
177
211
  mode?: "popup" | "large" | "small";
178
212
  visibleIndex?: number;
213
+ needSpace?: boolean;
179
214
  }
180
215
  export interface IDimensions {
181
216
  scroll: number;
@@ -894,13 +929,7 @@ export declare class Event<T, Options> {
894
929
  }
895
930
  export declare class ExpressionRunnerBase {
896
931
  constructor(expression: string);
897
- expressionValue: string;
898
- operand: Operand;
899
- processValue: ProcessValue;
900
- parser: ConditionsParser;
901
- isAsyncValue: boolean;
902
- hasFunctionValue: boolean;
903
- asyncFuncList: any;
932
+ expressionExecutor: IExpresionExecutor;
904
933
  get expression(): string;
905
934
  set expression(val: string);
906
935
  getVariables(): Array<any>;
@@ -1172,6 +1201,7 @@ export declare class ReactQuestionFactory {
1172
1201
  export declare class ReactSurveyElementsWrapper {
1173
1202
  static wrapRow(survey: any, element: any, row: any): any;
1174
1203
  static wrapElement(survey: any, element: any, question: any): any;
1204
+ static wrapQuestionContent(survey: any, element: any, question: any): any;
1175
1205
  static wrapItemValue(survey: any, element: any, question: any, item: any): any;
1176
1206
  static wrapMatrixCell(survey: any, element: any, cell: any, reason?: string): any;
1177
1207
  }
@@ -1230,6 +1260,10 @@ export declare class SurveyElementBase<P, S> extends React.Component<P, S> {
1230
1260
  componentDidMount(): void;
1231
1261
  componentWillUnmount(): void;
1232
1262
  componentDidUpdate(prevProps: any, prevState: any): void;
1263
+ _allowComponentUpdate: boolean;
1264
+ protected allowComponentUpdate(): void;
1265
+ protected denyComponentUpdate(): void;
1266
+ shouldComponentUpdate(nextProps: any, nextState: any): boolean;
1233
1267
  render(): any;
1234
1268
  protected wrapElement(element: any): any;
1235
1269
  protected get isRendering(): boolean;
@@ -1432,6 +1466,7 @@ export declare class Action extends Base implements IAction {
1432
1466
  mode: "popup" | "large" | "small";
1433
1467
  disableTabStop: boolean;
1434
1468
  disableShrink: boolean;
1469
+ needSpace: boolean;
1435
1470
  cssClassesValue: any;
1436
1471
  get cssClasses(): any;
1437
1472
  get disabled(): boolean;
@@ -1701,6 +1736,23 @@ export declare class ExceedSizeError extends SurveyError {
1701
1736
  getErrorType(): string;
1702
1737
  getDefaultText(): string;
1703
1738
  }
1739
+ export declare class ExpressionExecutor implements IExpresionExecutor {
1740
+ onComplete: any;
1741
+ expressionValue: string;
1742
+ operand: Operand;
1743
+ processValue: ProcessValue;
1744
+ parser: ConditionsParser;
1745
+ isAsyncValue: boolean;
1746
+ hasFunctionValue: boolean;
1747
+ asyncFuncList: any;
1748
+ get expression(): string;
1749
+ set expression(val: string);
1750
+ getVariables(): Array<any>;
1751
+ hasFunction(): boolean;
1752
+ get isAsync(): boolean;
1753
+ canRun(): boolean;
1754
+ run(values: any, properties?: any): any;
1755
+ }
1704
1756
  /*
1705
1757
  * Base class for HtmlConditionItem and UrlConditionItem classes.
1706
1758
  */
@@ -2337,7 +2389,7 @@ export declare class Popup extends SurveyElementBase<IPopupProps, any> {
2337
2389
  protected getStateElement(): any;
2338
2390
  componentDidMount(): void;
2339
2391
  componentWillUnmount(): void;
2340
- shouldComponentUpdate(nextProps: IPopupProps): boolean;
2392
+ shouldComponentUpdate(nextProps: IPopupProps, nextState: any): boolean;
2341
2393
  render(): any;
2342
2394
  }
2343
2395
  export declare class PopupBaseViewModel extends Base {
@@ -2735,8 +2787,10 @@ export declare class SurveyQuestion extends SurveyElementBase<any, any> {
2735
2787
  componentWillUnmount(): void;
2736
2788
  componentDidUpdate(prevProps: any, prevState: any): void;
2737
2789
  protected canRender(): boolean;
2790
+ protected renderQuestionContent(): any;
2738
2791
  protected renderElement(): any;
2739
2792
  protected wrapElement(element: any): any;
2793
+ protected wrapQuestionContent(element: any): any;
2740
2794
  protected renderQuestion(): any;
2741
2795
  protected renderDescription(cssClasses: any, isUnderInput?: boolean): any;
2742
2796
  protected renderComment(cssClasses: any): any;
@@ -2754,7 +2808,7 @@ export declare class SurveyQuestionElementBase extends SurveyElementBase<any, an
2754
2808
  protected getRenderedElement(): Base;
2755
2809
  protected get creator(): ISurveyCreator;
2756
2810
  protected canRender(): boolean;
2757
- shouldComponentUpdate(): boolean;
2811
+ shouldComponentUpdate(nextProps: any, nextState: any): boolean;
2758
2812
  protected get isDisplayMode(): boolean;
2759
2813
  protected wrapCell(cell: any, element: any, reason: string): any;
2760
2814
  }
@@ -2919,7 +2973,7 @@ export declare class UploadingFileError extends SurveyError {
2919
2973
  protected getDefaultText(): string;
2920
2974
  }
2921
2975
  export declare class VerticalResponsivityManager extends ResponsivityManager {
2922
- constructor(container: any, model: any, itemsSelector: string, dotsItemSize?: number);
2976
+ constructor(container: any, model: any, itemsSelector: string, dotsItemSize?: number, minDimension?: number);
2923
2977
  protected getDimensions(): IDimensions;
2924
2978
  protected getAvailableSpace(): number;
2925
2979
  protected calcItemSize(item: any): number;
@@ -4392,6 +4446,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
4392
4446
  get isLogoAfter(): boolean;
4393
4447
  get logoClassNames(): string;
4394
4448
  get renderedHasTitle(): boolean;
4449
+ get renderedHasDescription(): boolean;
4395
4450
  get hasTitle(): boolean;
4396
4451
  get renderedHasLogo(): boolean;
4397
4452
  get renderedHasHeader(): boolean;
@@ -5150,17 +5205,25 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
5150
5205
  processTextEx(text: string, returnDisplayValue: boolean, doEncoding: boolean): any;
5151
5206
  getSurveyMarkdownHtml(element: Base, text: string, name: string): string;
5152
5207
  /*
5153
- * Returns an amount of corrected quiz answers.
5208
+ * Deprecated. Use the getCorrectAnswerCount method instead.
5154
5209
  */
5155
5210
  getCorrectedAnswerCount(): number;
5156
5211
  /*
5212
+ * Returns an amount of corrected quiz answers.
5213
+ */
5214
+ getCorrectAnswerCount(): number;
5215
+ /*
5157
5216
  * Returns quiz question number. It may be different from `getQuizQuestions.length` because some widgets like matrix may have several questions.
5158
5217
  */
5159
5218
  getQuizQuestionCount(): number;
5160
5219
  /*
5161
- * Returns an amount of incorrect quiz answers.
5220
+ * Deprecated. Use the getInCorrectAnswerCount method instead.
5162
5221
  */
5163
5222
  getInCorrectedAnswerCount(): number;
5223
+ /*
5224
+ * Returns an amount of incorrect quiz answers.
5225
+ */
5226
+ getInCorrectAnswerCount(): number;
5164
5227
  getCorrectedAnswers(): number;
5165
5228
  getInCorrectedAnswers(): number;
5166
5229
  /*
@@ -5242,6 +5305,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
5242
5305
  */
5243
5306
  focusQuestion(name: string): boolean;
5244
5307
  getElementWrapperComponentName(element: any, reason?: string): string;
5308
+ getQuestionContentWrapperComponentName(element: any): string;
5245
5309
  getRowWrapperComponentName(row: QuestionRowModel): string;
5246
5310
  getElementWrapperComponentData(element: any, reason?: string): any;
5247
5311
  getRowWrapperComponentData(row: QuestionRowModel): any;
@@ -5330,7 +5394,7 @@ export declare class SurveyQuestionCheckboxItem extends ReactSurveyElement {
5330
5394
  protected get textStyle(): any;
5331
5395
  protected get isFirst(): any;
5332
5396
  protected get index(): number;
5333
- shouldComponentUpdate(): boolean;
5397
+ shouldComponentUpdate(nextProps: any, nextState: any): boolean;
5334
5398
  handleOnChange: any;
5335
5399
  selectAllChanged: any;
5336
5400
  protected canRender(): boolean;
@@ -5457,10 +5521,6 @@ export declare class SurveyQuestionPanelDynamic extends SurveyQuestionElementBas
5457
5521
  protected get question(): any;
5458
5522
  componentDidMount(): void;
5459
5523
  componentWillUnmount(): void;
5460
- handleOnPanelAddClick(event: any): void;
5461
- handleOnPanelPrevClick(event: any): void;
5462
- handleOnPanelNextClick(event: any): void;
5463
- handleOnRangeChange(event: any): void;
5464
5524
  protected renderElement(): any;
5465
5525
  protected renderNavigator(): any;
5466
5526
  protected rendrerPrevButton(): any;
@@ -5470,6 +5530,10 @@ export declare class SurveyQuestionPanelDynamic extends SurveyQuestionElementBas
5470
5530
  protected renderNavigatorV2(): any;
5471
5531
  protected renderPlaceholder(): any;
5472
5532
  }
5533
+ export declare class SurveyQuestionPanelDynamicAction extends ReactSurveyElement {
5534
+ constructor(props: any);
5535
+ protected get question(): any;
5536
+ }
5473
5537
  export declare class SurveyQuestionRadioItem extends ReactSurveyElement {
5474
5538
  constructor(props: any);
5475
5539
  protected getStateElement(): Base;
@@ -5478,7 +5542,7 @@ export declare class SurveyQuestionRadioItem extends ReactSurveyElement {
5478
5542
  protected get textStyle(): any;
5479
5543
  protected get index(): number;
5480
5544
  protected get isChecked(): boolean;
5481
- shouldComponentUpdate(): boolean;
5545
+ shouldComponentUpdate(nextProps: any, nextState: any): boolean;
5482
5546
  handleOnChange(event: any): void;
5483
5547
  protected canRender(): boolean;
5484
5548
  protected renderElement(): any;
@@ -6418,6 +6482,7 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
6418
6482
  protected supportResponsiveness(): boolean;
6419
6483
  resizeObserver: any;
6420
6484
  protected getCompactRenderAs(): string;
6485
+ protected getDesktopRenderAs(): string;
6421
6486
  protected processResponsiveness(requiredWidth: number, availableWidth: number): void;
6422
6487
  dispose(): void;
6423
6488
  }
@@ -6491,6 +6556,11 @@ export declare class SurveyQuestionMatrixDynamic extends SurveyQuestionMatrixDro
6491
6556
  protected renderNoRowsContent(cssClasses: any): any;
6492
6557
  protected renderAddRowButton(cssClasses: any, isEmptySection?: boolean): any;
6493
6558
  }
6559
+ export declare class SurveyQuestionPanelDynamicAddButton extends SurveyQuestionPanelDynamicAction {
6560
+ constructor(props: any);
6561
+ protected handleClick: any;
6562
+ protected renderElement(): any;
6563
+ }
6494
6564
  export declare class SurveyQuestionPanelDynamicItem extends SurveyPanel {
6495
6565
  constructor(props: any);
6496
6566
  protected getSurvey(): SurveyModel;
@@ -6499,6 +6569,20 @@ export declare class SurveyQuestionPanelDynamicItem extends SurveyPanel {
6499
6569
  render(): any;
6500
6570
  protected renderButton(): any;
6501
6571
  }
6572
+ export declare class SurveyQuestionPanelDynamicNextButton extends SurveyQuestionPanelDynamicAction {
6573
+ constructor(props: any);
6574
+ protected handleClick: any;
6575
+ protected renderElement(): any;
6576
+ }
6577
+ export declare class SurveyQuestionPanelDynamicPrevButton extends SurveyQuestionPanelDynamicAction {
6578
+ constructor(props: any);
6579
+ protected handleClick: any;
6580
+ protected renderElement(): any;
6581
+ }
6582
+ export declare class SurveyQuestionPanelDynamicProgressText extends SurveyQuestionPanelDynamicAction {
6583
+ constructor(props: any);
6584
+ protected renderElement(): any;
6585
+ }
6502
6586
  export declare class SurveyQuestionText extends SurveyQuestionUncontrolledElement<QuestionTextModel> {
6503
6587
  constructor(props: any);
6504
6588
  _isWaitingForEnter: boolean;
@@ -7518,6 +7602,7 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
7518
7602
  getPlainData(options?: any): any;
7519
7603
  updateElementCss(reNew?: boolean): void;
7520
7604
  get progressText(): string;
7605
+ get progress(): string;
7521
7606
  getRootCss(): string;
7522
7607
  getPanelWrapperCss(): string;
7523
7608
  getPanelRemoveButtonCss(): string;
@@ -7531,6 +7616,11 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
7531
7616
  set noEntriesText(val: string);
7532
7617
  get locNoEntriesText(): LocalizableString;
7533
7618
  getShowNoEntriesPlaceholder(): boolean;
7619
+ needResponsiveWidth(): boolean;
7620
+ footerToolbarValue: any;
7621
+ get footerToolbar(): any;
7622
+ legacyNavigation: boolean;
7623
+ updateFooterActionsCallback: any;
7534
7624
  }
7535
7625
  /*
7536
7626
  * A Model for a rating question.
@@ -7594,11 +7684,13 @@ export declare class QuestionRatingModel extends Question {
7594
7684
  * are displayed as plain non-clickable texts.
7595
7685
  */
7596
7686
  displayRateDescriptionsAsExtremeItems: boolean;
7687
+ useDropdown: "auto" | "always" | "never";
7597
7688
  protected valueToData(val: any): any;
7598
7689
  /*
7599
7690
  * Click value again to clear.
7600
7691
  */
7601
7692
  setValueFromClick(value: any): void;
7693
+ get ratingRootCss(): string;
7602
7694
  getItemClass(item: ItemValue): string;
7603
7695
  getControlClass(): string;
7604
7696
  get optionsCaption(): string;
@@ -7609,8 +7701,10 @@ export declare class QuestionRatingModel extends Question {
7609
7701
  set renderedValue(val: boolean);
7610
7702
  get visibleChoices(): any;
7611
7703
  get readOnlyText(): any;
7704
+ needResponsiveWidth(): boolean;
7612
7705
  protected supportResponsiveness(): boolean;
7613
7706
  protected getCompactRenderAs(): string;
7707
+ protected getDesktopRenderAs(): string;
7614
7708
  }
7615
7709
  /*
7616
7710
  * It is a base class for checkbox, dropdown and radiogroup questions.
@@ -8203,6 +8297,7 @@ export declare class QuestionImageModel extends QuestionNonValue {
8203
8297
  * The rendered mode.
8204
8298
  */
8205
8299
  get renderedMode(): string;
8300
+ getImageCss(): string;
8206
8301
  protected calculateRenderedMode(): void;
8207
8302
  }
8208
8303
  /*
@@ -9217,6 +9312,7 @@ export declare var Serializer: JsonMetadata;
9217
9312
  export declare var surveyBuiltInVarible: string;
9218
9313
  export declare var registerFunction: any;
9219
9314
  export declare var parse: any;
9315
+ export declare var createExpressionExecutorFactory: any;
9220
9316
  export declare var defaultActionBarCss: {
9221
9317
  root: string,
9222
9318
  item: string,
@@ -9448,6 +9544,8 @@ export declare var defaultStandardCss: {
9448
9544
  buttonRemove: string,
9449
9545
  buttonRemoveRight: string,
9450
9546
  buttonPrev: string,
9547
+ buttonPrevDisabled: string,
9548
+ buttonNextDisabled: string,
9451
9549
  buttonNext: string,
9452
9550
  progressContainer: string,
9453
9551
  progress: string,
@@ -9555,6 +9653,7 @@ export declare var surveyTimerFunctions: {
9555
9653
  setTimeout: any,
9556
9654
  clearTimeout: any,
9557
9655
  };
9656
+ export declare var keyFocusedClassName: any;
9558
9657
  export declare var matrixDropdownColumnTypes: {
9559
9658
  dropdown: {
9560
9659
  onCellQuestionUpdate: any,
@@ -9799,6 +9898,8 @@ export declare var defaultBootstrapCss: {
9799
9898
  buttonRemoveRight: string,
9800
9899
  buttonPrev: string,
9801
9900
  buttonNext: string,
9901
+ buttonPrevDisabled: string,
9902
+ buttonNextDisabled: string,
9802
9903
  progressContainer: string,
9803
9904
  progress: string,
9804
9905
  progressBar: string,
@@ -10122,6 +10223,8 @@ export declare var defaultBootstrapMaterialCss: {
10122
10223
  buttonRemoveRight: string,
10123
10224
  buttonPrev: string,
10124
10225
  buttonNext: string,
10226
+ buttonPrevDisabled: string,
10227
+ buttonNextDisabled: string,
10125
10228
  progressContainer: string,
10126
10229
  progress: string,
10127
10230
  progressBar: string,
@@ -10276,9 +10379,9 @@ export declare var defaultV2Css: {
10276
10379
  button: string,
10277
10380
  buttonRemove: string,
10278
10381
  buttonAdd: string,
10279
- progressTop: string,
10280
- progressBottom: string,
10281
10382
  buttonPrev: string,
10383
+ buttonPrevDisabled: string,
10384
+ buttonNextDisabled: string,
10282
10385
  buttonNext: string,
10283
10386
  progressContainer: string,
10284
10387
  progress: string,
@@ -10357,6 +10460,7 @@ export declare var defaultV2Css: {
10357
10460
  mainRoot: string,
10358
10461
  root: string,
10359
10462
  image: string,
10463
+ adaptive: string,
10360
10464
  withFrame: string,
10361
10465
  },
10362
10466
  html: {
@@ -10561,6 +10665,7 @@ export declare var defaultV2Css: {
10561
10665
  rating: {
10562
10666
  rootDropdown: string,
10563
10667
  root: string,
10668
+ rootWrappable: string,
10564
10669
  item: string,
10565
10670
  itemOnError: string,
10566
10671
  itemHover: string,
@@ -10668,6 +10773,7 @@ export declare var defaultV2Css: {
10668
10773
  itemPressed: string,
10669
10774
  itemAsIcon: string,
10670
10775
  itemIcon: string,
10776
+ itemTitle: string,
10671
10777
  },
10672
10778
  };
10673
10779
  export declare var modernCss: {
@@ -10720,6 +10826,8 @@ export declare var modernCss: {
10720
10826
  progressBottom: string,
10721
10827
  buttonPrev: string,
10722
10828
  buttonNext: string,
10829
+ buttonPrevDisabled: string,
10830
+ buttonNextDisabled: string,
10723
10831
  progressContainer: string,
10724
10832
  progress: string,
10725
10833
  progressBar: string,