survey-react 1.9.118 → 1.9.119

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.118
2
+ * surveyjs - Survey JavaScript library v1.9.119
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
@@ -82,6 +82,7 @@ declare module "localization/english" {
82
82
  urlRequestError: string;
83
83
  urlGetChoicesError: string;
84
84
  exceedMaxSize: string;
85
+ noUploadFilesHandler: string;
85
86
  otherRequiredError: string;
86
87
  uploadingFile: string;
87
88
  loadingFile: string;
@@ -201,6 +202,7 @@ declare module "surveyStrings" {
201
202
  urlRequestError: string;
202
203
  urlGetChoicesError: string;
203
204
  exceedMaxSize: string;
205
+ noUploadFilesHandler: string;
204
206
  otherRequiredError: string;
205
207
  uploadingFile: string;
206
208
  loadingFile: string;
@@ -702,6 +704,7 @@ declare module "conditionProcessValue" {
702
704
  private getValueFromSurvey;
703
705
  private getValueFromValues;
704
706
  private getNonNestedObject;
707
+ private getNonNestedObjectCore;
705
708
  private getObjInArray;
706
709
  private getFirstPropertyName;
707
710
  private getObjectValue;
@@ -1760,6 +1763,7 @@ declare module "defaultCss/defaultV2Css" {
1760
1763
  invisible: string;
1761
1764
  navigationButton: string;
1762
1765
  compact: string;
1766
+ errorsContainer: string;
1763
1767
  };
1764
1768
  paneldynamic: {
1765
1769
  mainRoot: string;
@@ -1826,6 +1830,7 @@ declare module "defaultCss/defaultV2Css" {
1826
1830
  emptyHeaderRoot: string;
1827
1831
  title: string;
1828
1832
  description: string;
1833
+ errorsContainer: string;
1829
1834
  };
1830
1835
  pageTitle: string;
1831
1836
  pageDescription: string;
@@ -1880,6 +1885,9 @@ declare module "defaultCss/defaultV2Css" {
1880
1885
  invisible: string;
1881
1886
  composite: string;
1882
1887
  disabled: string;
1888
+ errorsContainer: string;
1889
+ errorsContainerTop: string;
1890
+ errorsContainerBottom: string;
1883
1891
  };
1884
1892
  image: {
1885
1893
  mainRoot: string;
@@ -1899,9 +1907,6 @@ declare module "defaultCss/defaultV2Css" {
1899
1907
  root: string;
1900
1908
  icon: string;
1901
1909
  item: string;
1902
- outsideQuestion: string;
1903
- aboveQuestion: string;
1904
- belowQuestion: string;
1905
1910
  locationTop: string;
1906
1911
  locationBottom: string;
1907
1912
  };
@@ -2119,6 +2124,8 @@ declare module "defaultCss/defaultV2Css" {
2119
2124
  rowHasEndActions: string;
2120
2125
  headerCell: string;
2121
2126
  rowTextCell: string;
2127
+ footerCell: string;
2128
+ footerTotalCell: string;
2122
2129
  columnTitleCell: string;
2123
2130
  cellRequiredText: string;
2124
2131
  detailButton: string;
@@ -2154,6 +2161,7 @@ declare module "defaultCss/defaultV2Css" {
2154
2161
  itemCell: string;
2155
2162
  headerCell: string;
2156
2163
  rowTextCell: string;
2164
+ footerCell: string;
2157
2165
  columnTitleCell: string;
2158
2166
  cellRequiredText: string;
2159
2167
  button: string;
@@ -3580,6 +3588,8 @@ declare module "panel" {
3580
3588
  set questionErrorLocation(val: string);
3581
3589
  getQuestionErrorLocation(): string;
3582
3590
  get no(): string;
3591
+ get cssError(): string;
3592
+ protected getCssError(cssClasses: any): string;
3583
3593
  dispose(): void;
3584
3594
  }
3585
3595
  /**
@@ -3660,6 +3670,7 @@ declare module "panel" {
3660
3670
  */
3661
3671
  get no(): string;
3662
3672
  protected setNo(visibleIndex: number): void;
3673
+ protected notifyStateChanged(): void;
3663
3674
  protected createLocTitleProperty(): LocalizableString;
3664
3675
  protected beforeSetVisibleIndex(index: number): number;
3665
3676
  protected getPanelStartIndex(index: number): number;
@@ -3692,7 +3703,6 @@ declare module "panel" {
3692
3703
  get hasEditButton(): boolean;
3693
3704
  cancelPreview(): void;
3694
3705
  get cssTitle(): string;
3695
- get cssError(): string;
3696
3706
  get showErrorsAbovePanel(): boolean;
3697
3707
  protected getCssError(cssClasses: any): string;
3698
3708
  protected onVisibleChanged(): void;
@@ -3700,6 +3710,7 @@ declare module "panel" {
3700
3710
  focusIn(): void;
3701
3711
  protected getHasFrameV2(): boolean;
3702
3712
  protected getIsNested(): boolean;
3713
+ private get showPanelAsPage();
3703
3714
  protected getCssRoot(cssClasses: {
3704
3715
  [index: string]: string;
3705
3716
  }): string;
@@ -5732,9 +5743,9 @@ declare module "themes" {
5732
5743
  *
5733
5744
  * Possible values:
5734
5745
  *
5735
- * - `"survey"` (default)\
5746
+ * - `"survey"`\
5736
5747
  * The header width is the same as the survey width.
5737
- * - `"container"`\
5748
+ * - `"container"` (default)\
5738
5749
  * The header width is the same as the survey container width.
5739
5750
  *
5740
5751
  * @see [SurveyModel.width](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#width)
@@ -6970,9 +6981,9 @@ declare module "survey-events-api" {
6970
6981
  }
6971
6982
  export interface UploadFilesEvent extends LoadFilesEvent {
6972
6983
  /**
6973
- * A callback function that you should call when a file is uploaded successfully or when file upload fails. Pass `"success"` or `"error"` as the first argument to indicate the operation status. As the second argument, you can pass the uploaded file's data if file upload was successful or an error message if file upload failed.
6984
+ * A callback function that you should call when a file is uploaded successfully or when file upload fails. Pass an array of successfully uploaded files as the first argument. As the second argument, you can pass an array of error messages if file upload failed.
6974
6985
  */
6975
- callback: (status: string, data?: any) => any;
6986
+ callback: (data: any | Array<any>, errors?: any | Array<any>) => any;
6976
6987
  /**
6977
6988
  * An array of JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects that represent files to upload.
6978
6989
  */
@@ -7521,6 +7532,7 @@ declare module "page" {
7521
7532
  protected calcCssClasses(css: any): any;
7522
7533
  get cssTitle(): string;
7523
7534
  get cssRoot(): string;
7535
+ protected getCssError(cssClasses: any): string;
7524
7536
  num: number;
7525
7537
  /**
7526
7538
  * Set this property to "hide" to make "Prev", "Next" and "Complete" buttons are invisible for this page. Set this property to "show" to make these buttons visible, even if survey showNavigationButtons property is false.
@@ -8398,6 +8410,7 @@ declare module "survey" {
8398
8410
  import { QuestionMultipleTextModel } from "question_multipletext";
8399
8411
  import { ITheme, ImageFit, ImageAttachment } from "themes";
8400
8412
  import { PopupModel } from "popup";
8413
+ import { Cover } from "header";
8401
8414
  /**
8402
8415
  * The `SurveyModel` object contains properties and methods that allow you to control the survey and access its elements.
8403
8416
  *
@@ -9127,6 +9140,7 @@ declare module "survey" {
9127
9140
  * [View Demo](https://surveyjs.io/form-library/examples/brand-your-survey-header/ (linkStyle))
9128
9141
  */
9129
9142
  headerView: "advanced" | "basic";
9143
+ protected insertAdvancedHeader(advHeader: Cover): void;
9130
9144
  private getNavigationCss;
9131
9145
  private lazyRenderingValue;
9132
9146
  showBrandInfo: boolean;
@@ -9322,7 +9336,8 @@ declare module "survey" {
9322
9336
  * Specifies whether to hide validation errors thrown by the Required validation in the UI.
9323
9337
  *
9324
9338
  * [Built-In Client-Side Validators](https://surveyjs.io/form-library/documentation/data-validation#built-in-client-side-validators (linkStyle))
9325
- * @see ignoreValidation
9339
+ * @see validationEnabled
9340
+ * @see validationAllowSwitchPages
9326
9341
  */
9327
9342
  hideRequiredErrors: boolean;
9328
9343
  beforeSettingQuestionErrors(question: Question, errors: Array<SurveyError>): void;
@@ -9395,6 +9410,10 @@ declare module "survey" {
9395
9410
  * - `"onComplete"` - Triggers validation when a user clicks the Complete button. If previous pages contain errors, the survey switches to the page with the first error.
9396
9411
  *
9397
9412
  * Refer to the following help topic for more information: [Data Validation](https://surveyjs.io/form-library/documentation/data-validation).
9413
+ * @see validationEnabled
9414
+ * @see validationAllowSwitchPages
9415
+ * @see validationAllowComplete
9416
+ * @see validate
9398
9417
  */
9399
9418
  get checkErrorsMode(): string;
9400
9419
  set checkErrorsMode(val: string);
@@ -10129,15 +10148,32 @@ declare module "survey" {
10129
10148
  */
10130
10149
  deleteCookie(): void;
10131
10150
  /**
10132
- * Specifies whether to skip validation when you switch between pages or complete the survey programmatically or when users do that in the UI.
10151
+ * This property is obsolete. Use the [`validationEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#validationEnabled) property instead.
10152
+ */
10153
+ get ignoreValidation(): boolean;
10154
+ set ignoreValidation(val: boolean);
10155
+ /**
10156
+ * Specifies whether data validation is enabled.
10133
10157
  *
10134
- * Default value: `false`
10158
+ * Default value: `true`
10159
+ * @see checkErrorsMode
10135
10160
  * @see hideRequiredErrors
10136
- * @see nextPage
10137
- * @see isPrevPage
10138
- * @see completeLastPage
10139
10161
  */
10140
- ignoreValidation: boolean;
10162
+ validationEnabled: boolean;
10163
+ /**
10164
+ * Specifies whether respondents can switch the current page even if it contains validation errors.
10165
+ *
10166
+ * Default value: `false`
10167
+ * @see checkErrorsMode
10168
+ */
10169
+ validationAllowSwitchPages: boolean;
10170
+ /**
10171
+ * Specifies whether respondents can end a survey with validation errors.
10172
+ *
10173
+ * Default value: `false`
10174
+ * @see checkErrorsMode
10175
+ */
10176
+ validationAllowComplete: boolean;
10141
10177
  /**
10142
10178
  * Switches the survey to the next page.
10143
10179
  *
@@ -10485,11 +10521,11 @@ declare module "survey" {
10485
10521
  * @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model).
10486
10522
  * @param name The File Upload question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/file-model#name).
10487
10523
  * @param files An array of JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects that represent files to upload.
10488
- * @param callback A callback function that allows you to get the upload status (`"success"` or `"error"`) and file data.
10524
+ * @param callback A callback function that allows you to access successfully uploaded files as the first argument. If any files fail to upload, the second argument contains an array of error messages.
10489
10525
  * @see onUploadFiles
10490
10526
  * @see downloadFile
10491
10527
  */
10492
- uploadFiles(question: QuestionFileModel, name: string, files: File[], callback: (status: string, data: any) => any): void;
10528
+ uploadFiles(question: QuestionFileModel, name: string, files: File[], callback: (data: any | Array<any>, errors?: any | Array<any>) => any): void;
10493
10529
  /**
10494
10530
  * Downloads a file from a server.
10495
10531
  *
@@ -10525,7 +10561,7 @@ declare module "survey" {
10525
10561
  updateChoicesFromServer(question: QuestionSelectBase, choices: Array<ItemValue>, serverResult: any): Array<ItemValue>;
10526
10562
  loadedChoicesFromServer(question: IQuestion): void;
10527
10563
  protected createSurveyService(): dxSurveyService;
10528
- protected uploadFilesCore(name: string, files: File[], uploadingCallback: (status: string, data: any) => any): void;
10564
+ protected uploadFilesCore(name: string, files: File[], uploadingCallback: (data: any | Array<any>, errors?: any | Array<any>) => any): void;
10529
10565
  getPage(index: number): PageModel;
10530
10566
  /**
10531
10567
  * Adds an existing page to the survey.
@@ -11028,6 +11064,7 @@ declare module "survey" {
11028
11064
  private isMovingQuestion;
11029
11065
  startMovingQuestion(): void;
11030
11066
  stopMovingQuestion(): void;
11067
+ get isQuestionDragging(): boolean;
11031
11068
  private needRenderIcons;
11032
11069
  private skippedPages;
11033
11070
  /**
@@ -12179,6 +12216,8 @@ declare module "question" {
12179
12216
  * - `{row.other_question_name}` (to access questions inside the same dynamic matrix or multi-column dropdown)
12180
12217
  *
12181
12218
  * 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).
12219
+ *
12220
+ * [View Demo](https://surveyjs.io/form-library/examples/specify-default-question-value-dynamically (linkStyle))
12182
12221
  * @see defaultValue
12183
12222
  * @see setValueExpression
12184
12223
  */
@@ -13169,7 +13208,7 @@ declare module "base-interfaces" {
13169
13208
  maxTextLength: number;
13170
13209
  maxOthersLength: number;
13171
13210
  clearValueOnDisableItems: boolean;
13172
- uploadFiles(question: IQuestion, name: string, files: File[], uploadingCallback: (status: string, data: any) => any): any;
13211
+ uploadFiles(question: IQuestion, name: string, files: File[], uploadingCallback: (data: any | Array<any>, errors?: any | Array<any>) => any): any;
13173
13212
  downloadFile(question: IQuestion, name: string, content: string, callback: (status: string, data: any) => any): any;
13174
13213
  clearFiles(question: IQuestion, name: string, value: any, fileName: string, clearCallback: (status: string, data: any) => any): any;
13175
13214
  updateChoicesFromServer(question: IQuestion, choices: Array<any>, serverResult: any): Array<any>;
@@ -13363,6 +13402,7 @@ declare module "base-interfaces" {
13363
13402
  component?: string;
13364
13403
  template?: string;
13365
13404
  data?: any;
13405
+ index?: number;
13366
13406
  processResponsiveness?: (width: number) => void;
13367
13407
  }
13368
13408
  export interface IPlainDataOptions {
@@ -15532,7 +15572,13 @@ declare module "question_ranking" {
15532
15572
  set selectToRankAreasLayout(val: string);
15533
15573
  get renderedSelectToRankAreasLayout(): string;
15534
15574
  isMobileMode(): boolean;
15575
+ /**
15576
+ * A placeholder displayed in the area for ranked choices. Applies when [`selectToRankEnabled`](https://surveyjs.io/form-library/documentation/api-reference/ranking-question-model#selectToRankEnabled) is `true`.
15577
+ */
15535
15578
  selectToRankEmptyRankedAreaText: string;
15579
+ /**
15580
+ * A placeholder displayed in the area for unranked choices. Applies when [`selectToRankEnabled`](https://surveyjs.io/form-library/documentation/api-reference/ranking-question-model#selectToRankEnabled) is `true`.
15581
+ */
15536
15582
  selectToRankEmptyUnrankedAreaText: string;
15537
15583
  get useFullItemSizeForShortcut(): boolean;
15538
15584
  set useFullItemSizeForShortcut(val: boolean);
@@ -15782,6 +15828,7 @@ declare module "question_rating" {
15782
15828
  itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
15783
15829
  private createRenderedRateItems;
15784
15830
  renderedRateItems: Array<RenderedRatingItem>;
15831
+ private createRateValues;
15785
15832
  private correctValue;
15786
15833
  getType(): string;
15787
15834
  protected getFirstInputElementId(): string;
@@ -24383,6 +24430,18 @@ declare module "react/components/rating/rating-item-smiley" {
24383
24430
  render(): JSX.Element | null;
24384
24431
  }
24385
24432
  }
24433
+ declare module "react/components/rating/rating-dropdown-item" {
24434
+ import { SurveyElementBase } from "react/reactquestion_element";
24435
+ interface IRatingItemProps {
24436
+ item: any;
24437
+ }
24438
+ export class RatingDropdownItem extends SurveyElementBase<IRatingItemProps, any> {
24439
+ get item(): any;
24440
+ getStateElement(): any;
24441
+ render(): JSX.Element | null;
24442
+ renderDescription(item: any): JSX.Element;
24443
+ }
24444
+ }
24386
24445
  declare module "react/tagbox-filter" {
24387
24446
  import { DropdownMultiSelectListModel, QuestionTagboxModel } from "entries/core";
24388
24447
  import { SurveyElementBase } from "react/reactquestion_element";
@@ -24912,6 +24971,7 @@ declare module "react/reactquestion_rating" {
24912
24971
  declare module "react/rating-dropdown" {
24913
24972
  import { QuestionRatingModel } from "entries/core";
24914
24973
  import { SurveyQuestionDropdownBase } from "react/dropdown-base";
24974
+ export * from "react/components/rating/rating-dropdown-item";
24915
24975
  export class SurveyQuestionRatingDropdown extends SurveyQuestionDropdownBase<QuestionRatingModel> {
24916
24976
  constructor(props: any);
24917
24977
  protected renderElement(): JSX.Element;
@@ -25136,6 +25196,7 @@ declare module "entries/react-ui-model" {
25136
25196
  export { RatingItem } from "react/components/rating/rating-item";
25137
25197
  export { RatingItemStar } from "react/components/rating/rating-item-star";
25138
25198
  export { RatingItemSmiley } from "react/components/rating/rating-item-smiley";
25199
+ export { RatingDropdownItem } from "react/components/rating/rating-dropdown-item";
25139
25200
  export { TagboxFilterString } from "react/tagbox-filter";
25140
25201
  export { SurveyQuestionOptionItem } from "react/dropdown-item";
25141
25202
  export { SurveyQuestionDropdownBase } from "react/dropdown-base";