survey-react 1.9.87 → 1.9.89

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
@@ -892,6 +892,7 @@ declare module "jsonobject" {
892
892
  addDependedProperty(name: string): void;
893
893
  getDependedProperties(): Array<string>;
894
894
  schemaType(): string;
895
+ schemaRef(): string;
895
896
  private mergeValue;
896
897
  }
897
898
  export class CustomPropertiesCollection {
@@ -975,11 +976,11 @@ declare module "jsonobject" {
975
976
  isDescendantOf(className: string, ancestorClassName: string): boolean;
976
977
  addAlterNativeClassName(name: string, alternativeName: string): void;
977
978
  generateSchema(className?: string): any;
979
+ private generateLocStrClass;
978
980
  private generateSchemaProperties;
979
981
  private generateSchemaProperty;
982
+ private getChemeRefName;
980
983
  private generateChemaClass;
981
- private fillProperties;
982
- private addPropertyCore;
983
984
  }
984
985
  export class JsonError {
985
986
  type: string;
@@ -1408,6 +1409,7 @@ declare module "utils/utils" {
1408
1409
  export interface IAttachKey2clickOptions {
1409
1410
  processEsc?: boolean;
1410
1411
  disableTabStop?: boolean;
1412
+ __keyDownReceived?: boolean;
1411
1413
  }
1412
1414
  export function doKey2ClickBlur(evt: KeyboardEvent): void;
1413
1415
  export function doKey2ClickUp(evt: KeyboardEvent, options?: IAttachKey2clickOptions): void;
@@ -1681,6 +1683,7 @@ declare module "popup" {
1681
1683
  onVisibilityChanged: EventBase<PopupModel>;
1682
1684
  onFooterActionsCreated: EventBase<Base>;
1683
1685
  onRecalculatePosition: EventBase<Base>;
1686
+ private refreshInnerModel;
1684
1687
  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);
1685
1688
  get isVisible(): boolean;
1686
1689
  set isVisible(value: boolean);
@@ -1698,12 +1701,16 @@ declare module "actions/action" {
1698
1701
  export type actionModeType = "large" | "small" | "popup" | "removed";
1699
1702
  /**
1700
1703
  * An action item.
1704
+ *
1701
1705
  * Action items are used in the Toolbar, matrix rows, titles of pages, panels, questions, and other survey elements.
1702
-
1706
+ *
1707
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1703
1708
  */
1704
1709
  export interface IAction {
1705
1710
  /**
1706
1711
  * A unique action item identifier.
1712
+ *
1713
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1707
1714
  */
1708
1715
  id?: string;
1709
1716
  /**
@@ -1714,6 +1721,8 @@ declare module "actions/action" {
1714
1721
  visible?: boolean;
1715
1722
  /**
1716
1723
  * The action item's title.
1724
+ *
1725
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1717
1726
  * @see showTitle
1718
1727
  * @see disableShrink
1719
1728
  */
@@ -1739,19 +1748,29 @@ declare module "actions/action" {
1739
1748
  showTitle?: boolean;
1740
1749
  /**
1741
1750
  * A function that is executed when users click the action item.
1751
+ *
1752
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1742
1753
  */
1743
1754
  action?: (context?: any) => void;
1744
1755
  /**
1745
1756
  * One or several CSS classes that you want to apply to the outer `<div>` element.
1757
+ *
1746
1758
  * In the markup, an action item is rendered as an `<input>` wrapped in a `<div>`. The `css` property applies classes to the `<div>`.
1747
- * To apply several classes, separate them with a space character: "myclass1 myclass2".
1759
+ *
1760
+ * To apply several classes, separate them with a space character: `"myclass1 myclass2"`.
1761
+ *
1762
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1748
1763
  * @see innerCss
1749
1764
  */
1750
1765
  css?: string;
1751
1766
  /**
1752
1767
  * One or several CSS classes that you want to apply to the inner `<input>` element.
1768
+ *
1753
1769
  * In the markup, an action item is rendered as an `<input>` wrapped in a `<div>`. The `innerCss` property applies classes to the `<input>`.
1754
- * To apply several classes, separate them with a space character: "myclass1 myclass2".
1770
+ *
1771
+ * To apply several classes, separate them with a space character: `"myclass1 myclass2"`.
1772
+ *
1773
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1755
1774
  * @see css
1756
1775
  */
1757
1776
  innerCss?: string;
@@ -1763,7 +1782,8 @@ declare module "actions/action" {
1763
1782
  needSeparator?: boolean;
1764
1783
  /**
1765
1784
  * Specifies whether the action item is active.
1766
- * Use it as a flag to specify different action item appearances in different states.
1785
+ *
1786
+ * Use this property as a flag to specify different action item appearances in different states.
1767
1787
  * @see enabled
1768
1788
  * @see visible
1769
1789
  */
@@ -1810,6 +1830,11 @@ declare module "actions/action" {
1810
1830
  disableShrink?: boolean;
1811
1831
  disableHide?: boolean;
1812
1832
  mode?: actionModeType;
1833
+ /**
1834
+ * A number that specifies the action's position relative to other actions.
1835
+ *
1836
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1837
+ */
1813
1838
  visibleIndex?: number;
1814
1839
  needSpace?: boolean;
1815
1840
  ariaChecked?: boolean;
@@ -5110,6 +5135,7 @@ declare module "question_paneldynamic" {
5110
5135
  import { IAction } from "actions/action";
5111
5136
  export interface IQuestionPanelDynamicData {
5112
5137
  getItemIndex(item: ISurveyData): number;
5138
+ getVisibleItemIndex(item: ISurveyData): number;
5113
5139
  getPanelItemData(item: ISurveyData): any;
5114
5140
  setPanelItemData(item: ISurveyData, name: string, val: any): any;
5115
5141
  getSharedQuestionFromArray(name: string, panelIndex: number): Question;
@@ -5120,6 +5146,7 @@ declare module "question_paneldynamic" {
5120
5146
  static ItemVariableName: string;
5121
5147
  static ParentItemVariableName: string;
5122
5148
  static IndexVariableName: string;
5149
+ static VisibleIndexVariableName: string;
5123
5150
  private panelValue;
5124
5151
  private data;
5125
5152
  private textPreProcessor;
@@ -5193,6 +5220,11 @@ declare module "question_paneldynamic" {
5193
5220
  get templateElements(): Array<IElement>;
5194
5221
  /**
5195
5222
  * A template for panel titles.
5223
+ *
5224
+ * The template can contain the following placeholders:
5225
+ *
5226
+ * - `{panelIndex}` - A zero-based index of a panel in the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
5227
+ * - `{visiblePanelIndex}` - A zero-based index of a panel in the [`visiblePanels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#visiblePanels) array.
5196
5228
  * @see template
5197
5229
  * @see templateDescription
5198
5230
  * @see templateElements
@@ -5204,6 +5236,11 @@ declare module "question_paneldynamic" {
5204
5236
  get locTemplateTitle(): LocalizableString;
5205
5237
  /**
5206
5238
  * A template for tab titles. Applies when [`renderMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#renderMode) is `"tab"`.
5239
+ *
5240
+ * The template can contain the following placeholders:
5241
+ *
5242
+ * - `{panelIndex}` - A zero-based index of a panel in the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
5243
+ * - `{visiblePanelIndex}` - A zero-based index of a panel in the [`visiblePanels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#visiblePanels) array.
5207
5244
  * @see templateTitle
5208
5245
  * @see renderMode
5209
5246
  */
@@ -5221,6 +5258,19 @@ declare module "question_paneldynamic" {
5221
5258
  get templateDescription(): string;
5222
5259
  set templateDescription(newValue: string);
5223
5260
  get locTemplateDescription(): LocalizableString;
5261
+ /**
5262
+ * A Boolean expression that is evaluated against each panel. If the expression evaluates to `false`, the panel becomes hidden.
5263
+ *
5264
+ * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
5265
+ *
5266
+ * Use the `{panel}` placeholder to reference the current panel in the expression.
5267
+ *
5268
+ * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility).
5269
+ * @see visibleIf
5270
+ * @see visiblePanels
5271
+ */
5272
+ get templateVisibleIf(): string;
5273
+ set templateVisibleIf(val: string);
5224
5274
  protected get items(): Array<ISurveyData>;
5225
5275
  /**
5226
5276
  * An array of `PanelModel` objects created based on a panel template.
@@ -5229,6 +5279,14 @@ declare module "question_paneldynamic" {
5229
5279
  * @see panelCount
5230
5280
  */
5231
5281
  get panels(): Array<PanelModel>;
5282
+ /**
5283
+ * An array of currently visible panels ([`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model) objects).
5284
+ * @see templateVisibleIf
5285
+ */
5286
+ get visiblePanels(): Array<PanelModel>;
5287
+ private onPanelAdded;
5288
+ private onPanelRemoved;
5289
+ private onPanelRemovedCore;
5232
5290
  /**
5233
5291
  * A zero-based index of the currently displayed panel.
5234
5292
  *
@@ -5240,8 +5298,6 @@ declare module "question_paneldynamic" {
5240
5298
  */
5241
5299
  get currentIndex(): number;
5242
5300
  set currentIndex(val: number);
5243
- private get currentIndexValue();
5244
- private set currentIndexValue(value);
5245
5301
  /**
5246
5302
  * A `PanelModel` object that is the currently displayed panel.
5247
5303
  *
@@ -5252,6 +5308,7 @@ declare module "question_paneldynamic" {
5252
5308
  * @see renderMode
5253
5309
  */
5254
5310
  get currentPanel(): PanelModel;
5311
+ set currentPanel(val: PanelModel);
5255
5312
  /**
5256
5313
  * Specifies whether to display a confirmation dialog when a respondent wants to delete a panel.
5257
5314
  * @see confirmDeleteText
@@ -5334,7 +5391,7 @@ declare module "question_paneldynamic" {
5334
5391
  get isNextButtonVisible(): boolean;
5335
5392
  get isNextButtonShowing(): boolean;
5336
5393
  /**
5337
- * Returns true when showRangeInProgress equals to true, renderMode doesn't equal to "list" and panelCount is >= 2.
5394
+ * Returns true when showRangeInProgress equals to true, renderMode doesn't equal to "list" and visiblePanelCount is >= 2.
5338
5395
  */
5339
5396
  get isRangeShowing(): boolean;
5340
5397
  getElementsInDesign(includeHidden?: boolean): Array<IElement>;
@@ -5353,6 +5410,11 @@ declare module "question_paneldynamic" {
5353
5410
  */
5354
5411
  get panelCount(): number;
5355
5412
  set panelCount(val: number);
5413
+ /**
5414
+ * Returns the number of visible panels in Dynamic Panel.
5415
+ * @see templateVisibleIf
5416
+ */
5417
+ get visiblePanelCount(): number;
5356
5418
  /**
5357
5419
  * Specifies whether users can expand and collapse panels. Applies if `renderMode` is `"list"` and the `templateTitle` property is specified.
5358
5420
  *
@@ -5561,7 +5623,7 @@ declare module "question_paneldynamic" {
5561
5623
  * @see template
5562
5624
  */
5563
5625
  removePanel(value: any): void;
5564
- private getPanelIndex;
5626
+ private getVisualPanelIndex;
5565
5627
  private getPanelIndexById;
5566
5628
  locStrsChanged(): void;
5567
5629
  clearIncorrectValues(): void;
@@ -5609,6 +5671,7 @@ declare module "question_paneldynamic" {
5609
5671
  recalculateIsReadyValue(): void;
5610
5672
  protected onSetData(): void;
5611
5673
  getItemIndex(item: ISurveyData): number;
5674
+ getVisibleItemIndex(item: ISurveyData): number;
5612
5675
  getPanelItemData(item: ISurveyData): any;
5613
5676
  private isSetPanelItemData;
5614
5677
  private static maxCheckCount;
@@ -5652,7 +5715,9 @@ declare module "question_paneldynamic" {
5652
5715
  private updateTabToolbar;
5653
5716
  private addTabFromToolbar;
5654
5717
  private removeTabFromToolbar;
5655
- private get showLegacyNavigation();
5718
+ get showLegacyNavigation(): boolean;
5719
+ get showNavigation(): boolean;
5720
+ showSeparator(index: number): boolean;
5656
5721
  }
5657
5722
  }
5658
5723
  declare module "survey-events-api" {
@@ -6943,8 +7008,20 @@ declare module "question_textbase" {
6943
7008
  protected calcRenderedPlaceholder(): void;
6944
7009
  protected hasPlaceHolder(): boolean;
6945
7010
  protected setNewValue(newValue: any): void;
7011
+ protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
6946
7012
  getControlClass(): string;
6947
7013
  get ariaRole(): string;
7014
+ get ariaRequired(): any;
7015
+ get ariaInvalid(): any;
7016
+ get ariaLabel(): string;
7017
+ get ariaLabelledBy(): string;
7018
+ get ariaDescribedBy(): string;
7019
+ get a11y_input_ariaRole(): string;
7020
+ get a11y_input_ariaRequired(): "true" | "false";
7021
+ get a11y_input_ariaInvalid(): "true" | "false";
7022
+ get a11y_input_ariaLabel(): string;
7023
+ get a11y_input_ariaLabelledBy(): string;
7024
+ get a11y_input_ariaDescribedBy(): string;
6948
7025
  }
6949
7026
  }
6950
7027
  declare module "question_text" {
@@ -7095,6 +7172,10 @@ declare module "question_multipletext" {
7095
7172
  getItemDefaultValue(name: string): any;
7096
7173
  getIsRequiredText(): string;
7097
7174
  }
7175
+ export class MultipleTextEditorModel extends QuestionTextModel {
7176
+ get a11y_input_ariaLabel(): string;
7177
+ get a11y_input_ariaLabelledBy(): string;
7178
+ }
7098
7179
  /**
7099
7180
  * A class that describes an item in a [Multiple Text](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model) question.
7100
7181
  *
@@ -7114,8 +7195,8 @@ declare module "question_multipletext" {
7114
7195
  get name(): string;
7115
7196
  set name(val: string);
7116
7197
  get question(): Question;
7117
- get editor(): QuestionTextModel;
7118
- protected createEditor(name: string): QuestionTextModel;
7198
+ get editor(): MultipleTextEditorModel;
7199
+ protected createEditor(name: string): MultipleTextEditorModel;
7119
7200
  addUsedLocales(locales: Array<string>): void;
7120
7201
  localeChanged(): void;
7121
7202
  locStrsChanged(): void;
@@ -10291,6 +10372,7 @@ declare module "question" {
10291
10372
  get ariaRequired(): "true" | "false";
10292
10373
  get ariaInvalid(): "true" | "false";
10293
10374
  get ariaLabelledBy(): string;
10375
+ get ariaExpanded(): string;
10294
10376
  get ariaDescribedBy(): string;
10295
10377
  choicesLoaded(): void;
10296
10378
  /**
@@ -11927,7 +12009,7 @@ declare module "question_dropdown" {
11927
12009
  get dropdownListModel(): DropdownListModel;
11928
12010
  set dropdownListModel(val: DropdownListModel);
11929
12011
  get popupModel(): PopupModel;
11930
- get ariaExpanded(): boolean;
12012
+ get ariaExpanded(): string;
11931
12013
  onOpened: EventBase<QuestionDropdownModel>;
11932
12014
  onOpenedCallBack(): void;
11933
12015
  protected onSelectedItemValuesChangedHandler(newValue: any): void;
@@ -12273,6 +12355,7 @@ declare module "question_rating" {
12273
12355
  protected supportResponsiveness(): boolean;
12274
12356
  protected getCompactRenderAs(): string;
12275
12357
  protected getDesktopRenderAs(): string;
12358
+ get ariaExpanded(): string;
12276
12359
  private dropdownListModelValue;
12277
12360
  set dropdownListModel(val: DropdownListModel);
12278
12361
  get dropdownListModel(): DropdownListModel;
@@ -13337,7 +13420,7 @@ declare module "question_tagbox" {
13337
13420
  getType(): string;
13338
13421
  get ariaRole(): string;
13339
13422
  get popupModel(): PopupModel;
13340
- get ariaExpanded(): boolean;
13423
+ get ariaExpanded(): string;
13341
13424
  getControlClass(): string;
13342
13425
  onOpened: EventBase<QuestionTagboxModel>;
13343
13426
  onOpenedCallBack(): void;
@@ -14382,9 +14465,11 @@ declare module "question_custom" {
14382
14465
  protected getQuestionByName(name: string): IQuestion;
14383
14466
  private settingNewValue;
14384
14467
  setValue(name: string, newValue: any, locNotification: any, allowNotifyValueChanged?: boolean): any;
14468
+ private setNewValueIntoQuestion;
14385
14469
  addConditionObjectsByContext(objects: Array<IConditionObject>, context: any): void;
14386
14470
  protected convertDataValue(name: string, newValue: any): any;
14387
14471
  protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
14472
+ private setValuesIntoQuestions;
14388
14473
  protected getDisplayValueCore(keyAsText: boolean, value: any): any;
14389
14474
  private setAfterRenderCallbacks;
14390
14475
  }
@@ -14631,7 +14716,7 @@ declare module "entries/chunks/model" {
14631
14716
  export { MatrixDynamicRowModel, QuestionMatrixDynamicModel } from "question_matrixdynamic";
14632
14717
  export { MatrixRowModel, MatrixCells, QuestionMatrixModel, IMatrixData } from "question_matrix";
14633
14718
  export { QuestionMatrixBaseModel } from "martixBase";
14634
- export { MultipleTextItemModel, QuestionMultipleTextModel } from "question_multipletext";
14719
+ export { MultipleTextItemModel, QuestionMultipleTextModel, MultipleTextEditorModel } from "question_multipletext";
14635
14720
  export { PanelModel, PanelModelBase, QuestionRowModel } from "panel";
14636
14721
  export { FlowPanelModel } from "flowpanel";
14637
14722
  export { PageModel } from "page";
@@ -21402,10 +21487,9 @@ declare module "react/reactquestion_dropdown" {
21402
21487
  }
21403
21488
  declare module "react/tagbox-item" {
21404
21489
  import { ReactSurveyElement } from "react/reactquestion_element";
21405
- import { Base, QuestionTagboxModel, ItemValue } from "entries/core";
21490
+ import { QuestionTagboxModel, ItemValue } from "entries/core";
21406
21491
  export class SurveyQuestionTagboxItem extends ReactSurveyElement {
21407
21492
  constructor(props: any);
21408
- protected getStateElement(): Base;
21409
21493
  protected get question(): QuestionTagboxModel;
21410
21494
  protected get item(): ItemValue;
21411
21495
  protected canRender(): boolean;
@@ -21492,7 +21576,7 @@ declare module "react/reactquestion_multipletext" {
21492
21576
  export class SurveyMultipleTextItem extends ReactSurveyElement {
21493
21577
  private get question();
21494
21578
  private get item();
21495
- protected getStateElements(): (import("question_text").QuestionTextModel | MultipleTextItemModel)[];
21579
+ protected getStateElements(): (import("question_multipletext").MultipleTextEditorModel | MultipleTextItemModel)[];
21496
21580
  private get creator();
21497
21581
  protected renderElement(): JSX.Element;
21498
21582
  protected renderItemTooltipError(item: MultipleTextItemModel, cssClasses: any): JSX.Element | null;