survey-react 1.9.24 → 1.9.27

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.24
2
+ * Type definition for Survey JavaScript library for React v1.9.27
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
  */
@@ -479,6 +479,11 @@ export interface IFindElement {
479
479
  element: Base;
480
480
  str: LocalizableString;
481
481
  }
482
+ export interface IExpressionRunnerInfo {
483
+ onExecute: any;
484
+ canRun?: any;
485
+ runner?: ExpressionRunner;
486
+ }
482
487
  export interface IValidatorOwner {
483
488
  getValidators(): Array<SurveyValidator>;
484
489
  validatedValue: any;
@@ -589,6 +594,7 @@ export declare class Base {
589
594
  localizableStrings: any;
590
595
  arraysInfo: any;
591
596
  eventList: any;
597
+ expressionInfo: any;
592
598
  bindingsValue: Bindings;
593
599
  isDisposedValue: boolean;
594
600
  onPropChangeFunctions: any;
@@ -648,6 +654,10 @@ export declare class Base {
648
654
  getType(): string;
649
655
  getSurvey(isLive?: boolean): ISurvey;
650
656
  /*
657
+ * Returns true if the question in design mode right now.
658
+ */
659
+ get isDesignMode(): boolean;
660
+ /*
651
661
  * Returns true if the object is inluded into survey, otherwise returns false.
652
662
  */
653
663
  get inSurvey(): boolean;
@@ -709,6 +719,11 @@ export declare class Base {
709
719
  protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
710
720
  protected propertyValueChanged(name: string, oldValue: any, newValue: any, arrayChanges?: ArrayChanges, target?: Base): void;
711
721
  protected get isInternal(): boolean;
722
+ addExpressionProperty(name: string, onExecute: any, canRun?: any): void;
723
+ getDataFilteredValues(): any;
724
+ getDataFilteredProperties(): any;
725
+ protected runConditionCore(values: any, properties: any): void;
726
+ protected canRunConditions(): boolean;
712
727
  /*
713
728
  * Register a function that will be called on a property value changed.
714
729
  */
@@ -1097,12 +1112,14 @@ export declare class OperandMaker {
1097
1112
  static signs: any;
1098
1113
  }
1099
1114
  export declare class PopupUtils {
1115
+ static bottomIndent: number;
1100
1116
  static calculatePosition(targetRect: any, height: number, width: number, verticalPosition: any, horizontalPosition: any, showPointer: boolean): INumberPosition;
1101
1117
  static updateVerticalDimensions(top: number, height: number, windowHeight: number): any;
1102
1118
  static updateHorizontalDimensions(left: number, width: number, windowWidth: number, horizontalPosition: any): any;
1103
1119
  static updateVerticalPosition(targetRect: any, height: number, verticalPosition: any, showPointer: boolean, windowHeight: number): any;
1104
1120
  static calculatePopupDirection(verticalPosition: any, horizontalPosition: any): string;
1105
1121
  static calculatePointerTarget(targetRect: any, top: number, left: number, verticalPosition: any, horizontalPosition: any, width?: number, margins?: number): INumberPosition;
1122
+ static updatePopupWidthBeforeShow(popupModel: any, e: any): void;
1106
1123
  }
1107
1124
  export declare class ProcessValue {
1108
1125
  constructor();
@@ -1119,7 +1136,6 @@ export declare class QuestionCustomWidget {
1119
1136
  name: string;
1120
1137
  widgetJson: any;
1121
1138
  htmlTemplate: string;
1122
- isFirstRender: boolean;
1123
1139
  afterRender(question: IQuestion, el: any): void;
1124
1140
  willUnmount(question: IQuestion, el: any): void;
1125
1141
  getDisplayValue(question: IQuestion, value?: any): string;
@@ -1503,6 +1519,7 @@ export declare class ActionContainer<T extends Action = Action> extends Base {
1503
1519
  setItems(items: any, sortByVisibleIndex?: boolean): void;
1504
1520
  initResponsivityManager(container: any): void;
1505
1521
  resetResponsivityManager(): void;
1522
+ getActionById(id: string): T;
1506
1523
  }
1507
1524
  export declare class AnswerRequiredError extends SurveyError {
1508
1525
  constructor(text?: string, errorOwner?: ISurveyErrorOwner);
@@ -1919,6 +1936,7 @@ export declare class JsonObjectProperty implements IObject {
1919
1936
  onGetValue: any;
1920
1937
  onSetValue: any;
1921
1938
  visibleIf: any;
1939
+ onExecuteExpression: any;
1922
1940
  onPropertyEditorUpdate: any;
1923
1941
  get id(): number;
1924
1942
  get classInfo(): JsonMetadataClass;
@@ -2016,6 +2034,7 @@ export declare class LocalizableString implements ILocalizableString {
2016
2034
  localizationName: string;
2017
2035
  onGetTextCallback: any;
2018
2036
  onGetDefaultTextCallback: any;
2037
+ onGetLocalizationTextCallback: any;
2019
2038
  onStrChanged: any;
2020
2039
  onSearchChanged: any;
2021
2040
  sharedData: LocalizableString;
@@ -2164,7 +2183,7 @@ export declare class MatrixDropdownColumn extends Base implements ILocalizableOw
2164
2183
  updateCellQuestion(cellQuestion: Question, data: any, onUpdateJson?: any): void;
2165
2184
  defaultCellTypeChanged(): void;
2166
2185
  protected calcCellQuestionType(row: MatrixDropdownRowModelBase): string;
2167
- protected updateTemplateQuestion(): void;
2186
+ protected updateTemplateQuestion(newCellType?: string): void;
2168
2187
  protected createNewQuestion(cellType: string): Question;
2169
2188
  previousChoicesId: string;
2170
2189
  protected setQuestionProperties(question: Question, onUpdateJson?: any): void;
@@ -2406,6 +2425,7 @@ export declare class PopupBaseViewModel extends Base {
2406
2425
  top: string;
2407
2426
  left: string;
2408
2427
  height: string;
2428
+ width: string;
2409
2429
  isVisible: boolean;
2410
2430
  popupDirection: string;
2411
2431
  pointerTarget: IPosition;
@@ -2454,6 +2474,7 @@ export declare class PopupContainer extends SurveyElementBase<any, any> {
2454
2474
  }
2455
2475
  export declare class PopupModel<T = any> extends Base {
2456
2476
  constructor(contentComponentName: string, contentComponentData: T, verticalPosition?: any, horizontalPosition?: any, showPointer?: boolean, isModal?: boolean, onCancel?: any, onApply?: any, onHide?: any, onShow?: any, cssClass?: string, title?: string);
2477
+ width: number;
2457
2478
  contentComponentName: string;
2458
2479
  contentComponentData: T;
2459
2480
  verticalPosition: any;
@@ -2467,6 +2488,7 @@ export declare class PopupModel<T = any> extends Base {
2467
2488
  cssClass: string;
2468
2489
  title: string;
2469
2490
  displayMode: "popup" | "overlay";
2491
+ widthMode: "contentWidth" | "fixedWidth";
2470
2492
  get isVisible(): boolean;
2471
2493
  set isVisible(val: boolean);
2472
2494
  toggleVisibility(): void;
@@ -3151,6 +3173,7 @@ export declare class ImageItemValue extends ItemValue implements ILocalizableOwn
3151
3173
  */
3152
3174
  get imageLink(): string;
3153
3175
  set imageLink(val: string);
3176
+ aspectRatio: number;
3154
3177
  get locImageLink(): LocalizableString;
3155
3178
  getLocale(): string;
3156
3179
  getMarkdownHtml(text: string, name: string): string;
@@ -3172,6 +3195,7 @@ export declare class ListModel extends ActionContainer {
3172
3195
  constructor(items: any, onItemSelect: any, allowSelection: boolean, selectedItem?: IAction, onFilteredTextChange?: any);
3173
3196
  onItemSelect: any;
3174
3197
  allowSelection: boolean;
3198
+ denySearch: boolean;
3175
3199
  needFilter: boolean;
3176
3200
  isExpanded: boolean;
3177
3201
  selectedItem: IAction;
@@ -3345,6 +3369,9 @@ export declare class SurveyElement extends SurveyElementCore implements ISurveyE
3345
3369
  get titleTabIndex(): number;
3346
3370
  get titleAriaExpanded(): boolean;
3347
3371
  setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
3372
+ protected canRunConditions(): boolean;
3373
+ getDataFilteredValues(): any;
3374
+ getDataFilteredProperties(): any;
3348
3375
  protected get surveyImpl(): ISurveyImpl;
3349
3376
  __setData(data: ISurveyData): void;
3350
3377
  get data(): ISurveyData;
@@ -3354,10 +3381,6 @@ export declare class SurveyElement extends SurveyElementCore implements ISurveyE
3354
3381
  get survey(): ISurvey;
3355
3382
  getSurvey(live?: boolean): ISurvey;
3356
3383
  protected setSurveyCore(value: ISurvey): void;
3357
- /*
3358
- * Returns true if the question in design mode right now.
3359
- */
3360
- get isDesignMode(): boolean;
3361
3384
  isContentElement: boolean;
3362
3385
  isEditableTemplateElement: boolean;
3363
3386
  isInteractiveDesignElement: boolean;
@@ -4496,6 +4519,10 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
4496
4519
  get loadingHtml(): string;
4497
4520
  set loadingHtml(val: string);
4498
4521
  get locLoadingHtml(): LocalizableString;
4522
+ /*
4523
+ * Default value for loadingHtml property
4524
+ */
4525
+ get defaultLoadingHtml(): string;
4499
4526
  get navigationBar(): any;
4500
4527
  /*
4501
4528
  * Adds a custom navigation item similar to the Previous Page, Next Page, and Complete buttons.
@@ -5317,6 +5344,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
5317
5344
  isMovingQuestion: boolean;
5318
5345
  startMovingQuestion(): void;
5319
5346
  stopMovingQuestion(): void;
5347
+ needRenderIcons: boolean;
5320
5348
  /*
5321
5349
  * Focus question by its name. If needed change the current page on the page where question is located.
5322
5350
  * Function returns false if there is no question with this name or question is invisible, otherwise it returns true.
@@ -5391,6 +5419,7 @@ export declare class SurveyQuestionBoolean extends SurveyQuestionElementBase {
5391
5419
  handleOnClick(event: any): void;
5392
5420
  handleOnSwitchClick(event: any): void;
5393
5421
  handleOnLabelClick(event: any, value: boolean): void;
5422
+ handleOnKeyDown(event: any): void;
5394
5423
  protected updateDomElement(): void;
5395
5424
  protected renderElement(): any;
5396
5425
  }
@@ -5475,6 +5504,7 @@ export declare class SurveyQuestionImagePicker extends SurveyQuestionElementBase
5475
5504
  constructor(props: any);
5476
5505
  protected get question(): any;
5477
5506
  protected renderElement(): any;
5507
+ protected getColumns(cssClasses: any): any;
5478
5508
  protected getItems(cssClasses: any): Array<any>;
5479
5509
  protected get textStyle(): any;
5480
5510
  protected renderItem(key: string, item: any, cssClasses: any): any;
@@ -6019,20 +6049,18 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
6019
6049
  constructor(name: string);
6020
6050
  static TextPreprocessorValuesMap: any;
6021
6051
  static questionCounter: number;
6022
- conditionRunner: ConditionRunner;
6023
6052
  isCustomWidgetRequested: boolean;
6024
6053
  customWidgetValue: QuestionCustomWidget;
6025
6054
  customWidgetData: any;
6026
6055
  focusCallback: any;
6027
6056
  surveyLoadCallback: any;
6028
6057
  displayValueCallback: any;
6029
- conditionEnabelRunner: ConditionRunner;
6030
- conditionRequiredRunner: ConditionRunner;
6031
6058
  defaultValueRunner: ExpressionRunner;
6032
6059
  isChangingViaDefaultValue: boolean;
6033
6060
  isValueChangedDirectly: boolean;
6034
6061
  valueChangedCallback: any;
6035
6062
  commentChangedCallback: any;
6063
+ localeChangedCallback: any;
6036
6064
  validateValueCallback: any;
6037
6065
  questionTitleTemplateCallback: any;
6038
6066
  afterRenderQuestionCallback: any;
@@ -6135,8 +6163,6 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
6135
6163
  moveTo(container: IPanel, insertBefore?: any): boolean;
6136
6164
  getProgressInfo(): IProgressInfo;
6137
6165
  setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
6138
- getDataFilteredValues(): any;
6139
- getDataFilteredProperties(): any;
6140
6166
  /*
6141
6167
  * A parent element. It can be panel or page.
6142
6168
  */
@@ -6222,6 +6248,7 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
6222
6248
  */
6223
6249
  get customWidget(): QuestionCustomWidget;
6224
6250
  updateCustomWidget(): void;
6251
+ localeChanged(): void;
6225
6252
  get isCompositeQuestion(): boolean;
6226
6253
  updateCommentElement(): void;
6227
6254
  onCommentInput(event: any): void;
@@ -6542,10 +6569,14 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
6542
6569
  transformToDesktopView(): void;
6543
6570
  needResponsiveWidth(): boolean;
6544
6571
  protected supportResponsiveness(): boolean;
6572
+ protected needResponsiveness(): boolean;
6573
+ protected checkForResponsiveness(el: any): void;
6545
6574
  resizeObserver: any;
6575
+ protected getObservedElementSelector(): string;
6576
+ onMobileChangedCallback: any;
6546
6577
  protected getCompactRenderAs(): string;
6547
6578
  protected getDesktopRenderAs(): string;
6548
- protected processResponsiveness(requiredWidth: number, availableWidth: number): void;
6579
+ protected processResponsiveness(requiredWidth: number, availableWidth: number): any;
6549
6580
  dispose(): void;
6550
6581
  }
6551
6582
  export declare class SurveyFlowPanel extends SurveyPanel {
@@ -6964,6 +6995,7 @@ export declare class QuestionBooleanModel extends Question {
6964
6995
  protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
6965
6996
  onLabelClick(event: any, value: boolean): boolean;
6966
6997
  onSwitchClickModel(event: any): boolean;
6998
+ onKeyDownCore(event: any): boolean;
6967
6999
  getRadioItemClass(css: any, value: any): string;
6968
7000
  protected supportResponsiveness(): boolean;
6969
7001
  protected getCompactRenderAs(): string;
@@ -7641,6 +7673,7 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
7641
7673
  protected onReadOnlyChanged(): void;
7642
7674
  onSurveyLoad(): void;
7643
7675
  onFirstRendering(): void;
7676
+ localeChanged(): void;
7644
7677
  runCondition(values: any, properties: any): void;
7645
7678
  protected runPanelsCondition(values: any, properties: any): void;
7646
7679
  onAnyValueChanged(name: string): void;
@@ -7999,6 +8032,7 @@ export declare class QuestionSelectBase extends Question {
7999
8032
  getColumnClass(): string;
8000
8033
  getItemIndex(item: any): number;
8001
8034
  getItemClass(item: any): string;
8035
+ protected getCurrentColCount(): number;
8002
8036
  protected getItemClassCore(item: any, options: any): string;
8003
8037
  getLabelClass(item: ItemValue): string;
8004
8038
  getControlLabelClass(item: ItemValue): string;
@@ -8019,7 +8053,7 @@ export declare class QuestionSelectBase extends Question {
8019
8053
  getItemId(item: ItemValue): string;
8020
8054
  get questionName(): string;
8021
8055
  getItemEnabled(item: ItemValue): any;
8022
- rootElement: any;
8056
+ protected rootElement: any;
8023
8057
  afterRender(el: any): void;
8024
8058
  prevIsOtherSelected: boolean;
8025
8059
  protected onValueChanged(): void;
@@ -8308,8 +8342,13 @@ export declare class QuestionDropdownModel extends QuestionSelectBase {
8308
8342
  */
8309
8343
  get autoComplete(): string;
8310
8344
  set autoComplete(val: string);
8345
+ denySearch: boolean;
8346
+ dropdownWidthMode: "contentWidth" | "editorWidth";
8311
8347
  getControlClass(): string;
8312
8348
  get readOnlyText(): any;
8349
+ protected onVisibleChoicesChanged(): void;
8350
+ _popupModel: any;
8351
+ get popupModel(): any;
8313
8352
  }
8314
8353
  /*
8315
8354
  * A Model for html question. Unlike other questions it doesn't have value and title.
@@ -8494,6 +8533,7 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
8494
8533
  getConditionJson(operator?: string, path?: string): any;
8495
8534
  clearIncorrectValues(): void;
8496
8535
  clearErrors(): void;
8536
+ localeChanged(): void;
8497
8537
  runCondition(values: any, properties: any): void;
8498
8538
  protected shouldRunColumnExpression(): boolean;
8499
8539
  protected runCellsCondition(values: any, properties: any): void;
@@ -8771,6 +8811,10 @@ export declare class QuestionTextModel extends QuestionTextBase {
8771
8811
  isReadOnlyRenderDiv(): boolean;
8772
8812
  get inputStyle(): any;
8773
8813
  }
8814
+ export declare class SurveyQuestionDropdownSelect extends SurveyQuestionDropdown {
8815
+ constructor(props: any);
8816
+ protected renderSelect(cssClasses: any): any;
8817
+ }
8774
8818
  /*
8775
8819
  * A Model for a button group question.
8776
8820
  */
@@ -8898,14 +8942,16 @@ export declare class QuestionImagePickerModel extends QuestionCheckboxBase {
8898
8942
  /*
8899
8943
  * The image height.
8900
8944
  */
8901
- get imageHeight(): string;
8902
- set imageHeight(val: string);
8945
+ get imageHeight(): number;
8946
+ set imageHeight(val: number);
8947
+ responsiveImageHeight: number;
8903
8948
  get renderedImageHeight(): string;
8904
8949
  /*
8905
8950
  * The image width.
8906
8951
  */
8907
- get imageWidth(): string;
8908
- set imageWidth(val: string);
8952
+ get imageWidth(): number;
8953
+ set imageWidth(val: number);
8954
+ responsiveImageWidth: number;
8909
8955
  get renderedImageWidth(): string;
8910
8956
  /*
8911
8957
  * The image fit mode.
@@ -8918,8 +8964,24 @@ export declare class QuestionImagePickerModel extends QuestionCheckboxBase {
8918
8964
  get contentMode(): string;
8919
8965
  set contentMode(val: string);
8920
8966
  protected convertDefaultValue(val: any): any;
8921
- get hasColumns(): boolean;
8922
8967
  get inputType(): "checkbox" | "radio";
8968
+ protected isFootChoice(_item: ItemValue, _question: QuestionSelectBase): boolean;
8969
+ getSelectBaseRootCss(): string;
8970
+ isResponsiveValue: boolean;
8971
+ maxImageWidth: number;
8972
+ minImageWidth: number;
8973
+ maxImageHeight: number;
8974
+ minImageHeight: number;
8975
+ protected getObservedElementSelector(): string;
8976
+ protected supportResponsiveness(): boolean;
8977
+ protected needResponsiveness(): boolean;
8978
+ _width: number;
8979
+ onContentLoaded: any;
8980
+ responsiveColCount: number;
8981
+ protected getCurrentColCount(): number;
8982
+ protected processResponsiveness(_: number, availableWidth: number): boolean;
8983
+ gapBetweenItems: number;
8984
+ afterRender(el: any): void;
8923
8985
  }
8924
8986
  /*
8925
8987
  * A Model for a matrix dropdown question. You may use a dropdown, checkbox, radiogroup, text and comment questions as a cell editors.
@@ -9680,6 +9742,7 @@ export declare var defaultStandardCss: {
9680
9742
  itemInline: string,
9681
9743
  itemText: string,
9682
9744
  clearButton: string,
9745
+ column: string,
9683
9746
  },
9684
9747
  rating: {
9685
9748
  root: string,
@@ -10666,6 +10729,7 @@ export declare var defaultV2Css: {
10666
10729
  imagepicker: {
10667
10730
  mainRoot: string,
10668
10731
  root: string,
10732
+ rootColumn: string,
10669
10733
  item: string,
10670
10734
  itemOnError: string,
10671
10735
  itemInline: string,
@@ -10683,6 +10747,7 @@ export declare var defaultV2Css: {
10683
10747
  itemNoImage: string,
10684
10748
  itemNoImageSvgIcon: string,
10685
10749
  itemNoImageSvgIconId: string,
10750
+ column: string,
10686
10751
  },
10687
10752
  matrix: {
10688
10753
  mainRoot: string,
@@ -10859,6 +10924,17 @@ export declare var defaultV2Css: {
10859
10924
  itemDragMod: string,
10860
10925
  itemOnError: string,
10861
10926
  },
10927
+ buttongroup: {
10928
+ root: string,
10929
+ item: string,
10930
+ itemIcon: string,
10931
+ itemDecorator: string,
10932
+ itemCaption: string,
10933
+ itemHover: string,
10934
+ itemSelected: string,
10935
+ itemDisabled: string,
10936
+ itemControl: string,
10937
+ },
10862
10938
  actionBar: {
10863
10939
  root: string,
10864
10940
  item: string,
@@ -10869,6 +10945,7 @@ export declare var defaultV2Css: {
10869
10945
  },
10870
10946
  variables: {
10871
10947
  mobileWidth: string,
10948
+ imagepickerGapBetweenItems: string,
10872
10949
  themeMark: string,
10873
10950
  },
10874
10951
  };
@@ -11110,6 +11187,7 @@ export declare var modernCss: {
11110
11187
  },
11111
11188
  imagepicker: {
11112
11189
  root: string,
11190
+ column: string,
11113
11191
  item: string,
11114
11192
  itemInline: string,
11115
11193
  itemChecked: string,