survey-react 1.12.11 → 1.12.13

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
@@ -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.
@@ -60,6 +61,7 @@ declare module "packages/survey-core/src/helpers" {
60
61
  static getNumberByIndex(index: number, startIndexStr: string, parentIndex?: number): string;
61
62
  static isCharNotLetterAndDigit(ch: string): boolean;
62
63
  static isCharDigit(ch: string): boolean;
64
+ static isDigitsOnly(str: string): boolean;
63
65
  private static getNumberFromStr;
64
66
  private static countDecimals;
65
67
  static correctAfterPlusMinis(a: number, b: number, res: number): number;
@@ -215,6 +217,13 @@ declare module "packages/survey-core/src/surveyStrings" {
215
217
  onGetExternalString: (name: string, locale: string) => string;
216
218
  };
217
219
  export function getLocaleString(strName: string, locale?: string): string;
220
+ export function setupLocale(localeConfig: {
221
+ localeCode: string;
222
+ strings: any;
223
+ nativeName: string;
224
+ englishName: string;
225
+ rtl?: boolean;
226
+ }): void;
218
227
  export var surveyStrings: {
219
228
  pagePrevText: string;
220
229
  pageNextText: string;
@@ -4459,7 +4468,7 @@ declare module "packages/survey-core/src/utils/text-area" {
4459
4468
  export class TextAreaModel {
4460
4469
  private options;
4461
4470
  private element;
4462
- private updateElement;
4471
+ updateElement(): void;
4463
4472
  private onPropertyChangedCallback;
4464
4473
  constructor(options: ITextArea);
4465
4474
  setElement(element: HTMLTextAreaElement | null): void;
@@ -6686,7 +6695,7 @@ declare module "packages/survey-core/src/question_paneldynamic" {
6686
6695
  /**
6687
6696
  * A placeholder for tab titles that applies when the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) expression doesn't produce a meaningful value.
6688
6697
  *
6689
- * Default value: `"New Panel"` (taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/master/src/localization))
6698
+ * Default value: `"New Panel"` (taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/01bd8abd0c574719956d4d579d48c8010cd389d4/packages/survey-core/src/localization))
6690
6699
  */
6691
6700
  get tabTitlePlaceholder(): string;
6692
6701
  set tabTitlePlaceholder(newValue: string);
@@ -6789,7 +6798,7 @@ declare module "packages/survey-core/src/question_paneldynamic" {
6789
6798
  /**
6790
6799
  * An error message displayed when users enter a duplicate value into a question that accepts only unique values (`isUnique` is set to `true` or `keyName` is specified).
6791
6800
  *
6792
- * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/master/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
6801
+ * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/01bd8abd0c574719956d4d579d48c8010cd389d4/packages/survey-core/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
6793
6802
  * @see keyName
6794
6803
  */
6795
6804
  get keyDuplicationError(): string;
@@ -7152,7 +7161,7 @@ declare module "packages/survey-core/src/question_paneldynamic" {
7152
7161
  onFirstRendering(): void;
7153
7162
  localeChanged(): void;
7154
7163
  runCondition(values: HashTable<any>, properties: HashTable<any>): void;
7155
- runTriggers(name: string, value: any): void;
7164
+ runTriggers(name: string, value: any, keys?: any): void;
7156
7165
  private reRunCondition;
7157
7166
  protected runPanelsCondition(panels: PanelModel[], values: HashTable<any>, properties: HashTable<any>): void;
7158
7167
  onAnyValueChanged(name: string, questionName: string): void;
@@ -9110,6 +9119,7 @@ declare module "packages/survey-core/src/question_text" {
9110
9119
  protected onChangeQuestionValue(newValue: any): void;
9111
9120
  private updateInputValue;
9112
9121
  private hasToConvertToUTC;
9122
+ private createDate;
9113
9123
  protected valueForSurveyCore(val: any): any;
9114
9124
  protected valueFromDataCore(val: any): any;
9115
9125
  private dateValidationMessage;
@@ -9690,27 +9700,6 @@ declare module "packages/survey-core/src/surveyToc" {
9690
9700
  dispose(): void;
9691
9701
  }
9692
9702
  }
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
9703
  declare module "packages/survey-core/src/survey" {
9715
9704
  import { JsonError } from "packages/survey-core/src/jsonobject";
9716
9705
  import { Base, EventBase } from "packages/survey-core/src/base";
@@ -12218,6 +12207,7 @@ declare module "packages/survey-core/src/survey" {
12218
12207
  */
12219
12208
  runExpressions(): void;
12220
12209
  private runConditions;
12210
+ private questionTriggersKeys;
12221
12211
  private runConditionOnValueChanged;
12222
12212
  private runConditionsCore;
12223
12213
  private runQuestionsTriggers;
@@ -12680,7 +12670,6 @@ declare module "packages/survey-core/src/survey" {
12680
12670
  addScrollEventListener(): void;
12681
12671
  removeScrollEventListener(): void;
12682
12672
  questionErrorComponent: string;
12683
- protected registerIcons(): void;
12684
12673
  }
12685
12674
  }
12686
12675
  declare module "packages/survey-core/src/survey-element" {
@@ -12893,6 +12882,7 @@ declare module "packages/survey-core/src/survey-element" {
12893
12882
  getTitleActions(): Array<any>;
12894
12883
  protected getDefaultTitleActions(): Array<IAction>;
12895
12884
  private updateTitleActions;
12885
+ locStrsChanged(): void;
12896
12886
  get hasTitleActions(): boolean;
12897
12887
  get hasTitleEvents(): boolean;
12898
12888
  get titleTabIndex(): number;
@@ -13441,7 +13431,7 @@ declare module "packages/survey-core/src/question" {
13441
13431
  private triggersInfo;
13442
13432
  private addTriggerInfo;
13443
13433
  private runTriggerInfo;
13444
- runTriggers(name: string, value: any): void;
13434
+ runTriggers(name: string, value: any, keys?: any): void;
13445
13435
  private runConditions;
13446
13436
  setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
13447
13437
  /**
@@ -14746,7 +14736,7 @@ declare module "packages/survey-core/src/question_matrixdropdownbase" {
14746
14736
  localeChanged(): void;
14747
14737
  private runFuncForCellQuestions;
14748
14738
  runCondition(values: HashTable<any>, properties: HashTable<any>): void;
14749
- runTriggers(name: string, value: any): void;
14739
+ runTriggers(name: string, value: any, keys?: any): void;
14750
14740
  updateElementVisibility(): void;
14751
14741
  protected shouldRunColumnExpression(): boolean;
14752
14742
  protected runCellsCondition(values: HashTable<any>, properties: HashTable<any>): void;
@@ -14800,7 +14790,7 @@ declare module "packages/survey-core/src/question_matrixdropdownbase" {
14800
14790
  /**
14801
14791
  * An error message displayed when users enter a duplicate value into a column that accepts only unique values (`isUnique` is set to `true` or `keyName` is specified).
14802
14792
  *
14803
- * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/master/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
14793
+ * A default value for this property is taken from a [localization dictionary](https://github.com/surveyjs/survey-library/tree/01bd8abd0c574719956d4d579d48c8010cd389d4/packages/survey-core/src/localization). Refer to the following help topic for more information: [Localization & Globalization](https://surveyjs.io/form-library/documentation/localization).
14804
14794
  * @see isUniqueCaseSensitive
14805
14795
  */
14806
14796
  get keyDuplicationError(): string;
@@ -15707,6 +15697,7 @@ declare module "packages/survey-core/src/localizablestring" {
15707
15697
  get allowLineBreaks(): boolean;
15708
15698
  onGetTextCallback: (str: string) => string;
15709
15699
  storeDefaultText: boolean;
15700
+ serializeCallBackText: boolean;
15710
15701
  onGetLocalizationTextCallback: (str: string) => string;
15711
15702
  onStrChanged: (oldValue: string, newValue: string) => void;
15712
15703
  onSearchChanged: () => void;
@@ -16378,33 +16369,23 @@ declare module "packages/survey-core/src/settings" {
16378
16369
  * Nested properties:
16379
16370
  *
16380
16371
  * - `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.
16372
+ * 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
16373
  *
16383
16374
  * - `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.
16375
+ * 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
16376
  *
16386
16377
  * - `localizableStringSerializeAsObject`: `boolean`\
16387
16378
  * 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
16379
  *
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
- * ```
16380
+ * - `matrixDropdownColumnSerializeTitle`: `boolean`\
16381
+ * 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
16382
  * @see [settings.parseNumber](https://surveyjs.io/form-library/documentation/api-reference/settings#parseNumber)
16403
16383
  */
16404
16384
  serialization: {
16405
16385
  itemValueSerializeAsObject: boolean;
16406
16386
  itemValueSerializeDisplayText: boolean;
16407
16387
  localizableStringSerializeAsObject: boolean;
16388
+ matrixDropdownColumnSerializeTitle: boolean;
16408
16389
  };
16409
16390
  itemValueAlwaysSerializeAsObject: boolean;
16410
16391
  itemValueAlwaysSerializeText: boolean;
@@ -16867,6 +16848,7 @@ declare module "packages/survey-core/src/settings" {
16867
16848
  * ```
16868
16849
  */
16869
16850
  storeUtcDates: boolean;
16851
+ onDateCreated: (newDate: Date, reason: string, val?: number | string | Date) => Date;
16870
16852
  /**
16871
16853
  * A function that allows you to define custom parsing rules for numbers represented as string values.
16872
16854
  *
@@ -16891,7 +16873,6 @@ declare module "packages/survey-core/src/settings" {
16891
16873
  * @see [settings.serialization](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization)
16892
16874
  */
16893
16875
  parseNumber: (stringValue: any, numericValue: number) => number;
16894
- useLegacyIcons: boolean;
16895
16876
  };
16896
16877
  }
16897
16878
  declare module "packages/survey-core/src/question_matrixdropdown" {
@@ -17019,6 +17000,7 @@ declare module "packages/survey-core/src/dropdownListModel" {
17019
17000
  private setItems;
17020
17001
  private loadQuestionChoices;
17021
17002
  private updateQuestionChoices;
17003
+ private resetTimer;
17022
17004
  private updatePopupFocusFirstInputSelector;
17023
17005
  private getDropdownMenuOptions;
17024
17006
  protected createPopup(): void;
@@ -17587,6 +17569,7 @@ declare module "packages/survey-core/src/question_checkbox" {
17587
17569
  selectAll(): void;
17588
17570
  clickItemHandler(item: ItemValue, checked?: boolean): void;
17589
17571
  protected isItemSelectedCore(item: ItemValue): boolean;
17572
+ protected hasUnknownValueItem(val: any, includeOther?: boolean, isFilteredChoices?: boolean, checkEmptyValue?: boolean): boolean;
17590
17573
  protected convertFuncValuetoQuestionValue(val: any): any;
17591
17574
  private getRealValue;
17592
17575
  get isValueArray(): boolean;
@@ -17640,6 +17623,7 @@ declare module "packages/survey-core/src/question_checkbox" {
17640
17623
  protected setNewValue(newValue: any): void;
17641
17624
  protected getIsMultipleValue(): boolean;
17642
17625
  protected getCommentFromValue(newValue: any): string;
17626
+ getStoreOthersAsComment(): boolean;
17643
17627
  protected setOtherValueIntoValue(newValue: any): any;
17644
17628
  private getFirstUnknownIndex;
17645
17629
  protected removeNoneItemsValues(value: Array<any>, newValue: Array<any>): void;
@@ -17815,7 +17799,7 @@ declare module "packages/survey-core/src/question_tagbox" {
17815
17799
  getControlClass(): string;
17816
17800
  onOpened: EventBase<QuestionTagboxModel>;
17817
17801
  onOpenedCallBack(): void;
17818
- protected hasUnknownValue(val: any, includeOther: boolean, isFilteredChoices: boolean, checkEmptyValue: boolean): boolean;
17802
+ protected hasUnknownValue(val: any, includeOther?: boolean, isFilteredChoices?: boolean, checkEmptyValue?: boolean): boolean;
17819
17803
  protected needConvertRenderedOtherToDataValue(): boolean;
17820
17804
  protected onVisibleChoicesChanged(): void;
17821
17805
  protected getItemIfChoicesNotContainThisValue(value: any, text?: string): any;
@@ -18264,6 +18248,7 @@ declare module "packages/survey-core/src/question_comment" {
18264
18248
  onKeyDown(event: any): void;
18265
18249
  protected setNewValue(newValue: string): any;
18266
18250
  protected getValueSeparator(): string;
18251
+ protected notifyStateChanged(prevState: string): void;
18267
18252
  get className(): string;
18268
18253
  }
18269
18254
  }
@@ -19428,7 +19413,7 @@ declare module "packages/survey-core/entries/chunks/model" {
19428
19413
  export { Cover, CoverCell } from "packages/survey-core/src/header";
19429
19414
  export { dxSurveyService } from "packages/survey-core/src/dxSurveyService";
19430
19415
  export { englishStrings } from "packages/survey-core/src/localization/english";
19431
- export { surveyLocalization, surveyStrings, getLocaleString } from "packages/survey-core/src/surveyStrings";
19416
+ export { surveyLocalization, surveyStrings, getLocaleString, setupLocale } from "packages/survey-core/src/surveyStrings";
19432
19417
  export { QuestionCustomWidget, CustomWidgetCollection, } from "packages/survey-core/src/questionCustomWidgets";
19433
19418
  export { QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ICustomQuestionTypeConfiguration } from "packages/survey-core/src/question_custom";
19434
19419
  export { ListModel } from "packages/survey-core/src/list";
@@ -20394,6 +20379,30 @@ declare module "src/defaultCss/cssmodern" {
20394
20379
  };
20395
20380
  };
20396
20381
  }
20382
+ declare module "packages/survey-core/src/svgbundle" {
20383
+ import { EventBase } from "packages/survey-core/src/base";
20384
+ interface SvgIconData {
20385
+ [key: string]: string;
20386
+ }
20387
+ export class SvgIconRegistry {
20388
+ icons: SvgIconData;
20389
+ private iconPrefix;
20390
+ private processId;
20391
+ registerIconFromSymbol(iconId: string, iconSymbolSvg: string): void;
20392
+ registerIconFromSvgViaElement(iconId: string, iconSvg: string, iconPrefix?: string): void;
20393
+ registerIconFromSvg(iconId: string, iconSvg: string, iconPrefix?: string): boolean;
20394
+ registerIconsFromFolder(r: any): void;
20395
+ registerIcons(icons: SvgIconData): void;
20396
+ iconsRenderedHtml(): string;
20397
+ updateMarkup(): void;
20398
+ onIconsChanged: EventBase<SvgIconRegistry, {}>;
20399
+ }
20400
+ export const SvgRegistry: SvgIconRegistry;
20401
+ export const SvgThemeSets: {
20402
+ [index: string]: SvgIconData;
20403
+ };
20404
+ export function addIconsToThemeSet(name: string, iconsData: SvgIconData): void;
20405
+ }
20397
20406
  declare module "packages/survey-core/entries/chunks/core-wo-model" {
20398
20407
  export * from "packages/survey-core/entries/chunks/model";
20399
20408
  export * from "packages/survey-core/src/svgbundle";
@@ -27373,10 +27382,13 @@ declare module "packages/survey-react-ui/src/components/text-area" {
27373
27382
  viewModel: TextAreaModel;
27374
27383
  }
27375
27384
  export class TextAreaComponent extends SurveyElementBase<ITextAreaProps, any> {
27385
+ private textareaRef;
27376
27386
  private initialValue;
27377
27387
  constructor(props: ITextAreaProps);
27378
27388
  get viewModel(): TextAreaModel;
27379
27389
  protected canRender(): boolean;
27390
+ componentDidMount(): void;
27391
+ componentWillUnmount(): void;
27380
27392
  protected renderElement(): JSX.Element;
27381
27393
  }
27382
27394
  }
@@ -27792,23 +27804,6 @@ declare module "packages/survey-react-ui/src/page" {
27792
27804
  protected renderDescription(): JSX.Element | null;
27793
27805
  }
27794
27806
  }
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
27807
  declare module "packages/survey-react-ui/src/components/survey-header/survey-header" {
27813
27808
  import React from "react";
27814
27809
  import { SurveyModel } from "src/entries/core";
@@ -27856,7 +27851,9 @@ declare module "packages/survey-react-ui/src/svgbundle" {
27856
27851
  export class SvgBundleComponent extends React.Component {
27857
27852
  private containerRef;
27858
27853
  constructor(props: any);
27854
+ private onIconsChanged;
27859
27855
  componentDidMount(): void;
27856
+ componentWillUnmount(): void;
27860
27857
  render(): JSX.Element;
27861
27858
  }
27862
27859
  }
@@ -27883,6 +27880,18 @@ declare module "packages/survey-react-ui/src/components/popup/popup-modal" {
27883
27880
  componentWillUnmount(): void;
27884
27881
  }
27885
27882
  }
27883
+ declare module "packages/survey-core/src/iconsV1" {
27884
+ const icons: {
27885
+ [index: string]: string;
27886
+ };
27887
+ export { icons };
27888
+ }
27889
+ declare module "packages/survey-core/src/iconsV2" {
27890
+ const icons: {
27891
+ [index: string]: string;
27892
+ };
27893
+ export { icons };
27894
+ }
27886
27895
  declare module "packages/survey-react-ui/src/reactSurvey" {
27887
27896
  import { Base, Question, PageModel, SurveyError, SurveyModel, IAttachKey2clickOptions } from "src/entries/core";
27888
27897
  import { ISurveyCreator } from "packages/survey-react-ui/src/reactquestion";
@@ -28882,6 +28891,23 @@ declare module "packages/survey-react-ui/src/components/survey-actions/survey-na
28882
28891
  protected renderElement(): JSX.Element;
28883
28892
  }
28884
28893
  }
28894
+ declare module "packages/survey-react-ui/src/string-viewer" {
28895
+ import React from "react";
28896
+ export class SurveyLocStringViewer extends React.Component<any, any> {
28897
+ constructor(props: any);
28898
+ private rootRef;
28899
+ private get locStr();
28900
+ private get style();
28901
+ componentDidMount(): void;
28902
+ componentWillUnmount(): void;
28903
+ componentDidUpdate(prevProps: any, prevState: any): void;
28904
+ private isRendering;
28905
+ private onChangedHandler;
28906
+ private reactOnStrChanged;
28907
+ render(): JSX.Element | null;
28908
+ protected renderString(): JSX.Element;
28909
+ }
28910
+ }
28885
28911
  declare module "packages/survey-react-ui/src/components/question-error" {
28886
28912
  import React from "react";
28887
28913
  import { SurveyError } from "src/entries/core";