survey-react 1.9.8 → 1.9.9

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.8
2
+ * Type definition for Survey JavaScript library for React v1.9.9
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
  */
@@ -332,6 +332,8 @@ export interface ISurvey extends ITextProcessor, ISurveyErrorOwner {
332
332
  afterRenderPanel(panel: IElement, htmlElement: any): any;
333
333
  afterRenderPage(htmlElement: any): any;
334
334
  getQuestionByValueNameFromArray(valueName: string, name: string, index: number): IQuestion;
335
+ canChangeChoiceItemsVisibility(): boolean;
336
+ getChoiceItemVisibility(question: IQuestion, item: any, val: boolean): boolean;
335
337
  matrixRowAdded(question: IQuestion, row: any): any;
336
338
  matrixBeforeRowAdded(options: any): any;
337
339
  matrixRowRemoved(question: IQuestion, rowIndex: number, row: any): any;
@@ -528,6 +530,7 @@ export interface ISurveyHeaderProps {
528
530
  }
529
531
  export interface IMAtrixRowProps {
530
532
  model: any;
533
+ parentMatrix: any;
531
534
  }
532
535
  export interface IListItemProps {
533
536
  model: any;
@@ -855,6 +858,19 @@ export declare class DragDropInfo {
855
858
  isBottom: boolean;
856
859
  isEdge: boolean;
857
860
  }
861
+ export declare class DragOrClickHelper {
862
+ constructor(dragHandler: any);
863
+ pointerDownEvent: any;
864
+ currentTarget: any;
865
+ startX: any;
866
+ startY: any;
867
+ currentX: any;
868
+ currentY: any;
869
+ itemModel: any;
870
+ onPointerDown(pointerDownEvent: any, itemModel?: any): void;
871
+ onPointerUp: any;
872
+ tryToStartDrag: any;
873
+ }
858
874
  export declare class ElementFactory {
859
875
  static Instance: ElementFactory;
860
876
  creatorHash: any;
@@ -1052,7 +1068,7 @@ export declare class PopupUtils {
1052
1068
  static updateHorizontalDimensions(left: number, width: number, windowWidth: number, horizontalPosition: any): any;
1053
1069
  static updateVerticalPosition(targetRect: any, height: number, verticalPosition: any, showPointer: boolean, windowHeight: number): any;
1054
1070
  static calculatePopupDirection(verticalPosition: any, horizontalPosition: any): string;
1055
- static calculatePointerTarget(targetRect: any, top: number, left: number, verticalPosition: any, horizontalPosition: any): INumberPosition;
1071
+ static calculatePointerTarget(targetRect: any, top: number, left: number, verticalPosition: any, horizontalPosition: any, width?: number, margins?: number): INumberPosition;
1056
1072
  }
1057
1073
  export declare class ProcessValue {
1058
1074
  constructor();
@@ -1747,7 +1763,7 @@ export declare class ItemValue extends Base implements ILocalizableOwner, IShort
1747
1763
  static getItemByValue(items: any, val: any): ItemValue;
1748
1764
  static getTextOrHtmlByValue(items: any, val: any): string;
1749
1765
  static locStrsChanged(items: any): void;
1750
- static runConditionsForItems(items: any, filteredItems: any, runner: ConditionRunner, values: any, properties: any, useItemExpression?: boolean): boolean;
1766
+ static runConditionsForItems(items: any, filteredItems: any, runner: ConditionRunner, values: any, properties: any, useItemExpression?: boolean, onItemCallBack?: any): boolean;
1751
1767
  static runEnabledConditionsForItems(items: any, runner: ConditionRunner, values: any, properties: any, onItemCallBack?: any): boolean;
1752
1768
  ownerPropertyName: string;
1753
1769
  locTextValue: LocalizableString;
@@ -2178,7 +2194,9 @@ export declare class MatrixDropdownTotalCell extends MatrixDropdownCell {
2178
2194
  export declare class MatrixRow extends SurveyElementBase<IMAtrixRowProps, any> {
2179
2195
  constructor(props: IMAtrixRowProps);
2180
2196
  get model(): any;
2197
+ get parentMatrix(): any;
2181
2198
  protected getStateElement(): any;
2199
+ protected onPointerDownHandler: any;
2182
2200
  render(): any;
2183
2201
  }
2184
2202
  export declare class MatrixRowModel extends Base {
@@ -2395,7 +2413,7 @@ export declare class QuestionMatrixDropdownRenderedRow extends Base {
2395
2413
  constructor(cssClasses: any, isDetailRow?: boolean);
2396
2414
  cssClasses: any;
2397
2415
  isDetailRow: boolean;
2398
- ghostPosition: string;
2416
+ isGhostRow: boolean;
2399
2417
  isAdditionalClasses: boolean;
2400
2418
  row: MatrixDropdownRowModelBase;
2401
2419
  static counter: number;
@@ -2414,6 +2432,8 @@ export declare class QuestionMatrixDropdownRenderedTable extends Base {
2414
2432
  hasRemoveRowsValue: boolean;
2415
2433
  rowsActions: any;
2416
2434
  cssClasses: any;
2435
+ renderedRowsChangedCallback: any;
2436
+ rows: any;
2417
2437
  get showTable(): boolean;
2418
2438
  get showHeader(): boolean;
2419
2439
  get showAddRowOnTop(): boolean;
@@ -2424,7 +2444,6 @@ export declare class QuestionMatrixDropdownRenderedTable extends Base {
2424
2444
  isRequireReset(): boolean;
2425
2445
  get headerRow(): QuestionMatrixDropdownRenderedRow;
2426
2446
  get footerRow(): QuestionMatrixDropdownRenderedRow;
2427
- get rows(): any;
2428
2447
  protected build(): void;
2429
2448
  updateShowTableAndAddRow(): void;
2430
2449
  onAddedRow(): void;
@@ -2964,12 +2983,16 @@ export declare class DragDropChoices extends DragDropCore<QuestionSelectBase> {
2964
2983
  export declare class DragDropMatrixRows extends DragDropCore<QuestionMatrixDynamicModel> {
2965
2984
  constructor(surveyValue?: ISurvey, creator?: any);
2966
2985
  protected get draggedElementType(): string;
2967
- protected ghostPositionChanged(): void;
2986
+ protected createDraggedElementShortcut(text: string, draggedElementNode: any, event: any): any;
2987
+ fromIndex: number;
2988
+ toIndex: number;
2968
2989
  protected getDropTargetByDataAttributeValue(dataAttributeValue: any): MatrixDropdownRowModelBase;
2969
2990
  protected isDropTargetValid(dropTarget: any): boolean;
2970
2991
  protected findDropTargetNodeByDragOverNode(dragOverNode: any): any;
2971
2992
  protected calculateIsBottom(clientY: number): boolean;
2993
+ protected afterDragOver(dropTargetNode: any): void;
2972
2994
  protected doDrop: any;
2995
+ protected doClear(): void;
2973
2996
  }
2974
2997
  export declare class DragDropSurveyElements extends DragDropCore<any> {
2975
2998
  constructor(surveyValue?: ISurvey, creator?: any);
@@ -3119,6 +3142,7 @@ export declare class MatrixDropdownTotalRowModel extends MatrixDropdownRowModelB
3119
3142
  export declare class MatrixDynamicRowModel extends MatrixDropdownRowModelBase implements IShortcutText {
3120
3143
  constructor(index: number, data: IMatrixDropdownData, value: any);
3121
3144
  index: number;
3145
+ dragOrClickHelper: DragOrClickHelper;
3122
3146
  get rowName(): string;
3123
3147
  get shortcutText(): string;
3124
3148
  }
@@ -3840,6 +3864,13 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
3840
3864
  */
3841
3865
  onFocusInPanel: EventBase<SurveyModel>;
3842
3866
  /*
3867
+ * You can use this event to decide whether show or hide choice item in checkbox, dropdown and radiogroup like questions
3868
+ * <br/> `sender` - the survey object that fires the event
3869
+ * <br/> `options.question` - a question that contains choices.
3870
+ * <br/> `options.item` - an item of the question.
3871
+ */
3872
+ onShowingChoiceItem: EventBase<SurveyModel>;
3873
+ /*
3843
3874
  * The event is fired on adding a new row in Matrix Dynamic question.
3844
3875
  * <br/> `sender` - the survey object that fires the event
3845
3876
  * <br/> `options.question` - a matrix question.
@@ -4873,6 +4904,8 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
4873
4904
  afterRenderPanel(panel: IElement, htmlElement: any): void;
4874
4905
  whenQuestionFocusIn(question: IQuestion): void;
4875
4906
  whenPanelFocusIn(panel: IPanel): void;
4907
+ canChangeChoiceItemsVisibility(): boolean;
4908
+ getChoiceItemVisibility(question: IQuestion, item: any, val: boolean): boolean;
4876
4909
  matrixBeforeRowAdded(options: any): void;
4877
4910
  matrixRowAdded(question: IQuestion, row: any): void;
4878
4911
  getQuestionByValueNameFromArray(valueName: string, name: string, index: number): IQuestion;
@@ -5348,7 +5381,6 @@ export declare class SurveyQuestionMatrixDropdownBase extends SurveyQuestionElem
5348
5381
  }
5349
5382
  export declare class SurveyQuestionMatrixDynamicDragDropIcon extends ReactSurveyElement {
5350
5383
  constructor(props: any);
5351
- onPointerDownHandler(event: any): void;
5352
5384
  protected renderElement(): any;
5353
5385
  }
5354
5386
  export declare class SurveyQuestionMatrixDynamicRemoveButton extends ReactSurveyElement {
@@ -6119,6 +6151,7 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
6119
6151
  */
6120
6152
  get enableIf(): string;
6121
6153
  set enableIf(val: string);
6154
+ surveyChoiceItemVisibilityChange(): void;
6122
6155
  /*
6123
6156
  * Run visibleIf and enableIf expressions. If visibleIf or/and enabledIf are not empty, then the results of performing the expression (true or false) set to the visible/readOnly properties.
6124
6157
  */
@@ -6153,6 +6186,7 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
6153
6186
  */
6154
6187
  get isParentVisible(): boolean;
6155
6188
  clearValueIfInvisible(reason?: string): void;
6189
+ protected clearValueIfInvisibleCore(): void;
6156
6190
  /*
6157
6191
  * Gets or sets a value that specifies how invisible question clears the value. By default the behavior is define by Survey "clearInvisibleValues" property.
6158
6192
  *
@@ -7409,7 +7443,7 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
7409
7443
  hasErrors(fireCallback?: boolean, rec?: any): boolean;
7410
7444
  protected getContainsErrors(): boolean;
7411
7445
  protected getIsAnswered(): boolean;
7412
- clearValueIfInvisible(): void;
7446
+ protected clearValueIfInvisibleCore(): void;
7413
7447
  protected getIsRunningValidators(): boolean;
7414
7448
  getAllErrors(): Array<SurveyError>;
7415
7449
  protected getDisplayValueCore(keysAsText: boolean, value: any): any;
@@ -7571,6 +7605,7 @@ export declare class QuestionSelectBase extends Question {
7571
7605
  */
7572
7606
  get choicesEnableIf(): string;
7573
7607
  set choicesEnableIf(val: string);
7608
+ surveyChoiceItemVisibilityChange(): void;
7574
7609
  runCondition(values: any, properties: any): void;
7575
7610
  protected isTextValue(): boolean;
7576
7611
  isSettingDefaultValue: boolean;
@@ -7582,6 +7617,7 @@ export declare class QuestionSelectBase extends Question {
7582
7617
  protected runItemsEnableCondition(values: any, properties: any): any;
7583
7618
  protected onAfterRunItemsEnableCondition(): void;
7584
7619
  protected onEnableItemCallBack(item: ItemValue): boolean;
7620
+ changeItemVisisbility(): any;
7585
7621
  protected getHasOther(val: any): boolean;
7586
7622
  get validatedValue(): any;
7587
7623
  protected createRestful(): ChoicesRestful;
@@ -7678,7 +7714,7 @@ export declare class QuestionSelectBase extends Question {
7678
7714
  protected canUseFilteredChoices(): boolean;
7679
7715
  setCanShowOptionItemCallback(func: any): void;
7680
7716
  protected addToVisibleChoices(items: any, isAddAll: boolean): void;
7681
- protected canShowOptionItem(item: ItemValue): boolean;
7717
+ protected canShowOptionItem(item: ItemValue, isAddAll: boolean, hasItem: boolean): boolean;
7682
7718
  /*
7683
7719
  * For internal use in SurveyJS Creator V2.
7684
7720
  */
@@ -7719,7 +7755,7 @@ export declare class QuestionSelectBase extends Question {
7719
7755
  protected onVisibleChoicesChanged(): void;
7720
7756
  clearIncorrectValues(): void;
7721
7757
  protected hasValueToClearIncorrectValues(): boolean;
7722
- clearValueIfInvisible(): void;
7758
+ protected clearValueIfInvisibleCore(): void;
7723
7759
  /*
7724
7760
  * Returns true if item is selected
7725
7761
  */
@@ -7942,7 +7978,7 @@ export declare class QuestionCompositeModel extends QuestionCustomModelBase {
7942
7978
  hasErrors(fireCallback?: boolean, rec?: any): boolean;
7943
7979
  updateElementCss(reNew?: boolean): void;
7944
7980
  getTextProcessor(): ITextProcessor;
7945
- clearValueIfInvisible(): void;
7981
+ protected clearValueIfInvisibleCore(): void;
7946
7982
  onAnyValueChanged(name: string): void;
7947
7983
  protected createPanel(): PanelModel;
7948
7984
  protected onReadOnlyChanged(): void;
@@ -8050,6 +8086,7 @@ export declare class QuestionImageModel extends QuestionNonValue {
8050
8086
  constructor(name: string);
8051
8087
  getType(): string;
8052
8088
  get isCompositeQuestion(): boolean;
8089
+ onSurveyLoad(): void;
8053
8090
  /*
8054
8091
  * The image URL.
8055
8092
  */
@@ -8067,11 +8104,13 @@ export declare class QuestionImageModel extends QuestionNonValue {
8067
8104
  */
8068
8105
  get imageHeight(): string;
8069
8106
  set imageHeight(val: string);
8107
+ get renderedHeight(): string;
8070
8108
  /*
8071
8109
  * The image width.
8072
8110
  */
8073
8111
  get imageWidth(): string;
8074
8112
  set imageWidth(val: string);
8113
+ get renderedWidth(): string;
8075
8114
  /*
8076
8115
  * The image fit mode.
8077
8116
  */
@@ -8082,6 +8121,11 @@ export declare class QuestionImageModel extends QuestionNonValue {
8082
8121
  */
8083
8122
  get contentMode(): string;
8084
8123
  set contentMode(val: string);
8124
+ /*
8125
+ * The rendered mode.
8126
+ */
8127
+ get renderedMode(): string;
8128
+ protected calculateRenderedMode(): void;
8085
8129
  }
8086
8130
  /*
8087
8131
  * A base class for matrix dropdown and matrix dynamic questions.
@@ -8146,6 +8190,7 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
8146
8190
  get canAddRow(): boolean;
8147
8191
  get canRemoveRows(): boolean;
8148
8192
  canRemoveRow(row: MatrixDropdownRowModelBase): boolean;
8193
+ onPointerDown(pointerDownEvent: any, row: MatrixDropdownRowModelBase): void;
8149
8194
  protected onRowsChanged(): void;
8150
8195
  lockResetRenderedTable: boolean;
8151
8196
  protected onStartRowAddingRemoving(): void;
@@ -8364,7 +8409,7 @@ export declare class QuestionMatrixModel extends QuestionMatrixBaseModel<MatrixR
8364
8409
  getPlainData(options?: any): any;
8365
8410
  addConditionObjectsByContext(objects: any, context: any): void;
8366
8411
  getConditionJson(operator?: string, path?: string): any;
8367
- clearValueIfInvisible(): void;
8412
+ protected clearValueIfInvisibleCore(): void;
8368
8413
  protected getFirstInputElementId(): string;
8369
8414
  protected onRowsChanged(): void;
8370
8415
  onMatrixRowChanged(row: MatrixRowModel): void;
@@ -8643,7 +8688,7 @@ export declare class QuestionMatrixDropdownModel extends QuestionMatrixDropdownM
8643
8688
  protected getConditionObjectRowText(index: number): string;
8644
8689
  protected getConditionObjectsRowIndeces(): Array<any>;
8645
8690
  clearIncorrectValues(): void;
8646
- clearValueIfInvisible(): void;
8691
+ protected clearValueIfInvisibleCore(): void;
8647
8692
  protected generateRows(): Array<MatrixDropdownRowModel>;
8648
8693
  protected createMatrixRow(item: ItemValue, value: any): MatrixDropdownRowModel;
8649
8694
  protected getSearchableItemValueKeys(keys: any): void;
@@ -8660,7 +8705,9 @@ export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownMo
8660
8705
  setRowCountValueFromData: boolean;
8661
8706
  dragDropMatrixRows: DragDropMatrixRows;
8662
8707
  setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
8663
- startDragMatrixRow(event: any, row: MatrixDropdownRowModelBase): void;
8708
+ draggedRow: MatrixDropdownRowModelBase;
8709
+ onPointerDown(pointerDownEvent: any, row: MatrixDropdownRowModelBase): void;
8710
+ startDragMatrixRow: any;
8664
8711
  getType(): string;
8665
8712
  get isRowsDynamic(): boolean;
8666
8713
  /*
@@ -8835,7 +8882,6 @@ export declare class QuestionRadiogroupModel extends QuestionCheckboxBase {
8835
8882
  export declare class QuestionRankingModel extends QuestionCheckboxModel {
8836
8883
  constructor(name: string);
8837
8884
  domNode: any;
8838
- sortableInst: any;
8839
8885
  getType(): string;
8840
8886
  get rootClass(): string;
8841
8887
  protected getItemClassCore(item: ItemValue, options: any): string;
@@ -8859,8 +8905,6 @@ export declare class QuestionRankingModel extends QuestionCheckboxModel {
8859
8905
  protected supportSelectAll(): boolean;
8860
8906
  supportOther(): boolean;
8861
8907
  supportNone(): boolean;
8862
- get fallbackToSortableJS(): boolean;
8863
- set fallbackToSortableJS(val: boolean);
8864
8908
  handleArrowUp: any;
8865
8909
  handleArrowDown: any;
8866
8910
  focusItem: any;
@@ -9308,8 +9352,7 @@ export declare var defaultStandardCss: {
9308
9352
  emptyRowsSection: string,
9309
9353
  emptyRowsText: string,
9310
9354
  emptyRowsButton: string,
9311
- dragDropGhostPositionTop: string,
9312
- dragDropGhostPositionBottom: string,
9355
+ ghostRow: string,
9313
9356
  },
9314
9357
  paneldynamic: {
9315
9358
  root: string,
@@ -9451,7 +9494,8 @@ export declare var IsMobile: boolean;
9451
9494
  export declare var _isTouch: boolean;
9452
9495
  export declare var IsTouch: boolean;
9453
9496
  export declare var minMaxTypes: any;
9454
- export declare var Sortable: any;
9497
+ export declare var youtubeTags: any;
9498
+ export declare var videoSuffics: any;
9455
9499
  export declare var defaultWidth: number;
9456
9500
  export declare var defaultHeight: number;
9457
9501
  export declare var Version: string;
@@ -9653,8 +9697,7 @@ export declare var defaultBootstrapCss: {
9653
9697
  emptyRowsSection: string,
9654
9698
  emptyRowsText: string,
9655
9699
  emptyRowsButton: string,
9656
- dragDropGhostPositionTop: string,
9657
- dragDropGhostPositionBottom: string,
9700
+ ghostRow: string,
9658
9701
  },
9659
9702
  paneldynamic: {
9660
9703
  root: string,
@@ -9975,8 +10018,7 @@ export declare var defaultBootstrapMaterialCss: {
9975
10018
  emptyRowsSection: string,
9976
10019
  emptyRowsText: string,
9977
10020
  emptyRowsButton: string,
9978
- dragDropGhostPositionTop: string,
9979
- dragDropGhostPositionBottom: string,
10021
+ ghostRow: string,
9980
10022
  },
9981
10023
  paneldynamic: {
9982
10024
  root: string,
@@ -10163,6 +10205,18 @@ export declare var defaultV2Css: {
10163
10205
  progress: string,
10164
10206
  progressBar: string,
10165
10207
  progressText: string,
10208
+ progressButtonsContainerCenter: string,
10209
+ progressButtonsContainer: string,
10210
+ progressButtonsImageButtonLeft: string,
10211
+ progressButtonsImageButtonRight: string,
10212
+ progressButtonsImageButtonHidden: string,
10213
+ progressButtonsListContainer: string,
10214
+ progressButtonsList: string,
10215
+ progressButtonsListElementPassed: string,
10216
+ progressButtonsListElementCurrent: string,
10217
+ progressButtonsListElementNonClickable: string,
10218
+ progressButtonsPageTitle: string,
10219
+ progressButtonsPageDescription: string,
10166
10220
  progressTextInBar: string,
10167
10221
  page: {
10168
10222
  root: string,
@@ -10398,8 +10452,7 @@ export declare var defaultV2Css: {
10398
10452
  footer: string,
10399
10453
  emptyRowsSection: string,
10400
10454
  iconDrag: string,
10401
- dragDropGhostPositionTop: string,
10402
- dragDropGhostPositionBottom: string,
10455
+ ghostRow: string,
10403
10456
  emptyCell: string,
10404
10457
  verticalCell: string,
10405
10458
  cellQuestionWrapper: string,
@@ -10810,8 +10863,7 @@ export declare var modernCss: {
10810
10863
  emptyRowsSection: string,
10811
10864
  emptyRowsText: string,
10812
10865
  emptyRowsButton: string,
10813
- dragDropGhostPositionTop: string,
10814
- dragDropGhostPositionBottom: string,
10866
+ ghostRow: string,
10815
10867
  },
10816
10868
  rating: {
10817
10869
  root: string,