survey-react 1.9.57 → 1.9.59
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 +132 -173
- package/defaultV2.min.css +2 -2
- package/modern.css +38 -34
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +48 -48
- package/survey.min.css +2 -2
- package/survey.react.d.ts +210 -90
- package/survey.react.js +584 -198
- 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.59
|
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
|
*/
|
@@ -235,6 +235,7 @@ export interface IAction {
|
|
235
235
|
mode?: any;
|
236
236
|
visibleIndex?: number;
|
237
237
|
needSpace?: boolean;
|
238
|
+
ariaChecked?: boolean;
|
238
239
|
}
|
239
240
|
export interface IActionDropdownPopupOptions extends IListModel, IPopupOptionsBase {
|
240
241
|
}
|
@@ -253,6 +254,12 @@ export interface ISurveyTriggerOwner {
|
|
253
254
|
}
|
254
255
|
export interface ISurveyTimerText {
|
255
256
|
timerInfoText: string;
|
257
|
+
timerInfo: any;
|
258
|
+
timerClock: any;
|
259
|
+
getCss(): any;
|
260
|
+
isTimerPanelShowingOnBottom: boolean;
|
261
|
+
isTimerPanelShowingOnTop: boolean;
|
262
|
+
onCurrentPageChanged: EventBase<SurveyModel>;
|
256
263
|
}
|
257
264
|
export interface IConditionObject {
|
258
265
|
name: string;
|
@@ -400,6 +407,7 @@ export interface ISurvey extends ITextProcessor, ISurveyErrorOwner {
|
|
400
407
|
canChangeChoiceItemsVisibility(): boolean;
|
401
408
|
getChoiceItemVisibility(question: IQuestion, item: any, val: boolean): boolean;
|
402
409
|
loadQuestionChoices(options: any): void;
|
410
|
+
getChoiceDisplayValue(options: any): void;
|
403
411
|
matrixRowAdded(question: IQuestion, row: any): any;
|
404
412
|
matrixBeforeRowAdded(options: any): any;
|
405
413
|
matrixRowRemoved(question: IQuestion, rowIndex: number, row: any): any;
|
@@ -1700,6 +1708,7 @@ export declare class Action extends Base implements IAction, ILocalizableOwner {
|
|
1700
1708
|
disableShrink: boolean;
|
1701
1709
|
disableHide: boolean;
|
1702
1710
|
needSpace: boolean;
|
1711
|
+
ariaChecked: boolean;
|
1703
1712
|
title: string;
|
1704
1713
|
get locTitle(): any;
|
1705
1714
|
set locTitle(val: any);
|
@@ -2656,9 +2665,6 @@ export declare class MultipleTextItemModel extends Base implements IValidatorOwn
|
|
2656
2665
|
get title(): string;
|
2657
2666
|
set title(val: string);
|
2658
2667
|
get locTitle(): LocalizableString;
|
2659
|
-
/*
|
2660
|
-
* Returns the text or html for rendering the title.
|
2661
|
-
*/
|
2662
2668
|
get fullTitle(): string;
|
2663
2669
|
/*
|
2664
2670
|
* The maximum text length. If it is -1, defaul value, then the survey maxTextLength property will be used.
|
@@ -2832,7 +2838,6 @@ export declare class PopupModel<T = any> extends Base {
|
|
2832
2838
|
*/
|
2833
2839
|
export declare class PopupSurveyModel extends Base {
|
2834
2840
|
constructor(jsonObj: any, initialModel?: SurveyModel);
|
2835
|
-
static surveyElementName: string;
|
2836
2841
|
surveyValue: SurveyModel;
|
2837
2842
|
windowElement: any;
|
2838
2843
|
templateValue: string;
|
@@ -3254,13 +3259,22 @@ export declare class SurveyTimerModel extends Base {
|
|
3254
3259
|
onTimer: (page: PageModel) => void;
|
3255
3260
|
surveyValue: ISurvey;
|
3256
3261
|
text: string;
|
3262
|
+
progress: number;
|
3263
|
+
clockMajorText: string;
|
3264
|
+
clockMinorText: string;
|
3257
3265
|
spent: number;
|
3258
|
-
get survey():
|
3266
|
+
get survey(): ISurveyTimerText;
|
3259
3267
|
onCreating(): void;
|
3260
3268
|
timerFunc: any;
|
3261
3269
|
start(): void;
|
3262
3270
|
stop(): void;
|
3263
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;
|
3264
3278
|
}
|
3265
3279
|
/*
|
3266
3280
|
* Base SurveyJS validator class.
|
@@ -3689,6 +3703,7 @@ export declare class PopupDropdownViewModel extends PopupBaseViewModel {
|
|
3689
3703
|
targetElement: any;
|
3690
3704
|
isAutoScroll: boolean;
|
3691
3705
|
scrollEventCallBack: any;
|
3706
|
+
protected getActualHorizontalPosition(): "left" | "right" | "center";
|
3692
3707
|
protected hidePopup(): void;
|
3693
3708
|
protected getStyleClass(): CssClassBuilder;
|
3694
3709
|
protected getShowHeader(): boolean;
|
@@ -4000,12 +4015,12 @@ export declare class SurveyElement<E = any> extends SurveyElementCore implements
|
|
4000
4015
|
get renderWidth(): string;
|
4001
4016
|
set renderWidth(val: string);
|
4002
4017
|
/*
|
4003
|
-
* 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.
|
4004
4019
|
*/
|
4005
4020
|
get indent(): number;
|
4006
4021
|
set indent(val: number);
|
4007
4022
|
/*
|
4008
|
-
* 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.
|
4009
4024
|
*/
|
4010
4025
|
get rightIndent(): number;
|
4011
4026
|
set rightIndent(val: number);
|
@@ -4179,6 +4194,22 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
4179
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.
|
4180
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.
|
4181
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
|
+
*
|
4182
4213
|
* - `sender` - the survey object that fires the event.
|
4183
4214
|
* - `options.question` - a newly created question object.
|
4184
4215
|
*/
|
@@ -4496,8 +4527,39 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
4496
4527
|
* - `options.visible` - A Boolean value that specifies the item visibility. Set it to `false` to hide the item.
|
4497
4528
|
*/
|
4498
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
|
+
*/
|
4499
4546
|
onChoicesLazyLoad: EventBase<SurveyModel>;
|
4500
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
|
+
*/
|
4561
|
+
onGetChoiceDisplayValue: EventBase<SurveyModel>;
|
4562
|
+
/*
|
4501
4563
|
* The event is fired on adding a new row in Matrix Dynamic question.
|
4502
4564
|
* - `sender` - the survey object that fires the event
|
4503
4565
|
* - `options.question` - a matrix question.
|
@@ -5182,9 +5244,6 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
5182
5244
|
set progressBarType(val: string);
|
5183
5245
|
get isShowProgressBarOnTop(): boolean;
|
5184
5246
|
get isShowProgressBarOnBottom(): boolean;
|
5185
|
-
/*
|
5186
|
-
* Returns the text/HTML that is rendered as a survey title.
|
5187
|
-
*/
|
5188
5247
|
get processedTitle(): string;
|
5189
5248
|
/*
|
5190
5249
|
* Gets or sets question title location relative to the input field: `"top"`, `"bottom"`, or `"left"`.
|
@@ -5597,6 +5656,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
5597
5656
|
canChangeChoiceItemsVisibility(): boolean;
|
5598
5657
|
getChoiceItemVisibility(question: IQuestion, item: any, val: boolean): boolean;
|
5599
5658
|
loadQuestionChoices(options: any): void;
|
5659
|
+
getChoiceDisplayValue(options: any): void;
|
5600
5660
|
matrixBeforeRowAdded(options: any): void;
|
5601
5661
|
matrixRowAdded(question: IQuestion, row: any): void;
|
5602
5662
|
getQuestionByValueNameFromArray(valueName: string, name: string, index: number): IQuestion;
|
@@ -5876,6 +5936,8 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
5876
5936
|
get width(): string;
|
5877
5937
|
set width(val: string);
|
5878
5938
|
get renderedWidth(): string;
|
5939
|
+
get timerInfo(): any;
|
5940
|
+
get timerClock(): any;
|
5879
5941
|
get timerInfoText(): string;
|
5880
5942
|
get timerModel(): SurveyTimerModel;
|
5881
5943
|
/*
|
@@ -6272,6 +6334,7 @@ export declare class SurveyTimerPanel extends ReactSurveyElement {
|
|
6272
6334
|
constructor(props: any);
|
6273
6335
|
protected getStateElement(): Base;
|
6274
6336
|
protected get timerModel(): any;
|
6337
|
+
circleLength: any;
|
6275
6338
|
render(): JSX.Element;
|
6276
6339
|
}
|
6277
6340
|
/*
|
@@ -6372,9 +6435,7 @@ export declare class MultiSelectListModel extends ListModel {
|
|
6372
6435
|
selectFocusedItem(): void;
|
6373
6436
|
}
|
6374
6437
|
/*
|
6375
|
-
* A base class for
|
6376
|
-
*
|
6377
|
-
* [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.
|
6378
6439
|
*/
|
6379
6440
|
export declare class PanelModelBase extends SurveyElement<Question> implements IPanel, IConditionRunner, ISurveyErrorOwner, ITitleOwner {
|
6380
6441
|
constructor(name?: string);
|
@@ -6399,7 +6460,7 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
|
|
6399
6460
|
localeChanged(): void;
|
6400
6461
|
locStrsChanged(): void;
|
6401
6462
|
/*
|
6402
|
-
* Returns
|
6463
|
+
* Returns a character or text string that indicates a required panel/page.
|
6403
6464
|
*/
|
6404
6465
|
get requiredText(): string;
|
6405
6466
|
protected get titlePattern(): string;
|
@@ -6407,95 +6468,116 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
|
|
6407
6468
|
get isRequireTextBeforeTitle(): boolean;
|
6408
6469
|
get isRequireTextAfterTitle(): boolean;
|
6409
6470
|
/*
|
6410
|
-
*
|
6471
|
+
* Specifies a custom error message for a required panel/page.
|
6411
6472
|
*/
|
6412
6473
|
get requiredErrorText(): string;
|
6413
6474
|
set requiredErrorText(val: string);
|
6414
6475
|
get locRequiredErrorText(): LocalizableString;
|
6415
6476
|
/*
|
6416
|
-
*
|
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.
|
6417
6484
|
*/
|
6418
6485
|
get questionsOrder(): string;
|
6419
6486
|
set questionsOrder(val: string);
|
6420
6487
|
protected isRandomizing: boolean;
|
6421
6488
|
randomizeElements(isRandom: boolean): void;
|
6422
6489
|
/*
|
6423
|
-
*
|
6490
|
+
* Returns `true` if elements in this panel/page are arranged in random order.
|
6491
|
+
*/
|
6492
|
+
get areQuestionsRandomized(): boolean;
|
6493
|
+
/*
|
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.
|
6424
6497
|
*/
|
6425
6498
|
get parent(): PanelModelBase;
|
6426
6499
|
set parent(val: PanelModelBase);
|
6427
6500
|
get depth(): number;
|
6428
6501
|
/*
|
6429
|
-
*
|
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)
|
6430
6507
|
*/
|
6431
6508
|
get visibleIf(): string;
|
6432
6509
|
set visibleIf(val: string);
|
6433
6510
|
protected calcCssClasses(css: any): any;
|
6434
6511
|
/*
|
6435
|
-
*
|
6512
|
+
* An auto-generated unique element identifier.
|
6436
6513
|
*/
|
6437
6514
|
get id(): string;
|
6438
6515
|
set id(val: string);
|
6439
6516
|
/*
|
6440
|
-
* Returns true if the
|
6517
|
+
* Returns `true` if the survey element is a panel.
|
6441
6518
|
*/
|
6442
6519
|
get isPanel(): boolean;
|
6443
6520
|
getPanel(): IPanel;
|
6444
6521
|
getLayoutType(): string;
|
6445
6522
|
isLayoutTypeSupported(layoutType: string): boolean;
|
6446
6523
|
/*
|
6447
|
-
*
|
6524
|
+
* An array of all questions within this panel/page. Includes questions within nested panels.
|
6448
6525
|
*/
|
6449
6526
|
get questions(): any;
|
6450
6527
|
protected getValidName(name: string): string;
|
6451
6528
|
/*
|
6452
|
-
* Returns
|
6529
|
+
* Returns a question with a specified `name`. This method does not find questions within nested panels.
|
6453
6530
|
*/
|
6454
6531
|
getQuestionByName(name: string): Question;
|
6455
6532
|
/*
|
6456
|
-
* Returns
|
6533
|
+
* Returns a survey element with a specified `name`. This method can find survey elements within nested elements.
|
6457
6534
|
*/
|
6458
6535
|
getElementByName(name: string): IElement;
|
6459
6536
|
getQuestionByValueName(valueName: string): Question;
|
6460
6537
|
/*
|
6461
|
-
* Returns question values
|
6538
|
+
* Returns a JSON object with question values nested in the panel/page.
|
6462
6539
|
*/
|
6463
6540
|
getValue(): any;
|
6464
6541
|
/*
|
6465
|
-
*
|
6542
|
+
* Returns a JSON object with display texts that correspond to question values nested in the panel/page.
|
6466
6543
|
*/
|
6467
6544
|
getDisplayValue(keysAsText: boolean): any;
|
6468
6545
|
/*
|
6469
|
-
* Returns
|
6546
|
+
* Returns a JSON object with comments left to questions within this panel/page. Question names are used as keys.
|
6470
6547
|
*/
|
6471
6548
|
getComments(): any;
|
6472
6549
|
/*
|
6473
|
-
*
|
6474
|
-
*
|
6475
|
-
*
|
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.
|
6476
6555
|
*/
|
6477
6556
|
clearIncorrectValues(): void;
|
6478
6557
|
/*
|
6479
|
-
*
|
6558
|
+
* Empties the `errors` array for this panel/page and all its child elements (panels and questions).
|
6480
6559
|
*/
|
6481
6560
|
clearErrors(): void;
|
6482
6561
|
/*
|
6483
|
-
*
|
6562
|
+
* An array of all survey elements (questions or panels) within this panel/page. Does not include questions within nested panels.
|
6484
6563
|
*/
|
6485
6564
|
get elements(): any;
|
6486
6565
|
getElementsInDesign(includeHidden?: boolean): Array<IElement>;
|
6487
6566
|
/*
|
6488
|
-
*
|
6567
|
+
* Checks whether a given element belongs to this panel/page or nested panels.
|
6489
6568
|
*/
|
6490
6569
|
containsElement(element: IElement): boolean;
|
6491
6570
|
/*
|
6492
|
-
*
|
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.
|
6493
6572
|
*/
|
6494
6573
|
get isRequired(): boolean;
|
6495
6574
|
set isRequired(val: boolean);
|
6496
6575
|
/*
|
6497
|
-
*
|
6498
|
-
*
|
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)
|
6499
6581
|
*/
|
6500
6582
|
get requiredIf(): string;
|
6501
6583
|
set requiredIf(val: string);
|
@@ -6510,28 +6592,34 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
|
|
6510
6592
|
updateElementVisibility(): void;
|
6511
6593
|
getFirstQuestionToFocus(withError?: boolean, ignoreCollapseState?: boolean): Question;
|
6512
6594
|
/*
|
6513
|
-
*
|
6595
|
+
* Sets focus on the input of the first question in this panel/page.
|
6514
6596
|
*/
|
6515
6597
|
focusFirstQuestion(): void;
|
6516
6598
|
/*
|
6517
|
-
*
|
6599
|
+
* Sets focus on the input of the first question in this panel/page that has an error.
|
6518
6600
|
*/
|
6519
6601
|
focusFirstErrorQuestion(): void;
|
6520
|
-
/*
|
6521
|
-
* Fill list array with the questions.
|
6522
|
-
*/
|
6523
6602
|
addQuestionsToList(list: any, visibleOnly?: boolean, includingDesignTime?: boolean): void;
|
6524
|
-
/*
|
6525
|
-
* Fill list array with the panels.
|
6526
|
-
*/
|
6527
6603
|
addPanelsIntoList(list: any, visibleOnly?: boolean, includingDesignTime?: boolean): void;
|
6528
6604
|
/*
|
6529
|
-
* Returns true if
|
6605
|
+
* Returns `true` if this is the current page.
|
6530
6606
|
*/
|
6531
6607
|
get isActive(): boolean;
|
6532
6608
|
updateCustomWidgets(): void;
|
6533
6609
|
/*
|
6534
|
-
*
|
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.
|
6535
6623
|
*/
|
6536
6624
|
get questionTitleLocation(): string;
|
6537
6625
|
set questionTitleLocation(val: string);
|
@@ -6556,19 +6644,20 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
|
|
6556
6644
|
protected getDragDropInfo(): any;
|
6557
6645
|
protected updateRowsRemoveElementFromRow(element: IElement, row: QuestionRowModel): void;
|
6558
6646
|
elementWidthChanged(el: IElement): void;
|
6559
|
-
/*
|
6560
|
-
* Returns rendered title text or html.
|
6561
|
-
*/
|
6562
6647
|
get processedTitle(): string;
|
6563
6648
|
protected getRenderedTitle(str: string): string;
|
6564
6649
|
/*
|
6565
|
-
*
|
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).
|
6566
6653
|
*/
|
6567
6654
|
get visible(): boolean;
|
6568
6655
|
set visible(val: boolean);
|
6569
6656
|
protected onVisibleChanged(): void;
|
6570
6657
|
/*
|
6571
|
-
* 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).
|
6572
6661
|
*/
|
6573
6662
|
get isVisible(): boolean;
|
6574
6663
|
getIsPageVisible(exceptionQuestion: IQuestion): boolean;
|
@@ -6581,46 +6670,41 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
|
|
6581
6670
|
protected onReadOnlyChanged(): void;
|
6582
6671
|
updateElementCss(reNew?: boolean): void;
|
6583
6672
|
/*
|
6584
|
-
*
|
6585
|
-
*
|
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)
|
6586
6678
|
*/
|
6587
6679
|
get enableIf(): string;
|
6588
6680
|
set enableIf(val: string);
|
6589
6681
|
/*
|
6590
|
-
*
|
6682
|
+
* Adds a survey element (question or panel) to this panel/page. Returns `true` if the element was added successfully; `false` otherwise.
|
6591
6683
|
*/
|
6592
6684
|
addElement(element: IElement, index?: number): boolean;
|
6593
6685
|
insertElementAfter(element: IElement, after: IElement): void;
|
6594
6686
|
insertElementBefore(element: IElement, before: IElement): void;
|
6595
6687
|
protected canAddElement(element: IElement): boolean;
|
6596
|
-
/*
|
6597
|
-
* Add a question into Panel or Page. Returns true if the question added successfully. Otherwise returns false.
|
6598
|
-
*/
|
6599
6688
|
addQuestion(question: Question, index?: number): boolean;
|
6600
|
-
/*
|
6601
|
-
* Add a panel into Panel or Page. Returns true if the panel added successfully. Otherwise returns false.
|
6602
|
-
*/
|
6603
6689
|
addPanel(panel: PanelModel, index?: number): boolean;
|
6604
6690
|
/*
|
6605
|
-
* 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.
|
6606
6694
|
*/
|
6607
6695
|
addNewQuestion(questionType: string, name?: string, index?: number): Question;
|
6608
6696
|
/*
|
6609
|
-
* 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.
|
6610
6700
|
*/
|
6611
6701
|
addNewPanel(name?: string): PanelModel;
|
6612
|
-
/*
|
6613
|
-
* Returns the index of element parameter in the elements list.
|
6614
|
-
*/
|
6615
6702
|
indexOf(element: IElement): number;
|
6616
6703
|
protected createNewPanel(name: string): PanelModel;
|
6617
6704
|
/*
|
6618
|
-
*
|
6705
|
+
* Deletes a survey element (question or panel) from this panel/page. Returns `true` if the element was deleted successfully; `false` otherwise.
|
6619
6706
|
*/
|
6620
6707
|
removeElement(element: IElement): boolean;
|
6621
|
-
/*
|
6622
|
-
* Remove question from the elements list.
|
6623
|
-
*/
|
6624
6708
|
removeQuestion(question: Question): void;
|
6625
6709
|
runCondition(values: any, properties: any): void;
|
6626
6710
|
onAnyValueChanged(name: string): void;
|
@@ -6690,6 +6774,7 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
|
|
6690
6774
|
get isReady(): boolean;
|
6691
6775
|
get ariaRequired(): "true" | "false";
|
6692
6776
|
get ariaInvalid(): "true" | "false";
|
6777
|
+
get ariaLabelledBy(): string;
|
6693
6778
|
get ariaDescribedBy(): string;
|
6694
6779
|
choicesLoaded(): void;
|
6695
6780
|
/*
|
@@ -6806,7 +6891,7 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
|
|
6806
6891
|
*
|
6807
6892
|
* Possible values:
|
6808
6893
|
*
|
6809
|
-
* - `"default"` - Inherits the setting from the `questionTitleLocation` property specified for the question's container.
|
6894
|
+
* - `"default"` (default) - Inherits the setting from the `questionTitleLocation` property specified for the question's container.
|
6810
6895
|
* - `"top"` - Displays the title above the input field.
|
6811
6896
|
* - `"bottom"` - Displays the title below the input field.
|
6812
6897
|
* - `"left"` - Displays the title to the left of the input field.
|
@@ -6999,9 +7084,9 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
|
|
6999
7084
|
surveyChoiceItemVisibilityChange(): void;
|
7000
7085
|
runCondition(values: any, properties: any): void;
|
7001
7086
|
/*
|
7002
|
-
* 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)).
|
7003
7088
|
*
|
7004
|
-
*
|
7089
|
+
* When the question number, title, or the entire question is invisible, this property returns an empty string.
|
7005
7090
|
*/
|
7006
7091
|
get no(): string;
|
7007
7092
|
protected getStartIndex(): string;
|
@@ -7171,6 +7256,7 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
|
|
7171
7256
|
updateValueFromSurvey(newValue: any): void;
|
7172
7257
|
updateCommentFromSurvey(newValue: any): any;
|
7173
7258
|
protected onChangeQuestionValue(newValue: any): void;
|
7259
|
+
protected setValueChangedDirectly(): void;
|
7174
7260
|
protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
|
7175
7261
|
onSurveyValueChanged(newValue: any): void;
|
7176
7262
|
setVisibleIndex(val: number): number;
|
@@ -7466,10 +7552,6 @@ export declare class PageModel extends PanelModelBase implements IPage {
|
|
7466
7552
|
get hasShown(): boolean;
|
7467
7553
|
setWasShown(val: boolean): void;
|
7468
7554
|
/*
|
7469
|
-
* The property returns true, if the elements are randomized on the page
|
7470
|
-
*/
|
7471
|
-
get areQuestionsRandomized(): boolean;
|
7472
|
-
/*
|
7473
7555
|
* Call it to scroll to the page top.
|
7474
7556
|
*/
|
7475
7557
|
scrollToTop(): void;
|
@@ -7496,8 +7578,11 @@ export declare class PageModel extends PanelModelBase implements IPage {
|
|
7496
7578
|
ensureRowsVisibility(): void;
|
7497
7579
|
}
|
7498
7580
|
/*
|
7499
|
-
* A
|
7500
|
-
*
|
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))
|
7501
7586
|
*/
|
7502
7587
|
export declare class PanelModel extends PanelModelBase implements IElement {
|
7503
7588
|
constructor(name?: string);
|
@@ -7508,7 +7593,7 @@ export declare class PanelModel extends PanelModelBase implements IElement {
|
|
7508
7593
|
protected onSetData(): void;
|
7509
7594
|
get isPanel(): boolean;
|
7510
7595
|
/*
|
7511
|
-
*
|
7596
|
+
* Returns a page to which the panel belongs and allows you to move this panel to a different page.
|
7512
7597
|
*/
|
7513
7598
|
get page(): IPage;
|
7514
7599
|
set page(val: IPage);
|
@@ -7521,7 +7606,9 @@ export declare class PanelModel extends PanelModelBase implements IElement {
|
|
7521
7606
|
get visibleIndex(): number;
|
7522
7607
|
getTitleOwner(): ITitleOwner;
|
7523
7608
|
/*
|
7524
|
-
*
|
7609
|
+
* Specifies whether to show the panel number in the title.
|
7610
|
+
*
|
7611
|
+
* Default value: `false`
|
7525
7612
|
*/
|
7526
7613
|
get showNumber(): boolean;
|
7527
7614
|
set showNumber(val: boolean);
|
@@ -7537,16 +7624,24 @@ export declare class PanelModel extends PanelModelBase implements IElement {
|
|
7537
7624
|
get showQuestionNumbers(): string;
|
7538
7625
|
set showQuestionNumbers(val: string);
|
7539
7626
|
/*
|
7540
|
-
*
|
7541
|
-
*
|
7542
|
-
* 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)
|
7543
7637
|
*/
|
7544
7638
|
get questionStartIndex(): string;
|
7545
7639
|
set questionStartIndex(val: string);
|
7546
7640
|
getQuestionStartIndex(): string;
|
7547
7641
|
/*
|
7548
|
-
*
|
7549
|
-
*
|
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.
|
7550
7645
|
*/
|
7551
7646
|
get no(): string;
|
7552
7647
|
protected setNo(visibleIndex: number): void;
|
@@ -7556,18 +7651,15 @@ export declare class PanelModel extends PanelModelBase implements IElement {
|
|
7556
7651
|
protected hasErrorsCore(rec: any): void;
|
7557
7652
|
protected getRenderedTitle(str: string): string;
|
7558
7653
|
/*
|
7559
|
-
*
|
7654
|
+
* Increases or decreases an indent of panel content from the left edge. Accepts positive integer values and 0.
|
7560
7655
|
*/
|
7561
7656
|
get innerIndent(): number;
|
7562
7657
|
set innerIndent(val: number);
|
7563
7658
|
/*
|
7564
|
-
*
|
7659
|
+
* Disable this property if you want to render the current panel on the same line or row with the previous question or panel.
|
7565
7660
|
*/
|
7566
7661
|
get startWithNewLine(): boolean;
|
7567
7662
|
set startWithNewLine(val: boolean);
|
7568
|
-
/*
|
7569
|
-
* The Panel toolbar gets adaptive if the property is set to true.
|
7570
|
-
*/
|
7571
7663
|
get allowAdaptiveActions(): boolean;
|
7572
7664
|
set allowAdaptiveActions(val: boolean);
|
7573
7665
|
get innerPaddingLeft(): string;
|
@@ -7611,6 +7703,7 @@ export declare class QuestionBooleanModel extends Question {
|
|
7611
7703
|
set defaultValue(val: any);
|
7612
7704
|
getDefaultValue(): any;
|
7613
7705
|
get locTitle(): LocalizableString;
|
7706
|
+
get labelRenderedAriaID(): string;
|
7614
7707
|
showTitle: boolean;
|
7615
7708
|
get label(): string;
|
7616
7709
|
set label(val: string);
|
@@ -8055,6 +8148,8 @@ export declare class QuestionMultipleTextModel extends Question implements IMult
|
|
8055
8148
|
setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
|
8056
8149
|
get isAllowTitleLeft(): boolean;
|
8057
8150
|
get hasSingleInput(): boolean;
|
8151
|
+
get id(): string;
|
8152
|
+
set id(val: string);
|
8058
8153
|
onSurveyLoad(): void;
|
8059
8154
|
setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
|
8060
8155
|
onSurveyValueChanged(newValue: any): void;
|
@@ -8610,6 +8705,7 @@ export declare class QuestionSelectBase extends Question {
|
|
8610
8705
|
noneItemValue: ItemValue;
|
8611
8706
|
newItemValue: ItemValue;
|
8612
8707
|
canShowOptionItemCallback: (item: ItemValue) => boolean;
|
8708
|
+
protected selectedItemValues: any;
|
8613
8709
|
getType(): string;
|
8614
8710
|
dispose(): void;
|
8615
8711
|
protected getItemValueType(): string;
|
@@ -8701,6 +8797,8 @@ export declare class QuestionSelectBase extends Question {
|
|
8701
8797
|
protected rendredValueToData(val: any): any;
|
8702
8798
|
protected renderedValueFromDataCore(val: any): any;
|
8703
8799
|
protected rendredValueToDataCore(val: any): any;
|
8800
|
+
protected updateSelectedItemValues(): void;
|
8801
|
+
protected resetSelectedItemValues(): void;
|
8704
8802
|
protected hasUnknownValue(val: any, includeOther?: boolean, isFilteredChoices?: boolean, checkEmptyValue?: boolean): boolean;
|
8705
8803
|
protected isValueDisabled(val: any): boolean;
|
8706
8804
|
/*
|
@@ -9256,7 +9354,13 @@ export declare class QuestionDropdownModel extends QuestionSelectBase {
|
|
9256
9354
|
searchEnabled: boolean;
|
9257
9355
|
inputHasValue: boolean;
|
9258
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
|
+
*/
|
9259
9360
|
choicesLazyLoadEnabled: boolean;
|
9361
|
+
/*
|
9362
|
+
* Specifies the number of choice items to load at a time when choices are loaded on demand.
|
9363
|
+
*/
|
9260
9364
|
choicesLazyLoadPageSize: number;
|
9261
9365
|
getControlClass(): string;
|
9262
9366
|
get selectedItemLocText(): LocalizableString;
|
@@ -9856,6 +9960,7 @@ export declare class QuestionCheckboxModel extends QuestionCheckboxBase {
|
|
9856
9960
|
constructor(name: string);
|
9857
9961
|
selectAllItemValue: ItemValue;
|
9858
9962
|
invisibleOldValues: any;
|
9963
|
+
initialSelectedItemValues: any;
|
9859
9964
|
protected getDefaultItemComponent(): string;
|
9860
9965
|
get ariaRole(): string;
|
9861
9966
|
getType(): string;
|
@@ -10383,7 +10488,13 @@ export declare class QuestionTagboxModel extends QuestionCheckboxModel {
|
|
10383
10488
|
* Specifies whether to remove selected items from the drop-down list.
|
10384
10489
|
*/
|
10385
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
|
+
*/
|
10386
10494
|
choicesLazyLoadEnabled: boolean;
|
10495
|
+
/*
|
10496
|
+
* Specifies the number of choice items to load at a time when choices are loaded on demand.
|
10497
|
+
*/
|
10387
10498
|
choicesLazyLoadPageSize: number;
|
10388
10499
|
/*
|
10389
10500
|
* A text displayed in the input field when it doesn't have a value.
|
@@ -11773,6 +11884,15 @@ export declare var defaultV2Css: {
|
|
11773
11884
|
container: string,
|
11774
11885
|
header: string,
|
11775
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,
|
11776
11896
|
bodyEmpty: string,
|
11777
11897
|
footer: string,
|
11778
11898
|
title: string,
|