survey-react 1.9.87 → 1.9.88

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/modern.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.87
2
+ * surveyjs - Survey JavaScript library v1.9.88
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/modern.min.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.87
2
+ * surveyjs - Survey JavaScript library v1.9.88
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-react",
3
- "version": "1.9.87",
3
+ "version": "1.9.88",
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.9.87
2
+ * surveyjs - Survey JavaScript library v1.9.88
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.min.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.87
2
+ * surveyjs - Survey JavaScript library v1.9.88
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
@@ -1681,6 +1681,7 @@ declare module "popup" {
1681
1681
  onVisibilityChanged: EventBase<PopupModel>;
1682
1682
  onFooterActionsCreated: EventBase<Base>;
1683
1683
  onRecalculatePosition: EventBase<Base>;
1684
+ private refreshInnerModel;
1684
1685
  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
1686
  get isVisible(): boolean;
1686
1687
  set isVisible(value: boolean);
@@ -1698,12 +1699,16 @@ declare module "actions/action" {
1698
1699
  export type actionModeType = "large" | "small" | "popup" | "removed";
1699
1700
  /**
1700
1701
  * An action item.
1702
+ *
1701
1703
  * Action items are used in the Toolbar, matrix rows, titles of pages, panels, questions, and other survey elements.
1702
-
1704
+ *
1705
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1703
1706
  */
1704
1707
  export interface IAction {
1705
1708
  /**
1706
1709
  * A unique action item identifier.
1710
+ *
1711
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1707
1712
  */
1708
1713
  id?: string;
1709
1714
  /**
@@ -1714,6 +1719,8 @@ declare module "actions/action" {
1714
1719
  visible?: boolean;
1715
1720
  /**
1716
1721
  * The action item's title.
1722
+ *
1723
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1717
1724
  * @see showTitle
1718
1725
  * @see disableShrink
1719
1726
  */
@@ -1739,19 +1746,29 @@ declare module "actions/action" {
1739
1746
  showTitle?: boolean;
1740
1747
  /**
1741
1748
  * A function that is executed when users click the action item.
1749
+ *
1750
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1742
1751
  */
1743
1752
  action?: (context?: any) => void;
1744
1753
  /**
1745
1754
  * One or several CSS classes that you want to apply to the outer `<div>` element.
1755
+ *
1746
1756
  * 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".
1757
+ *
1758
+ * To apply several classes, separate them with a space character: `"myclass1 myclass2"`.
1759
+ *
1760
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1748
1761
  * @see innerCss
1749
1762
  */
1750
1763
  css?: string;
1751
1764
  /**
1752
1765
  * One or several CSS classes that you want to apply to the inner `<input>` element.
1766
+ *
1753
1767
  * 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".
1768
+ *
1769
+ * To apply several classes, separate them with a space character: `"myclass1 myclass2"`.
1770
+ *
1771
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1755
1772
  * @see css
1756
1773
  */
1757
1774
  innerCss?: string;
@@ -1763,7 +1780,8 @@ declare module "actions/action" {
1763
1780
  needSeparator?: boolean;
1764
1781
  /**
1765
1782
  * Specifies whether the action item is active.
1766
- * Use it as a flag to specify different action item appearances in different states.
1783
+ *
1784
+ * Use this property as a flag to specify different action item appearances in different states.
1767
1785
  * @see enabled
1768
1786
  * @see visible
1769
1787
  */
@@ -1810,6 +1828,11 @@ declare module "actions/action" {
1810
1828
  disableShrink?: boolean;
1811
1829
  disableHide?: boolean;
1812
1830
  mode?: actionModeType;
1831
+ /**
1832
+ * A number that specifies the action's position relative to other actions.
1833
+ *
1834
+ * [View Demo](/form-library/examples/add-custom-navigation-button/ (linkStyle))
1835
+ */
1813
1836
  visibleIndex?: number;
1814
1837
  needSpace?: boolean;
1815
1838
  ariaChecked?: boolean;
@@ -5110,6 +5133,7 @@ declare module "question_paneldynamic" {
5110
5133
  import { IAction } from "actions/action";
5111
5134
  export interface IQuestionPanelDynamicData {
5112
5135
  getItemIndex(item: ISurveyData): number;
5136
+ getVisibleItemIndex(item: ISurveyData): number;
5113
5137
  getPanelItemData(item: ISurveyData): any;
5114
5138
  setPanelItemData(item: ISurveyData, name: string, val: any): any;
5115
5139
  getSharedQuestionFromArray(name: string, panelIndex: number): Question;
@@ -5120,6 +5144,7 @@ declare module "question_paneldynamic" {
5120
5144
  static ItemVariableName: string;
5121
5145
  static ParentItemVariableName: string;
5122
5146
  static IndexVariableName: string;
5147
+ static VisibleIndexVariableName: string;
5123
5148
  private panelValue;
5124
5149
  private data;
5125
5150
  private textPreProcessor;
@@ -5193,6 +5218,11 @@ declare module "question_paneldynamic" {
5193
5218
  get templateElements(): Array<IElement>;
5194
5219
  /**
5195
5220
  * A template for panel titles.
5221
+ *
5222
+ * The template can contain the following placeholders:
5223
+ *
5224
+ * - `{panelIndex}` - A zero-based index of a panel in the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
5225
+ * - `{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
5226
  * @see template
5197
5227
  * @see templateDescription
5198
5228
  * @see templateElements
@@ -5204,6 +5234,11 @@ declare module "question_paneldynamic" {
5204
5234
  get locTemplateTitle(): LocalizableString;
5205
5235
  /**
5206
5236
  * A template for tab titles. Applies when [`renderMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#renderMode) is `"tab"`.
5237
+ *
5238
+ * The template can contain the following placeholders:
5239
+ *
5240
+ * - `{panelIndex}` - A zero-based index of a panel in the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
5241
+ * - `{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
5242
  * @see templateTitle
5208
5243
  * @see renderMode
5209
5244
  */
@@ -5221,6 +5256,19 @@ declare module "question_paneldynamic" {
5221
5256
  get templateDescription(): string;
5222
5257
  set templateDescription(newValue: string);
5223
5258
  get locTemplateDescription(): LocalizableString;
5259
+ /**
5260
+ * A Boolean expression that is evaluated against each panel. If the expression evaluates to `false`, the panel becomes hidden.
5261
+ *
5262
+ * A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
5263
+ *
5264
+ * Use the `{panel}` placeholder to reference the current panel in the expression.
5265
+ *
5266
+ * Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility).
5267
+ * @see visibleIf
5268
+ * @see visiblePanels
5269
+ */
5270
+ get templateVisibleIf(): string;
5271
+ set templateVisibleIf(val: string);
5224
5272
  protected get items(): Array<ISurveyData>;
5225
5273
  /**
5226
5274
  * An array of `PanelModel` objects created based on a panel template.
@@ -5229,6 +5277,14 @@ declare module "question_paneldynamic" {
5229
5277
  * @see panelCount
5230
5278
  */
5231
5279
  get panels(): Array<PanelModel>;
5280
+ /**
5281
+ * An array of currently visible panels ([`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model) objects).
5282
+ * @see templateVisibleIf
5283
+ */
5284
+ get visiblePanels(): Array<PanelModel>;
5285
+ private onPanelAdded;
5286
+ private onPanelRemoved;
5287
+ private onPanelRemovedCore;
5232
5288
  /**
5233
5289
  * A zero-based index of the currently displayed panel.
5234
5290
  *
@@ -5240,8 +5296,6 @@ declare module "question_paneldynamic" {
5240
5296
  */
5241
5297
  get currentIndex(): number;
5242
5298
  set currentIndex(val: number);
5243
- private get currentIndexValue();
5244
- private set currentIndexValue(value);
5245
5299
  /**
5246
5300
  * A `PanelModel` object that is the currently displayed panel.
5247
5301
  *
@@ -5252,6 +5306,7 @@ declare module "question_paneldynamic" {
5252
5306
  * @see renderMode
5253
5307
  */
5254
5308
  get currentPanel(): PanelModel;
5309
+ set currentPanel(val: PanelModel);
5255
5310
  /**
5256
5311
  * Specifies whether to display a confirmation dialog when a respondent wants to delete a panel.
5257
5312
  * @see confirmDeleteText
@@ -5334,7 +5389,7 @@ declare module "question_paneldynamic" {
5334
5389
  get isNextButtonVisible(): boolean;
5335
5390
  get isNextButtonShowing(): boolean;
5336
5391
  /**
5337
- * Returns true when showRangeInProgress equals to true, renderMode doesn't equal to "list" and panelCount is >= 2.
5392
+ * Returns true when showRangeInProgress equals to true, renderMode doesn't equal to "list" and visiblePanelCount is >= 2.
5338
5393
  */
5339
5394
  get isRangeShowing(): boolean;
5340
5395
  getElementsInDesign(includeHidden?: boolean): Array<IElement>;
@@ -5353,6 +5408,11 @@ declare module "question_paneldynamic" {
5353
5408
  */
5354
5409
  get panelCount(): number;
5355
5410
  set panelCount(val: number);
5411
+ /**
5412
+ * Returns the number of visible panels in Dynamic Panel.
5413
+ * @see templateVisibleIf
5414
+ */
5415
+ get visiblePanelCount(): number;
5356
5416
  /**
5357
5417
  * Specifies whether users can expand and collapse panels. Applies if `renderMode` is `"list"` and the `templateTitle` property is specified.
5358
5418
  *
@@ -5561,7 +5621,7 @@ declare module "question_paneldynamic" {
5561
5621
  * @see template
5562
5622
  */
5563
5623
  removePanel(value: any): void;
5564
- private getPanelIndex;
5624
+ private getVisualPanelIndex;
5565
5625
  private getPanelIndexById;
5566
5626
  locStrsChanged(): void;
5567
5627
  clearIncorrectValues(): void;
@@ -5609,6 +5669,7 @@ declare module "question_paneldynamic" {
5609
5669
  recalculateIsReadyValue(): void;
5610
5670
  protected onSetData(): void;
5611
5671
  getItemIndex(item: ISurveyData): number;
5672
+ getVisibleItemIndex(item: ISurveyData): number;
5612
5673
  getPanelItemData(item: ISurveyData): any;
5613
5674
  private isSetPanelItemData;
5614
5675
  private static maxCheckCount;
@@ -21402,10 +21463,9 @@ declare module "react/reactquestion_dropdown" {
21402
21463
  }
21403
21464
  declare module "react/tagbox-item" {
21404
21465
  import { ReactSurveyElement } from "react/reactquestion_element";
21405
- import { Base, QuestionTagboxModel, ItemValue } from "entries/core";
21466
+ import { QuestionTagboxModel, ItemValue } from "entries/core";
21406
21467
  export class SurveyQuestionTagboxItem extends ReactSurveyElement {
21407
21468
  constructor(props: any);
21408
- protected getStateElement(): Base;
21409
21469
  protected get question(): QuestionTagboxModel;
21410
21470
  protected get item(): ItemValue;
21411
21471
  protected canRender(): boolean;