survey-react 1.9.27 → 1.9.30

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.27
2
+ * Type definition for Survey JavaScript library for React v1.9.30
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
  */
@@ -109,6 +109,7 @@ export interface IAction {
109
109
  * The action item's title.
110
110
  */
111
111
  title?: string;
112
+ locTitle?: any;
112
113
  /*
113
114
  * The action item's tooltip.
114
115
  */
@@ -357,6 +358,7 @@ export interface ISurvey extends ITextProcessor, ISurveyErrorOwner {
357
358
  matrixCellValueChanged(question: IQuestion, options: any): any;
358
359
  matrixCellValueChanging(question: IQuestion, options: any): any;
359
360
  isValidateOnValueChanging: boolean;
361
+ isValidateOnValueChanged: boolean;
360
362
  matrixCellValidate(question: IQuestion, options: any): SurveyError;
361
363
  dynamicPanelAdded(question: IQuestion): any;
362
364
  dynamicPanelRemoved(question: IQuestion, panelIndex: number, panel: IPanel): any;
@@ -880,15 +882,6 @@ export declare class CustomWidgetCollection {
880
882
  getCustomWidgetByName(name: string): QuestionCustomWidget;
881
883
  getCustomWidget(question: IQuestion): QuestionCustomWidget;
882
884
  }
883
- export declare class DefaultTitle extends React.Component<any, any> {
884
- constructor(props: any);
885
- constructor(props: any, context: any);
886
- isNeedFocus: boolean;
887
- protected get cssClasses(): any;
888
- protected get element(): any;
889
- render(): any;
890
- componentDidMount(): void;
891
- }
892
885
  export declare class DefaultTitleModel {
893
886
  static getIconCss(cssClasses: any, isCollapsed: boolean): string;
894
887
  }
@@ -1118,7 +1111,7 @@ export declare class PopupUtils {
1118
1111
  static updateHorizontalDimensions(left: number, width: number, windowWidth: number, horizontalPosition: any): any;
1119
1112
  static updateVerticalPosition(targetRect: any, height: number, verticalPosition: any, showPointer: boolean, windowHeight: number): any;
1120
1113
  static calculatePopupDirection(verticalPosition: any, horizontalPosition: any): string;
1121
- static calculatePointerTarget(targetRect: any, top: number, left: number, verticalPosition: any, horizontalPosition: any, width?: number, margins?: number): INumberPosition;
1114
+ static calculatePointerTarget(targetRect: any, top: number, left: number, verticalPosition: any, horizontalPosition: any, marginLeft?: number, marginRight?: number): INumberPosition;
1122
1115
  static updatePopupWidthBeforeShow(popupModel: any, e: any): void;
1123
1116
  }
1124
1117
  export declare class ProcessValue {
@@ -1296,6 +1289,12 @@ export declare class SurveyElementBase<P, S> extends React.Component<P, S> {
1296
1289
  protected renderLocString(locStr: any, style?: any): any;
1297
1290
  protected canUsePropInState(key: string): boolean;
1298
1291
  }
1292
+ export declare class SurveyElementHeader extends React.Component<any, any> {
1293
+ constructor(props: any);
1294
+ constructor(props: any, context: any);
1295
+ render(): any;
1296
+ protected renderDescription(): any;
1297
+ }
1299
1298
  export declare class SurveyError {
1300
1299
  constructor(text?: string, errorOwner?: ISurveyErrorOwner);
1301
1300
  text: string;
@@ -1467,7 +1466,6 @@ export declare class Action extends Base implements IAction {
1467
1466
  iconName: string;
1468
1467
  iconSize: number;
1469
1468
  visible: boolean;
1470
- title: string;
1471
1469
  tooltip: string;
1472
1470
  enabled: boolean;
1473
1471
  showTitle: boolean;
@@ -1487,6 +1485,10 @@ export declare class Action extends Base implements IAction {
1487
1485
  disableTabStop: boolean;
1488
1486
  disableShrink: boolean;
1489
1487
  needSpace: boolean;
1488
+ locTitle: any;
1489
+ titleValue: string;
1490
+ get title(): string;
1491
+ set title(val: string);
1490
1492
  cssClassesValue: any;
1491
1493
  get cssClasses(): any;
1492
1494
  get disabled(): boolean;
@@ -2450,10 +2452,8 @@ export declare class PopupBaseViewModel extends Base {
2450
2452
  get cancelButtonText(): any;
2451
2453
  get applyButtonText(): any;
2452
2454
  dispose(): void;
2453
- createPopupContainer(): void;
2454
- mountPopupContainer(): void;
2455
2455
  initializePopupContainer(): void;
2456
- destroyPopupContainer(): void;
2456
+ unmountPopupContainer(): void;
2457
2457
  }
2458
2458
  export declare class PopupContainer extends SurveyElementBase<any, any> {
2459
2459
  constructor(props: any);
@@ -2808,7 +2808,7 @@ export declare class SurveyQuestion extends SurveyElementBase<any, any> {
2808
2808
  protected wrapElement(element: any): any;
2809
2809
  protected wrapQuestionContent(element: any): any;
2810
2810
  protected renderQuestion(): any;
2811
- protected renderDescription(cssClasses: any, isUnderInput?: boolean): any;
2811
+ protected renderDescription(): any;
2812
2812
  protected renderComment(cssClasses: any): any;
2813
2813
  protected renderHeader(question: any): any;
2814
2814
  protected renderErrors(cssClasses: any, location: string): any;
@@ -3101,8 +3101,9 @@ export declare class DragDropSurveyElements extends DragDropCore<any> {
3101
3101
  protected ghostSurveyElement: IElement;
3102
3102
  protected get draggedElementType(): string;
3103
3103
  protected isDraggedElementSelected: boolean;
3104
- startDragToolboxItem(event: any, draggedElementJson: JsonObject): void;
3104
+ startDragToolboxItem(event: any, draggedElementJson: JsonObject, toolboxItemTitle: string): void;
3105
3105
  startDragSurveyElement(event: any, draggedElement: any, isElementSelected?: boolean): void;
3106
+ protected getShortcutText(draggedElement: IShortcutText): string;
3106
3107
  protected createDraggedElementShortcut(text: string, draggedElementNode?: any, event?: any): any;
3107
3108
  protected createDraggedElementIcon(): any;
3108
3109
  protected getDraggedElementClass(): string;
@@ -3192,7 +3193,7 @@ export declare class JsonMissingTypeError extends JsonMissingTypeErrorBase {
3192
3193
  baseClassName: string;
3193
3194
  }
3194
3195
  export declare class ListModel extends ActionContainer {
3195
- constructor(items: any, onItemSelect: any, allowSelection: boolean, selectedItem?: IAction, onFilteredTextChange?: any);
3196
+ constructor(items: any, onItemSelect: any, allowSelection: boolean, selectedItem?: IAction, onFilteredTextChangedCallback?: any);
3196
3197
  onItemSelect: any;
3197
3198
  allowSelection: boolean;
3198
3199
  denySearch: boolean;
@@ -3202,6 +3203,7 @@ export declare class ListModel extends ActionContainer {
3202
3203
  filteredText: string;
3203
3204
  static INDENT: number;
3204
3205
  static MINELEMENTCOUNT: number;
3206
+ isItemVisible(item: Action): boolean;
3205
3207
  protected onSet(): void;
3206
3208
  selectItem: any;
3207
3209
  isItemDisabled: any;
@@ -3360,12 +3362,12 @@ export declare class SurveyElement extends SurveyElementCore implements ISurveyE
3360
3362
  get shortcutText(): string;
3361
3363
  titleToolbarValue: any;
3362
3364
  getTitleToolbar(): AdaptiveActionContainer;
3365
+ protected createActionContainer(allowAdaptiveActions?: boolean): ActionContainer;
3363
3366
  get titleActions(): any;
3364
3367
  isTitleActionRequested: boolean;
3365
3368
  getTitleActions(): Array<any>;
3366
3369
  get hasTitleActions(): boolean;
3367
3370
  get hasTitleEvents(): boolean;
3368
- getTitleComponentName(): string;
3369
3371
  get titleTabIndex(): number;
3370
3372
  get titleAriaExpanded(): boolean;
3371
3373
  setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
@@ -3509,6 +3511,9 @@ export declare class SurveyElement extends SurveyElementCore implements ISurveyE
3509
3511
  set paddingRight(val: string);
3510
3512
  allowRootStyle: boolean;
3511
3513
  get rootStyle(): any;
3514
+ get clickTitleFunction(): any;
3515
+ protected needClickTitleFunction(): boolean;
3516
+ protected processTitleClick(): void;
3512
3517
  }
3513
3518
  export declare class SurveyElementErrors extends ReactSurveyElement {
3514
3519
  constructor(props: any);
@@ -5051,6 +5056,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
5051
5056
  matrixCellValueChanged(question: IQuestion, options: any): void;
5052
5057
  matrixCellValueChanging(question: IQuestion, options: any): void;
5053
5058
  get isValidateOnValueChanging(): boolean;
5059
+ get isValidateOnValueChanged(): boolean;
5054
5060
  matrixCellValidate(question: IQuestion, options: any): SurveyError;
5055
5061
  dynamicPanelAdded(question: IQuestion): void;
5056
5062
  dynamicPanelRemoved(question: IQuestion, panelIndex: number, panel: IPanel): void;
@@ -5175,7 +5181,6 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
5175
5181
  setJsonObject(jsonObj: any): void;
5176
5182
  isEndLoadingFromJson: string;
5177
5183
  endLoadingFromJson(): void;
5178
- updateNavigationItemTitlesCallback: any;
5179
5184
  updateNavigationItemCssCallback: any;
5180
5185
  protected createNavigationBar(): ActionContainer;
5181
5186
  protected createNavigationActions(): Array<IAction>;
@@ -5367,6 +5372,12 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
5367
5372
  dispose(): void;
5368
5373
  disposeCallback: any;
5369
5374
  }
5375
+ export declare class SurveyMultipleTextItem extends ReactSurveyElement {
5376
+ constructor(props: any);
5377
+ protected getStateElements(): any;
5378
+ protected renderElement(): any;
5379
+ protected renderItemTooltipError(item: any, cssClasses: any): any;
5380
+ }
5370
5381
  export declare class SurveyNavigationButton extends ReactSurveyElement {
5371
5382
  constructor(props: any);
5372
5383
  protected get item(): Action;
@@ -5575,7 +5586,6 @@ export declare class SurveyQuestionMultipleText extends SurveyQuestionElementBas
5575
5586
  constructor(props: any);
5576
5587
  protected get question(): any;
5577
5588
  protected renderElement(): any;
5578
- protected renderItemTooltipError(item: any, cssClasses: any): any;
5579
5589
  protected renderRow(rowIndex: number, items: any, cssClasses: any): any;
5580
5590
  }
5581
5591
  export declare class SurveyQuestionOptionItem extends ReactSurveyElement {
@@ -5656,6 +5666,7 @@ export declare class SurveyQuestionSignaturePad extends SurveyQuestionElementBas
5656
5666
  constructor(props: any);
5657
5667
  protected get question(): any;
5658
5668
  protected renderElement(): any;
5669
+ renderCleanButton(): any;
5659
5670
  }
5660
5671
  export declare class SurveyQuestionUncontrolledElement<T> extends SurveyQuestionElementBase {
5661
5672
  constructor(props: any);
@@ -6039,6 +6050,9 @@ export declare class PanelModelBase extends SurveyElement implements IPanel, ICo
6039
6050
  dragDropFindRow(findElement: ISurveyElement): QuestionRowModel;
6040
6051
  dragDropMoveElement(src: IElement, target: IElement, targetIndex: number): void;
6041
6052
  needResponsiveWidth(): boolean;
6053
+ get hasDescriptionUnderTitle(): boolean;
6054
+ get cssHeader(): string;
6055
+ get cssDescription(): string;
6042
6056
  get no(): string;
6043
6057
  dispose(): void;
6044
6058
  }
@@ -6217,7 +6231,8 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
6217
6231
  set descriptionLocation(val: string);
6218
6232
  get hasDescriptionUnderTitle(): boolean;
6219
6233
  get hasDescriptionUnderInput(): boolean;
6220
- get clickTitleFunction(): any;
6234
+ protected needClickTitleFunction(): boolean;
6235
+ protected processTitleClick(): boolean;
6221
6236
  /*
6222
6237
  * The custom text that will be shown on required error. Use this property, if you do not want to show the default text.
6223
6238
  * Please note, this property is hidden for question without input, for example html question.
@@ -6286,6 +6301,9 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
6286
6301
  get cssTitle(): string;
6287
6302
  protected setCssTitle(val: string): void;
6288
6303
  protected getCssTitle(cssClasses: any): string;
6304
+ get cssDescription(): string;
6305
+ protected setCssDescription(val: string): void;
6306
+ protected getCssDescription(cssClasses: any): string;
6289
6307
  get cssError(): string;
6290
6308
  protected setCssError(val: string): void;
6291
6309
  protected getCssError(cssClasses: any): string;
@@ -7617,6 +7635,7 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
7617
7635
  setVisibleIndex(value: number): number;
7618
7636
  /*
7619
7637
  * Returns true when an end user may add a new panel. The question is not read only and panelCount less than maxPanelCount
7638
+ * and renderMode is "list" or the current panel doesn't have any errors
7620
7639
  */
7621
7640
  get canAddPanel(): boolean;
7622
7641
  /*
@@ -7641,6 +7660,7 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
7641
7660
  getProgressInfo(): IProgressInfo;
7642
7661
  /*
7643
7662
  * Add a new dynamic panel based on the template Panel. It checks if canAddPanel returns true and then calls addPanel method.
7663
+ * If a renderMode is different from "list" and the current panel has erros, then
7644
7664
  */
7645
7665
  addPanelUI(): PanelModel;
7646
7666
  /*
@@ -7653,8 +7673,9 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
7653
7673
  removePanelUI(value: any): void;
7654
7674
  /*
7655
7675
  * Goes to the next panel in the PanelDynamic
7676
+ * Returns true, if it can move to the next panel. It can return false if the renderMode is "list" or the current panel has errors.
7656
7677
  */
7657
- goToNextPanel(): void;
7678
+ goToNextPanel(): boolean;
7658
7679
  /*
7659
7680
  * Goes to the previous panel in the PanelDynamic
7660
7681
  */
@@ -8091,6 +8112,7 @@ export declare class QuestionSignaturePadModel extends Question {
8091
8112
  */
8092
8113
  get allowClear(): boolean;
8093
8114
  set allowClear(val: boolean);
8115
+ get canShowClearButton(): boolean;
8094
8116
  /*
8095
8117
  * Use it to set pen color for the signature pad.
8096
8118
  */
@@ -8292,6 +8314,7 @@ export declare class QuestionCustomModel extends QuestionCustomModelBase {
8292
8314
  runCondition(values: any, properties: any): void;
8293
8315
  protected convertDataName(name: string): string;
8294
8316
  protected convertDataValue(name: string, newValue: any): any;
8317
+ protected canSetValueToSurvey(): boolean;
8295
8318
  protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
8296
8319
  onSurveyValueChanged(newValue: any): void;
8297
8320
  protected getValueCore(): any;
@@ -8674,6 +8697,7 @@ export declare class QuestionMatrixModel extends QuestionMatrixBaseModel<MatrixR
8674
8697
  getColumns(): Array<any>;
8675
8698
  addColumn(value: any, text?: string): ItemValue;
8676
8699
  getItemClass(row: any, column: any): string;
8700
+ get itemSvgIcon(): string;
8677
8701
  protected getQuizQuestionCount(): number;
8678
8702
  protected getCorrectAnswerCount(): number;
8679
8703
  protected getVisibleRows(): Array<MatrixRowModel>;
@@ -9239,9 +9263,9 @@ export declare class QuestionRankingModel extends QuestionCheckboxModel {
9239
9263
  }
9240
9264
  export declare function property(options?: any): any;
9241
9265
  export declare function propertyArray(options?: IArrayPropertyDecoratorOptions): any;
9242
- export declare function createPopupModalViewModel(componentName: string, data: any, onApply: any, onCancel?: any, onHide?: any, onShow?: any, cssClass?: string, title?: string, displayMode?: "popup" | "overlay"): PopupBaseViewModel;
9243
9266
  export declare function unwrap<T>(value: any): T;
9244
9267
  export declare function getSize(value: any): any;
9268
+ export declare function createPopupModalViewModel(componentName: string, data: any, onApply: any, onCancel?: any, onHide?: any, onShow?: any, cssClass?: string, title?: string, displayMode?: "popup" | "overlay"): PopupBaseViewModel;
9245
9269
  export declare function getCurrecyCodes(): Array<any>;
9246
9270
  export declare function showModal(componentName: string, data: any, onApply: any, onCancel?: any, cssClass?: string, title?: string, displayMode?: "popup" | "overlay"): void;
9247
9271
  export declare function attachKey2click(element: any, viewModel?: any, options?: any): any;
@@ -9317,6 +9341,11 @@ export declare var settings: {
9317
9341
  */
9318
9342
  matrixMaxRowCountInCondition: number,
9319
9343
  /*
9344
+ * Set this property to false, to render matrix dynamic remove action as button.
9345
+ * It is rendered as icon in new themes ("defaultV2") by default.
9346
+ */
9347
+ matrixRenderRemoveAsIcon: boolean,
9348
+ /*
9320
9349
  * Maximum panel count in dynamic panel
9321
9350
  */
9322
9351
  panelMaximumPanelCount: number,
@@ -9465,6 +9494,7 @@ export declare var defaultActionBarCss: {
9465
9494
  itemTitle: string,
9466
9495
  itemTitleWithIcon: string,
9467
9496
  };
9497
+ export declare var keyFocusedClassName: any;
9468
9498
  export declare var FOCUS_INPUT_SELECTOR: any;
9469
9499
  export declare var surveyCss: {
9470
9500
  currentType: string,
@@ -9636,6 +9666,7 @@ export declare var defaultStandardCss: {
9636
9666
  cellText: string,
9637
9667
  cellTextSelected: string,
9638
9668
  cellLabel: string,
9669
+ cellResponsiveTitle: string,
9639
9670
  },
9640
9671
  matrixdropdown: {
9641
9672
  root: string,
@@ -9800,7 +9831,6 @@ export declare var surveyTimerFunctions: {
9800
9831
  setTimeout: any,
9801
9832
  clearTimeout: any,
9802
9833
  };
9803
- export declare var keyFocusedClassName: any;
9804
9834
  export declare var matrixDropdownColumnTypes: {
9805
9835
  dropdown: {
9806
9836
  onCellQuestionUpdate: any,
@@ -9993,6 +10023,7 @@ export declare var defaultBootstrapCss: {
9993
10023
  cellText: string,
9994
10024
  cellTextSelected: string,
9995
10025
  cellLabel: string,
10026
+ cellResponsiveTitle: string,
9996
10027
  },
9997
10028
  matrixdropdown: {
9998
10029
  root: string,
@@ -10315,6 +10346,7 @@ export declare var defaultBootstrapMaterialCss: {
10315
10346
  itemChecked: string,
10316
10347
  itemDecorator: string,
10317
10348
  materialDecorator: string,
10349
+ cellResponsiveTitle: string,
10318
10350
  },
10319
10351
  matrixdropdown: {
10320
10352
  root: string,
@@ -10489,6 +10521,7 @@ export declare var defaultV2Css: {
10489
10521
  logoImage: string,
10490
10522
  headerText: string,
10491
10523
  navigationButton: string,
10524
+ bodyNavigationButton: string,
10492
10525
  completedPage: string,
10493
10526
  timerRoot: string,
10494
10527
  navigation: {
@@ -10518,6 +10551,7 @@ export declare var defaultV2Css: {
10518
10551
  collapsed: string,
10519
10552
  nested: string,
10520
10553
  invisible: string,
10554
+ navigationButton: string,
10521
10555
  },
10522
10556
  paneldynamic: {
10523
10557
  mainRoot: string,
@@ -10767,6 +10801,7 @@ export declare var defaultV2Css: {
10767
10801
  cellText: string,
10768
10802
  cellTextSelected: string,
10769
10803
  cellTextDisabled: string,
10804
+ cellResponsiveTitle: string,
10770
10805
  },
10771
10806
  matrixdropdown: {
10772
10807
  mainRoot: string,
@@ -11216,6 +11251,8 @@ export declare var modernCss: {
11216
11251
  cellText: string,
11217
11252
  cellTextSelected: string,
11218
11253
  cellTextDisabled: string,
11254
+ cellResponsiveTitle: string,
11255
+ itemSvgIconId: string,
11219
11256
  },
11220
11257
  matrixdropdown: {
11221
11258
  root: string,