survey-react 1.12.11 → 1.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-react",
3
- "version": "1.12.11",
3
+ "version": "1.12.12",
4
4
  "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
5
5
  "keywords": [
6
6
  "Survey",
package/survey.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.11
2
+ * surveyjs - Survey JavaScript library v1.12.12
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
package/survey.min.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.11
2
+ * surveyjs - Survey JavaScript library v1.12.12
3
3
  * Copyright (c) 2015-2024 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
@@ -35,6 +35,7 @@ declare module "packages/survey-core/src/helpers" {
35
35
  export interface HashTable<T = any> {
36
36
  [key: string]: T;
37
37
  }
38
+ export function createDate(reason: string, val?: number | string | Date): Date;
38
39
  export class Helpers {
39
40
  /**
40
41
  * A static methods that returns true if a value undefined, null, empty string or empty array.
@@ -215,6 +216,13 @@ declare module "packages/survey-core/src/surveyStrings" {
215
216
  onGetExternalString: (name: string, locale: string) => string;
216
217
  };
217
218
  export function getLocaleString(strName: string, locale?: string): string;
219
+ export function setupLocale(localeConfig: {
220
+ localeCode: string;
221
+ strings: any;
222
+ nativeName: string;
223
+ englishName: string;
224
+ rtl?: boolean;
225
+ }): void;
218
226
  export var surveyStrings: {
219
227
  pagePrevText: string;
220
228
  pageNextText: string;
@@ -9110,6 +9118,7 @@ declare module "packages/survey-core/src/question_text" {
9110
9118
  protected onChangeQuestionValue(newValue: any): void;
9111
9119
  private updateInputValue;
9112
9120
  private hasToConvertToUTC;
9121
+ private createDate;
9113
9122
  protected valueForSurveyCore(val: any): any;
9114
9123
  protected valueFromDataCore(val: any): any;
9115
9124
  private dateValidationMessage;
@@ -9690,27 +9699,6 @@ declare module "packages/survey-core/src/surveyToc" {
9690
9699
  dispose(): void;
9691
9700
  }
9692
9701
  }
9693
- declare module "packages/survey-core/src/svgbundle" {
9694
- class SvgIconData {
9695
- [key: string]: string;
9696
- }
9697
- export class SvgIconRegistry {
9698
- icons: SvgIconData;
9699
- private iconPrefix;
9700
- private processId;
9701
- registerIconFromSymbol(iconId: string, iconSymbolSvg: string): void;
9702
- registerIconFromSvgViaElement(iconId: string, iconSvg: string, iconPrefix?: string): void;
9703
- registerIconFromSvg(iconId: string, iconSvg: string, iconPrefix?: string): boolean;
9704
- registerIconsFromFolder(r: any): void;
9705
- iconsRenderedHtml(): string;
9706
- }
9707
- export var SvgRegistry: SvgIconRegistry;
9708
- export var SvgBundleViewModel: any;
9709
- export var svgBundle: {
9710
- V1?: string;
9711
- V2?: string;
9712
- };
9713
- }
9714
9702
  declare module "packages/survey-core/src/survey" {
9715
9703
  import { JsonError } from "packages/survey-core/src/jsonobject";
9716
9704
  import { Base, EventBase } from "packages/survey-core/src/base";
@@ -12680,7 +12668,6 @@ declare module "packages/survey-core/src/survey" {
12680
12668
  addScrollEventListener(): void;
12681
12669
  removeScrollEventListener(): void;
12682
12670
  questionErrorComponent: string;
12683
- protected registerIcons(): void;
12684
12671
  }
12685
12672
  }
12686
12673
  declare module "packages/survey-core/src/survey-element" {
@@ -15707,6 +15694,7 @@ declare module "packages/survey-core/src/localizablestring" {
15707
15694
  get allowLineBreaks(): boolean;
15708
15695
  onGetTextCallback: (str: string) => string;
15709
15696
  storeDefaultText: boolean;
15697
+ serializeCallBackText: boolean;
15710
15698
  onGetLocalizationTextCallback: (str: string) => string;
15711
15699
  onStrChanged: (oldValue: string, newValue: string) => void;
15712
15700
  onSearchChanged: () => void;
@@ -16378,33 +16366,23 @@ declare module "packages/survey-core/src/settings" {
16378
16366
  * Nested properties:
16379
16367
  *
16380
16368
  * - `itemValueSerializeAsObject`: `boolean`\
16381
- * Enable this property if you want to serialize [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) instances as objects even when they include only the `value` property. Default value: `false`. View an example below.
16369
+ * Enable this property if you want to serialize [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) instances (choice options, matrix rows, columns in a [Single-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model)) as objects even when they include only the `value` property. Default value: `false`.
16382
16370
  *
16383
16371
  * - `itemValueSerializeDisplayText`: `boolean`\
16384
- * Enable this property if you want to serialize the `text` property of [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) objects even when it is empty or equal to the `value` property. Default value: `false`. View an example below.
16372
+ * Enable this property if you want to serialize the `text` property of [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) objects even when it is empty or equal to the `value` property. Default value: `false`.
16385
16373
  *
16386
16374
  * - `localizableStringSerializeAsObject`: `boolean`\
16387
16375
  * Enable this property if you want to serialize [`LocalizableString`](https://surveyjs.io/form-library/documentation/api-reference/localizablestring) instances as objects even when they include only a translation string for the default locale. For example, `"Custom String"` will be serialized as `{ default: "Custom String" }`. Default value: `false`.
16388
16376
  *
16389
- * ```js
16390
- * import { ItemValue, settings } from "survey-core";
16391
- *
16392
- * // `itemValueSerializeAsObject` example
16393
- * settings.serialization.itemValueSerializeAsObject = true;
16394
- * const item = new ItemValue(5);
16395
- * const itemString = item.toJSON(); // Produces { value: 5 } instead of 5
16396
- *
16397
- * // `itemValueSerializeDisplayText` example
16398
- * settings.serialization.itemValueSerializeDisplayText = true;
16399
- * const item = new ItemValue("item1");
16400
- * const itemString = item.toJSON(); // Produces { value: "item1", text: "item1" } instead of "item1"
16401
- * ```
16377
+ * - `matrixDropdownColumnSerializeTitle`: `boolean`\
16378
+ * Enable this property if you want to serialize the `title` property of [`MatrixDropdownColumn`](https://surveyjs.io/form-library/documentation/api-reference/multi-select-matrix-column-values) objects even when it is empty or equal to the `name` property. Default value: `false`.
16402
16379
  * @see [settings.parseNumber](https://surveyjs.io/form-library/documentation/api-reference/settings#parseNumber)
16403
16380
  */
16404
16381
  serialization: {
16405
16382
  itemValueSerializeAsObject: boolean;
16406
16383
  itemValueSerializeDisplayText: boolean;
16407
16384
  localizableStringSerializeAsObject: boolean;
16385
+ matrixDropdownColumnSerializeTitle: boolean;
16408
16386
  };
16409
16387
  itemValueAlwaysSerializeAsObject: boolean;
16410
16388
  itemValueAlwaysSerializeText: boolean;
@@ -16867,6 +16845,7 @@ declare module "packages/survey-core/src/settings" {
16867
16845
  * ```
16868
16846
  */
16869
16847
  storeUtcDates: boolean;
16848
+ onDateCreated: (newDate: Date, reason: string, val?: number | string | Date) => Date;
16870
16849
  /**
16871
16850
  * A function that allows you to define custom parsing rules for numbers represented as string values.
16872
16851
  *
@@ -16891,7 +16870,6 @@ declare module "packages/survey-core/src/settings" {
16891
16870
  * @see [settings.serialization](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization)
16892
16871
  */
16893
16872
  parseNumber: (stringValue: any, numericValue: number) => number;
16894
- useLegacyIcons: boolean;
16895
16873
  };
16896
16874
  }
16897
16875
  declare module "packages/survey-core/src/question_matrixdropdown" {
@@ -17587,6 +17565,7 @@ declare module "packages/survey-core/src/question_checkbox" {
17587
17565
  selectAll(): void;
17588
17566
  clickItemHandler(item: ItemValue, checked?: boolean): void;
17589
17567
  protected isItemSelectedCore(item: ItemValue): boolean;
17568
+ protected hasUnknownValueItem(val: any, includeOther?: boolean, isFilteredChoices?: boolean, checkEmptyValue?: boolean): boolean;
17590
17569
  protected convertFuncValuetoQuestionValue(val: any): any;
17591
17570
  private getRealValue;
17592
17571
  get isValueArray(): boolean;
@@ -17640,6 +17619,7 @@ declare module "packages/survey-core/src/question_checkbox" {
17640
17619
  protected setNewValue(newValue: any): void;
17641
17620
  protected getIsMultipleValue(): boolean;
17642
17621
  protected getCommentFromValue(newValue: any): string;
17622
+ getStoreOthersAsComment(): boolean;
17643
17623
  protected setOtherValueIntoValue(newValue: any): any;
17644
17624
  private getFirstUnknownIndex;
17645
17625
  protected removeNoneItemsValues(value: Array<any>, newValue: Array<any>): void;
@@ -17815,7 +17795,7 @@ declare module "packages/survey-core/src/question_tagbox" {
17815
17795
  getControlClass(): string;
17816
17796
  onOpened: EventBase<QuestionTagboxModel>;
17817
17797
  onOpenedCallBack(): void;
17818
- protected hasUnknownValue(val: any, includeOther: boolean, isFilteredChoices: boolean, checkEmptyValue: boolean): boolean;
17798
+ protected hasUnknownValue(val: any, includeOther?: boolean, isFilteredChoices?: boolean, checkEmptyValue?: boolean): boolean;
17819
17799
  protected needConvertRenderedOtherToDataValue(): boolean;
17820
17800
  protected onVisibleChoicesChanged(): void;
17821
17801
  protected getItemIfChoicesNotContainThisValue(value: any, text?: string): any;
@@ -19428,7 +19408,7 @@ declare module "packages/survey-core/entries/chunks/model" {
19428
19408
  export { Cover, CoverCell } from "packages/survey-core/src/header";
19429
19409
  export { dxSurveyService } from "packages/survey-core/src/dxSurveyService";
19430
19410
  export { englishStrings } from "packages/survey-core/src/localization/english";
19431
- export { surveyLocalization, surveyStrings, getLocaleString } from "packages/survey-core/src/surveyStrings";
19411
+ export { surveyLocalization, surveyStrings, getLocaleString, setupLocale } from "packages/survey-core/src/surveyStrings";
19432
19412
  export { QuestionCustomWidget, CustomWidgetCollection, } from "packages/survey-core/src/questionCustomWidgets";
19433
19413
  export { QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ICustomQuestionTypeConfiguration } from "packages/survey-core/src/question_custom";
19434
19414
  export { ListModel } from "packages/survey-core/src/list";
@@ -20394,6 +20374,30 @@ declare module "src/defaultCss/cssmodern" {
20394
20374
  };
20395
20375
  };
20396
20376
  }
20377
+ declare module "packages/survey-core/src/svgbundle" {
20378
+ import { EventBase } from "packages/survey-core/src/base";
20379
+ interface SvgIconData {
20380
+ [key: string]: string;
20381
+ }
20382
+ export class SvgIconRegistry {
20383
+ icons: SvgIconData;
20384
+ private iconPrefix;
20385
+ private processId;
20386
+ registerIconFromSymbol(iconId: string, iconSymbolSvg: string): void;
20387
+ registerIconFromSvgViaElement(iconId: string, iconSvg: string, iconPrefix?: string): void;
20388
+ registerIconFromSvg(iconId: string, iconSvg: string, iconPrefix?: string): boolean;
20389
+ registerIconsFromFolder(r: any): void;
20390
+ registerIcons(icons: SvgIconData): void;
20391
+ iconsRenderedHtml(): string;
20392
+ updateMarkup(): void;
20393
+ onIconsChanged: EventBase<SvgIconRegistry, {}>;
20394
+ }
20395
+ export const SvgRegistry: SvgIconRegistry;
20396
+ export const SvgThemeSets: {
20397
+ [index: string]: SvgIconData;
20398
+ };
20399
+ export function addIconsToThemeSet(name: string, iconsData: SvgIconData): void;
20400
+ }
20397
20401
  declare module "packages/survey-core/entries/chunks/core-wo-model" {
20398
20402
  export * from "packages/survey-core/entries/chunks/model";
20399
20403
  export * from "packages/survey-core/src/svgbundle";
@@ -27792,23 +27796,6 @@ declare module "packages/survey-react-ui/src/page" {
27792
27796
  protected renderDescription(): JSX.Element | null;
27793
27797
  }
27794
27798
  }
27795
- declare module "packages/survey-react-ui/src/string-viewer" {
27796
- import React from "react";
27797
- export class SurveyLocStringViewer extends React.Component<any, any> {
27798
- constructor(props: any);
27799
- private rootRef;
27800
- private get locStr();
27801
- private get style();
27802
- componentDidMount(): void;
27803
- componentWillUnmount(): void;
27804
- componentDidUpdate(prevProps: any, prevState: any): void;
27805
- private isRendering;
27806
- private onChangedHandler;
27807
- private reactOnStrChanged;
27808
- render(): JSX.Element | null;
27809
- protected renderString(): JSX.Element;
27810
- }
27811
- }
27812
27799
  declare module "packages/survey-react-ui/src/components/survey-header/survey-header" {
27813
27800
  import React from "react";
27814
27801
  import { SurveyModel } from "src/entries/core";
@@ -27856,7 +27843,9 @@ declare module "packages/survey-react-ui/src/svgbundle" {
27856
27843
  export class SvgBundleComponent extends React.Component {
27857
27844
  private containerRef;
27858
27845
  constructor(props: any);
27846
+ private onIconsChanged;
27859
27847
  componentDidMount(): void;
27848
+ componentWillUnmount(): void;
27860
27849
  render(): JSX.Element;
27861
27850
  }
27862
27851
  }
@@ -27883,6 +27872,18 @@ declare module "packages/survey-react-ui/src/components/popup/popup-modal" {
27883
27872
  componentWillUnmount(): void;
27884
27873
  }
27885
27874
  }
27875
+ declare module "packages/survey-core/src/iconsV1" {
27876
+ const icons: {
27877
+ [index: string]: string;
27878
+ };
27879
+ export { icons };
27880
+ }
27881
+ declare module "packages/survey-core/src/iconsV2" {
27882
+ const icons: {
27883
+ [index: string]: string;
27884
+ };
27885
+ export { icons };
27886
+ }
27886
27887
  declare module "packages/survey-react-ui/src/reactSurvey" {
27887
27888
  import { Base, Question, PageModel, SurveyError, SurveyModel, IAttachKey2clickOptions } from "src/entries/core";
27888
27889
  import { ISurveyCreator } from "packages/survey-react-ui/src/reactquestion";
@@ -28882,6 +28883,23 @@ declare module "packages/survey-react-ui/src/components/survey-actions/survey-na
28882
28883
  protected renderElement(): JSX.Element;
28883
28884
  }
28884
28885
  }
28886
+ declare module "packages/survey-react-ui/src/string-viewer" {
28887
+ import React from "react";
28888
+ export class SurveyLocStringViewer extends React.Component<any, any> {
28889
+ constructor(props: any);
28890
+ private rootRef;
28891
+ private get locStr();
28892
+ private get style();
28893
+ componentDidMount(): void;
28894
+ componentWillUnmount(): void;
28895
+ componentDidUpdate(prevProps: any, prevState: any): void;
28896
+ private isRendering;
28897
+ private onChangedHandler;
28898
+ private reactOnStrChanged;
28899
+ render(): JSX.Element | null;
28900
+ protected renderString(): JSX.Element;
28901
+ }
28902
+ }
28885
28903
  declare module "packages/survey-react-ui/src/components/question-error" {
28886
28904
  import React from "react";
28887
28905
  import { SurveyError } from "src/entries/core";