survey-react 1.9.111 → 1.9.112

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.min.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.111
2
+ * surveyjs - Survey JavaScript library v1.9.112
3
3
  * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
package/survey.react.d.ts CHANGED
@@ -4428,7 +4428,6 @@ declare module "question_expression" {
4428
4428
  set precision(val: number);
4429
4429
  private roundValue;
4430
4430
  protected getValueAsStr(val: any): string;
4431
- protected convertToCorrectValue(val: any): any;
4432
4431
  }
4433
4432
  export function getCurrecyCodes(): Array<string>;
4434
4433
  }
@@ -4516,6 +4515,10 @@ declare module "question_matrixdropdowncolumn" {
4516
4515
  set resetValueIf(val: string);
4517
4516
  get defaultValueExpression(): string;
4518
4517
  set defaultValueExpression(val: string);
4518
+ get setValueIf(): string;
4519
+ set setValueIf(val: string);
4520
+ get setValueExpession(): string;
4521
+ set setValueExpession(val: string);
4519
4522
  get isUnique(): boolean;
4520
4523
  set isUnique(val: boolean);
4521
4524
  get showInMultipleColumns(): boolean;
@@ -5810,6 +5813,77 @@ declare module "question_paneldynamic" {
5810
5813
  protected calcCssClasses(css: any): any;
5811
5814
  }
5812
5815
  }
