survey-react 1.9.8 → 1.9.12

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.12
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();
@@ -1151,6 +1167,14 @@ export declare class ReactQuestionFactory {
1151
1167
  getAllTypes(): Array<any>;
1152
1168
  createQuestion(questionType: string, params: any): any;
1153
1169
  }
1170
+ export declare class ReactSurveyElementsWrapper {
1171
+ constructor(survey: any);
1172
+ survey: any;
1173
+ wrapRow(element: any, row: any): any;
1174
+ wrapElement(element: any, question: any): any;
1175
+ wrapItemValue(element: any, question: any, item: any): any;
1176
+ wrapMatrixCell(element: any, cell: any, reason?: string): any;
1177
+ }
1154
1178
  export declare class RendererFactory {
1155
1179
  static Instance: RendererFactory;
1156
1180
  renderersHash: any;
@@ -1747,7 +1771,7 @@ export declare class ItemValue extends Base implements ILocalizableOwner, IShort
1747
1771
  static getItemByValue(items: any, val: any): ItemValue;
1748
1772
  static getTextOrHtmlByValue(items: any, val: any): string;
1749
1773
  static locStrsChanged(items: any): void;
1750
- static runConditionsForItems(items: any, filteredItems: any, runner: ConditionRunner, values: any, properties: any, useItemExpression?: boolean): boolean;
1774
+ static runConditionsForItems(items: any, filteredItems: any, runner: ConditionRunner, values: any, properties: any, useItemExpression?: boolean, onItemCallBack?: any): boolean;
1751
1775
  static runEnabledConditionsForItems(items: any, runner: ConditionRunner, values: any, properties: any, onItemCallBack?: any): boolean;
1752
1776
  ownerPropertyName: string;
1753
1777
  locTextValue: LocalizableString;
@@ -2178,7 +2202,9 @@ export declare class MatrixDropdownTotalCell extends MatrixDropdownCell {
2178
2202
  export declare class MatrixRow extends SurveyElementBase<IMAtrixRowProps, any> {
2179
2203
  constructor(props: IMAtrixRowProps);
2180
2204
  get model(): any;
2205
+ get parentMatrix(): any;
2181
2206
  protected getStateElement(): any;
2207
+ protected onPointerDownHandler: any;
2182
2208
  render(): any;
2183
2209
  }
2184
2210
  export declare class MatrixRowModel extends Base {
@@ -2395,7 +2421,7 @@ export declare class QuestionMatrixDropdownRenderedRow extends Base {
2395
2421
  constructor(cssClasses: any, isDetailRow?: boolean);
2396
2422
  cssClasses: any;
2397
2423
  isDetailRow: boolean;
2398
- ghostPosition: string;
2424
+ isGhostRow: boolean;
2399
2425
  isAdditionalClasses: boolean;
2400
2426
  row: MatrixDropdownRowModelBase;
2401
2427
  static counter: number;
@@ -2414,6 +2440,8 @@ export declare class QuestionMatrixDropdownRenderedTable extends Base {
2414
2440
  hasRemoveRowsValue: boolean;
2415
2441
  rowsActions: any;
2416
2442
  cssClasses: any;
2443
+ renderedRowsChangedCallback: any;
2444
+ rows: any;
2417
2445
  get showTable(): boolean;
2418
2446
  get showHeader(): boolean;
2419
2447
  get showAddRowOnTop(): boolean;
@@ -2424,7 +2452,6 @@ export declare class QuestionMatrixDropdownRenderedTable extends Base {
2424
2452
  isRequireReset(): boolean;
2425
2453
  get headerRow(): QuestionMatrixDropdownRenderedRow;
2426
2454
  get footerRow(): QuestionMatrixDropdownRenderedRow;
2427
- get rows(): any;
2428
2455
  protected build(): void;
2429
2456
  updateShowTableAndAddRow(): void;
2430
2457
  onAddedRow(): void;
@@ -2964,12 +2991,16 @@ export declare class DragDropChoices extends DragDropCore<QuestionSelectBase> {
2964
2991
  export declare class DragDropMatrixRows extends DragDropCore<QuestionMatrixDynamicModel> {
2965
2992
  constructor(surveyValue?: ISurvey, creator?: any);
2966
2993
  protected get draggedElementType(): string;
2967
- protected ghostPositionChanged(): void;
2994
+ protected createDraggedElementShortcut(text: string, draggedElementNode: any, event: any): any;
2995
+ fromIndex: number;
2996
+ toIndex: number;
2968
2997
  protected getDropTargetByDataAttributeValue(dataAttributeValue: any): MatrixDropdownRowModelBase;
2969
2998
  protected isDropTargetValid(dropTarget: any): boolean;
2970
2999
  protected findDropTargetNodeByDragOverNode(dragOverNode: any): any;
2971
3000
  protected calculateIsBottom(clientY: number): boolean;
3001
+ protected afterDragOver(dropTargetNode: any): void;
2972
3002
  protected doDrop: any;
3003
+ protected doClear(): void;
2973
3004
  }
2974
3005
  export declare class DragDropSurveyElements extends DragDropCore<any> {
2975
3006
  constructor(surveyValue?: ISurvey, creator?: any);
@@ -3119,6 +3150,7 @@ export declare class MatrixDropdownTotalRowModel extends MatrixDropdownRowModelB
3119
3150
  export declare class MatrixDynamicRowModel extends MatrixDropdownRowModelBase implements IShortcutText {
3120
3151
  constructor(index: number, data: IMatrixDropdownData, value: any);
3121
3152
  index: number;
3153
+ dragOrClickHelper: DragOrClickHelper;
3122
3154
  get rowName(): string;
3123
3155
  get shortcutText(): string;
3124
3156
  }
@@ -3840,6 +3872,13 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
3840
3872
  */
3841
3873
  onFocusInPanel: EventBase<SurveyModel>;
3842
3874
  /*
3875
+ * You can use this event to decide whether show or hide choice item in checkbox, dropdown and radiogroup like questions
3876
+ * <br/> `sender` - the survey object that fires the event
3877
+ * <br/> `options.question` - a question that contains choices.
3878
+ * <br/> `options.item` - an item of the question.
3879
+ */
3880
+ onShowingChoiceItem: EventBase<SurveyModel>;
3881
+ /*
3843
3882
  * The event is fired on adding a new row in Matrix Dynamic question.
3844
3883
  * <br/> `sender` - the survey object that fires the event
3845
3884
  * <br/> `options.question` - a matrix question.
@@ -4873,6 +4912,8 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
4873
4912
  afterRenderPanel(panel: IElement, htmlElement: any): void;
4874
4913
  whenQuestionFocusIn(question: IQuestion): void;
4875
4914
  whenPanelFocusIn(panel: IPanel): void;
4915
+ canChangeChoiceItemsVisibility(): boolean;
4916
+ getChoiceItemVisibility(question: IQuestion, item: any, val: boolean): boolean;
4876
4917
  matrixBeforeRowAdded(options: any): void;
4877
4918
  matrixRowAdded(question: IQuestion, row: any): void;
4878
4919
  getQuestionByValueNameFromArray(valueName: string, name: string, index: number): IQuestion;
@@ -5348,7 +5389,6 @@ export declare class SurveyQuestionMatrixDropdownBase extends SurveyQuestionElem
5348
5389
  }
5349
5390
  export declare class SurveyQuestionMatrixDynamicDragDropIcon extends ReactSurveyElement {
5350
5391
  constructor(props: any);
5351
- onPointerDownHandler(event: any): void;
5352
5392
  protected renderElement(): any;
5353
5393
  }
5354
5394
  export declare class SurveyQuestionMatrixDynamicRemoveButton extends ReactSurveyElement {
@@ -6119,6 +6159,7 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
6119
6159
  */
6120
6160
  get enableIf(): string;
6121
6161
  set enableIf(val: string);
6162
+ surveyChoiceItemVisibilityChange(): void;
6122
6163
  /*
6123
6164
  * 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
6165
  */
@@ -6153,6 +6194,7 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
6153
6194
  */
6154
6195
  get isParentVisible(): boolean;
6155
6196
  clearValueIfInvisible(reason?: string): void;
6197
+ protected clearValueIfInvisibleCore(): void;
6156
6198
  /*
6157
6199
  * Gets or sets a value that specifies how invisible question clears the value. By default the behavior is define by Survey "clearInvisibleValues" property.
6158
6200
  *
@@ -7409,7 +7451,7 @@ export declare class QuestionPanelDynamicModel extends Question implements IQues
7409
7451
  hasErrors(fireCallback?: boolean, rec?: any): boolean;
7410
7452
  protected getContainsErrors(): boolean;
7411
7453
  protected getIsAnswered(): boolean;
7412
- clearValueIfInvisible(): void;
7454
+ protected clearValueIfInvisibleCore(): void;
7413
7455
  protected getIsRunningValidators(): boolean;
7414
7456
  getAllErrors(): Array<SurveyError>;
7415
7457
  protected getDisplayValueCore(keysAsText: boolean, value: any): any;
@@ -7571,6 +7613,7 @@ export declare class QuestionSelectBase extends Question {
7571
7613
  */
7572
7614
  get choicesEnableIf(): string;
7573
7615
  set choicesEnableIf(val: string);
7616
+ surveyChoiceItemVisibilityChange(): void;
7574
7617
  runCondition(values: any, properties: any): void;
7575
7618
  protected isTextValue(): boolean;
7576
7619
  isSettingDefaultValue: boolean;
@@ -7582,6 +7625,7 @@ export declare class QuestionSelectBase extends Question {
7582
7625
  protected runItemsEnableCondition(values: any, properties: any): any;
7583
7626
  protected onAfterRunItemsEnableCondition(): void;
7584
7627
  protected onEnableItemCallBack(item: ItemValue): boolean;
7628
+ changeItemVisisbility(): any;
7585
7629
  protected getHasOther(val: any): boolean;
7586
7630
  get validatedValue(): any;
7587
7631
  protected createRestful(): ChoicesRestful;
@@ -7678,7 +7722,7 @@ export declare class QuestionSelectBase extends Question {
7678
7722
  protected canUseFilteredChoices(): boolean;
7679
7723
  setCanShowOptionItemCallback(func: any): void;
7680
7724
  protected addToVisibleChoices(items: any, isAddAll: boolean): void;
7681
- protected canShowOptionItem(item: ItemValue): boolean;
7725
+ protected canShowOptionItem(item: ItemValue, isAddAll: boolean, hasItem: boolean): boolean;
7682
7726
  /*
7683
7727
  * For internal use in SurveyJS Creator V2.
7684
7728
  */
@@ -7719,7 +7763,7 @@ export declare class QuestionSelectBase extends Question {
7719
7763
  protected onVisibleChoicesChanged(): void;
7720
7764
  clearIncorrectValues(): void;
7721
7765
  protected hasValueToClearIncorrectValues(): boolean;
7722
- clearValueIfInvisible(): void;
7766
+ protected clearValueIfInvisibleCore(): void;
7723
7767
  /*
7724
7768
  * Returns true if item is selected
7725
7769
  */
@@ -7942,7 +7986,7 @@ export declare class QuestionCompositeModel extends QuestionCustomModelBase {
7942
7986
  hasErrors(fireCallback?: boolean, rec?: any): boolean;
7943
7987
  updateElementCss(reNew?: boolean): void;
7944
7988
  getTextProcessor(): ITextProcessor;
7945
- clearValueIfInvisible(): void;
7989
+ protected clearValueIfInvisibleCore(): void;
7946
7990
  onAnyValueChanged(name: string): void;
7947
7991
  protected createPanel(): PanelModel;
7948
7992
  protected onReadOnlyChanged(): void;
@@ -8050,6 +8094,7 @@ export declare class QuestionImageModel extends QuestionNonValue {
8050
8094
  constructor(name: string);
8051
8095
  getType(): string;
8052
8096
  get isCompositeQuestion(): boolean;
8097
+ onSurveyLoad(): void;
8053
8098
  /*
8054
8099
  * The image URL.
8055
8100
  */
@@ -8067,11 +8112,13 @@ export declare class QuestionImageModel extends QuestionNonValue {
8067
8112
  */
8068
8113
  get imageHeight(): string;
8069
8114
  set imageHeight(val: string);
8115
+ get renderedHeight(): string;
8070
8116
  /*
8071
8117
  * The image width.
8072
8118
  */
8073
8119
  get imageWidth(): string;
8074
8120
  set imageWidth(val: string);
8121
+ get renderedWidth(): string;
8075
8122
  /*
8076
8123
  * The image fit mode.
8077
8124
  */
@@ -8082,6 +8129,11 @@ export declare class QuestionImageModel extends QuestionNonValue {
8082
8129
  */
8083
8130
  get contentMode(): string;
8084
8131
  set contentMode(val: string);
8132
+ /*
8133
+ * The rendered mode.
8134
+ */
8135
+ get renderedMode(): string;
8136
+ protected calculateRenderedMode(): void;
8085
8137
  }
8086
8138
  /*
8087
8139
  * A base class for matrix dropdown and matrix dynamic questions.
@@ -8146,6 +8198,7 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
8146
8198
  get canAddRow(): boolean;
8147
8199
  get canRemoveRows(): boolean;
8148
8200
  canRemoveRow(row: MatrixDropdownRowModelBase): boolean;
8201
+ onPointerDown(pointerDownEvent: any, row: MatrixDropdownRowModelBase): void;
8149
8202
  protected onRowsChanged(): void;
8150
8203
  lockResetRenderedTable: boolean;
8151
8204
  protected onStartRowAddingRemoving(): void;
@@ -8364,7 +8417,7 @@ export declare class QuestionMatrixModel extends QuestionMatrixBaseModel<MatrixR
8364
8417
  getPlainData(options?: any): any;
8365
8418
  addConditionObjectsByContext(objects: any, context: any): void;
8366
8419
  getConditionJson(operator?: string, path?: string): any;
8367
- clearValueIfInvisible(): void;
8420
+ protected clearValueIfInvisibleCore(): void;
8368
8421
  protected getFirstInputElementId(): string;
8369
8422
  protected onRowsChanged(): void;
8370
8423
  onMatrixRowChanged(row: MatrixRowModel): void;
@@ -8643,7 +8696,7 @@ export declare class QuestionMatrixDropdownModel extends QuestionMatrixDropdownM
8643
8696
  protected getConditionObjectRowText(index: number): string;
8644
8697
  protected getConditionObjectsRowIndeces(): Array<any>;
8645
8698
  clearIncorrectValues(): void;
8646
- clearValueIfInvisible(): void;
8699
+ protected clearValueIfInvisibleCore(): void;
8647
8700
  protected generateRows(): Array<MatrixDropdownRowModel>;
8648
8701
  protected createMatrixRow(item: ItemValue, value: any): MatrixDropdownRowModel;
8649
8702
  protected getSearchableItemValueKeys(keys: any): void;
@@ -8660,7 +8713,9 @@ export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownMo
8660
8713
  setRowCountValueFromData: boolean;
8661
8714
  dragDropMatrixRows: DragDropMatrixRows;
8662
8715
  setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
8663
- startDragMatrixRow(event: any, row: MatrixDropdownRowModelBase): void;
8716
+ draggedRow: MatrixDropdownRowModelBase;
8717
+ onPointerDown(pointerDownEvent: any, row: MatrixDropdownRowModelBase): void;
8718
+ startDragMatrixRow: any;
8664
8719
  getType(): string;
8665
8720
  get isRowsDynamic(): boolean;
8666
8721
  /*
@@ -8835,7 +8890,6 @@ export declare class QuestionRadiogroupModel extends QuestionCheckboxBase {
8835
8890
  export declare class QuestionRankingModel extends QuestionCheckboxModel {
8836
8891
  constructor(name: string);
8837
8892
  domNode: any;
8838
- sortableInst: any;
8839
8893
  getType(): string;
8840
8894
  get rootClass(): string;
8841
8895
  protected getItemClassCore(item: ItemValue, options: any): string;
@@ -8859,8 +8913,6 @@ export declare class QuestionRankingModel extends QuestionCheckboxModel {
8859
8913
  protected supportSelectAll(): boolean;
8860
8914
  supportOther(): boolean;
8861
8915
  supportNone(): boolean;
8862
- get fallbackToSortableJS(): boolean;
8863
- set fallbackToSortableJS(val: boolean);
8864
8916
  handleArrowUp: any;
8865
8917
  handleArrowDown: any;
8866
8918
  focusItem: any;
@@ -9308,8 +9360,7 @@ export declare var defaultStandardCss: {
9308
9360
  emptyRowsSection: string,
9309
9361
  emptyRowsText: string,
9310
9362
  emptyRowsButton: string,
9311
- dragDropGhostPositionTop: string,
9312
- dragDropGhostPositionBottom: string,
9363
+ ghostRow: string,
9313
9364
  },
9314
9365
  paneldynamic: {
9315
9366
  root: string,
@@ -9451,7 +9502,8 @@ export declare var IsMobile: boolean;
9451
9502
  export declare var _isTouch: boolean;
9452
9503
  export declare var IsTouch: boolean;
9453
9504
  export declare var minMaxTypes: any;
9454
- export declare var Sortable: any;
9505
+ export declare var youtubeTags: any;
9506
+ export declare var videoSuffics: any;
9455
9507
  export declare var defaultWidth: number;
9456
9508
  export declare var defaultHeight: number;
9457
9509
  export declare var Version: string;
@@ -9653,8 +9705,7 @@ export declare var defaultBootstrapCss: {
9653
9705
  emptyRowsSection: string,
9654
9706
  emptyRowsText: string,
9655
9707
  emptyRowsButton: string,
9656
- dragDropGhostPositionTop: string,
9657
- dragDropGhostPositionBottom: string,
9708
+ ghostRow: string,
9658
9709
  },
9659
9710
  paneldynamic: {
9660
9711
  root: string,
@@ -9975,8 +10026,7 @@ export declare var defaultBootstrapMaterialCss: {
9975
10026
  emptyRowsSection: string,
9976
10027
  emptyRowsText: string,
9977
10028
  emptyRowsButton: string,
9978
- dragDropGhostPositionTop: string,
9979
- dragDropGhostPositionBottom: string,
10029
+ ghostRow: string,
9980
10030
  },
9981
10031
  paneldynamic: {
9982
10032
  root: string,
@@ -10163,6 +10213,18 @@ export declare var defaultV2Css: {
10163
10213
  progress: string,
10164
10214
  progressBar: string,
10165
10215
  progressText: string,
10216
+ progressButtonsContainerCenter: string,
10217
+ progressButtonsContainer: string,
10218
+ progressButtonsImageButtonLeft: string,
10219
+ progressButtonsImageButtonRight: string,
10220
+ progressButtonsImageButtonHidden: string,
10221
+ progressButtonsListContainer: string,
10222
+ progressButtonsList: string,
10223
+ progressButtonsListElementPassed: string,
10224
+ progressButtonsListElementCurrent: string,
10225
+ progressButtonsListElementNonClickable: string,
10226
+ progressButtonsPageTitle: string,
10227
+ progressButtonsPageDescription: string,
10166
10228
  progressTextInBar: string,
10167
10229
  page: {
10168
10230
  root: string,
@@ -10398,8 +10460,7 @@ export declare var defaultV2Css: {
10398
10460
  footer: string,
10399
10461
  emptyRowsSection: string,
10400
10462
  iconDrag: string,
10401
- dragDropGhostPositionTop: string,
10402
- dragDropGhostPositionBottom: string,
10463
+ ghostRow: string,
10403
10464
  emptyCell: string,
10404
10465
  verticalCell: string,
10405
10466
  cellQuestionWrapper: string,
@@ -10810,8 +10871,7 @@ export declare var modernCss: {
10810
10871
  emptyRowsSection: string,
10811
10872
  emptyRowsText: string,
10812
10873
  emptyRowsButton: string,
10813
- dragDropGhostPositionTop: string,
10814
- dragDropGhostPositionBottom: string,
10874
+ ghostRow: string,
10815
10875
  },
10816
10876
  rating: {
10817
10877
  root: string,