survey-react 1.9.71 → 1.9.72

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
@@ -253,6 +253,8 @@ declare module "helpers" {
253
253
  static createCopy(obj: any): any;
254
254
  static isConvertibleToNumber(value: any): boolean;
255
255
  static isNumber(value: any): boolean;
256
+ static getNumber(value: any): number;
257
+ private static prepareStringToNumber;
256
258
  static getMaxLength(maxLength: number, surveyLength: number): any;
257
259
  static getNumberByIndex(index: number, startIndexStr: string): string;
258
260
  static isCharNotLetterAndDigit(ch: string): boolean;
@@ -2700,6 +2702,7 @@ declare module "defaultCss/defaultV2Css" {
2700
2702
  controlDisabled: string;
2701
2703
  controlEmpty: string;
2702
2704
  filterStringInput: string;
2705
+ popup: string;
2703
2706
  onError: string;
2704
2707
  };
2705
2708
  comment: {
@@ -3143,7 +3146,7 @@ declare module "surveytimer" {
3143
3146
  static get instance(): SurveyTimer;
3144
3147
  private listenerCounter;
3145
3148
  private timerId;
3146
- onTimer: Event<() => any, any>;
3149
+ onTimer: Event<() => any, SurveyTimer, any>;
3147
3150
  start(func?: () => any): void;
3148
3151
  stop(func?: () => any): void;
3149
3152
  doTimer(): void;
@@ -3914,7 +3917,6 @@ declare module "question_paneldynamic" {
3914
3917
  private loadingPanelCount;
3915
3918
  private isValueChangingInternally;
3916
3919
  private changingValueQuestion;
3917
- private currentIndexValue;
3918
3920
  renderModeChangedCallback: () => void;
3919
3921
  panelCountChangedCallback: () => void;
3920
3922
  currentIndexChangedCallback: () => void;
@@ -3989,6 +3991,8 @@ declare module "question_paneldynamic" {
3989
3991
  */
3990
3992
  get currentIndex(): number;
3991
3993
  set currentIndex(val: number);
3994
+ private get currentIndexValue();
3995
+ private set currentIndexValue(value);
3992
3996
  /**
3993
3997
  * A `PanelModel` object that is the currently displayed panel.
3994
3998
  *
@@ -5369,6 +5373,20 @@ declare module "survey" {
5369
5373
  * @see QuestionMatrixDropdownModel
5370
5374
  */
5371
5375
  onMatrixCellValidate: EventBase<SurveyModel>;
5376
+ /**
5377
+ * An event that is raised on adding a new column in Matrix Dynamic or Matrix Dropdown question.
5378
+ * - `sender`: `SurveyModel` - A survey instance that raised the event.
5379
+ * - `options.question` - a matrix question.
5380
+ * - `options.column` - a new added column.
5381
+ */
5382
+ onMatrixColumnAdded: EventBase<SurveyModel>;
5383
+ /**
5384
+ * An event that is raised on adding a new item in Multiple Text question.
5385
+ * - `sender`: `SurveyModel` - A survey instance that raised the event.
5386
+ * - `options.question` - a multiple text question.
5387
+ * - `options.item` - a new added item.
5388
+ */
5389
+ onMultipleTextItemAdded: EventBase<SurveyModel>;
5372
5390
  /**
5373
5391
  * An event that is raised after a new panel is added to a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
5374
5392
  *
@@ -6735,6 +6753,8 @@ declare module "survey" {
6735
6753
  }): void;
6736
6754
  matrixBeforeRowAdded(options: any): void;
6737
6755
  matrixRowAdded(question: IQuestion, row: any): void;
6756
+ matrixColumnAdded(question: IQuestion, column: any): void;
6757
+ multipleTextItemAdded(question: IQuestion, item: any): void;
6738
6758
  getQuestionByValueNameFromArray(valueName: string, name: string, index: number): IQuestion;
6739
6759
  matrixRowRemoved(question: IQuestion, rowIndex: number, row: any): void;
6740
6760
  matrixRowRemoving(question: IQuestion, rowIndex: number, row: any): boolean;
@@ -7938,7 +7958,7 @@ declare module "questionCustomWidgets" {
7938
7958
  static Instance: CustomWidgetCollection;
7939
7959
  private widgetsValues;
7940
7960
  private widgetsActivatedBy;
7941
- onCustomWidgetAdded: Event<(customWidget: QuestionCustomWidget) => any, any>;
7961
+ onCustomWidgetAdded: Event<(customWidget: QuestionCustomWidget) => any, QuestionCustomWidget, any>;
7942
7962
  get widgets(): Array<QuestionCustomWidget>;
7943
7963
  add(widgetJson: any, activatedBy?: string): void;
7944
7964
  addCustomWidget(widgetJson: any, activatedBy?: string): QuestionCustomWidget;
@@ -9074,7 +9094,7 @@ declare module "dragdrop/core" {
9074
9094
  private creator?;
9075
9095
  private longTap?;
9076
9096
  isBottom: boolean;
9077
- onGhostPositionChanged: EventBase<Base>;
9097
+ onGhostPositionChanged: EventBase<{}>;
9078
9098
  protected ghostPositionChanged(): void;
9079
9099
  static PreventScrolling: boolean;
9080
9100
  onBeforeDrop: EventBase<DragDropCore<T>>;
@@ -10170,6 +10190,7 @@ declare module "base-interfaces" {
10170
10190
  setItems: (displayValues: Array<string>) => void;
10171
10191
  }): void;
10172
10192
  matrixRowAdded(question: IQuestion, row: any): any;
10193
+ matrixColumnAdded(question: IQuestion, column: any): void;
10173
10194
  matrixBeforeRowAdded(options: {
10174
10195
  question: IQuestion;
10175
10196
  canAddRow: boolean;
@@ -10184,6 +10205,7 @@ declare module "base-interfaces" {
10184
10205
  matrixCellValueChanging(question: IQuestion, options: any): any;
10185
10206
  isValidateOnValueChanging: boolean;
10186
10207
  isValidateOnValueChanged: boolean;
10208
+ multipleTextItemAdded(question: IQuestion, item: any): void;
10187
10209
  matrixCellValidate(question: IQuestion, options: any): SurveyError;
10188
10210
  dynamicPanelAdded(question: IQuestion, panelIndex?: number, panel?: IPanel): void;
10189
10211
  dynamicPanelRemoved(question: IQuestion, panelIndex: number, panel: IPanel): void;
@@ -10503,7 +10525,7 @@ declare module "base" {
10503
10525
  * - `options.newValue: `any`\
10504
10526
  * A new value for the property.
10505
10527
  */
10506
- onItemValuePropertyChanged: Event<(sender: Base, options: any) => any, any>;
10528
+ onItemValuePropertyChanged: Event<(sender: Base, options: any) => any, Base, any>;
10507
10529
  getPropertyValueCoreHandler: (propertiesHash: any, name: string) => any;
10508
10530
  setPropertyValueCoreHandler: (propertiesHash: any, name: string, val: any) => void;
10509
10531
  createArrayCoreHandler: (propertiesHash: any, name: string) => Array<any>;
@@ -10512,7 +10534,7 @@ declare module "base" {
10512
10534
  constructor();
10513
10535
  dispose(): void;
10514
10536
  get isDisposed(): boolean;
10515
- protected addEvent<T>(): EventBase<T>;
10537
+ protected addEvent<T, Options = any>(): EventBase<T, Options>;
10516
10538
  protected onBaseCreating(): void;
10517
10539
  /**
10518
10540
  * Returns the object type as it is used in the JSON schema.
@@ -10671,20 +10693,20 @@ declare module "base" {
10671
10693
  deletedItems: any[];
10672
10694
  constructor(index: number, deleteCount: number, itemsToAdd: any[], deletedItems: any[]);
10673
10695
  }
10674
- export class Event<T extends Function, Options> {
10696
+ export class Event<CallbackFunction extends Function, Sender, Options> {
10675
10697
  onCallbacksChanged: () => void;
10676
- protected callbacks: Array<T>;
10698
+ protected callbacks: Array<CallbackFunction>;
10677
10699
  get isEmpty(): boolean;
10678
10700
  get length(): number;
10679
10701
  fireByCreatingOptions(sender: any, createOptions: () => Options): void;
10680
- fire(sender: any, options: Options): void;
10702
+ fire(sender: Sender, options: Options): void;
10681
10703
  clear(): void;
10682
- add(func: T): void;
10683
- remove(func: T): void;
10684
- hasFunc(func: T): boolean;
10704
+ add(func: CallbackFunction): void;
10705
+ remove(func: CallbackFunction): void;
10706
+ hasFunc(func: CallbackFunction): boolean;
10685
10707
  private fireCallbackChanged;
10686
10708
  }
10687
- export class EventBase<T> extends Event<(sender: T, options: any) => any, any> {
10709
+ export class EventBase<Sender, Options = any> extends Event<(sender: Sender, options: Options) => any, Sender, Options> {
10688
10710
  }
10689
10711
  }
10690
10712
  declare module "validator" {
@@ -10905,7 +10927,10 @@ declare module "dropdownListModel" {
10905
10927
  readonly minPageSize = 25;
10906
10928
  readonly loadingItemHeight = 40;
10907
10929
  private _popupModel;
10908
- private focusFirstInputSelector;
10930
+ private get focusFirstInputSelector();
10931
+ protected readonly selectedItemSelector = ".sv-list__item--selected";
10932
+ protected readonly itemSelector = ".sv-list__item";
10933
+ protected getFocusFirstInputSelector(): string;
10909
10934
  private itemsSettings;
10910
10935
  private isRunningLoadQuestionChoices;
10911
10936
  protected listModel: ListModel;
@@ -10933,6 +10958,7 @@ declare module "dropdownListModel" {
10933
10958
  get popupModel(): PopupModel;
10934
10959
  get inputReadOnly(): boolean;
10935
10960
  get filterStringEnabled(): boolean;
10961
+ get inputMode(): "none" | "text";
10936
10962
  setSearchEnabled(newValue: boolean): void;
10937
10963
  updateItems(): void;
10938
10964
  onClick(event: any): void;
@@ -11520,7 +11546,18 @@ declare module "question_multipletext" {
11520
11546
  private editorsOnSurveyLoad;
11521
11547
  private performForEveryEditor;
11522
11548
  /**
11523
- * An array of `MultipleTextItemModel` objects that represent input items.
11549
+ * Gets or sets an array of `MultipleTextItemModel` objects that represent input items.
11550
+ *
11551
+ * This property accepts an array of objects with the following structure:
11552
+ *
11553
+ * ```js
11554
+ * {
11555
+ * "name": any, // A unique value used to identify an input item and save an item value to survey results.
11556
+ * "title": String // An item caption. When `title` is undefined, `name` is used. This property supports Markdown.
11557
+ * }
11558
+ * ```
11559
+ *
11560
+ * To enable Markdown support for the `title` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with Showdown](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
11524
11561
  * @see addItem
11525
11562
  */
11526
11563
  get items(): Array<MultipleTextItemModel>;
@@ -11818,6 +11855,7 @@ declare module "dropdownMultiSelectListModel" {
11818
11855
  private updateListState;
11819
11856
  private syncFilterStringPlaceholder;
11820
11857
  private getSelectedActions;
11858
+ protected getFocusFirstInputSelector(): string;
11821
11859
  protected createListModel(): MultiSelectListModel;
11822
11860
  previousValue: any;
11823
11861
  doneButtonCaption: string;
@@ -12329,6 +12367,7 @@ declare module "question_file" {
12329
12367
  getFileDecoratorCss(): string;
12330
12368
  private onChange;
12331
12369
  protected onChangeQuestionValue(newValue: any): void;
12370
+ endLoadingFromJson(): void;
12332
12371
  private rootElement;
12333
12372
  afterRender(el: HTMLElement): void;
12334
12373
  private dragCounter;
@@ -12414,6 +12453,7 @@ declare module "question_rating" {
12414
12453
  import { Question } from "question";
12415
12454
  import { LocalizableString } from "localizablestring";
12416
12455
  import { Base } from "base";
12456
+ import { DropdownListModel } from "dropdownListModel";
12417
12457
  export class RenderedRatingItem extends Base {
12418
12458
  itemValue: ItemValue;
12419
12459
  private locString;
@@ -12562,6 +12602,11 @@ declare module "question_rating" {
12562
12602
  protected supportResponsiveness(): boolean;
12563
12603
  protected getCompactRenderAs(): string;
12564
12604
  protected getDesktopRenderAs(): string;
12605
+ private dropdownListModelValue;
12606
+ set dropdownListModel(val: DropdownListModel);
12607
+ get dropdownListModel(): DropdownListModel;
12608
+ protected updateCssClasses(res: any, css: any): void;
12609
+ protected calcCssClasses(css: any): any;
12565
12610
  }
12566
12611
  }
12567
12612
  declare module "question_boolean" {
@@ -13267,6 +13312,9 @@ declare module "popup-dropdown-view-model" {
13267
13312
  targetElement?: HTMLElement;
13268
13313
  private scrollEventCallBack;
13269
13314
  private resizeEventCallback;
13315
+ private clientY;
13316
+ private touchStartEventCallback;
13317
+ private touchMoveEventCallback;
13270
13318
  private _updatePosition;
13271
13319
  protected getActualHorizontalPosition(): "left" | "center" | "right";
13272
13320
  protected getStyleClass(): CssClassBuilder;
@@ -18095,6 +18143,7 @@ declare module "localization/portuguese" {
18095
18143
  noneItemText: string;
18096
18144
  selectAllItemText: string;
18097
18145
  progressText: string;
18146
+ indexText: string;
18098
18147
  panelDynamicProgressText: string;
18099
18148
  questionsProgressText: string;
18100
18149
  emptySurvey: string;
@@ -18102,11 +18151,14 @@ declare module "localization/portuguese" {
18102
18151
  completingSurveyBefore: string;
18103
18152
  loadingSurvey: string;
18104
18153
  placeholder: string;
18154
+ ratingOptionsCaption: string;
18105
18155
  value: string;
18106
18156
  requiredError: string;
18107
18157
  requiredErrorInPanel: string;
18108
18158
  requiredInAllRowsError: string;
18109
18159
  numericError: string;
18160
+ minError: string;
18161
+ maxError: string;
18110
18162
  textMinLength: string;
18111
18163
  textMaxLength: string;
18112
18164
  textMinMaxLength: string;
@@ -18126,16 +18178,19 @@ declare module "localization/portuguese" {
18126
18178
  loadingFile: string;
18127
18179
  chooseFile: string;
18128
18180
  noFileChosen: string;
18181
+ fileDragAreaPlaceholder: string;
18129
18182
  confirmDelete: string;
18130
18183
  keyDuplicationError: string;
18131
18184
  addColumn: string;
18132
18185
  addRow: string;
18133
18186
  removeRow: string;
18187
+ emptyRowsText: string;
18134
18188
  addPanel: string;
18135
18189
  removePanel: string;
18136
18190
  choices_Item: string;
18137
18191
  matrix_column: string;
18138
18192
  matrix_row: string;
18193
+ multipletext_itemname: string;
18139
18194
  savingData: string;
18140
18195
  savingDataError: string;
18141
18196
  savingDataSuccess: string;
@@ -18149,6 +18204,7 @@ declare module "localization/portuguese" {
18149
18204
  timerLimitPage: string;
18150
18205
  timerLimitSurvey: string;
18151
18206
  clearCaption: string;
18207
+ signaturePlaceHolder: string;
18152
18208
  chooseFileCaption: string;
18153
18209
  removeFileCaption: string;
18154
18210
  booleanCheckedLabel: string;
@@ -18156,6 +18212,13 @@ declare module "localization/portuguese" {
18156
18212
  confirmRemoveFile: string;
18157
18213
  confirmRemoveAllFiles: string;
18158
18214
  questionTitlePatternText: string;
18215
+ modalCancelButtonText: string;
18216
+ modalApplyButtonText: string;
18217
+ filterStringPlaceholder: string;
18218
+ emptyMessage: string;
18219
+ noEntriesText: string;
18220
+ more: string;
18221
+ tagboxDoneButtonCaption: string;
18159
18222
  };
18160
18223
  }
18161
18224
  declare module "localization/portuguese-br" {