5816
+ declare module "themes" {
5817
+ export type ImageFit = "auto" | "contain" | "cover";
5818
+ export type ImageAttachment = "fixed" | "scroll";
5819
+ /**
5820
+ * A theme configuration interface.
5821
+ *
5822
+ * `ITheme` objects are used to apply predefined themes or create custom themes. Refer to the following help topic for more information:
5823
+ *
5824
+ * [Themes & Styles](https://surveyjs.io/form-library/documentation/manage-default-themes-and-styles (linkStyle))
5825
+ */
5826
+ export interface ITheme {
5827
+ /**
5828
+ * A theme name.
5829
+ */
5830
+ themeName?: string;
5831
+ /**
5832
+ * A color palette.
5833
+ *
5834
+ * Possible values:
5835
+ *
5836
+ * - `"light"`
5837
+ * - `"dark"`
5838
+ */
5839
+ colorPalette?: string;
5840
+ /**
5841
+ * A Boolean value that specifies whether survey questions are displayed within panels (`false`) or without them (`true`).
5842
+ */
5843
+ isPanelless?: boolean;
5844
+ /**
5845
+ * An image to display as survey background. This property accepts a hyperlink or a data URL.
5846
+ */
5847
+ backgroundImage?: string;
5848
+ /**
5849
+ * A string value that specifies how to resize the [background image](#backgroundImage) to fit it into its container.
5850
+ *
5851
+ * Possible values:
5852
+ *
5853
+ * - `"auto"`
5854
+ * - `"contain"`
5855
+ * - `"cover"`
5856
+ *
5857
+ * Refer to the description of the [`background-size`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size#values) CSS property values on MDN for detailed information on the possible values.
5858
+ */
5859
+ backgroundImageFit?: ImageFit;
5860
+ /**
5861
+ * A string value that specifies whether the [background image](#backgroundImage) is fixed in its position or scrolled along with the survey.
5862
+ *
5863
+ * Possible values:
5864
+ *
5865
+ * - `"fixed"`
5866
+ * - `"scroll"`
5867
+ */
5868
+ backgroundImageAttachment?: ImageAttachment;
5869
+ /**
5870
+ * A value from 0 to 1 that specifies how transparent the [background image](#backgroundImage) should be: 0 makes the image completely transparent, and 1 makes it opaque.
5871
+ */
5872
+ backgroundOpacity?: number;
5873
+ /**
5874
+ * An object with survey header settings.
5875
+ */
5876
+ header?: {
5877
+ [index: string]: any;
5878
+ };
5879
+ /**
5880
+ * An object with CSS variables.
5881
+ */
5882
+ cssVariables?: {
5883
+ [index: string]: string;
5884
+ };
5885
+ }
5886
+ }
5813
5887
  declare module "survey-events-api" {
5814
5888
  import { IAction } from "actions/action";
5815
5889
  import { Base } from "base";
@@ -5826,6 +5900,7 @@ declare module "survey-events-api" {
5826
5900
  import { QuestionPanelDynamicModel } from "question_paneldynamic";
5827
5901
  import { SurveyModel } from "survey";
5828
5902
  import { SurveyError } from "survey-error";
5903
+ import { ITheme } from "themes";
5829
5904
  import { Trigger } from "trigger";
5830
5905
  export interface QuestionEventMixin {
5831
5906
  /**
@@ -6773,6 +6848,9 @@ declare module "survey-events-api" {
6773
6848
  */
6774
6849
  visible: boolean;
6775
6850
  }
6851
+ export interface ThemeAppliedEvent {
6852
+ theme: ITheme;
6853
+ }
6776
6854
  }
6777
6855
  declare module "drag-drop-page-helper-v1" {
6778
6856
  import { IElement, ISurveyElement } from "base-interfaces";
@@ -7118,6 +7196,7 @@ declare module "notifier" {
7118
7196
  timer: any;
7119
7197
  private actionsVisibility;
7120
7198
  actionBar: ActionContainer;
7199
+ showActions: boolean;
7121
7200
  constructor(cssClasses: {
7122
7201
  root: string;
7123
7202
  info: string;
@@ -7590,25 +7669,6 @@ declare module "question_multipletext" {
7590
7669
  protected getClassName(): string;
7591
7670
  }
7592
7671
  }
7593
- declare module "themes" {
7594
- export type ImageFit = "auto" | "contain" | "cover";
7595
- export type ImageAttachment = "fixed" | "scroll";
7596
- export interface ITheme {
7597
- themeName?: string;
7598
- colorPalette?: string;
7599
- isPanelless?: boolean;
7600
- backgroundImage?: string;
7601
- backgroundImageFit?: ImageFit;
7602
- backgroundImageAttachment?: ImageAttachment;
7603
- backgroundOpacity?: number;
7604
- cover?: {
7605
- [index: string]: any;
7606
- };
7607
- cssVariables?: {
7608
- [index: string]: string;
7609
- };
7610
- }
7611
- }
7612
7672
  declare module "cover" {
7613
7673
  import { Base } from "base";
7614
7674
  import { HorizontalAlignment, VerticalAlignment } from "base-interfaces";
@@ -7632,21 +7692,23 @@ declare module "cover" {
7632
7692
  get showLogo(): boolean;
7633
7693
  get showTitle(): boolean;
7634
7694
  get showDescription(): boolean;
7635
- get textWidth(): string;
7695
+ get textAreaWidth(): string;
7636
7696
  }
7637
7697
  export class Cover extends Base {
7698
+ private _survey;
7638
7699
  private calcBackgroundSize;
7700
+ private updateCoverClasses;
7701
+ private updateContentClasses;
7702
+ private updateBackgroundImageClasses;
7639
7703
  fromTheme(theme: ITheme): void;
7640
7704
  constructor();
7641
7705
  getType(): string;
7642
- survey: SurveyModel;
7643
7706
  cells: CoverCell[];
7644
7707
  height: number;
7645
- areaWidth: "survey" | "container";
7646
- textWidth: number;
7647
- invertText: boolean;
7648
- glowText: boolean;
7649
- overlap: boolean;
7708
+ inheritWidthFrom: "survey" | "page";
7709
+ textAreaWidth: number;
7710
+ textGlowEnabled: boolean;
7711
+ overlapEnabled: boolean;
7650
7712
  backgroundColor: string;
7651
7713
  backgroundImage: string;
7652
7714
  renderBackgroundImage: string;
@@ -7670,16 +7732,19 @@ declare module "cover" {
7670
7732
  gridColumn: number;
7671
7733
  gridRow: number;
7672
7734
  };
7735
+ coverClasses: string;
7736
+ contentClasses: string;
7737
+ backgroundImageClasses: string;
7673
7738
  get renderedHeight(): string;
7674
- get renderedTextWidth(): string;
7675
- get coverClasses(): string;
7676
- get contentClasses(): string;
7677
- get backgroundImageClasses(): string;
7739
+ get renderedtextAreaWidth(): string;
7740
+ get survey(): SurveyModel;
7741
+ set survey(newValue: SurveyModel);
7678
7742
  get backgroundImageStyle(): {
7679
7743
  opacity: number;
7680
7744
  backgroundImage: string;
7681
7745
  backgroundSize: string;
7682
7746
  };
7747
+ protected propertyValueChanged(name: string, oldValue: any, newValue: any): void;
7683
7748
  }
7684
7749
  }
7685
7750
  declare module "survey" {
@@ -7703,7 +7768,7 @@ declare module "survey" {
7703
7768
  import { ActionContainer } from "actions/container";
7704
7769
  import { QuestionPanelDynamicModel } from "question_paneldynamic";
7705
7770
  import { Notifier } from "notifier";
7706
- import { TriggerExecutedEvent, CompletingEvent, CompleteEvent, ShowingPreviewEvent, NavigateToUrlEvent, CurrentPageChangingEvent, CurrentPageChangedEvent, ValueChangingEvent, ValueChangedEvent, VariableChangedEvent, QuestionVisibleChangedEvent, PageVisibleChangedEvent, PanelVisibleChangedEvent, QuestionCreatedEvent, QuestionAddedEvent, QuestionRemovedEvent, PanelAddedEvent, PanelRemovedEvent, PageAddedEvent, ValidateQuestionEvent, SettingQuestionErrorsEvent, ValidatePanelEvent, ErrorCustomTextEvent, ValidatedErrorsOnCurrentPageEvent, ProcessHtmlEvent, GetQuestionTitleEvent, GetTitleTagNameEvent, GetQuestionNoEvent, ProgressTextEvent, TextMarkdownEvent, TextRenderAsEvent, SendResultEvent, GetResultEvent, UploadFilesEvent, DownloadFileEvent, ClearFilesEvent, LoadChoicesFromServerEvent, ProcessTextValueEvent, UpdateQuestionCssClassesEvent, UpdatePanelCssClassesEvent, UpdatePageCssClassesEvent, UpdateChoiceItemCssEvent, AfterRenderSurveyEvent, AfterRenderHeaderEvent, AfterRenderPageEvent, AfterRenderQuestionEvent, AfterRenderQuestionInputEvent, AfterRenderPanelEvent, FocusInQuestionEvent, FocusInPanelEvent, ShowingChoiceItemEvent, ChoicesLazyLoadEvent, GetChoiceDisplayValueEvent, MatrixRowAddedEvent, MatrixBeforeRowAddedEvent, MatrixRowRemovingEvent, MatrixRowRemovedEvent, MatrixAllowRemoveRowEvent, MatrixCellCreatingEvent, MatrixCellCreatedEvent, MatrixAfterCellRenderEvent, MatrixCellValueChangedEvent, MatrixCellValueChangingEvent, MatrixCellValidateEvent, DynamicPanelModifiedEvent, DynamicPanelRemovingEvent, TimerPanelInfoTextEvent, DynamicPanelItemValueChangedEvent, DynamicPanelGetTabTitleEvent, IsAnswerCorrectEvent, DragDropAllowEvent, ScrollingElementToTopEvent, GetQuestionTitleActionsEvent, GetPanelTitleActionsEvent, GetPageTitleActionsEvent, GetPanelFooterActionsEvent, GetMatrixRowActionsEvent, ElementContentVisibilityChangedEvent, GetExpressionDisplayValueEvent, ServerValidateQuestionsEvent, MultipleTextItemAddedEvent, MatrixColumnAddedEvent, GetQuestionDisplayValueEvent, PopupVisibleChangedEvent } from "survey-events-api";
7771
+ import { TriggerExecutedEvent, CompletingEvent, CompleteEvent, ShowingPreviewEvent, NavigateToUrlEvent, CurrentPageChangingEvent, CurrentPageChangedEvent, ValueChangingEvent, ValueChangedEvent, VariableChangedEvent, QuestionVisibleChangedEvent, PageVisibleChangedEvent, PanelVisibleChangedEvent, QuestionCreatedEvent, QuestionAddedEvent, QuestionRemovedEvent, PanelAddedEvent, PanelRemovedEvent, PageAddedEvent, ValidateQuestionEvent, SettingQuestionErrorsEvent, ValidatePanelEvent, ErrorCustomTextEvent, ValidatedErrorsOnCurrentPageEvent, ProcessHtmlEvent, GetQuestionTitleEvent, GetTitleTagNameEvent, GetQuestionNoEvent, ProgressTextEvent, TextMarkdownEvent, TextRenderAsEvent, SendResultEvent, GetResultEvent, UploadFilesEvent, DownloadFileEvent, ClearFilesEvent, LoadChoicesFromServerEvent, ProcessTextValueEvent, UpdateQuestionCssClassesEvent, UpdatePanelCssClassesEvent, UpdatePageCssClassesEvent, UpdateChoiceItemCssEvent, AfterRenderSurveyEvent, AfterRenderHeaderEvent, AfterRenderPageEvent, AfterRenderQuestionEvent, AfterRenderQuestionInputEvent, AfterRenderPanelEvent, FocusInQuestionEvent, FocusInPanelEvent, ShowingChoiceItemEvent, ChoicesLazyLoadEvent, GetChoiceDisplayValueEvent, MatrixRowAddedEvent, MatrixBeforeRowAddedEvent, MatrixRowRemovingEvent, MatrixRowRemovedEvent, MatrixAllowRemoveRowEvent, MatrixCellCreatingEvent, MatrixCellCreatedEvent, MatrixAfterCellRenderEvent, MatrixCellValueChangedEvent, MatrixCellValueChangingEvent, MatrixCellValidateEvent, DynamicPanelModifiedEvent, DynamicPanelRemovingEvent, TimerPanelInfoTextEvent, DynamicPanelItemValueChangedEvent, DynamicPanelGetTabTitleEvent, IsAnswerCorrectEvent, DragDropAllowEvent, ScrollingElementToTopEvent, GetQuestionTitleActionsEvent, GetPanelTitleActionsEvent, GetPageTitleActionsEvent, GetPanelFooterActionsEvent, GetMatrixRowActionsEvent, ElementContentVisibilityChangedEvent, GetExpressionDisplayValueEvent, ServerValidateQuestionsEvent, MultipleTextItemAddedEvent, MatrixColumnAddedEvent, GetQuestionDisplayValueEvent, PopupVisibleChangedEvent, ThemeAppliedEvent } from "survey-events-api";
7707
7772
  import { QuestionMatrixDropdownModelBase } from "question_matrixdropdownbase";
7708
7773
  import { QuestionMatrixDynamicModel } from "question_matrixdynamic";
7709
7774
  import { QuestionFileModel } from "question_file";
@@ -7746,7 +7811,11 @@ declare module "survey" {
7746
7811
  private timerModelValue;
7747
7812
  private navigationBarValue;
7748
7813
  onThemeApplying: EventBase<SurveyModel>;
7749
- onThemeApplied: EventBase<SurveyModel>;
7814
+ /**
7815
+ * An event that is raised after a [theme](/form-library/documentation/manage-default-themes-and-styles) is [applied](#applyTheme) to the survey.
7816
+ * @see applyTheme
7817
+ */
7818
+ onThemeApplied: EventBase<SurveyModel, ThemeAppliedEvent>;
7750
7819
  /**
7751
7820
  * An event that is raised after a [trigger](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#triggers) is executed.
7752
7821
  *
@@ -8336,10 +8405,12 @@ declare module "survey" {
8336
8405
  * For information on event handler parameters, refer to descriptions within the interface.
8337
8406
  *
8338
8407
  * [View Demo](https://surveyjs.io/form-library/examples/survey-titleactions/ (linkStyle))
8408
+ * @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
8339
8409
  */
8340
8410
  onGetQuestionTitleActions: EventBase<SurveyModel, GetQuestionTitleActionsEvent>;
8341
8411
  /**
8342
8412
  * An event that allows you to add, delete, or modify actions in a panel title.
8413
+ * @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
8343
8414
  */
8344
8415
  onGetPanelTitleActions: EventBase<SurveyModel, GetPanelTitleActionsEvent>;
8345
8416
  /**
@@ -8348,10 +8419,12 @@ declare module "survey" {
8348
8419
  * For information on event handler parameters, refer to descriptions within the interface.
8349
8420
  *
8350
8421
  * [View Demo](https://surveyjs.io/form-library/examples/modify-titles-of-survey-elements/ (linkStyle))
8422
+ * @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
8351
8423
  */
8352
8424
  onGetPageTitleActions: EventBase<SurveyModel, GetPageTitleActionsEvent>;
8353
8425
  /**
8354
8426
  * An event that allows you to add, delete, or modify actions in the footer of a [Panel](https://surveyjs.io/form-library/documentation/panelmodel).
8427
+ * @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
8355
8428
  */
8356
8429
  onGetPanelFooterActions: EventBase<SurveyModel, GetPanelFooterActionsEvent>;
8357
8430
  /**
@@ -8360,7 +8433,7 @@ declare module "survey" {
8360
8433
  * For information on event handler parameters, refer to descriptions within the interface.
8361
8434
  *
8362
8435
  * [View Demo](https://surveyjs.io/form-library/examples/employee-information-form/ (linkStyle))
8363
- * @see IAction
8436
+ * @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
8364
8437
  */
8365
8438
  onGetMatrixRowActions: EventBase<SurveyModel, GetMatrixRowActionsEvent>;
8366
8439
  /**
@@ -8423,7 +8496,7 @@ declare module "survey" {
8423
8496
  loadingBodyCss: string;
8424
8497
  containerCss: string;
8425
8498
  fitToContainer: boolean;
8426
- titleView: "cover" | "title";
8499
+ headerView: "advanced" | "basic";
8427
8500
  private getNavigationCss;
8428
8501
  private lazyRenderingValue;
8429
8502
  showBrandInfo: boolean;
@@ -9349,7 +9422,7 @@ declare module "survey" {
9349
9422
  get completedState(): string;
9350
9423
  get completedStateText(): string;
9351
9424
  protected setCompletedState(value: string, text: string): void;
9352
- notify(message: string, type: string): void;
9425
+ notify(message: string, type: string, showActions?: boolean): void;
9353
9426
  /**
9354
9427
  * Resets the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) and, optionally, [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data). If `state` is `"completed"`, it becomes `"running"`.
9355
9428
  * @param clearData *(Optional)* Specifies whether to clear survey data. Default value: `true`.
@@ -10363,6 +10436,13 @@ declare module "survey" {
10363
10436
  removeLayoutElement(layoutElementId: string): ISurveyLayoutElement;
10364
10437
  getContainerContent(container: LayoutElementContainer): any[];
10365
10438
  processPopupVisiblityChanged(question: Question, popup: PopupModel<any>, visible: boolean): void;
10439
+ /**
10440
+ * Applies a specified theme to the survey.
10441
+ *
10442
+ * [Themes & Styles](/form-library/documentation/manage-default-themes-and-styles (linkStyle))
10443
+ * @param theme An [`ITheme`](/form-library/documentation/api-reference/itheme) object with theme settings.
10444
+ * @see onThemeApplied
10445
+ */
10366
10446
  applyTheme(theme: ITheme): void;
10367
10447
  /**
10368
10448
  * Disposes of the survey model.
@@ -10763,7 +10843,6 @@ declare module "survey-element" {
10763
10843
  get paddingRight(): string;
10764
10844
  set paddingRight(val: string);
10765
10845
  allowRootStyle: boolean;
10766
- renderMinWidth: boolean;
10767
10846
  get rootStyle(): {
10768
10847
  [index: string]: any;
10769
10848
  };
@@ -11050,8 +11129,11 @@ declare module "question" {
11050
11129
  get isQuestion(): boolean;
11051
11130
  moveTo(container: IPanel, insertBefore?: any): boolean;
11052
11131
  getProgressInfo(): IProgressInfo;
11053
- private resetValueIfExpression;
11054
- private isRunningResetValueIf;
11132
+ private setValueExpressionRunner;
11133
+ private runSetValueExpression;
11134
+ private triggersInfo;
11135
+ private addTriggerInfo;
11136
+ private runTriggerInfo;
11055
11137
  runTriggers(name: string, value: any): void;
11056
11138
  private runConditions;
11057
11139
  setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
@@ -11447,6 +11529,7 @@ declare module "question" {
11447
11529
  *
11448
11530
  * An expression can also include built-in and custom functions for advanced calculations. For example, if the `defaultValue` should be today's date, set the `defaultValueExpression` to `"today()"`, and the corresponding built-in function will be executed each time the survey is loaded. Refer to the following help topic for more information: [Built-In Functions](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#built-in-functions).
11449
11531
  * @see defaultValue
11532
+ * @see setValueExpression
11450
11533
  */
11451
11534
  get defaultValueExpression(): any;
11452
11535
  set defaultValueExpression(val: any);
@@ -11456,9 +11539,29 @@ declare module "question" {
11456
11539
  * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
11457
11540
  *
11458
11541
  * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
11542
+ * @see setValueIf
11459
11543
  */
11460
11544
  get resetValueIf(): string;
11461
11545
  set resetValueIf(val: string);
11546
+ /**
11547
+ * A Boolean expression. If it evaluates to `true`, the question value is set to a value calculated using the [`setValueExpression`](#setValueExpression).
11548
+ *
11549
+ * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
11550
+ *
11551
+ * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
11552
+ * @see resetValueIf
11553
+ */
11554
+ get setValueIf(): string;
11555
+ set setValueIf(val: string);
11556
+ /**
11557
+ * An expression used to calculate the question value. Applies only when the [`setValueIf`](#setValueIf) expression evaluates to `true`.
11558
+ *
11559
+ * [Expressions](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions (linkStyle))
11560
+ * @see defaultValueExpression
11561
+ * @see resetValueIf
11562
+ */
11563
+ get setValueExpression(): string;
11564
+ set setValueExpression(val: string);
11462
11565
  get resizeStyle(): "none" | "both";
11463
11566
  /**
11464
11567
  * Returns the question value as an object in which the question name, title, value, and other parameters are stored as individual properties.