survey-react 1.10.1 → 1.10.3

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
@@ -706,6 +706,7 @@ declare module "utils/animation" {
706
706
  private removeCancelCallback;
707
707
  protected onAnimationEnd(element: HTMLElement, callback: (isCancel?: boolean) => void, options: AnimationOptions): void;
708
708
  protected beforeAnimationRun(element: HTMLElement, options: AnimationOptions | AnimationOptions): void;
709
+ private getCssClasses;
709
710
  protected runAnimation(element: HTMLElement, options: AnimationOptions, callback: (isCancel?: boolean) => void): void;
710
711
  protected clearHtmlElement(element: HTMLElement, options: AnimationOptions): void;
711
712
  protected onNextRender(callback: () => void, runEarly?: () => boolean, isCancel?: boolean): void;
@@ -972,10 +973,10 @@ declare module "list" {
972
973
  export class ListModel<T extends BaseAction = Action> extends ActionContainer<T> {
973
974
  onSelectionChanged: (item: T, ...params: any[]) => void;
974
975
  allowSelection: boolean;
975
- private onFilterStringChangedCallback?;
976
976
  elementId?: string;
977
977
  private listContainerHtmlElement;
978
978
  private loadingIndicatorValue;
979
+ private onFilterStringChangedCallback?;
979
980
  searchEnabled: boolean;
980
981
  showFilter: boolean;
981
982
  forceShowFilter: boolean;
@@ -998,7 +999,7 @@ declare module "list" {
998
999
  private get shouldProcessFilter();
999
1000
  private onFilterStringChanged;
1000
1001
  private scrollToItem;
1001
- constructor(items: Array<IAction>, onSelectionChanged: (item: T, ...params: any[]) => void, allowSelection: boolean, selectedItem?: IAction, onFilterStringChangedCallback?: (text: string) => void, elementId?: string);
1002
+ constructor(items: Array<IAction>, onSelectionChanged: (item: T, ...params: any[]) => void, allowSelection: boolean, selectedItem?: IAction, elementId?: string);
1002
1003
  private onTextSearchCallback;
1003
1004
  setOnFilterStringChangedCallback(callback: (text: string) => void): void;
1004
1005
  setOnTextSearchCallback(callback: (item: T, textToSearch: string) => boolean): void;
@@ -2043,6 +2044,8 @@ declare module "defaultCss/defaultV2Css" {
2043
2044
  selectWrapper: string;
2044
2045
  controlValue: string;
2045
2046
  controlDisabled: string;
2047
+ controlReadOnly: string;
2048
+ controlPreview: string;
2046
2049
  controlEmpty: string;
2047
2050
  filterStringInput: string;
2048
2051
  chevronButton: string;
@@ -3169,6 +3172,8 @@ declare module "panel" {
3169
3172
  get _showDescription(): boolean;
3170
3173
  localeChanged(): void;
3171
3174
  locStrsChanged(): void;
3175
+ getMarkdownHtml(text: string, name: string): string;
3176
+ get locNavigationTitle(): LocalizableString;
3172
3177
  get renderedNavigationTitle(): string;
3173
3178
  /**
3174
3179
  * Returns a character or text string that indicates a required panel/page.
@@ -3845,10 +3850,12 @@ declare module "question_file" {
3845
3850
  set takePhotoCaption(val: string);
3846
3851
  get locTakePhotoCaption(): LocalizableString;
3847
3852
  replaceButtonCaption: string;
3848
- clearButtonCaption: string;
3849
3853
  removeFileCaption: string;
3850
3854
  loadingFileTitle: string;
3851
3855
  chooseFileTitle: string;
3856
+ get clearButtonCaption(): string;
3857
+ set clearButtonCaption(value: string);
3858
+ get locClearButtonCaption(): LocalizableString;
3852
3859
  /**
3853
3860
  * A placeholder text displayed when the File Upload question doesn't contain any files or photos to upload. Applies only when [`sourceType`](#sourceType) value is `"file-camera"`.
3854
3861
  * @see filePlaceholder
@@ -4315,7 +4322,7 @@ declare module "question_baseselect" {
4315
4322
  private setConditionalChoicesRunner;
4316
4323
  private setConditionalEnableChoicesRunner;
4317
4324
  private canSurveyChangeItemVisibility;
4318
- changeItemVisisbility(): (item: ItemValue, val: boolean) => boolean;
4325
+ private changeItemVisibility;
4319
4326
  private runConditionsForItems;
4320
4327
  protected getHasOther(val: any): boolean;
4321
4328
  protected getIsItemValue(val: any, item: ItemValue): boolean;
@@ -5342,6 +5349,8 @@ declare module "dragdrop/dom-adapter" {
5342
5349
  private moveShortcutElement;
5343
5350
  private getShortcutBottomCoordinate;
5344
5351
  private getShortcutRightCoordinate;
5352
+ protected requestAnimationFrame(callback: any): number;
5353
+ protected scrollByDrag(scrollableParentNode: HTMLElement, clientY: number, clientX: number): void;
5345
5354
  private doScroll;
5346
5355
  private dragOver;
5347
5356
  private clear;
@@ -7999,7 +8008,6 @@ declare module "page" {
7999
8008
  */
8000
8009
  get navigationTitle(): string;
8001
8010
  set navigationTitle(val: string);
8002
- get locNavigationTitle(): LocalizableString;
8003
8011
  /**
8004
8012
  * Explanatory text displayed under a navigation button in the progress bar. Applies when the [progress bar is visible](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showProgressBar), `SurveyModel`'s [`progressBarType`](https://surveyjs.io/form-library/documentation/surveymodel#progressBarType) is set to `"pages"`, and [`progressBarShowPageTitles`](https://surveyjs.io/form-library/documentation/surveymodel#progressBarShowPageTitles) is `true`.
8005
8013
  */
@@ -8007,7 +8015,6 @@ declare module "page" {
8007
8015
  set navigationDescription(val: string);
8008
8016
  get locNavigationDescription(): LocalizableString;
8009
8017
  navigationLocStrChanged(): void;
8010
- get renderedNavigationTitle(): string;
8011
8018
  get passed(): boolean;
8012
8019
  set passed(val: boolean);
8013
8020
  protected removeFromParent(): void;
@@ -11988,6 +11995,7 @@ declare module "survey" {
11988
11995
  onScroll(): void;
11989
11996
  addScrollEventListener(): void;
11990
11997
  removeScrollEventListener(): void;
11998
+ questionErrorComponent: string;
11991
11999
  }
11992
12000
  }
11993
12001
  declare module "knockout/kobase" {
@@ -12515,9 +12523,10 @@ declare module "rendererFactory" {
12515
12523
  export class RendererFactory {
12516
12524
  static Instance: RendererFactory;
12517
12525
  private renderersHash;
12526
+ private defaultHash;
12518
12527
  unregisterRenderer(questionType: string, rendererAs: string): void;
12519
- registerRenderer(questionType: string, renderAs: string, renderer: any): void;
12520
- getRenderer(questionType: string, renderAs: string): any;
12528
+ registerRenderer(questionType: string, renderAs: string, renderer: any, useAsDefault?: boolean): void;
12529
+ getRenderer(questionType: string, renderAs: string): string;
12521
12530
  getRendererByQuestion(question: Question): any;
12522
12531
  clear(): void;
12523
12532
  }
@@ -15083,6 +15092,8 @@ declare module "base" {
15083
15092
  * A new value for the property.
15084
15093
  * - `options.oldValue`: `any`\
15085
15094
  * An old value of the property. If the property is an array, `oldValue` contains the same array as `newValue` does.
15095
+ *
15096
+ * If you need to add and remove property change event handlers dynamically, use the [`registerPropertyChangedHandlers`](#registerPropertyChangedHandlers) and [`unregisterPropertyChangedHandlers`](#unregisterPropertyChangedHandlers) methods instead.
15086
15097
  */
15087
15098
  onPropertyChanged: EventBase<Base>;
15088
15099
  /**
@@ -15229,9 +15240,11 @@ declare module "base" {
15229
15240
  get isAsyncExpressionRunning(): boolean;
15230
15241
  protected createExpressionRunner(expression: string): ExpressionRunner;
15231
15242
  /**
15232
- * Registers a function to call when a property value changes.
15243
+ * Registers a single value change handler for one or multiple properties.
15244
+ *
15245
+ * The `registerPropertyChangedHandlers` and [`unregisterPropertyChangedHandlers`](#unregisterPropertyChangedHandlers) methods allow you to manage property change event handlers dynamically. If you only need to attach an event handler without removing it afterwards, you can use the [`onPropertyChanged`](#onPropertyChanged) event instead.
15233
15246
  * @param propertyNames An array of one or multiple property names.
15234
- * @param handler A function to call when one of the listed properties change.
15247
+ * @param handler A function to call when one of the listed properties change. Accepts a new property value as an argument.
15235
15248
  * @param key *(Optional)* A key that identifies the current registration. If a function for one of the properties is already registered with the same key, the function will be overwritten. You can also use the key to subsequently unregister handlers.
15236
15249
  * @see unregisterPropertyChangedHandlers
15237
15250
  */
@@ -15341,8 +15354,8 @@ declare module "popup" {
15341
15354
  export interface IPopupOptionsBase {
15342
15355
  onHide?: () => void;
15343
15356
  onShow?: () => void;
15344
- onApply?: () => boolean;
15345
15357
  onCancel?: () => void;
15358
+ onDispose?: () => void;
15346
15359
  cssClass?: string;
15347
15360
  title?: string;
15348
15361
  verticalPosition?: VerticalPosition;
@@ -15357,15 +15370,15 @@ declare module "popup" {
15357
15370
  onApply: () => boolean;
15358
15371
  isFocusedContent?: boolean;
15359
15372
  }
15360
- export interface IPopupModel<T = any> extends IDialogOptions {
15361
- contentComponentName: string;
15362
- contentComponentData: T;
15363
- }
15364
- export class PopupModel<T = any> extends Base {
15365
- private onDispose;
15373
+ export class PopupModel<T = any> extends Base implements IPopupOptionsBase {
15366
15374
  setWidthByTarget: boolean;
15367
15375
  focusFirstInputSelector: string;
15368
15376
  locale: string;
15377
+ onCancel: () => void;
15378
+ onApply: () => boolean;
15379
+ onHide: () => void;
15380
+ onShow: () => void;
15381
+ onDispose: () => void;
15369
15382
  contentComponentName: string;
15370
15383
  contentComponentData: T;
15371
15384
  verticalPosition: VerticalPosition;
@@ -15374,10 +15387,6 @@ declare module "popup" {
15374
15387
  isModal: boolean;
15375
15388
  isFocusedContent: boolean;
15376
15389
  isFocusedContainer: boolean;
15377
- onCancel: () => void;
15378
- onApply: () => boolean;
15379
- onHide: () => void;
15380
- onShow: () => void;
15381
15390
  cssClass: string;
15382
15391
  title: string;
15383
15392
  overlayDisplayMode: "auto" | "overlay" | "dropdown-overlay";
@@ -15387,7 +15396,7 @@ declare module "popup" {
15387
15396
  onFooterActionsCreated: EventBase<Base>;
15388
15397
  onRecalculatePosition: EventBase<Base>;
15389
15398
  private refreshInnerModel;
15390
- constructor(contentComponentName: string, contentComponentData: T, verticalPosition?: VerticalPosition, horizontalPosition?: HorizontalPosition, showPointer?: boolean, isModal?: boolean, onCancel?: () => void, onApply?: () => boolean, onHide?: () => void, onShow?: () => void, cssClass?: string, title?: string, onDispose?: () => void);
15399
+ constructor(contentComponentName: string, contentComponentData: T, option1?: IPopupOptionsBase | any, option2?: any);
15391
15400
  get isVisible(): boolean;
15392
15401
  set isVisible(value: boolean);
15393
15402
  toggleVisibility(): void;
@@ -16099,6 +16108,7 @@ declare module "dropdownListModel" {
16099
16108
  get filterStringEnabled(): boolean;
16100
16109
  get inputMode(): "none" | "text";
16101
16110
  setSearchEnabled(newValue: boolean): void;
16111
+ setChoicesLazyLoadEnabled(newValue: boolean): void;
16102
16112
  updateItems(): void;
16103
16113
  onClick(event: any): void;
16104
16114
  chevronPointerDown(event: any): void;
@@ -16302,6 +16312,8 @@ declare module "question_matrix" {
16302
16312
  setValueDirectly(val: any): void;
16303
16313
  get isReadOnly(): boolean;
16304
16314
  get rowTextClasses(): string;
16315
+ get hasError(): boolean;
16316
+ set hasError(val: boolean);
16305
16317
  get rowClasses(): string;
16306
16318
  }
16307
16319
  export interface IMatrixCellsOwner extends ILocalizableOwner {
@@ -16414,11 +16426,10 @@ declare module "question_matrix" {
16414
16426
  supportGoNextPageAutomatic(): boolean;
16415
16427
  private errorsInRow;
16416
16428
  protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
16417
- private hasErrorAllRowsRequired;
16418
- private hasErrorEachRowUnique;
16419
16429
  private hasValuesInAllRows;
16420
- private hasNonUniqueValueInRow;
16430
+ private checkErrorsAllRows;
16421
16431
  private addErrorIntoRow;
16432
+ private refreshRowsErrors;
16422
16433
  protected getIsAnswered(): boolean;
16423
16434
  private createMatrixRow;
16424
16435
  protected onMatrixRowCreated(row: MatrixRowModel): void;
@@ -16688,7 +16699,7 @@ declare module "multiSelectListModel" {
16688
16699
  selectedItems: Array<IAction>;
16689
16700
  hideSelectedItems: boolean;
16690
16701
  private updateItemState;
16691
- constructor(items: Array<IAction>, onSelectionChanged: (item: T, status: string) => void, allowSelection: boolean, selectedItems?: Array<IAction>, onFilterStringChangedCallback?: (text: string) => void, elementId?: string);
16702
+ constructor(items: Array<IAction>, onSelectionChanged: (item: T, status: string) => void, allowSelection: boolean, selectedItems?: Array<IAction>, elementId?: string);
16692
16703
  onItemClick: (item: T) => void;
16693
16704
  isItemDisabled: (itemValue: T) => boolean;
16694
16705
  isItemSelected: (itemValue: T) => boolean;
@@ -16756,6 +16767,8 @@ declare module "question_tagbox" {
16756
16767
  private updateReadOnlyText;
16757
16768
  protected getDefaultItemComponent(): string;
16758
16769
  onSurveyLoad(): void;
16770
+ protected onSetData(): void;
16771
+ private createDropdownListModel;
16759
16772
  /**
16760
16773
  * Specifies a comparison operation used to filter the drop-down list. Applies only if [`searchEnabled`](#searchEnabled) is `true`.
16761
16774
  *
@@ -16984,6 +16997,7 @@ declare module "question_imagepicker" {
16984
16997
  protected getObservedElementSelector(): string;
16985
16998
  protected supportResponsiveness(): boolean;
16986
16999
  protected needResponsiveness(): boolean;
17000
+ needResponsiveWidth(): boolean;
16987
17001
  private _width;
16988
17002
  onContentLoaded: (item: ImageItemValue, event: any) => void;
16989
17003
  private responsiveColCount;
@@ -17308,6 +17322,7 @@ declare module "question_radiogroup" {
17308
17322
  get canShowClearButton(): boolean;
17309
17323
  get clearButtonCaption(): string;
17310
17324
  supportGoNextPageAutomatic(): boolean;
17325
+ getConditionJson(operator?: string, path?: string): any;
17311
17326
  protected setNewComment(newValue: string): void;
17312
17327
  get showClearButtonInContent(): boolean;
17313
17328
  clickItemHandler(item: ItemValue): void;
@@ -17634,6 +17649,11 @@ declare module "question_boolean" {
17634
17649
  getDefaultValue(): any;
17635
17650
  get locTitle(): LocalizableString;
17636
17651
  get labelRenderedAriaID(): string;
17652
+ leftAnswerElement: HTMLElement;
17653
+ thumbMargin: string;
17654
+ updateThumbMargin(): void;
17655
+ afterRender(el: HTMLElement): void;
17656
+ beforeDestroyQuestionElement(el: HTMLElement): void;
17637
17657
  showTitle: boolean;
17638
17658
  label: string;
17639
17659
  get isLabelRendered(): boolean;
@@ -26231,7 +26251,7 @@ declare module "react/reactquestion" {
26231
26251
  import { SurveyElementBase, ReactSurveyElement } from "react/reactquestion_element";
26232
26252
  export interface ISurveyCreator {
26233
26253
  createQuestionElement(question: Question): JSX.Element | null;
26234
- renderError(key: string, error: SurveyError, cssClasses: any): JSX.Element;
26254
+ renderError(key: string, error: SurveyError, cssClasses: any, element?: any): JSX.Element;
26235
26255
  questionTitleLocation(): string;
26236
26256
  questionErrorLocation(): string;
26237
26257
  }
@@ -26557,7 +26577,7 @@ declare module "react/reactSurvey" {
26557
26577
  protected updateSurvey(newProps: any, oldProps?: any): void;
26558
26578
  protected setSurveyEvents(): void;
26559
26579
  createQuestionElement(question: Question): JSX.Element | null;
26560
- renderError(key: string, error: SurveyError, cssClasses: any): JSX.Element;
26580
+ renderError(key: string, error: SurveyError, cssClasses: any, element?: any): JSX.Element;
26561
26581
  questionTitleLocation(): string;
26562
26582
  questionErrorLocation(): string;
26563
26583
  }
@@ -27453,6 +27473,18 @@ declare module "react/components/survey-actions/survey-nav-button" {
27453
27473
  protected renderElement(): JSX.Element;
27454
27474
  }
27455
27475
  }
27476
+ declare module "react/components/question-error" {
27477
+ import React from "react";
27478
+ import { SurveyError } from "entries/core";
27479
+ export interface IQuestionErrorComponentProps {
27480
+ error: SurveyError;
27481
+ cssClasses: any;
27482
+ element: any;
27483
+ }
27484
+ export class QuestionErrorComponent extends React.Component<IQuestionErrorComponentProps, any> {
27485
+ render(): JSX.Element | null;
27486
+ }
27487
+ }
27456
27488
  declare module "react/components/skeleton" {
27457
27489
  import React from "react";
27458
27490
  export class Skeleton extends React.Component<any, any> {
@@ -27568,6 +27600,7 @@ declare module "entries/react-ui-model" {
27568
27600
  export { SurveyQuestionPanelDynamicNextButton } from "react/components/paneldynamic-actions/paneldynamic-next-btn";
27569
27601
  export { SurveyQuestionPanelDynamicProgressText } from "react/components/paneldynamic-actions/paneldynamic-progress-text";
27570
27602
  export { SurveyNavigationButton } from "react/components/survey-actions/survey-nav-button";
27603
+ export { QuestionErrorComponent } from "react/components/question-error";
27571
27604
  export { MatrixRow } from "react/components/matrix/row";
27572
27605
  export { Skeleton } from "react/components/skeleton";
27573
27606
  export { NotifierComponent } from "react/components/notifier";