survey-react 1.9.58 → 1.9.60
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/defaultV2.css +89 -3
- package/defaultV2.min.css +2 -2
- package/modern.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +193 -85
- package/survey.react.js +456 -139
- package/survey.react.min.js +3 -3
package/survey.react.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* Type definition for Survey JavaScript library for React v1.9.
|
2
|
+
* Type definition for Survey JavaScript library for React v1.9.60
|
3
3
|
* Copyright (c) 2015-2022 Devsoft Baltic OÜ - https://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -254,6 +254,12 @@ export interface ISurveyTriggerOwner {
|
|
254
254
|
}
|
255
255
|
export interface ISurveyTimerText {
|
256
256
|
timerInfoText: string;
|
257
|
+
timerInfo: any;
|
258
|
+
timerClock: any;
|
259
|
+
getCss(): any;
|
260
|
+
isTimerPanelShowingOnBottom: boolean;
|
261
|
+
isTimerPanelShowingOnTop: boolean;
|
262
|
+
onCurrentPageChanged: EventBase<SurveyModel>;
|
257
263
|
}
|
258
264
|
export interface IConditionObject {
|
259
265
|
name: string;
|
@@ -2659,9 +2665,6 @@ export declare class MultipleTextItemModel extends Base implements IValidatorOwn
|
|
2659
2665
|
get title(): string;
|
2660
2666
|
set title(val: string);
|
2661
2667
|
get locTitle(): LocalizableString;
|
2662
|
-
/*
|
2663
|
-
* Returns the text or html for rendering the title.
|
2664
|
-
*/
|
2665
2668
|
get fullTitle(): string;
|
2666
2669
|
/*
|
2667
2670
|
* The maximum text length. If it is -1, defaul value, then the survey maxTextLength property will be used.
|
@@ -3256,13 +3259,22 @@ export declare class SurveyTimerModel extends Base {
|
|
3256
3259
|
onTimer: (page: PageModel) => void;
|
3257
3260
|
surveyValue: ISurvey;
|
3258
3261
|
text: string;
|
3262
|
+
progress: number;
|
3263
|
+
clockMajorText: string;
|
3264
|
+
clockMinorText: string;
|
3259
3265
|
spent: number;
|
3260
|
-
get survey():
|
3266
|
+
get survey(): ISurveyTimerText;
|
3261
3267
|
onCreating(): void;
|
3262
3268
|
timerFunc: any;
|
3263
3269
|
start(): void;
|
3264
3270
|
stop(): void;
|
3265
3271
|
get isRunning(): boolean;
|
3272
|
+
get showTimerAsClock(): boolean;
|
3273
|
+
get rootCss(): string;
|
3274
|
+
getProgressCss(): string;
|
3275
|
+
get textContainerCss(): string;
|
3276
|
+
get minorTextCss(): string;
|
3277
|
+
get majorTextCss(): string;
|
3266
3278
|
}
|
3267
3279
|
/*
|
3268
3280
|
* Base SurveyJS validator class.
|
@@ -4003,12 +4015,12 @@ export declare class SurveyElement<E = any> extends SurveyElementCore implements
|
|
4003
4015
|
get renderWidth(): string;
|
4004
4016
|
set renderWidth(val: string);
|
4005
4017
|
/*
|
4006
|
-
* Increases or decreases indent of
|
4018
|
+
* Increases or decreases an indent of survey element content from the left edge. Accepts positive integer values and 0. Does not apply in the Default V2 theme.
|
4007
4019
|
*/
|
4008
4020
|
get indent(): number;
|
4009
4021
|
set indent(val: number);
|
4010
4022
|
/*
|
4011
|
-
* Increases or decreases indent of
|
4023
|
+
* Increases or decreases an indent of survey element content from the right edge. Accepts positive integer values and 0. Does not apply in the Default V2 theme.
|
4012
4024
|
*/
|
4013
4025
|
get rightIndent(): number;
|
4014
4026
|
set rightIndent(val: number);
|
@@ -4182,6 +4194,22 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
4182
4194
|
* or inside a matrix cell or it can be a text question in multiple text items or inside a panel of a panel dynamic.
|
4183
4195
|
* You can use this event to set up properties to a question based on it's type for all questions, regardless where they are located, on the page or inside a matrix cell.
|
4184
4196
|
* Please note: If you want to use this event for questions loaded from JSON then you have to create survey with empty/null JSON parameter, assign the event and call survey.fromJSON(yourJSON) function.
|
4197
|
+
* ```js
|
4198
|
+
* import { Model } from "survey-core";
|
4199
|
+
*
|
4200
|
+
* const surveyJson = {
|
4201
|
+
* // ...
|
4202
|
+
* };
|
4203
|
+
* // Create an empty model
|
4204
|
+
* const survey = new Model();
|
4205
|
+
* // Add an event handler
|
4206
|
+
* survey.onQuestionCreated.add((sender, options) => {
|
4207
|
+
* //...
|
4208
|
+
* });
|
4209
|
+
* // Load the survey JSON schema
|
4210
|
+
* survey.fromJSON(surveyJson);
|
4211
|
+
* ```
|
4212
|
+
*
|
4185
4213
|
* - `sender` - the survey object that fires the event.
|
4186
4214
|
* - `options.question` - a newly created question object.
|
4187
4215
|
*/
|
@@ -4499,7 +4527,37 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
4499
4527
|
* - `options.visible` - A Boolean value that specifies the item visibility. Set it to `false` to hide the item.
|
4500
4528
|
*/
|
4501
4529
|
onShowingChoiceItem: EventBase<SurveyModel>;
|
4530
|
+
/*
|
4531
|
+
* Use this event to load choice items in [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel) and [Tag Box](https://surveyjs.io/form-library/documentation/questiontagboxmodel) questions on demand.
|
4532
|
+
*
|
4533
|
+
* This event is raised only for those questions that have the [`choicesLazyLoadEnabled`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesLazyLoadEnabled) property set to `true`.
|
4534
|
+
*
|
4535
|
+
* The event handler accepts the following arguments:
|
4536
|
+
*
|
4537
|
+
* - `sender` - A Survey instance that raised the event.
|
4538
|
+
* - `options.question` - A Question instance for which the event is raised.
|
4539
|
+
* - `options.skip`- The number of choice items to skip.
|
4540
|
+
* - `options.take` - The number of choice items to load. You can use the question's [`choicesLazyLoadPageSize`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesLazyLoadPageSize) property to change this number.
|
4541
|
+
* - `options.filter` - A search string used to filter choices.
|
4542
|
+
* - `options.setItems(items: Array<any>, totalCount: Number)` - A method that you should call to assign loaded items to the question.
|
4543
|
+
*
|
4544
|
+
* [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
|
4545
|
+
*/
|
4502
4546
|
onChoicesLazyLoad: EventBase<SurveyModel>;
|
4547
|
+
/*
|
4548
|
+
* Use this event to load a display text for the [default choice item](https://surveyjs.io/form-library/documentation/questiondropdownmodel#defaultValue) in [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel) and [Tag Box](https://surveyjs.io/form-library/documentation/questiontagboxmodel) questions.
|
4549
|
+
*
|
4550
|
+
* If you load choices from a server (use [`choicesByUrl`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesByUrl) or [`onChoicesLazyLoad`](https://surveyjs.io/form-library/documentation/surveymodel#onChoicesLazyLoad)), display texts become available only when data is loaded, which does not happen until a user opens the drop-down menu. However, a display text for a default choice item is required before that. In this case, you can load data individually for the default item within the `onGetChoiceDisplayValue` event handler.
|
4551
|
+
*
|
4552
|
+
* The event handler accepts the following arguments:
|
4553
|
+
*
|
4554
|
+
* - `sender` - A Survey instance that raised the event.
|
4555
|
+
* - `options.question` - A Question instance for which the event is raised.
|
4556
|
+
* - `options.values`- An array of one (in Dropdown) or more (in Tag Box) default values.
|
4557
|
+
* - `options.setItems(displayValues: Array<string>)` - A method that you should call to assign display texts to the question.
|
4558
|
+
*
|
4559
|
+
* [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
|
4560
|
+
*/
|
4503
4561
|
onGetChoiceDisplayValue: EventBase<SurveyModel>;
|
4504
4562
|
/*
|
4505
4563
|
* The event is fired on adding a new row in Matrix Dynamic question.
|
@@ -5186,9 +5244,6 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
5186
5244
|
set progressBarType(val: string);
|
5187
5245
|
get isShowProgressBarOnTop(): boolean;
|
5188
5246
|
get isShowProgressBarOnBottom(): boolean;
|
5189
|
-
/*
|
5190
|
-
* Returns the text/HTML that is rendered as a survey title.
|
5191
|
-
*/
|
5192
5247
|
get processedTitle(): string;
|
5193
5248
|
/*
|
5194
5249
|
* Gets or sets question title location relative to the input field: `"top"`, `"bottom"`, or `"left"`.
|
@@ -5881,6 +5936,8 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
5881
5936
|
get width(): string;
|
5882
5937
|
set width(val: string);
|
5883
5938
|
get renderedWidth(): string;
|
5939
|
+
get timerInfo(): any;
|
5940
|
+
get timerClock(): any;
|
5884
5941
|
get timerInfoText(): string;
|
5885
5942
|
get timerModel(): SurveyTimerModel;
|
5886
5943
|
/*
|
@@ -6277,6 +6334,7 @@ export declare class SurveyTimerPanel extends ReactSurveyElement {
|
|
6277
6334
|
constructor(props: any);
|
6278
6335
|
protected getStateElement(): Base;
|
6279
6336
|
protected get timerModel(): any;
|
6337
|
+
circleLength: any;
|
6280
6338
|
render(): JSX.Element;
|
6281
6339
|
}
|
6282
6340
|
/*
|
@@ -6377,9 +6435,7 @@ export declare class MultiSelectListModel extends ListModel {
|
|
6377
6435
|
selectFocusedItem(): void;
|
6378
6436
|
}
|
6379
6437
|
/*
|
6380
|
-
* A base class for
|
6381
|
-
*
|
6382
|
-
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-panel/ (linkStyle))
|
6438
|
+
* A base class for the [PanelModel](https://surveyjs.io/form-library/documentation/panelmodel) and [PageModel](https://surveyjs.io/form-library/documentation/pagemodel) classes.
|
6383
6439
|
*/
|
6384
6440
|
export declare class PanelModelBase extends SurveyElement<Question> implements IPanel, IConditionRunner, ISurveyErrorOwner, ITitleOwner {
|
6385
6441
|
constructor(name?: string);
|
@@ -6404,7 +6460,7 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
|
|
6404
6460
|
localeChanged(): void;
|
6405
6461
|
locStrsChanged(): void;
|
6406
6462
|
/*
|
6407
|
-
* Returns
|
6463
|
+
* Returns a character or text string that indicates a required panel/page.
|
6408
6464
|
*/
|
6409
6465
|
get requiredText(): string;
|
6410
6466
|
protected get titlePattern(): string;
|
@@ -6412,99 +6468,116 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
|
|
6412
6468
|
get isRequireTextBeforeTitle(): boolean;
|
6413
6469
|
get isRequireTextAfterTitle(): boolean;
|
6414
6470
|
/*
|
6415
|
-
*
|
6471
|
+
* Specifies a custom error message for a required panel/page.
|
6416
6472
|
*/
|
6417
6473
|
get requiredErrorText(): string;
|
6418
6474
|
set requiredErrorText(val: string);
|
6419
6475
|
get locRequiredErrorText(): LocalizableString;
|
6420
6476
|
/*
|
6421
|
-
*
|
6477
|
+
* Specifies the sort order of questions in the panel/page.
|
6478
|
+
*
|
6479
|
+
* Possible values:
|
6480
|
+
*
|
6481
|
+
* - `"initial"` - Preserves the original order of questions.
|
6482
|
+
* - `"random"` - Displays questions in random order.
|
6483
|
+
* - `"default"` (default) - Inherits the setting from the Survey's `questionsOrder` property.
|
6422
6484
|
*/
|
6423
6485
|
get questionsOrder(): string;
|
6424
6486
|
set questionsOrder(val: string);
|
6425
6487
|
protected isRandomizing: boolean;
|
6426
6488
|
randomizeElements(isRandom: boolean): void;
|
6427
6489
|
/*
|
6428
|
-
*
|
6490
|
+
* Returns `true` if elements in this panel/page are arranged in random order.
|
6429
6491
|
*/
|
6430
6492
|
get areQuestionsRandomized(): boolean;
|
6431
6493
|
/*
|
6432
|
-
*
|
6494
|
+
* Returns a survey element (panel or page) that contains this panel and allows you to move this question to a different survey element.
|
6495
|
+
*
|
6496
|
+
* This property is always `null` for the `PageModel` object.
|
6433
6497
|
*/
|
6434
6498
|
get parent(): PanelModelBase;
|
6435
6499
|
set parent(val: PanelModelBase);
|
6436
6500
|
get depth(): number;
|
6437
6501
|
/*
|
6438
|
-
*
|
6502
|
+
* A Boolean expression. If it evaluates to `false`, this panel/page becomes hidden.
|
6503
|
+
*
|
6504
|
+
* A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
|
6505
|
+
*
|
6506
|
+
* Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility)
|
6439
6507
|
*/
|
6440
6508
|
get visibleIf(): string;
|
6441
6509
|
set visibleIf(val: string);
|
6442
6510
|
protected calcCssClasses(css: any): any;
|
6443
6511
|
/*
|
6444
|
-
*
|
6512
|
+
* An auto-generated unique element identifier.
|
6445
6513
|
*/
|
6446
6514
|
get id(): string;
|
6447
6515
|
set id(val: string);
|
6448
6516
|
/*
|
6449
|
-
* Returns true if the
|
6517
|
+
* Returns `true` if the survey element is a panel.
|
6450
6518
|
*/
|
6451
6519
|
get isPanel(): boolean;
|
6452
6520
|
getPanel(): IPanel;
|
6453
6521
|
getLayoutType(): string;
|
6454
6522
|
isLayoutTypeSupported(layoutType: string): boolean;
|
6455
6523
|
/*
|
6456
|
-
*
|
6524
|
+
* An array of all questions within this panel/page. Includes questions within nested panels.
|
6457
6525
|
*/
|
6458
6526
|
get questions(): any;
|
6459
6527
|
protected getValidName(name: string): string;
|
6460
6528
|
/*
|
6461
|
-
* Returns
|
6529
|
+
* Returns a question with a specified `name`. This method does not find questions within nested panels.
|
6462
6530
|
*/
|
6463
6531
|
getQuestionByName(name: string): Question;
|
6464
6532
|
/*
|
6465
|
-
* Returns
|
6533
|
+
* Returns a survey element with a specified `name`. This method can find survey elements within nested elements.
|
6466
6534
|
*/
|
6467
6535
|
getElementByName(name: string): IElement;
|
6468
6536
|
getQuestionByValueName(valueName: string): Question;
|
6469
6537
|
/*
|
6470
|
-
* Returns question values
|
6538
|
+
* Returns a JSON object with question values nested in the panel/page.
|
6471
6539
|
*/
|
6472
6540
|
getValue(): any;
|
6473
6541
|
/*
|
6474
|
-
*
|
6542
|
+
* Returns a JSON object with display texts that correspond to question values nested in the panel/page.
|
6475
6543
|
*/
|
6476
6544
|
getDisplayValue(keysAsText: boolean): any;
|
6477
6545
|
/*
|
6478
|
-
* Returns
|
6546
|
+
* Returns a JSON object with comments left to questions within this panel/page. Question names are used as keys.
|
6479
6547
|
*/
|
6480
6548
|
getComments(): any;
|
6481
6549
|
/*
|
6482
|
-
*
|
6483
|
-
*
|
6484
|
-
*
|
6550
|
+
* Removes values that cannot be assigned to nested questions, for example, choices unlisted in the `choices` array.
|
6551
|
+
*
|
6552
|
+
* Call this method after you assign new question values in code to ensure that they are acceptable.
|
6553
|
+
*
|
6554
|
+
* > NOTE: This method does not remove values for invisible questions and values that fail validation. Call the `hasErrors()` method to validate newly assigned values.
|
6485
6555
|
*/
|
6486
6556
|
clearIncorrectValues(): void;
|
6487
6557
|
/*
|
6488
|
-
*
|
6558
|
+
* Empties the `errors` array for this panel/page and all its child elements (panels and questions).
|
6489
6559
|
*/
|
6490
6560
|
clearErrors(): void;
|
6491
6561
|
/*
|
6492
|
-
*
|
6562
|
+
* An array of all survey elements (questions or panels) within this panel/page. Does not include questions within nested panels.
|
6493
6563
|
*/
|
6494
6564
|
get elements(): any;
|
6495
6565
|
getElementsInDesign(includeHidden?: boolean): Array<IElement>;
|
6496
6566
|
/*
|
6497
|
-
*
|
6567
|
+
* Checks whether a given element belongs to this panel/page or nested panels.
|
6498
6568
|
*/
|
6499
6569
|
containsElement(element: IElement): boolean;
|
6500
6570
|
/*
|
6501
|
-
*
|
6571
|
+
* Makes the panel/page require an answer at least in one nested question. If a respondent leaves the panel/page without any answers, the survey displays a validation error.
|
6502
6572
|
*/
|
6503
6573
|
get isRequired(): boolean;
|
6504
6574
|
set isRequired(val: boolean);
|
6505
6575
|
/*
|
6506
|
-
*
|
6507
|
-
*
|
6576
|
+
* A Boolean expression. If it evaluates to `true`, this panel/page becomes required (at least one question in the panel/page should have an answer).
|
6577
|
+
*
|
6578
|
+
* A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
|
6579
|
+
*
|
6580
|
+
* Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility)
|
6508
6581
|
*/
|
6509
6582
|
get requiredIf(): string;
|
6510
6583
|
set requiredIf(val: string);
|
@@ -6519,28 +6592,34 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
|
|
6519
6592
|
updateElementVisibility(): void;
|
6520
6593
|
getFirstQuestionToFocus(withError?: boolean, ignoreCollapseState?: boolean): Question;
|
6521
6594
|
/*
|
6522
|
-
*
|
6595
|
+
* Sets focus on the input of the first question in this panel/page.
|
6523
6596
|
*/
|
6524
6597
|
focusFirstQuestion(): void;
|
6525
6598
|
/*
|
6526
|
-
*
|
6599
|
+
* Sets focus on the input of the first question in this panel/page that has an error.
|
6527
6600
|
*/
|
6528
6601
|
focusFirstErrorQuestion(): void;
|
6529
|
-
/*
|
6530
|
-
* Fill list array with the questions.
|
6531
|
-
*/
|
6532
6602
|
addQuestionsToList(list: any, visibleOnly?: boolean, includingDesignTime?: boolean): void;
|
6533
|
-
/*
|
6534
|
-
* Fill list array with the panels.
|
6535
|
-
*/
|
6536
6603
|
addPanelsIntoList(list: any, visibleOnly?: boolean, includingDesignTime?: boolean): void;
|
6537
6604
|
/*
|
6538
|
-
* Returns true if
|
6605
|
+
* Returns `true` if this is the current page.
|
6539
6606
|
*/
|
6540
6607
|
get isActive(): boolean;
|
6541
6608
|
updateCustomWidgets(): void;
|
6542
6609
|
/*
|
6543
|
-
*
|
6610
|
+
* Sets a title location relative to the input field for questions that belong to this panel/page.
|
6611
|
+
*
|
6612
|
+
* Use this property to override the `questionTitleLocation` property specified for the survey. You can also set the `titleLocation` property for individual questions.
|
6613
|
+
*
|
6614
|
+
* Possible values:
|
6615
|
+
*
|
6616
|
+
* - `"default"` (default) - Inherits the setting from the `questionTitleLocation` property specified for the survey.
|
6617
|
+
* - `"top"` - Displays the title above the input field.
|
6618
|
+
* - `"bottom"` - Displays the title below the input field.
|
6619
|
+
* - `"left"` - Displays the title to the left of the input field.
|
6620
|
+
* - `"hidden"` - Hides the question title.
|
6621
|
+
*
|
6622
|
+
* > NOTE: Certain question types (Matrix, Multiple Text) do not support the `"left"` value. For them, the `"top"` value is used.
|
6544
6623
|
*/
|
6545
6624
|
get questionTitleLocation(): string;
|
6546
6625
|
set questionTitleLocation(val: string);
|
@@ -6565,19 +6644,20 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
|
|
6565
6644
|
protected getDragDropInfo(): any;
|
6566
6645
|
protected updateRowsRemoveElementFromRow(element: IElement, row: QuestionRowModel): void;
|
6567
6646
|
elementWidthChanged(el: IElement): void;
|
6568
|
-
/*
|
6569
|
-
* Returns rendered title text or html.
|
6570
|
-
*/
|
6571
6647
|
get processedTitle(): string;
|
6572
6648
|
protected getRenderedTitle(str: string): string;
|
6573
6649
|
/*
|
6574
|
-
*
|
6650
|
+
* Gets or sets panel/page visibility.
|
6651
|
+
*
|
6652
|
+
* If you want to display or hide a survey element based on a condition, specify the `visibleIf` property. Refer to the following help topic for information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
|
6575
6653
|
*/
|
6576
6654
|
get visible(): boolean;
|
6577
6655
|
set visible(val: boolean);
|
6578
6656
|
protected onVisibleChanged(): void;
|
6579
6657
|
/*
|
6580
|
-
* Returns true if
|
6658
|
+
* Returns `true` if the panel/page is visible or the survey is currently in design mode.
|
6659
|
+
*
|
6660
|
+
* If you want to display or hide a question based on a condition, specify the `visibleIf` property. Refer to the following help topic for information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility).
|
6581
6661
|
*/
|
6582
6662
|
get isVisible(): boolean;
|
6583
6663
|
getIsPageVisible(exceptionQuestion: IQuestion): boolean;
|
@@ -6590,46 +6670,41 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
|
|
6590
6670
|
protected onReadOnlyChanged(): void;
|
6591
6671
|
updateElementCss(reNew?: boolean): void;
|
6592
6672
|
/*
|
6593
|
-
*
|
6594
|
-
*
|
6673
|
+
* A Boolean expression. If it evaluates to `false`, this panel/page becomes read-only.
|
6674
|
+
*
|
6675
|
+
* A survey parses and runs all expressions on startup. If any values used in the expression change, the survey re-evaluates it.
|
6676
|
+
*
|
6677
|
+
* Refer to the following help topic for more information: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#conditional-visibility)
|
6595
6678
|
*/
|
6596
6679
|
get enableIf(): string;
|
6597
6680
|
set enableIf(val: string);
|
6598
6681
|
/*
|
6599
|
-
*
|
6682
|
+
* Adds a survey element (question or panel) to this panel/page. Returns `true` if the element was added successfully; `false` otherwise.
|
6600
6683
|
*/
|
6601
6684
|
addElement(element: IElement, index?: number): boolean;
|
6602
6685
|
insertElementAfter(element: IElement, after: IElement): void;
|
6603
6686
|
insertElementBefore(element: IElement, before: IElement): void;
|
6604
6687
|
protected canAddElement(element: IElement): boolean;
|
6605
|
-
/*
|
6606
|
-
* Add a question into Panel or Page. Returns true if the question added successfully. Otherwise returns false.
|
6607
|
-
*/
|
6608
6688
|
addQuestion(question: Question, index?: number): boolean;
|
6609
|
-
/*
|
6610
|
-
* Add a panel into Panel or Page. Returns true if the panel added successfully. Otherwise returns false.
|
6611
|
-
*/
|
6612
6689
|
addPanel(panel: PanelModel, index?: number): boolean;
|
6613
6690
|
/*
|
6614
|
-
* Creates a new question
|
6691
|
+
* Creates a new question of a given type and adds it to the `elements` array at a specified index.
|
6692
|
+
*
|
6693
|
+
* This method returns `null` if the question cannot be created or added to this panel/page; otherwise, the method returns the created question.
|
6615
6694
|
*/
|
6616
6695
|
addNewQuestion(questionType: string, name?: string, index?: number): Question;
|
6617
6696
|
/*
|
6618
|
-
* Creates a new panel and adds it
|
6697
|
+
* Creates a new panel and adds it to the end of the `elements` array.
|
6698
|
+
*
|
6699
|
+
* This method returns `null` if the panel cannot be created or added to this panel/page; otherwise, the method returns the created panel.
|
6619
6700
|
*/
|
6620
6701
|
addNewPanel(name?: string): PanelModel;
|
6621
|
-
/*
|
6622
|
-
* Returns the index of element parameter in the elements list.
|
6623
|
-
*/
|
6624
6702
|
indexOf(element: IElement): number;
|
6625
6703
|
protected createNewPanel(name: string): PanelModel;
|
6626
6704
|
/*
|
6627
|
-
*
|
6705
|
+
* Deletes a survey element (question or panel) from this panel/page. Returns `true` if the element was deleted successfully; `false` otherwise.
|
6628
6706
|
*/
|
6629
6707
|
removeElement(element: IElement): boolean;
|
6630
|
-
/*
|
6631
|
-
* Remove question from the elements list.
|
6632
|
-
*/
|
6633
6708
|
removeQuestion(question: Question): void;
|
6634
6709
|
runCondition(values: any, properties: any): void;
|
6635
6710
|
onAnyValueChanged(name: string): void;
|
@@ -7009,9 +7084,9 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
|
|
7009
7084
|
surveyChoiceItemVisibilityChange(): void;
|
7010
7085
|
runCondition(values: any, properties: any): void;
|
7011
7086
|
/*
|
7012
|
-
* A question number or letter (depends on
|
7087
|
+
* A question number or letter (depends on the `questionStartIndex` property of the question container (panel, page, or survey)).
|
7013
7088
|
*
|
7014
|
-
*
|
7089
|
+
* When the question number, title, or the entire question is invisible, this property returns an empty string.
|
7015
7090
|
*/
|
7016
7091
|
get no(): string;
|
7017
7092
|
protected getStartIndex(): string;
|
@@ -7503,8 +7578,11 @@ export declare class PageModel extends PanelModelBase implements IPage {
|
|
7503
7578
|
ensureRowsVisibility(): void;
|
7504
7579
|
}
|
7505
7580
|
/*
|
7506
|
-
* A
|
7507
|
-
*
|
7581
|
+
* A class that describes the Panel container element.
|
7582
|
+
*
|
7583
|
+
* A panel can contain questions and other panels. Refer to the following help topic for an illustration: [Survey Structure](https://surveyjs.io/form-library/documentation/design-survey-create-a-simple-survey#survey-structure).
|
7584
|
+
*
|
7585
|
+
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-panel/ (linkStyle))
|
7508
7586
|
*/
|
7509
7587
|
export declare class PanelModel extends PanelModelBase implements IElement {
|
7510
7588
|
constructor(name?: string);
|
@@ -7515,7 +7593,7 @@ export declare class PanelModel extends PanelModelBase implements IElement {
|
|
7515
7593
|
protected onSetData(): void;
|
7516
7594
|
get isPanel(): boolean;
|
7517
7595
|
/*
|
7518
|
-
*
|
7596
|
+
* Returns a page to which the panel belongs and allows you to move this panel to a different page.
|
7519
7597
|
*/
|
7520
7598
|
get page(): IPage;
|
7521
7599
|
set page(val: IPage);
|
@@ -7528,7 +7606,9 @@ export declare class PanelModel extends PanelModelBase implements IElement {
|
|
7528
7606
|
get visibleIndex(): number;
|
7529
7607
|
getTitleOwner(): ITitleOwner;
|
7530
7608
|
/*
|
7531
|
-
*
|
7609
|
+
* Specifies whether to show the panel number in the title.
|
7610
|
+
*
|
7611
|
+
* Default value: `false`
|
7532
7612
|
*/
|
7533
7613
|
get showNumber(): boolean;
|
7534
7614
|
set showNumber(val: boolean);
|
@@ -7544,16 +7624,24 @@ export declare class PanelModel extends PanelModelBase implements IElement {
|
|
7544
7624
|
get showQuestionNumbers(): string;
|
7545
7625
|
set showQuestionNumbers(val: string);
|
7546
7626
|
/*
|
7547
|
-
*
|
7548
|
-
*
|
7549
|
-
* You can
|
7627
|
+
* Specifies a number or letter used to start numbering of elements inside the panel.
|
7628
|
+
*
|
7629
|
+
* You can include desired prefixes and postfixes alongside the number or letter:
|
7630
|
+
*
|
7631
|
+
* ```js
|
7632
|
+
* "questionStartIndex": "a.", // a., b., c., ...
|
7633
|
+
* "questionStartIndex": "#3", // #3, #4, #5, ...
|
7634
|
+
* "questionStartIndex": "(B)." // (B)., (C)., (D)., ...
|
7635
|
+
* ```
|
7636
|
+
* Default value: `"1."` (inherited from `SurveyModel`'s `questionStartIndex` property)
|
7550
7637
|
*/
|
7551
7638
|
get questionStartIndex(): string;
|
7552
7639
|
set questionStartIndex(val: string);
|
7553
7640
|
getQuestionStartIndex(): string;
|
7554
7641
|
/*
|
7555
|
-
*
|
7556
|
-
*
|
7642
|
+
* A question number or letter (depends on the `questionStartIndex` property).
|
7643
|
+
*
|
7644
|
+
* When the question number, title, or the entire question is invisible, this property returns an empty string.
|
7557
7645
|
*/
|
7558
7646
|
get no(): string;
|
7559
7647
|
protected setNo(visibleIndex: number): void;
|
@@ -7563,18 +7651,15 @@ export declare class PanelModel extends PanelModelBase implements IElement {
|
|
7563
7651
|
protected hasErrorsCore(rec: any): void;
|
7564
7652
|
protected getRenderedTitle(str: string): string;
|
7565
7653
|
/*
|
7566
|
-
*
|
7654
|
+
* Increases or decreases an indent of panel content from the left edge. Accepts positive integer values and 0.
|
7567
7655
|
*/
|
7568
7656
|
get innerIndent(): number;
|
7569
7657
|
set innerIndent(val: number);
|
7570
7658
|
/*
|
7571
|
-
*
|
7659
|
+
* Disable this property if you want to render the current panel on the same line or row with the previous question or panel.
|
7572
7660
|
*/
|
7573
7661
|
get startWithNewLine(): boolean;
|
7574
7662
|
set startWithNewLine(val: boolean);
|
7575
|
-
/*
|
7576
|
-
* The Panel toolbar gets adaptive if the property is set to true.
|
7577
|
-
*/
|
7578
7663
|
get allowAdaptiveActions(): boolean;
|
7579
7664
|
set allowAdaptiveActions(val: boolean);
|
7580
7665
|
get innerPaddingLeft(): string;
|
@@ -8063,6 +8148,8 @@ export declare class QuestionMultipleTextModel extends Question implements IMult
|
|
8063
8148
|
setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
|
8064
8149
|
get isAllowTitleLeft(): boolean;
|
8065
8150
|
get hasSingleInput(): boolean;
|
8151
|
+
get id(): string;
|
8152
|
+
set id(val: string);
|
8066
8153
|
onSurveyLoad(): void;
|
8067
8154
|
setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
|
8068
8155
|
onSurveyValueChanged(newValue: any): void;
|
@@ -9267,7 +9354,13 @@ export declare class QuestionDropdownModel extends QuestionSelectBase {
|
|
9267
9354
|
searchEnabled: boolean;
|
9268
9355
|
inputHasValue: boolean;
|
9269
9356
|
readOnlyText: string;
|
9357
|
+
/*
|
9358
|
+
* Enables lazy loading. If you set this property to `true`, you should implement the Survey's [`onChoicesLazyLoad`](https://surveyjs.io/form-library/documentation/surveymodel#onChoicesLazyLoad) event handler.
|
9359
|
+
*/
|
9270
9360
|
choicesLazyLoadEnabled: boolean;
|
9361
|
+
/*
|
9362
|
+
* Specifies the number of choice items to load at a time when choices are loaded on demand.
|
9363
|
+
*/
|
9271
9364
|
choicesLazyLoadPageSize: number;
|
9272
9365
|
getControlClass(): string;
|
9273
9366
|
get selectedItemLocText(): LocalizableString;
|
@@ -10395,7 +10488,13 @@ export declare class QuestionTagboxModel extends QuestionCheckboxModel {
|
|
10395
10488
|
* Specifies whether to remove selected items from the drop-down list.
|
10396
10489
|
*/
|
10397
10490
|
hideSelectedItems: boolean;
|
10491
|
+
/*
|
10492
|
+
* Enables lazy loading. If you set this property to `true`, you should implement the Survey's [`onChoicesLazyLoad`](https://surveyjs.io/form-library/documentation/surveymodel#onChoicesLazyLoad) event handler.
|
10493
|
+
*/
|
10398
10494
|
choicesLazyLoadEnabled: boolean;
|
10495
|
+
/*
|
10496
|
+
* Specifies the number of choice items to load at a time when choices are loaded on demand.
|
10497
|
+
*/
|
10399
10498
|
choicesLazyLoadPageSize: number;
|
10400
10499
|
/*
|
10401
10500
|
* A text displayed in the input field when it doesn't have a value.
|
@@ -11785,6 +11884,15 @@ export declare var defaultV2Css: {
|
|
11785
11884
|
container: string,
|
11786
11885
|
header: string,
|
11787
11886
|
body: string,
|
11887
|
+
bodyWithTimer: string,
|
11888
|
+
clockTimerRoot: string,
|
11889
|
+
clockTimerRootTop: string,
|
11890
|
+
clockTimerRootBottom: string,
|
11891
|
+
clockTimerProgress: string,
|
11892
|
+
clockTimerProgressAnimation: string,
|
11893
|
+
clockTimerTextContainer: string,
|
11894
|
+
clockTimerMinorText: string,
|
11895
|
+
clockTimerMajorText: string,
|
11788
11896
|
bodyEmpty: string,
|
11789
11897
|
footer: string,
|
11790
11898
|
title: string,
|