survey-react 1.9.82 → 1.9.84
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 +70 -55
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +21 -21
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +6 -6
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +678 -637
- package/survey.react.js +489 -204
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.d.ts
CHANGED
@@ -338,11 +338,11 @@ declare module "settings" {
|
|
338
338
|
imagepicker: string[];
|
339
339
|
};
|
340
340
|
/**
|
341
|
-
* Specifies a minimum date that users can enter into a [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) question with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"date"
|
341
|
+
* Specifies a minimum date that users can enter into a [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) question with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"date"` or `"datetime-local"`. Set this property to a string with the folllowing format: `"yyyy-mm-dd"`.
|
342
342
|
*/
|
343
343
|
minDate: string;
|
344
344
|
/**
|
345
|
-
* Specifies a maximum date that users can enter into a [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) question with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"date"
|
345
|
+
* Specifies a maximum date that users can enter into a [Text](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model) question with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"date"` or `"datetime-local"`. Set this property to a string with the folllowing format: `"yyyy-mm-dd"`.
|
346
346
|
*/
|
347
347
|
maxDate: string;
|
348
348
|
showModal: (componentName: string, data: any, onApply: () => boolean, onCancel?: () => void, cssClass?: string, title?: string, displayMode?: "popup" | "overlay") => any;
|
@@ -1457,6 +1457,7 @@ declare module "actions/container" {
|
|
1457
1457
|
initResponsivityManager(container: HTMLDivElement): void;
|
1458
1458
|
resetResponsivityManager(): void;
|
1459
1459
|
getActionById(id: string): T;
|
1460
|
+
dispose(): void;
|
1460
1461
|
}
|
1461
1462
|
}
|
1462
1463
|
declare module "element-helper" {
|
@@ -1576,6 +1577,7 @@ declare module "list" {
|
|
1576
1577
|
scrollToFocusedItem(): void;
|
1577
1578
|
addScrollEventListener(handler: (e?: any) => void): void;
|
1578
1579
|
removeScrollEventListener(): void;
|
1580
|
+
dispose(): void;
|
1579
1581
|
}
|
1580
1582
|
}
|
1581
1583
|
declare module "utils/popup" {
|
@@ -3664,7 +3666,7 @@ declare module "question_baseselect" {
|
|
3664
3666
|
get otherId(): string;
|
3665
3667
|
protected getCommentElementsId(): Array<string>;
|
3666
3668
|
protected getItemValueType(): string;
|
3667
|
-
createItemValue(value: any): ItemValue;
|
3669
|
+
createItemValue(value: any, text?: string): ItemValue;
|
3668
3670
|
supportGoNextPageError(): boolean;
|
3669
3671
|
isLayoutTypeSupported(layoutType: string): boolean;
|
3670
3672
|
localeChanged(): void;
|
@@ -3975,7 +3977,7 @@ declare module "question_baseselect" {
|
|
3975
3977
|
protected updateChoicesDependedQuestions(): void;
|
3976
3978
|
onSurveyValueChanged(newValue: any): void;
|
3977
3979
|
protected onVisibleChoicesChanged(): void;
|
3978
|
-
|
3980
|
+
protected isVisibleCore(): boolean;
|
3979
3981
|
private sortVisibleChoices;
|
3980
3982
|
private sortArray;
|
3981
3983
|
private randomizeArray;
|
@@ -4171,13 +4173,12 @@ declare module "question_paneldynamic" {
|
|
4171
4173
|
/**
|
4172
4174
|
* A class that describes the Dynamic Panel question type.
|
4173
4175
|
*
|
4174
|
-
* Dynamic Panel allows respondents to add panels based on a template
|
4176
|
+
* Dynamic Panel allows respondents to add panels based on a panel template and delete them. Specify the [`templateElements`](https://surveyjs.io/form-library/documentation/questionpaneldynamicmodel#templateElements) property to configure panel template elements.
|
4175
4177
|
*
|
4176
4178
|
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/ (linkStyle))
|
4177
4179
|
*/
|
4178
4180
|
export class QuestionPanelDynamicModel extends Question implements IQuestionPanelDynamicData {
|
4179
4181
|
private templateValue;
|
4180
|
-
private loadingPanelCount;
|
4181
4182
|
private isValueChangingInternally;
|
4182
4183
|
private changingValueQuestion;
|
4183
4184
|
renderModeChangedCallback: () => void;
|
@@ -4207,14 +4208,14 @@ declare module "question_paneldynamic" {
|
|
4207
4208
|
get template(): PanelModel;
|
4208
4209
|
getPanel(): IPanel;
|
4209
4210
|
/**
|
4210
|
-
* An array of questions and panels included in
|
4211
|
+
* An array of questions and panels included in a panel template.
|
4211
4212
|
* @see template
|
4212
4213
|
* @see panels
|
4213
4214
|
* @see panelCount
|
4214
4215
|
*/
|
4215
4216
|
get templateElements(): Array<IElement>;
|
4216
4217
|
/**
|
4217
|
-
* A
|
4218
|
+
* A template for panel titles.
|
4218
4219
|
* @see template
|
4219
4220
|
* @see templateDescription
|
4220
4221
|
* @see templateElements
|
@@ -4225,7 +4226,15 @@ declare module "question_paneldynamic" {
|
|
4225
4226
|
set templateTitle(newValue: string);
|
4226
4227
|
get locTemplateTitle(): LocalizableString;
|
4227
4228
|
/**
|
4228
|
-
* A
|
4229
|
+
* A template for tab titles. Applies when [`renderMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#renderMode) is `"tab"`.
|
4230
|
+
* @see templateTitle
|
4231
|
+
* @see renderMode
|
4232
|
+
*/
|
4233
|
+
get templateTabTitle(): string;
|
4234
|
+
set templateTabTitle(newValue: string);
|
4235
|
+
get locTemplateTabTitle(): LocalizableString;
|
4236
|
+
/**
|
4237
|
+
* A template for panel descriptions.
|
4229
4238
|
* @see template
|
4230
4239
|
* @see templateTitle
|
4231
4240
|
* @see templateElements
|
@@ -4237,7 +4246,7 @@ declare module "question_paneldynamic" {
|
|
4237
4246
|
get locTemplateDescription(): LocalizableString;
|
4238
4247
|
protected get items(): Array<ISurveyData>;
|
4239
4248
|
/**
|
4240
|
-
* An array of `PanelModel` objects created based on
|
4249
|
+
* An array of `PanelModel` objects created based on a panel template.
|
4241
4250
|
* @see PanelModel
|
4242
4251
|
* @see template
|
4243
4252
|
* @see panelCount
|
@@ -4424,7 +4433,7 @@ declare module "question_paneldynamic" {
|
|
4424
4433
|
get allowRemovePanel(): boolean;
|
4425
4434
|
set allowRemovePanel(val: boolean);
|
4426
4435
|
/**
|
4427
|
-
* Gets or sets the location of question titles
|
4436
|
+
* Gets or sets the location of question titles relative to their input fields.
|
4428
4437
|
*
|
4429
4438
|
* - `"default"` (default) - Inherits the setting from the Dynamic Panel's `titleLocation` property, which in turn inherits the [`questionTitleLocation`](https://surveyjs.io/form-library/documentation/surveymodel#questionTitleLocation) property value specified for the Dynamic Panel's container (page or survey).
|
4430
4439
|
* - `"top"` - Displays question titles above input fields.
|
@@ -4460,7 +4469,15 @@ declare module "question_paneldynamic" {
|
|
4460
4469
|
get showRangeInProgress(): boolean;
|
4461
4470
|
set showRangeInProgress(val: boolean);
|
4462
4471
|
/**
|
4463
|
-
*
|
4472
|
+
* Specifies how to render panels.
|
4473
|
+
*
|
4474
|
+
* Possible values:
|
4475
|
+
*
|
4476
|
+
* - `"list"` - Renders panels one under the other. [View Demo](https://surveyjs.io/form-library/examples/how-to-use-expressions-in-dynamic-panel/)
|
4477
|
+
* - `"progressTop"` - Renders each panel as a card and displays a progress bar at the top. [View Demo](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/)
|
4478
|
+
* - `"progressBottom"` - Renders each panel panel as a card and displays a progress bar at the bottom.
|
4479
|
+
* - `"progressTopBottom"` - Renders each panel as a card and displays a progress bar at the top and bottom.
|
4480
|
+
* - `"tab"` - Renders each panel within a tab. Use the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) to specify a template for tab titles.
|
4464
4481
|
*/
|
4465
4482
|
get renderMode(): string;
|
4466
4483
|
set renderMode(val: string);
|
@@ -4568,6 +4585,7 @@ declare module "question_paneldynamic" {
|
|
4568
4585
|
*/
|
4569
4586
|
removePanel(value: any): void;
|
4570
4587
|
private getPanelIndex;
|
4588
|
+
private getPanelIndexById;
|
4571
4589
|
locStrsChanged(): void;
|
4572
4590
|
clearIncorrectValues(): void;
|
4573
4591
|
clearErrors(): void;
|
@@ -5302,7 +5320,8 @@ declare module "question_matrixdropdownrendered" {
|
|
5302
5320
|
get allowRowsDragAndDrop(): boolean;
|
5303
5321
|
protected build(): void;
|
5304
5322
|
updateShowTableAndAddRow(): void;
|
5305
|
-
onAddedRow(): void;
|
5323
|
+
onAddedRow(row: MatrixDropdownRowModelBase, index: number): void;
|
5324
|
+
private getRenderedRowIndexByIndex;
|
5306
5325
|
private getRenderedDataRowCount;
|
5307
5326
|
onRemovedRow(row: MatrixDropdownRowModelBase): void;
|
5308
5327
|
onDetailPanelChangeVisibility(row: MatrixDropdownRowModelBase, isShowing: boolean): void;
|
@@ -5434,7 +5453,8 @@ declare module "question_matrixdynamic" {
|
|
5434
5453
|
protected isDefaultValueEmpty(): boolean;
|
5435
5454
|
protected valueFromData(val: any): any;
|
5436
5455
|
protected setDefaultValue(): void;
|
5437
|
-
moveRowByIndex
|
5456
|
+
moveRowByIndex(fromIndex: number, toIndex: number): void;
|
5457
|
+
clearOnDrop(): void;
|
5438
5458
|
/**
|
5439
5459
|
* The number of rows in the matrix.
|
5440
5460
|
* @see minRowCount
|
@@ -5615,6 +5635,9 @@ declare module "question_matrixdynamic" {
|
|
5615
5635
|
protected getUniqueColumns(): Array<MatrixDropdownColumn>;
|
5616
5636
|
protected generateRows(): Array<MatrixDynamicRowModel>;
|
5617
5637
|
protected createMatrixRow(value: any): MatrixDynamicRowModel;
|
5638
|
+
private lastDeletedRow;
|
5639
|
+
private getInsertedDeletedIndex;
|
5640
|
+
private isEditingObjectValueChanged;
|
5618
5641
|
protected onBeforeValueChanged(val: any): void;
|
5619
5642
|
protected createNewValue(): any;
|
5620
5643
|
protected deleteRowValue(newValue: any, row: MatrixDropdownRowModelBase): any;
|
@@ -7996,13 +8019,18 @@ declare module "survey" {
|
|
7996
8019
|
protected isLogoImageChoosen(): string;
|
7997
8020
|
get titleMaxWidth(): string;
|
7998
8021
|
/**
|
7999
|
-
*
|
8022
|
+
* An image to display in the background of the survey or form. Accepts a base64 or URL string value.
|
8023
|
+
* @see backgroundOpacity
|
8000
8024
|
*/
|
8001
8025
|
get backgroundImage(): string;
|
8002
8026
|
set backgroundImage(value: string);
|
8003
8027
|
get locBackgroundImage(): LocalizableString;
|
8004
8028
|
renderBackgroundImage: string;
|
8005
8029
|
private updateRenderBackgroundImage;
|
8030
|
+
/**
|
8031
|
+
* A value from 0 to 1 that specifies how transparent the survey background should be: 0 makes the background completely transparent, and 1 makes it opaque.
|
8032
|
+
* @see backgroundImage
|
8033
|
+
*/
|
8006
8034
|
get backgroundOpacity(): number;
|
8007
8035
|
set backgroundOpacity(val: number);
|
8008
8036
|
get renderBackgroundOpacity(): string;
|
@@ -10243,6 +10271,7 @@ declare module "question" {
|
|
10243
10271
|
* @see isParentVisible
|
10244
10272
|
*/
|
10245
10273
|
get isVisible(): boolean;
|
10274
|
+
protected isVisibleCore(): boolean;
|
10246
10275
|
/**
|
10247
10276
|
* Returns the visible index of the question in the survey. It can be from 0 to all visible questions count - 1
|
10248
10277
|
* The visibleIndex is -1 if the title is 'hidden' or hideNumber is true
|
@@ -11206,6 +11235,7 @@ declare module "question_matrixdropdownbase" {
|
|
11206
11235
|
protected clearRowsAndResetRenderedTable(): void;
|
11207
11236
|
protected resetRenderedTable(): void;
|
11208
11237
|
protected clearGeneratedRows(): void;
|
11238
|
+
protected get isRendredTableCreated(): boolean;
|
11209
11239
|
get renderedTable(): QuestionMatrixDropdownRenderedTable;
|
11210
11240
|
protected createRenderedTable(): QuestionMatrixDropdownRenderedTable;
|
11211
11241
|
protected onMatrixRowCreated(row: MatrixDropdownRowModelBase): void;
|
@@ -11695,206 +11725,601 @@ declare module "base-interfaces" {
|
|
11695
11725
|
data?: any;
|
11696
11726
|
}
|
11697
11727
|
}
|
11698
|
-
declare module "
|
11699
|
-
import {
|
11700
|
-
import {
|
11701
|
-
import {
|
11702
|
-
import {
|
11728
|
+
declare module "question_dropdown" {
|
11729
|
+
import { QuestionSelectBase } from "question_baseselect";
|
11730
|
+
import { LocalizableString } from "localizablestring";
|
11731
|
+
import { ItemValue } from "itemvalue";
|
11732
|
+
import { PopupModel } from "popup";
|
11733
|
+
import { EventBase } from "base";
|
11734
|
+
import { DropdownListModel } from "dropdownListModel";
|
11703
11735
|
/**
|
11704
|
-
*
|
11705
|
-
*
|
11706
|
-
*
|
11736
|
+
* A class that describes the Dropdown question type.
|
11737
|
+
*
|
11738
|
+
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-dropdown/ (linkStyle))
|
11707
11739
|
*/
|
11708
|
-
export class
|
11709
|
-
|
11710
|
-
|
11711
|
-
|
11712
|
-
|
11713
|
-
|
11714
|
-
|
11715
|
-
|
11716
|
-
|
11740
|
+
export class QuestionDropdownModel extends QuestionSelectBase {
|
11741
|
+
dropdownListModelValue: DropdownListModel;
|
11742
|
+
lastSelectedItemValue: ItemValue;
|
11743
|
+
updateReadOnlyText(): void;
|
11744
|
+
constructor(name: string);
|
11745
|
+
locStrsChanged(): void;
|
11746
|
+
get showOptionsCaption(): boolean;
|
11747
|
+
set showOptionsCaption(val: boolean);
|
11748
|
+
get optionsCaption(): string;
|
11749
|
+
set optionsCaption(val: string);
|
11717
11750
|
/**
|
11718
|
-
*
|
11751
|
+
* A placeholder for the input field.
|
11719
11752
|
*/
|
11720
|
-
|
11721
|
-
|
11722
|
-
|
11723
|
-
|
11724
|
-
|
11725
|
-
|
11726
|
-
static runEnabledConditionsForItems(items: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
|
11727
|
-
private static runConditionsForItemsCore;
|
11728
|
-
ownerPropertyName: string;
|
11729
|
-
private _visible;
|
11730
|
-
private locTextValue;
|
11731
|
-
private visibleConditionRunner;
|
11732
|
-
private enableConditionRunner;
|
11733
|
-
constructor(value: any, text?: string, typeName?: string);
|
11734
|
-
onCreating(): any;
|
11735
|
-
getType(): string;
|
11736
|
-
getSurvey(live?: boolean): ISurvey;
|
11737
|
-
getLocale(): string;
|
11738
|
-
get locText(): LocalizableString;
|
11739
|
-
setLocText(locText: LocalizableString): void;
|
11740
|
-
private _locOwner;
|
11741
|
-
get locOwner(): ILocalizableOwner;
|
11742
|
-
set locOwner(value: ILocalizableOwner);
|
11743
|
-
get value(): any;
|
11744
|
-
set value(newValue: any);
|
11745
|
-
get hasText(): boolean;
|
11746
|
-
get pureText(): string;
|
11747
|
-
set pureText(val: string);
|
11748
|
-
get text(): string;
|
11749
|
-
set text(newText: string);
|
11750
|
-
get calculatedText(): string;
|
11751
|
-
get shortcutText(): string;
|
11752
|
-
private canSerializeValue;
|
11753
|
-
getData(): any;
|
11754
|
-
toJSON(): any;
|
11755
|
-
setData(value: any): void;
|
11756
|
-
get visibleIf(): string;
|
11757
|
-
set visibleIf(val: string);
|
11758
|
-
get enableIf(): string;
|
11759
|
-
set enableIf(val: string);
|
11760
|
-
get isVisible(): any;
|
11761
|
-
setIsVisible(val: boolean): void;
|
11762
|
-
get isEnabled(): any;
|
11763
|
-
setIsEnabled(val: boolean): void;
|
11764
|
-
addUsedLocales(locales: Array<string>): void;
|
11765
|
-
locStrsChanged(): void;
|
11766
|
-
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
11767
|
-
protected getConditionRunner(isVisible: boolean): ConditionRunner;
|
11768
|
-
private getVisibleConditionRunner;
|
11769
|
-
private getEnableConditionRunner;
|
11770
|
-
originalItem: any;
|
11771
|
-
selectedValue: boolean;
|
11772
|
-
get selected(): boolean;
|
11773
|
-
private componentValue;
|
11774
|
-
getComponent(): string;
|
11775
|
-
setComponent(val: string): void;
|
11776
|
-
protected getEnabled(): boolean;
|
11777
|
-
protected setEnabled(val: boolean): void;
|
11778
|
-
protected getVisible(): boolean;
|
11779
|
-
protected setVisible(val: boolean): void;
|
11780
|
-
protected getLocTitle(): LocalizableString;
|
11781
|
-
protected getTitle(): string;
|
11782
|
-
protected setLocTitle(val: LocalizableString): void;
|
11783
|
-
protected setTitle(val: string): void;
|
11784
|
-
}
|
11785
|
-
}
|
11786
|
-
declare module "base" {
|
11787
|
-
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
11788
|
-
import { HashTable } from "helpers";
|
11789
|
-
import { JsonObjectProperty } from "jsonobject";
|
11790
|
-
import { ItemValue } from "itemvalue";
|
11791
|
-
import { IElement, IFindElement, IProgressInfo, ISurvey } from "base-interfaces";
|
11792
|
-
export class Bindings {
|
11793
|
-
private obj;
|
11794
|
-
private properties;
|
11795
|
-
private values;
|
11796
|
-
constructor(obj: Base);
|
11753
|
+
get placeholder(): string;
|
11754
|
+
set placeholder(val: string);
|
11755
|
+
get locPlaceholder(): LocalizableString;
|
11756
|
+
get clearCaption(): string;
|
11757
|
+
set clearCaption(value: string);
|
11758
|
+
get locClearCaption(): LocalizableString;
|
11797
11759
|
getType(): string;
|
11798
|
-
|
11799
|
-
|
11800
|
-
|
11801
|
-
|
11802
|
-
|
11803
|
-
|
11804
|
-
getPropertiesByValueName(valueName: string): Array<string>;
|
11805
|
-
getJson(): any;
|
11806
|
-
setJson(value: any): void;
|
11807
|
-
private fillProperties;
|
11808
|
-
private onChangedJSON;
|
11809
|
-
}
|
11810
|
-
export class Dependencies {
|
11811
|
-
currentDependency: () => void;
|
11812
|
-
target: Base;
|
11813
|
-
property: string;
|
11814
|
-
private static DependenciesCount;
|
11815
|
-
constructor(currentDependency: () => void, target: Base, property: string);
|
11816
|
-
dependencies: Array<{
|
11817
|
-
obj: Base;
|
11818
|
-
prop: string;
|
11819
|
-
id: string;
|
11820
|
-
}>;
|
11821
|
-
id: string;
|
11822
|
-
addDependency(target: Base, property: string): void;
|
11823
|
-
dispose(): void;
|
11824
|
-
}
|
11825
|
-
export class ComputedUpdater<T = any> {
|
11826
|
-
private _updater;
|
11827
|
-
static readonly ComputedUpdaterType = "__dependency_computed";
|
11828
|
-
private dependencies;
|
11829
|
-
constructor(_updater: () => T);
|
11830
|
-
readonly type = "__dependency_computed";
|
11831
|
-
get updater(): () => T;
|
11832
|
-
setDependencies(dependencies: Dependencies): void;
|
11833
|
-
protected getDependencies(): Dependencies;
|
11834
|
-
private clearDependencies;
|
11835
|
-
dispose(): any;
|
11836
|
-
}
|
11837
|
-
/**
|
11838
|
-
* A base class for all SurveyJS objects.
|
11839
|
-
*/
|
11840
|
-
export class Base {
|
11841
|
-
private static currentDependencis;
|
11842
|
-
static finishCollectDependencies(): Dependencies;
|
11843
|
-
static startCollectDependencies(updater: () => void, target: Base, property: string): void;
|
11844
|
-
private static collectDependency;
|
11845
|
-
static get commentSuffix(): string;
|
11846
|
-
static set commentSuffix(val: string);
|
11847
|
-
static get commentPrefix(): string;
|
11848
|
-
static set commentPrefix(val: string);
|
11849
|
-
static createItemValue: (item: any, type?: string) => any;
|
11850
|
-
static itemValueLocStrChanged: (arr: Array<any>) => void;
|
11760
|
+
get ariaRole(): string;
|
11761
|
+
get selectedItem(): ItemValue;
|
11762
|
+
protected onGetSingleSelectedItem(selectedItemByValue: ItemValue): void;
|
11763
|
+
supportGoNextPageAutomatic(): boolean;
|
11764
|
+
private minMaxChoices;
|
11765
|
+
protected getChoices(): Array<ItemValue>;
|
11851
11766
|
/**
|
11852
|
-
*
|
11767
|
+
* Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
|
11853
11768
|
*
|
11854
|
-
*
|
11855
|
-
*
|
11769
|
+
* ```js
|
11770
|
+
* "choicesMin": 10,
|
11771
|
+
* "choicesMax": 30
|
11772
|
+
* "choicesStep": 10
|
11773
|
+
* ```
|
11774
|
+
* @see choicesMax
|
11775
|
+
* @see choicesStep
|
11856
11776
|
*/
|
11857
|
-
|
11858
|
-
|
11859
|
-
protected isPropertyEmpty(value: any): boolean;
|
11860
|
-
private propertyHash;
|
11861
|
-
private localizableStrings;
|
11862
|
-
private arraysInfo;
|
11863
|
-
private eventList;
|
11864
|
-
private expressionInfo;
|
11865
|
-
private bindingsValue;
|
11866
|
-
private isDisposedValue;
|
11867
|
-
private classMetaData;
|
11868
|
-
private onPropChangeFunctions;
|
11869
|
-
protected isLoadingFromJsonValue: boolean;
|
11870
|
-
loadingOwner: Base;
|
11777
|
+
get choicesMin(): number;
|
11778
|
+
set choicesMin(val: number);
|
11871
11779
|
/**
|
11872
|
-
*
|
11873
|
-
*
|
11874
|
-
* Parameters:
|
11780
|
+
* Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
|
11875
11781
|
*
|
11876
|
-
*
|
11877
|
-
*
|
11878
|
-
*
|
11879
|
-
*
|
11880
|
-
*
|
11881
|
-
*
|
11882
|
-
*
|
11883
|
-
* An old value of the property. If the property is an array, `oldValue` contains the same array as `newValue` does.
|
11782
|
+
* ```js
|
11783
|
+
* "choicesMin": 10,
|
11784
|
+
* "choicesMax": 30
|
11785
|
+
* "choicesStep": 10
|
11786
|
+
* ```
|
11787
|
+
* @see choicesMin
|
11788
|
+
* @see choicesStep
|
11884
11789
|
*/
|
11885
|
-
|
11790
|
+
get choicesMax(): number;
|
11791
|
+
set choicesMax(val: number);
|
11886
11792
|
/**
|
11887
|
-
*
|
11793
|
+
* Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
|
11888
11794
|
*
|
11889
|
-
*
|
11795
|
+
* ```js
|
11796
|
+
* "choicesMin": 10,
|
11797
|
+
* "choicesMax": 30
|
11798
|
+
* "choicesStep": 10
|
11799
|
+
* ```
|
11890
11800
|
*
|
11891
|
-
*
|
11892
|
-
*
|
11893
|
-
*
|
11894
|
-
|
11895
|
-
|
11896
|
-
|
11897
|
-
|
11801
|
+
* The default value of the `choicesStep` property is 1.
|
11802
|
+
* @see choicesMin
|
11803
|
+
* @see choicesMax
|
11804
|
+
*/
|
11805
|
+
get choicesStep(): number;
|
11806
|
+
set choicesStep(val: number);
|
11807
|
+
get autocomplete(): string;
|
11808
|
+
set autocomplete(val: string);
|
11809
|
+
/**
|
11810
|
+
* Specifies whether to display a button that clears the selected value.
|
11811
|
+
*/
|
11812
|
+
allowClear: boolean;
|
11813
|
+
/**
|
11814
|
+
* Specifies whether users can enter a value into the input field to filter the drop-down list.
|
11815
|
+
*/
|
11816
|
+
searchEnabled: boolean;
|
11817
|
+
inputHasValue: boolean;
|
11818
|
+
readOnlyText: string;
|
11819
|
+
/**
|
11820
|
+
* 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.
|
11821
|
+
* @see choicesLazyLoadPageSize
|
11822
|
+
* @see SurveyModel.onChoicesLazyLoad
|
11823
|
+
*/
|
11824
|
+
choicesLazyLoadEnabled: boolean;
|
11825
|
+
/**
|
11826
|
+
* Specifies the number of choice items to load at a time when choices are loaded on demand.
|
11827
|
+
* @see choicesLazyLoadEnabled
|
11828
|
+
* @see SurveyModel.onChoicesLazyLoad
|
11829
|
+
*/
|
11830
|
+
choicesLazyLoadPageSize: number;
|
11831
|
+
getControlClass(): string;
|
11832
|
+
suggestedItem: ItemValue;
|
11833
|
+
get selectedItemLocText(): LocalizableString;
|
11834
|
+
get inputFieldComponentName(): string;
|
11835
|
+
get showSelectedItemLocText(): boolean;
|
11836
|
+
get showInputFieldComponent(): boolean;
|
11837
|
+
private get selectedItemText();
|
11838
|
+
get dropdownListModel(): DropdownListModel;
|
11839
|
+
set dropdownListModel(val: DropdownListModel);
|
11840
|
+
get popupModel(): PopupModel;
|
11841
|
+
get ariaExpanded(): boolean;
|
11842
|
+
onOpened: EventBase<QuestionDropdownModel>;
|
11843
|
+
onOpenedCallBack(): void;
|
11844
|
+
protected onSelectedItemValuesChangedHandler(newValue: any): void;
|
11845
|
+
protected hasUnknownValue(val: any, includeOther: boolean, isFilteredChoices: boolean, checkEmptyValue: boolean): boolean;
|
11846
|
+
protected onVisibleChoicesChanged(): void;
|
11847
|
+
protected getFirstInputElementId(): string;
|
11848
|
+
getInputId(): string;
|
11849
|
+
clearValue(): void;
|
11850
|
+
onClick(e: any): void;
|
11851
|
+
onKeyUp(event: any): void;
|
11852
|
+
dispose(): void;
|
11853
|
+
}
|
11854
|
+
}
|
11855
|
+
declare module "dropdownListModel" {
|
11856
|
+
import { IAction } from "actions/action";
|
11857
|
+
import { Base } from "base";
|
11858
|
+
import { ItemValue } from "itemvalue";
|
11859
|
+
import { ListModel } from "list";
|
11860
|
+
import { PopupModel } from "popup";
|
11861
|
+
import { Question } from "question";
|
11862
|
+
export class DropdownListModel extends Base {
|
11863
|
+
protected question: Question;
|
11864
|
+
protected onSelectionChanged?: (item: IAction, ...params: any[]) => void;
|
11865
|
+
readonly minPageSize = 25;
|
11866
|
+
readonly loadingItemHeight = 40;
|
11867
|
+
private _markdownMode;
|
11868
|
+
private _popupModel;
|
11869
|
+
private get focusFirstInputSelector();
|
11870
|
+
protected readonly selectedItemSelector = ".sv-list__item--selected";
|
11871
|
+
protected readonly itemSelector = ".sv-list__item";
|
11872
|
+
protected getFocusFirstInputSelector(): string;
|
11873
|
+
private itemsSettings;
|
11874
|
+
private isRunningLoadQuestionChoices;
|
11875
|
+
protected listModel: ListModel<ItemValue>;
|
11876
|
+
protected popupCssClasses: string;
|
11877
|
+
private resetItemsSettings;
|
11878
|
+
private setItems;
|
11879
|
+
private updateQuestionChoices;
|
11880
|
+
private updatePopupFocusFirstInputSelector;
|
11881
|
+
protected createPopup(): void;
|
11882
|
+
private setFilterStringToListModel;
|
11883
|
+
protected popupRecalculatePosition(isResetHeight: boolean): void;
|
11884
|
+
protected onHidePopup(): void;
|
11885
|
+
protected getAvailableItems(): Array<ItemValue>;
|
11886
|
+
protected createListModel(): ListModel<ItemValue>;
|
11887
|
+
protected updateAfterListModelCreated(model: ListModel<ItemValue>): void;
|
11888
|
+
updateCssClasses(popupCssClass: string, listCssClasses: any): void;
|
11889
|
+
protected resetFilterString(): void;
|
11890
|
+
protected onSetFilterString(): void;
|
11891
|
+
searchEnabled: boolean;
|
11892
|
+
filterString: string;
|
11893
|
+
inputString: string;
|
11894
|
+
showSelectedItemLocText: boolean;
|
11895
|
+
showInputFieldComponent: boolean;
|
11896
|
+
ariaActivedescendant: string;
|
11897
|
+
private applyInputString;
|
11898
|
+
private applyHintString;
|
11899
|
+
get inputStringRendered(): string;
|
11900
|
+
set inputStringRendered(val: string);
|
11901
|
+
get placeholderRendered(): any;
|
11902
|
+
get listElementId(): string;
|
11903
|
+
hasScroll: boolean;
|
11904
|
+
hintString: string;
|
11905
|
+
private get hintStringLC();
|
11906
|
+
private get inputStringLC();
|
11907
|
+
get showHintPrefix(): boolean;
|
11908
|
+
get hintStringPrefix(): string;
|
11909
|
+
get showHintString(): boolean;
|
11910
|
+
get hintStringSuffix(): string;
|
11911
|
+
constructor(question: Question, onSelectionChanged?: (item: IAction, ...params: any[]) => void);
|
11912
|
+
get popupModel(): PopupModel;
|
11913
|
+
get inputReadOnly(): boolean;
|
11914
|
+
get filterStringEnabled(): boolean;
|
11915
|
+
get inputMode(): "none" | "text";
|
11916
|
+
setSearchEnabled(newValue: boolean): void;
|
11917
|
+
updateItems(): void;
|
11918
|
+
onClick(event: any): void;
|
11919
|
+
onClear(event: any): void;
|
11920
|
+
getSelectedAction(): ItemValue;
|
11921
|
+
changeSelectionWithKeyboard(reverse: boolean): void;
|
11922
|
+
keyHandler(event: any): void;
|
11923
|
+
onScroll(event: Event): void;
|
11924
|
+
onBlur(event: any): void;
|
11925
|
+
onFocus(event: any): void;
|
11926
|
+
setInputStringFromSelectedItem(newValue?: any): void;
|
11927
|
+
dispose(): void;
|
11928
|
+
scrollToFocusedItem(): void;
|
11929
|
+
}
|
11930
|
+
}
|
11931
|
+
declare module "question_rating" {
|
11932
|
+
import { ItemValue } from "itemvalue";
|
11933
|
+
import { Question } from "question";
|
11934
|
+
import { LocalizableString } from "localizablestring";
|
11935
|
+
import { Base } from "base";
|
11936
|
+
import { DropdownListModel } from "dropdownListModel";
|
11937
|
+
export class RenderedRatingItem extends Base {
|
11938
|
+
itemValue: ItemValue;
|
11939
|
+
private locString;
|
11940
|
+
private onStringChangedCallback;
|
11941
|
+
get value(): number;
|
11942
|
+
highlight: "none" | "highlighted" | "unhighlighted";
|
11943
|
+
get locText(): LocalizableString;
|
11944
|
+
text: string;
|
11945
|
+
constructor(itemValue: ItemValue, locString?: LocalizableString);
|
11946
|
+
}
|
11947
|
+
/**
|
11948
|
+
* A Model for a rating question.
|
11949
|
+
*
|
11950
|
+
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-rating/ (linkStyle))
|
11951
|
+
*/
|
11952
|
+
export class QuestionRatingModel extends Question {
|
11953
|
+
constructor(name: string);
|
11954
|
+
private jsonObj;
|
11955
|
+
private setIconsToRateValues;
|
11956
|
+
startLoadingFromJson(jsonObj: any): void;
|
11957
|
+
endLoadingFromJson(): void;
|
11958
|
+
private _syncPropertiesChanging;
|
11959
|
+
private registerSychProperties;
|
11960
|
+
private useRateValues;
|
11961
|
+
private updateRateMax;
|
11962
|
+
private updateRateMin;
|
11963
|
+
private updateRateCount;
|
11964
|
+
initPropertyDependencies(): void;
|
11965
|
+
autoGenerate: boolean;
|
11966
|
+
/**
|
11967
|
+
* A list of rate values.
|
11968
|
+
*
|
11969
|
+
* This property accepts an array of objects with the following structure:
|
11970
|
+
*
|
11971
|
+
* ```js
|
11972
|
+
* {
|
11973
|
+
* "value": any, // A value to be saved in survey results
|
11974
|
+
* "text": String, // A display text. This property supports Markdown. When `text` is undefined, `value` is used.
|
11975
|
+
* "customProperty": any // Any property that you find useful.
|
11976
|
+
* }
|
11977
|
+
* ```
|
11978
|
+
*
|
11979
|
+
* If you add custom properties, refer to the following help topic to learn how to serialize them into JSON: [Add Custom Properties to Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid#add-custom-properties-to-the-property-grid).
|
11980
|
+
*
|
11981
|
+
* To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with Showdown](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
|
11982
|
+
*
|
11983
|
+
* If you need to specify only the `value` property, you can set the `rateValues` property to an array of numbers, for example, `[ 3, 6, 10 ]`. These values are both saved in survey results and used as display text.
|
11984
|
+
*
|
11985
|
+
* If you do not specify the `rateValues` property, rate values are generated automatically based upon the [`rateMin`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMin), [`rateMax`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMax), [`rateStep`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateStep), and [`rateCount`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateCount) property values.
|
11986
|
+
*/
|
11987
|
+
get rateValues(): Array<any>;
|
11988
|
+
set rateValues(val: Array<any>);
|
11989
|
+
/**
|
11990
|
+
* Specifies the first rate value in the generated sequence of rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
11991
|
+
*
|
11992
|
+
* Default value: 1
|
11993
|
+
* @see rateMax
|
11994
|
+
* @see rateStep
|
11995
|
+
* @see rateCount
|
11996
|
+
*/
|
11997
|
+
get rateMin(): number;
|
11998
|
+
set rateMin(val: number);
|
11999
|
+
/**
|
12000
|
+
* Specifies the last rate value in the generated sequence of rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
12001
|
+
*
|
12002
|
+
* Default value: 5
|
12003
|
+
* @see rateMin
|
12004
|
+
* @see rateStep
|
12005
|
+
* @see rateCount
|
12006
|
+
*/
|
12007
|
+
get rateMax(): number;
|
12008
|
+
set rateMax(val: number);
|
12009
|
+
/**
|
12010
|
+
* Specifies a step with which to generate rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
12011
|
+
*
|
12012
|
+
* Default value: 1
|
12013
|
+
* @see rateMin
|
12014
|
+
* @see rateMax
|
12015
|
+
* @see rateCount
|
12016
|
+
*/
|
12017
|
+
get rateStep(): number;
|
12018
|
+
set rateStep(val: number);
|
12019
|
+
/**
|
12020
|
+
* Specifies the number of rate values you want to generate. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
12021
|
+
*
|
12022
|
+
* Set the [`rateMin`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMin) or [`rateMax`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMax) property to specify the first or the last rate value. Use the [`rateStep`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateStep) property to specify a step with which to generate rate values.
|
12023
|
+
*/
|
12024
|
+
rateCount: number;
|
12025
|
+
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
|
12026
|
+
get visibleRateValues(): ItemValue[];
|
12027
|
+
itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
|
12028
|
+
private createRenderedRateItems;
|
12029
|
+
renderedRateItems: Array<RenderedRatingItem>;
|
12030
|
+
private correctValue;
|
12031
|
+
getType(): string;
|
12032
|
+
protected getFirstInputElementId(): string;
|
12033
|
+
getInputId(index: number): string;
|
12034
|
+
supportGoNextPageAutomatic(): boolean;
|
12035
|
+
supportOther(): boolean;
|
12036
|
+
/**
|
12037
|
+
* Specifies a description for the minimum (first) rate value.
|
12038
|
+
* @see rateValues
|
12039
|
+
* @see rateMin
|
12040
|
+
* @see displayRateDescriptionsAsExtremeItems
|
12041
|
+
*/
|
12042
|
+
get minRateDescription(): string;
|
12043
|
+
set minRateDescription(val: string);
|
12044
|
+
get locMinRateDescription(): LocalizableString;
|
12045
|
+
/**
|
12046
|
+
* Specifies a description for the maximum (last) rate value.
|
12047
|
+
* @see rateValues
|
12048
|
+
* @see rateMax
|
12049
|
+
* @see displayRateDescriptionsAsExtremeItems
|
12050
|
+
*/
|
12051
|
+
get maxRateDescription(): string;
|
12052
|
+
set maxRateDescription(val: string);
|
12053
|
+
get locMaxRateDescription(): LocalizableString;
|
12054
|
+
hasMinRateDescription: boolean;
|
12055
|
+
hasMaxRateDescription: boolean;
|
12056
|
+
get hasMinLabel(): boolean;
|
12057
|
+
get hasMaxLabel(): boolean;
|
12058
|
+
/**
|
12059
|
+
* Specifies whether to display `minRateDescription` and `maxRateDescription` values as captions for buttons that correspond to the extreme (first and last) rate values.
|
12060
|
+
*
|
12061
|
+
* Default value: `false`
|
12062
|
+
*
|
12063
|
+
* If this property is disabled, the `minRateDescription` and `maxRateDescription` values are displayed as plain non-clickable texts.
|
12064
|
+
*
|
12065
|
+
* If any of the `minRateDescription` and `maxRateDescription` properties is empty, the corresponding rate value's `value` or `text` is displayed as a button caption.
|
12066
|
+
* @see minRateDescription
|
12067
|
+
* @see maxRateDescription
|
12068
|
+
* @see rateMin
|
12069
|
+
* @see rateMax
|
12070
|
+
* @see rateValues
|
12071
|
+
*/
|
12072
|
+
displayRateDescriptionsAsExtremeItems: boolean;
|
12073
|
+
/**
|
12074
|
+
* Specifies how a Rating question displays rate values.
|
12075
|
+
*
|
12076
|
+
* Possible values:
|
12077
|
+
*
|
12078
|
+
* - `"buttons"` - Displays rate values as buttons in a row.
|
12079
|
+
* - `"dropdown"` - Displays rate values as items in a drop-down list.
|
12080
|
+
* - `"auto"` (default) - Selects between the `"buttons"` and `"dropdown"` modes based on the available width. When the width is insufficient to display buttons, the question displays a dropdown.
|
12081
|
+
*/
|
12082
|
+
displayMode: "dropdown" | "buttons" | "auto";
|
12083
|
+
rateDisplayMode: "labels" | "stars" | "smileys";
|
12084
|
+
get rateType(): "labels" | "stars" | "smileys";
|
12085
|
+
set rateType(val: "labels" | "stars" | "smileys");
|
12086
|
+
smileysColorMode: "monochrome" | "colored";
|
12087
|
+
get isStar(): boolean;
|
12088
|
+
get isSmiley(): boolean;
|
12089
|
+
get itemComponentName(): "sv-rating-item-star" | "sv-rating-item-smiley" | "sv-rating-item";
|
12090
|
+
protected valueToData(val: any): any;
|
12091
|
+
setValueFromClick(value: any): void;
|
12092
|
+
onItemMouseIn(item: RenderedRatingItem): void;
|
12093
|
+
onItemMouseOut(item: RenderedRatingItem): void;
|
12094
|
+
get ratingRootCss(): string;
|
12095
|
+
getItemSmiley(item: ItemValue): string;
|
12096
|
+
getItemSmileyIconName(item: ItemValue): string;
|
12097
|
+
getItemClassByText(item: ItemValue, text: string): string;
|
12098
|
+
getItemClass(item: ItemValue, highlight?: "none" | "highlighted" | "unhighlighted"): string;
|
12099
|
+
getControlClass(): string;
|
12100
|
+
get placeholder(): string;
|
12101
|
+
set placeholder(val: string);
|
12102
|
+
get locPlaceholder(): LocalizableString;
|
12103
|
+
get allowClear(): boolean;
|
12104
|
+
get searchEnabled(): boolean;
|
12105
|
+
get renderedValue(): any;
|
12106
|
+
set renderedValue(val: any);
|
12107
|
+
isItemSelected(item: ItemValue): boolean;
|
12108
|
+
get visibleChoices(): ItemValue[];
|
12109
|
+
get readOnlyText(): any;
|
12110
|
+
needResponsiveWidth(): boolean;
|
12111
|
+
protected supportResponsiveness(): boolean;
|
12112
|
+
protected getCompactRenderAs(): string;
|
12113
|
+
protected getDesktopRenderAs(): string;
|
12114
|
+
private dropdownListModelValue;
|
12115
|
+
set dropdownListModel(val: DropdownListModel);
|
12116
|
+
get dropdownListModel(): DropdownListModel;
|
12117
|
+
protected updateCssClasses(res: any, css: any): void;
|
12118
|
+
protected calcCssClasses(css: any): any;
|
12119
|
+
dispose(): void;
|
12120
|
+
}
|
12121
|
+
}
|
12122
|
+
declare module "itemvalue" {
|
12123
|
+
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
12124
|
+
import { ConditionRunner } from "conditions";
|
12125
|
+
import { IShortcutText, ISurvey } from "base-interfaces";
|
12126
|
+
import { BaseAction } from "actions/action";
|
12127
|
+
/**
|
12128
|
+
* Array of ItemValue is used in checkox, dropdown and radiogroup choices, matrix columns and rows.
|
12129
|
+
* It has two main properties: value and text. If text is empty, value is used for displaying.
|
12130
|
+
* The text property is localizable and support markdown.
|
12131
|
+
*/
|
12132
|
+
export class ItemValue extends BaseAction implements ILocalizableOwner, IShortcutText {
|
12133
|
+
protected typeName: string;
|
12134
|
+
[index: string]: any;
|
12135
|
+
getMarkdownHtml(text: string, name: string): string;
|
12136
|
+
getRenderer(name: string): string;
|
12137
|
+
getRendererContext(locStr: LocalizableString): any;
|
12138
|
+
getProcessedText(text: string): string;
|
12139
|
+
static get Separator(): string;
|
12140
|
+
static set Separator(val: string);
|
12141
|
+
/**
|
12142
|
+
* Resets the input array and fills it with values from the values array
|
12143
|
+
*/
|
12144
|
+
static setData(items: Array<ItemValue>, values: Array<any>, type?: string): void;
|
12145
|
+
static getData(items: Array<ItemValue>): any;
|
12146
|
+
static getItemByValue(items: Array<ItemValue>, val: any): ItemValue;
|
12147
|
+
static getTextOrHtmlByValue(items: Array<ItemValue>, val: any): string;
|
12148
|
+
static locStrsChanged(items: Array<ItemValue>): void;
|
12149
|
+
static runConditionsForItems(items: Array<ItemValue>, filteredItems: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, useItemExpression?: boolean, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
|
12150
|
+
static runEnabledConditionsForItems(items: Array<ItemValue>, runner: ConditionRunner, values: any, properties: any, onItemCallBack?: (item: ItemValue, val: boolean) => boolean): boolean;
|
12151
|
+
private static runConditionsForItemsCore;
|
12152
|
+
ownerPropertyName: string;
|
12153
|
+
private _visible;
|
12154
|
+
private locTextValue;
|
12155
|
+
private visibleConditionRunner;
|
12156
|
+
private enableConditionRunner;
|
12157
|
+
constructor(value: any, text?: string, typeName?: string);
|
12158
|
+
onCreating(): any;
|
12159
|
+
getType(): string;
|
12160
|
+
getSurvey(live?: boolean): ISurvey;
|
12161
|
+
getLocale(): string;
|
12162
|
+
get locText(): LocalizableString;
|
12163
|
+
setLocText(locText: LocalizableString): void;
|
12164
|
+
private _locOwner;
|
12165
|
+
get locOwner(): ILocalizableOwner;
|
12166
|
+
set locOwner(value: ILocalizableOwner);
|
12167
|
+
get value(): any;
|
12168
|
+
set value(newValue: any);
|
12169
|
+
get hasText(): boolean;
|
12170
|
+
get pureText(): string;
|
12171
|
+
set pureText(val: string);
|
12172
|
+
get text(): string;
|
12173
|
+
set text(newText: string);
|
12174
|
+
get calculatedText(): string;
|
12175
|
+
get shortcutText(): string;
|
12176
|
+
private canSerializeValue;
|
12177
|
+
getData(): any;
|
12178
|
+
toJSON(): any;
|
12179
|
+
setData(value: any): void;
|
12180
|
+
get visibleIf(): string;
|
12181
|
+
set visibleIf(val: string);
|
12182
|
+
get enableIf(): string;
|
12183
|
+
set enableIf(val: string);
|
12184
|
+
get isVisible(): any;
|
12185
|
+
setIsVisible(val: boolean): void;
|
12186
|
+
get isEnabled(): any;
|
12187
|
+
setIsEnabled(val: boolean): void;
|
12188
|
+
addUsedLocales(locales: Array<string>): void;
|
12189
|
+
locStrsChanged(): void;
|
12190
|
+
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
|
12191
|
+
protected getConditionRunner(isVisible: boolean): ConditionRunner;
|
12192
|
+
private getVisibleConditionRunner;
|
12193
|
+
private getEnableConditionRunner;
|
12194
|
+
originalItem: any;
|
12195
|
+
selectedValue: boolean;
|
12196
|
+
get selected(): boolean;
|
12197
|
+
private componentValue;
|
12198
|
+
getComponent(): string;
|
12199
|
+
setComponent(val: string): void;
|
12200
|
+
protected getEnabled(): boolean;
|
12201
|
+
protected setEnabled(val: boolean): void;
|
12202
|
+
protected getVisible(): boolean;
|
12203
|
+
protected setVisible(val: boolean): void;
|
12204
|
+
protected getLocTitle(): LocalizableString;
|
12205
|
+
protected getTitle(): string;
|
12206
|
+
protected setLocTitle(val: LocalizableString): void;
|
12207
|
+
protected setTitle(val: string): void;
|
12208
|
+
icon: string;
|
12209
|
+
}
|
12210
|
+
}
|
12211
|
+
declare module "base" {
|
12212
|
+
import { ILocalizableOwner, LocalizableString } from "localizablestring";
|
12213
|
+
import { HashTable } from "helpers";
|
12214
|
+
import { JsonObjectProperty } from "jsonobject";
|
12215
|
+
import { ItemValue } from "itemvalue";
|
12216
|
+
import { IElement, IFindElement, IProgressInfo, ISurvey } from "base-interfaces";
|
12217
|
+
export class Bindings {
|
12218
|
+
private obj;
|
12219
|
+
private properties;
|
12220
|
+
private values;
|
12221
|
+
constructor(obj: Base);
|
12222
|
+
getType(): string;
|
12223
|
+
getNames(): Array<string>;
|
12224
|
+
getProperties(): Array<JsonObjectProperty>;
|
12225
|
+
setBinding(propertyName: string, valueName: string): void;
|
12226
|
+
clearBinding(propertyName: string): void;
|
12227
|
+
isEmpty(): boolean;
|
12228
|
+
getValueNameByPropertyName(propertyName: string): string;
|
12229
|
+
getPropertiesByValueName(valueName: string): Array<string>;
|
12230
|
+
getJson(): any;
|
12231
|
+
setJson(value: any): void;
|
12232
|
+
private fillProperties;
|
12233
|
+
private onChangedJSON;
|
12234
|
+
}
|
12235
|
+
export class Dependencies {
|
12236
|
+
currentDependency: () => void;
|
12237
|
+
target: Base;
|
12238
|
+
property: string;
|
12239
|
+
private static DependenciesCount;
|
12240
|
+
constructor(currentDependency: () => void, target: Base, property: string);
|
12241
|
+
dependencies: Array<{
|
12242
|
+
obj: Base;
|
12243
|
+
prop: string;
|
12244
|
+
id: string;
|
12245
|
+
}>;
|
12246
|
+
id: string;
|
12247
|
+
addDependency(target: Base, property: string): void;
|
12248
|
+
dispose(): void;
|
12249
|
+
}
|
12250
|
+
export class ComputedUpdater<T = any> {
|
12251
|
+
private _updater;
|
12252
|
+
static readonly ComputedUpdaterType = "__dependency_computed";
|
12253
|
+
private dependencies;
|
12254
|
+
constructor(_updater: () => T);
|
12255
|
+
readonly type = "__dependency_computed";
|
12256
|
+
get updater(): () => T;
|
12257
|
+
setDependencies(dependencies: Dependencies): void;
|
12258
|
+
protected getDependencies(): Dependencies;
|
12259
|
+
private clearDependencies;
|
12260
|
+
dispose(): any;
|
12261
|
+
}
|
12262
|
+
/**
|
12263
|
+
* A base class for all SurveyJS objects.
|
12264
|
+
*/
|
12265
|
+
export class Base {
|
12266
|
+
private static currentDependencis;
|
12267
|
+
static finishCollectDependencies(): Dependencies;
|
12268
|
+
static startCollectDependencies(updater: () => void, target: Base, property: string): void;
|
12269
|
+
private static collectDependency;
|
12270
|
+
static get commentSuffix(): string;
|
12271
|
+
static set commentSuffix(val: string);
|
12272
|
+
static get commentPrefix(): string;
|
12273
|
+
static set commentPrefix(val: string);
|
12274
|
+
static createItemValue: (item: any, type?: string) => any;
|
12275
|
+
static itemValueLocStrChanged: (arr: Array<any>) => void;
|
12276
|
+
/**
|
12277
|
+
* Returns `true` if a passed `value` is an empty string, array, or object or if it equals to `undefined` or `null`.
|
12278
|
+
*
|
12279
|
+
* @param value A value to be checked.
|
12280
|
+
* @param trimString (Optional) When this parameter is `true`, the method ignores whitespace characters at the beginning and end of a string value. Pass `false` to disable this functionality.
|
12281
|
+
*/
|
12282
|
+
isValueEmpty(value: any, trimString?: boolean): boolean;
|
12283
|
+
protected trimValue(value: any): any;
|
12284
|
+
protected isPropertyEmpty(value: any): boolean;
|
12285
|
+
private propertyHash;
|
12286
|
+
private localizableStrings;
|
12287
|
+
private arraysInfo;
|
12288
|
+
private eventList;
|
12289
|
+
private expressionInfo;
|
12290
|
+
private bindingsValue;
|
12291
|
+
private isDisposedValue;
|
12292
|
+
private classMetaData;
|
12293
|
+
private onPropChangeFunctions;
|
12294
|
+
protected isLoadingFromJsonValue: boolean;
|
12295
|
+
loadingOwner: Base;
|
12296
|
+
/**
|
12297
|
+
* An event that is raised when a property of this SurveyJS object has changed.
|
12298
|
+
*
|
12299
|
+
* Parameters:
|
12300
|
+
*
|
12301
|
+
* - `sender`: `this`\
|
12302
|
+
* A SurveyJS object whose property has changed.
|
12303
|
+
* - `options.name`: `String`\
|
12304
|
+
* The name of the changed property.
|
12305
|
+
* - `options.newValue`: `any`\
|
12306
|
+
* A new value for the property.
|
12307
|
+
* - `options.oldValue`: `any`\
|
12308
|
+
* An old value of the property. If the property is an array, `oldValue` contains the same array as `newValue` does.
|
12309
|
+
*/
|
12310
|
+
onPropertyChanged: EventBase<Base>;
|
12311
|
+
/**
|
12312
|
+
* An event that is raised when an [`ItemValue`](https://surveyjs.io/form-library/documentation/itemvalue) property is changed.
|
12313
|
+
*
|
12314
|
+
* Parameters:
|
12315
|
+
*
|
12316
|
+
* - `sender`: `this`\
|
12317
|
+
* A SurveyJS object whose property contains an array of `ItemValue` objects.
|
12318
|
+
* - `options.obj`: [`ItemValue`](https://surveyjs.io/form-library/documentation/itemvalue)\
|
12319
|
+
* An `ItemValue` object.
|
12320
|
+
* - `options.propertyName`: `String`\
|
12321
|
+
* The name of the property to which an array of `ItemValue` objects is assigned (for example, `"choices"` or `"rows"`).
|
12322
|
+
* - `options.name`: `"text"` | `"value"`\
|
11898
12323
|
* The name of the changed property.
|
11899
12324
|
* - `options.newValue`: `any`\
|
11900
12325
|
* A new value for the property.
|
@@ -12242,254 +12667,53 @@ declare module "validator" {
|
|
12242
12667
|
}
|
12243
12668
|
}
|
12244
12669
|
declare module "question_matrixdropdown" {
|
12245
|
-
import { QuestionMatrixDropdownModelBase, MatrixDropdownRowModelBase, IMatrixDropdownData } from "question_matrixdropdownbase";
|
12246
|
-
import { ItemValue } from "itemvalue";
|
12247
|
-
import { LocalizableString } from "localizablestring";
|
12248
|
-
import { IProgressInfo } from "base-interfaces";
|
12249
|
-
export class MatrixDropdownRowModel extends MatrixDropdownRowModelBase {
|
12250
|
-
name: string;
|
12251
|
-
private item;
|
12252
|
-
constructor(name: string, item: ItemValue, data: IMatrixDropdownData, value: any);
|
12253
|
-
get rowName(): string;
|
12254
|
-
get text(): string;
|
12255
|
-
get locText(): LocalizableString;
|
12256
|
-
}
|
12257
|
-
/**
|
12258
|
-
* A class that describes the Multiple-Choice Matrix question type. Multiple-Choice Matrix allows you to use the [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel), [Checkbox](https://surveyjs.io/form-library/documentation/questioncheckboxmodel), [Radiogroup](https://surveyjs.io/form-library/documentation/questionradiogroupmodel), [Text](https://surveyjs.io/form-library/documentation/questiontextmodel), and [Comment](https://surveyjs.io/form-library/documentation/questioncommentmodel) question types as cell editors.
|
12259
|
-
*
|
12260
|
-
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/ (linkStyle))
|
12261
|
-
*/
|
12262
|
-
export class QuestionMatrixDropdownModel extends QuestionMatrixDropdownModelBase implements IMatrixDropdownData {
|
12263
|
-
constructor(name: string);
|
12264
|
-
getType(): string;
|
12265
|
-
/**
|
12266
|
-
* A title for the total row. Applies if at least one column displays total values.
|
12267
|
-
* @see rowTitleWidth
|
12268
|
-
* @see columns
|
12269
|
-
*/
|
12270
|
-
get totalText(): string;
|
12271
|
-
set totalText(val: string);
|
12272
|
-
get locTotalText(): LocalizableString;
|
12273
|
-
getFooterText(): LocalizableString;
|
12274
|
-
getRowTitleWidth(): string;
|
12275
|
-
/**
|
12276
|
-
* Specifies whether to hide the question when the matrix has no visible rows.
|
12277
|
-
* @see rowsVisibleIf
|
12278
|
-
*/
|
12279
|
-
get hideIfRowsEmpty(): boolean;
|
12280
|
-
set hideIfRowsEmpty(val: boolean);
|
12281
|
-
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
|
12282
|
-
protected getConditionObjectRowName(index: number): string;
|
12283
|
-
protected getConditionObjectRowText(index: number): string;
|
12284
|
-
protected getConditionObjectsRowIndeces(): Array<number>;
|
12285
|
-
protected setNewValue(newValue: any): void;
|
12286
|
-
clearIncorrectValues(): void;
|
12287
|
-
protected clearValueIfInvisibleCore(): void;
|
12288
|
-
protected generateRows(): Array<MatrixDropdownRowModel>;
|
12289
|
-
protected createMatrixRow(item: ItemValue, value: any): MatrixDropdownRowModel;
|
12290
|
-
protected getSearchableItemValueKeys(keys: Array<string>): void;
|
12291
|
-
protected updateProgressInfoByValues(res: IProgressInfo): void;
|
12292
|
-
}
|
12293
|
-
}
|
12294
|
-
declare module "dropdownListModel" {
|
12295
|
-
import { IAction } from "actions/action";
|
12296
|
-
import { Base } from "base";
|
12297
|
-
import { ItemValue } from "itemvalue";
|
12298
|
-
import { ListModel } from "list";
|
12299
|
-
import { PopupModel } from "popup";
|
12300
|
-
import { Question } from "question";
|
12301
|
-
export class DropdownListModel extends Base {
|
12302
|
-
protected question: Question;
|
12303
|
-
protected onSelectionChanged?: (item: IAction, ...params: any[]) => void;
|
12304
|
-
readonly minPageSize = 25;
|
12305
|
-
readonly loadingItemHeight = 40;
|
12306
|
-
private _markdownMode;
|
12307
|
-
private _popupModel;
|
12308
|
-
private get focusFirstInputSelector();
|
12309
|
-
protected readonly selectedItemSelector = ".sv-list__item--selected";
|
12310
|
-
protected readonly itemSelector = ".sv-list__item";
|
12311
|
-
protected getFocusFirstInputSelector(): string;
|
12312
|
-
private itemsSettings;
|
12313
|
-
private isRunningLoadQuestionChoices;
|
12314
|
-
protected listModel: ListModel<ItemValue>;
|
12315
|
-
protected popupCssClasses: string;
|
12316
|
-
private resetItemsSettings;
|
12317
|
-
private setItems;
|
12318
|
-
private updateQuestionChoices;
|
12319
|
-
private updatePopupFocusFirstInputSelector;
|
12320
|
-
protected createPopup(): void;
|
12321
|
-
private setFilterStringToListModel;
|
12322
|
-
protected popupRecalculatePosition(isResetHeight: boolean): void;
|
12323
|
-
protected onHidePopup(): void;
|
12324
|
-
protected getAvailableItems(): Array<ItemValue>;
|
12325
|
-
protected createListModel(): ListModel<ItemValue>;
|
12326
|
-
protected updateAfterListModelCreated(model: ListModel<ItemValue>): void;
|
12327
|
-
updateCssClasses(popupCssClass: string, listCssClasses: any): void;
|
12328
|
-
protected resetFilterString(): void;
|
12329
|
-
protected onSetFilterString(): void;
|
12330
|
-
searchEnabled: boolean;
|
12331
|
-
filterString: string;
|
12332
|
-
inputString: string;
|
12333
|
-
showSelectedItemLocText: boolean;
|
12334
|
-
showInputFieldComponent: boolean;
|
12335
|
-
ariaActivedescendant: string;
|
12336
|
-
private applyInputString;
|
12337
|
-
private applyHintString;
|
12338
|
-
get inputStringRendered(): string;
|
12339
|
-
set inputStringRendered(val: string);
|
12340
|
-
get placeholderRendered(): any;
|
12341
|
-
get listElementId(): string;
|
12342
|
-
hasScroll: boolean;
|
12343
|
-
hintString: string;
|
12344
|
-
private get hintStringLC();
|
12345
|
-
private get inputStringLC();
|
12346
|
-
get showHintPrefix(): boolean;
|
12347
|
-
get hintStringPrefix(): string;
|
12348
|
-
get showHintString(): boolean;
|
12349
|
-
get hintStringSuffix(): string;
|
12350
|
-
constructor(question: Question, onSelectionChanged?: (item: IAction, ...params: any[]) => void);
|
12351
|
-
get popupModel(): PopupModel;
|
12352
|
-
get inputReadOnly(): boolean;
|
12353
|
-
get filterStringEnabled(): boolean;
|
12354
|
-
get inputMode(): "none" | "text";
|
12355
|
-
setSearchEnabled(newValue: boolean): void;
|
12356
|
-
updateItems(): void;
|
12357
|
-
onClick(event: any): void;
|
12358
|
-
onClear(event: any): void;
|
12359
|
-
getSelectedAction(): ItemValue;
|
12360
|
-
changeSelectionWithKeyboard(reverse: boolean): void;
|
12361
|
-
keyHandler(event: any): void;
|
12362
|
-
onScroll(event: Event): void;
|
12363
|
-
onBlur(event: any): void;
|
12364
|
-
onFocus(event: any): void;
|
12365
|
-
setInputStringFromSelectedItem(newValue?: any): void;
|
12366
|
-
scrollToFocusedItem(): void;
|
12367
|
-
}
|
12368
|
-
}
|
12369
|
-
declare module "question_dropdown" {
|
12370
|
-
import { QuestionSelectBase } from "question_baseselect";
|
12371
|
-
import { LocalizableString } from "localizablestring";
|
12372
|
-
import { ItemValue } from "itemvalue";
|
12373
|
-
import { PopupModel } from "popup";
|
12374
|
-
import { EventBase } from "base";
|
12375
|
-
import { DropdownListModel } from "dropdownListModel";
|
12376
|
-
/**
|
12377
|
-
* A class that describes the Dropdown question type.
|
12378
|
-
*
|
12379
|
-
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-dropdown/ (linkStyle))
|
12380
|
-
*/
|
12381
|
-
export class QuestionDropdownModel extends QuestionSelectBase {
|
12382
|
-
dropdownListModelValue: DropdownListModel;
|
12383
|
-
lastSelectedItemValue: ItemValue;
|
12384
|
-
updateReadOnlyText(): void;
|
12385
|
-
constructor(name: string);
|
12386
|
-
locStrsChanged(): void;
|
12387
|
-
get showOptionsCaption(): boolean;
|
12388
|
-
set showOptionsCaption(val: boolean);
|
12389
|
-
get optionsCaption(): string;
|
12390
|
-
set optionsCaption(val: string);
|
12391
|
-
/**
|
12392
|
-
* A placeholder for the input field.
|
12393
|
-
*/
|
12394
|
-
get placeholder(): string;
|
12395
|
-
set placeholder(val: string);
|
12396
|
-
get locPlaceholder(): LocalizableString;
|
12397
|
-
get clearCaption(): string;
|
12398
|
-
set clearCaption(value: string);
|
12399
|
-
get locClearCaption(): LocalizableString;
|
12400
|
-
getType(): string;
|
12401
|
-
get ariaRole(): string;
|
12402
|
-
get selectedItem(): ItemValue;
|
12403
|
-
protected onGetSingleSelectedItem(selectedItemByValue: ItemValue): void;
|
12404
|
-
supportGoNextPageAutomatic(): boolean;
|
12405
|
-
private minMaxChoices;
|
12406
|
-
protected getChoices(): Array<ItemValue>;
|
12407
|
-
/**
|
12408
|
-
* Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
|
12409
|
-
*
|
12410
|
-
* ```js
|
12411
|
-
* "choicesMin": 10,
|
12412
|
-
* "choicesMax": 30
|
12413
|
-
* "choicesStep": 10
|
12414
|
-
* ```
|
12415
|
-
* @see choicesMax
|
12416
|
-
* @see choicesStep
|
12417
|
-
*/
|
12418
|
-
get choicesMin(): number;
|
12419
|
-
set choicesMin(val: number);
|
12420
|
-
/**
|
12421
|
-
* Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
|
12422
|
-
*
|
12423
|
-
* ```js
|
12424
|
-
* "choicesMin": 10,
|
12425
|
-
* "choicesMax": 30
|
12426
|
-
* "choicesStep": 10
|
12427
|
-
* ```
|
12428
|
-
* @see choicesMin
|
12429
|
-
* @see choicesStep
|
12430
|
-
*/
|
12431
|
-
get choicesMax(): number;
|
12432
|
-
set choicesMax(val: number);
|
12433
|
-
/**
|
12434
|
-
* Use the `choicesMin`, `choicesMax`, and `choicesStep` properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
|
12435
|
-
*
|
12436
|
-
* ```js
|
12437
|
-
* "choicesMin": 10,
|
12438
|
-
* "choicesMax": 30
|
12439
|
-
* "choicesStep": 10
|
12440
|
-
* ```
|
12441
|
-
*
|
12442
|
-
* The default value of the `choicesStep` property is 1.
|
12443
|
-
* @see choicesMin
|
12444
|
-
* @see choicesMax
|
12445
|
-
*/
|
12446
|
-
get choicesStep(): number;
|
12447
|
-
set choicesStep(val: number);
|
12448
|
-
get autocomplete(): string;
|
12449
|
-
set autocomplete(val: string);
|
12450
|
-
/**
|
12451
|
-
* Specifies whether to display a button that clears the selected value.
|
12452
|
-
*/
|
12453
|
-
allowClear: boolean;
|
12454
|
-
/**
|
12455
|
-
* Specifies whether users can enter a value into the input field to filter the drop-down list.
|
12456
|
-
*/
|
12457
|
-
searchEnabled: boolean;
|
12458
|
-
inputHasValue: boolean;
|
12459
|
-
readOnlyText: string;
|
12670
|
+
import { QuestionMatrixDropdownModelBase, MatrixDropdownRowModelBase, IMatrixDropdownData } from "question_matrixdropdownbase";
|
12671
|
+
import { ItemValue } from "itemvalue";
|
12672
|
+
import { LocalizableString } from "localizablestring";
|
12673
|
+
import { IProgressInfo } from "base-interfaces";
|
12674
|
+
export class MatrixDropdownRowModel extends MatrixDropdownRowModelBase {
|
12675
|
+
name: string;
|
12676
|
+
private item;
|
12677
|
+
constructor(name: string, item: ItemValue, data: IMatrixDropdownData, value: any);
|
12678
|
+
get rowName(): string;
|
12679
|
+
get text(): string;
|
12680
|
+
get locText(): LocalizableString;
|
12681
|
+
}
|
12682
|
+
/**
|
12683
|
+
* A class that describes the Multiple-Choice Matrix question type. Multiple-Choice Matrix allows you to use the [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel), [Checkbox](https://surveyjs.io/form-library/documentation/questioncheckboxmodel), [Radiogroup](https://surveyjs.io/form-library/documentation/questionradiogroupmodel), [Text](https://surveyjs.io/form-library/documentation/questiontextmodel), and [Comment](https://surveyjs.io/form-library/documentation/questioncommentmodel) question types as cell editors.
|
12684
|
+
*
|
12685
|
+
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/ (linkStyle))
|
12686
|
+
*/
|
12687
|
+
export class QuestionMatrixDropdownModel extends QuestionMatrixDropdownModelBase implements IMatrixDropdownData {
|
12688
|
+
constructor(name: string);
|
12689
|
+
getType(): string;
|
12460
12690
|
/**
|
12461
|
-
*
|
12462
|
-
* @see
|
12463
|
-
* @see
|
12691
|
+
* A title for the total row. Applies if at least one column displays total values.
|
12692
|
+
* @see rowTitleWidth
|
12693
|
+
* @see columns
|
12464
12694
|
*/
|
12465
|
-
|
12695
|
+
get totalText(): string;
|
12696
|
+
set totalText(val: string);
|
12697
|
+
get locTotalText(): LocalizableString;
|
12698
|
+
getFooterText(): LocalizableString;
|
12699
|
+
getRowTitleWidth(): string;
|
12466
12700
|
/**
|
12467
|
-
* Specifies
|
12468
|
-
* @see
|
12469
|
-
* @see SurveyModel.onChoicesLazyLoad
|
12701
|
+
* Specifies whether to hide the question when the matrix has no visible rows.
|
12702
|
+
* @see rowsVisibleIf
|
12470
12703
|
*/
|
12471
|
-
|
12472
|
-
|
12473
|
-
|
12474
|
-
|
12475
|
-
|
12476
|
-
|
12477
|
-
|
12478
|
-
|
12479
|
-
|
12480
|
-
|
12481
|
-
|
12482
|
-
|
12483
|
-
|
12484
|
-
onOpenedCallBack(): void;
|
12485
|
-
protected onSelectedItemValuesChangedHandler(newValue: any): void;
|
12486
|
-
protected hasUnknownValue(val: any, includeOther: boolean, isFilteredChoices: boolean, checkEmptyValue: boolean): boolean;
|
12487
|
-
protected onVisibleChoicesChanged(): void;
|
12488
|
-
protected getFirstInputElementId(): string;
|
12489
|
-
getInputId(): string;
|
12490
|
-
clearValue(): void;
|
12491
|
-
onClick(e: any): void;
|
12492
|
-
onKeyUp(event: any): void;
|
12704
|
+
get hideIfRowsEmpty(): boolean;
|
12705
|
+
set hideIfRowsEmpty(val: boolean);
|
12706
|
+
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
|
12707
|
+
protected getConditionObjectRowName(index: number): string;
|
12708
|
+
protected getConditionObjectRowText(index: number): string;
|
12709
|
+
protected getConditionObjectsRowIndeces(): Array<number>;
|
12710
|
+
protected setNewValue(newValue: any): void;
|
12711
|
+
clearIncorrectValues(): void;
|
12712
|
+
protected clearValueIfInvisibleCore(): void;
|
12713
|
+
protected generateRows(): Array<MatrixDropdownRowModel>;
|
12714
|
+
protected createMatrixRow(item: ItemValue, value: any): MatrixDropdownRowModel;
|
12715
|
+
protected getSearchableItemValueKeys(keys: Array<string>): void;
|
12716
|
+
protected updateProgressInfoByValues(res: IProgressInfo): void;
|
12493
12717
|
}
|
12494
12718
|
}
|
12495
12719
|
declare module "question_matrix" {
|
@@ -12956,6 +13180,7 @@ declare module "question_tagbox" {
|
|
12956
13180
|
updateItemDisplayNameMap(): void;
|
12957
13181
|
protected getFirstInputElementId(): string;
|
12958
13182
|
getInputId(): string;
|
13183
|
+
dispose(): void;
|
12959
13184
|
}
|
12960
13185
|
}
|
12961
13186
|
declare module "question_imagepicker" {
|
@@ -13305,190 +13530,6 @@ declare module "question_radiogroup" {
|
|
13305
13530
|
protected getDefaultTitleActions(): Array<Action>;
|
13306
13531
|
}
|
13307
13532
|
}
|
13308
|
-
declare module "question_rating" {
|
13309
|
-
import { ItemValue } from "itemvalue";
|
13310
|
-
import { Question } from "question";
|
13311
|
-
import { LocalizableString } from "localizablestring";
|
13312
|
-
import { Base } from "base";
|
13313
|
-
import { DropdownListModel } from "dropdownListModel";
|
13314
|
-
export class RenderedRatingItem extends Base {
|
13315
|
-
itemValue: ItemValue;
|
13316
|
-
private locString;
|
13317
|
-
private onStringChangedCallback;
|
13318
|
-
get value(): number;
|
13319
|
-
highlight: "none" | "highlighted" | "unhighlighted";
|
13320
|
-
get locText(): LocalizableString;
|
13321
|
-
text: string;
|
13322
|
-
constructor(itemValue: ItemValue, locString?: LocalizableString);
|
13323
|
-
}
|
13324
|
-
/**
|
13325
|
-
* A Model for a rating question.
|
13326
|
-
*
|
13327
|
-
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-rating/ (linkStyle))
|
13328
|
-
*/
|
13329
|
-
export class QuestionRatingModel extends Question {
|
13330
|
-
constructor(name: string);
|
13331
|
-
private jsonObj;
|
13332
|
-
startLoadingFromJson(jsonObj: any): void;
|
13333
|
-
endLoadingFromJson(): void;
|
13334
|
-
private _syncPropertiesChanging;
|
13335
|
-
private registerSychProperties;
|
13336
|
-
private updateRateMax;
|
13337
|
-
private updateRateMin;
|
13338
|
-
private updateRateCount;
|
13339
|
-
initPropertyDependencies(): void;
|
13340
|
-
/**
|
13341
|
-
* A list of rate values.
|
13342
|
-
*
|
13343
|
-
* This property accepts an array of objects with the following structure:
|
13344
|
-
*
|
13345
|
-
* ```js
|
13346
|
-
* {
|
13347
|
-
* "value": any, // A value to be saved in survey results
|
13348
|
-
* "text": String, // A display text. This property supports Markdown. When `text` is undefined, `value` is used.
|
13349
|
-
* "customProperty": any // Any property that you find useful.
|
13350
|
-
* }
|
13351
|
-
* ```
|
13352
|
-
*
|
13353
|
-
* If you add custom properties, refer to the following help topic to learn how to serialize them into JSON: [Add Custom Properties to Property Grid](https://surveyjs.io/survey-creator/documentation/property-grid#add-custom-properties-to-the-property-grid).
|
13354
|
-
*
|
13355
|
-
* To enable Markdown support for the `text` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with Showdown](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
|
13356
|
-
*
|
13357
|
-
* If you need to specify only the `value` property, you can set the `rateValues` property to an array of numbers, for example, `[ 3, 6, 10 ]`. These values are both saved in survey results and used as display text.
|
13358
|
-
*
|
13359
|
-
* If you do not specify the `rateValues` property, rate values are generated automatically based upon the [`rateMin`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMin), [`rateMax`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMax), [`rateStep`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateStep), and [`rateCount`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateCount) property values.
|
13360
|
-
*/
|
13361
|
-
get rateValues(): Array<any>;
|
13362
|
-
set rateValues(val: Array<any>);
|
13363
|
-
/**
|
13364
|
-
* Specifies the first rate value in the generated sequence of rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
13365
|
-
*
|
13366
|
-
* Default value: 1
|
13367
|
-
* @see rateMax
|
13368
|
-
* @see rateStep
|
13369
|
-
* @see rateCount
|
13370
|
-
*/
|
13371
|
-
get rateMin(): number;
|
13372
|
-
set rateMin(val: number);
|
13373
|
-
/**
|
13374
|
-
* Specifies the last rate value in the generated sequence of rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
13375
|
-
*
|
13376
|
-
* Default value: 5
|
13377
|
-
* @see rateMin
|
13378
|
-
* @see rateStep
|
13379
|
-
* @see rateCount
|
13380
|
-
*/
|
13381
|
-
get rateMax(): number;
|
13382
|
-
set rateMax(val: number);
|
13383
|
-
/**
|
13384
|
-
* Specifies a step with which to generate rate values. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
13385
|
-
*
|
13386
|
-
* Default value: 1
|
13387
|
-
* @see rateMin
|
13388
|
-
* @see rateMax
|
13389
|
-
* @see rateCount
|
13390
|
-
*/
|
13391
|
-
get rateStep(): number;
|
13392
|
-
set rateStep(val: number);
|
13393
|
-
/**
|
13394
|
-
* Specifies the number of rate values you want to generate. Applies if the [`rateValues`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateValues) array is empty.
|
13395
|
-
*
|
13396
|
-
* Set the [`rateMin`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMin) or [`rateMax`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMax) property to specify the first or the last rate value. Use the [`rateStep`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateStep) property to specify a step with which to generate rate values.
|
13397
|
-
*/
|
13398
|
-
rateCount: number;
|
13399
|
-
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
|
13400
|
-
get visibleRateValues(): ItemValue[];
|
13401
|
-
itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
|
13402
|
-
private createRenderedRateItems;
|
13403
|
-
renderedRateItems: Array<RenderedRatingItem>;
|
13404
|
-
private correctValue;
|
13405
|
-
getType(): string;
|
13406
|
-
protected getFirstInputElementId(): string;
|
13407
|
-
getInputId(index: number): string;
|
13408
|
-
supportGoNextPageAutomatic(): boolean;
|
13409
|
-
supportOther(): boolean;
|
13410
|
-
/**
|
13411
|
-
* Specifies a description for the minimum (first) rate value.
|
13412
|
-
* @see rateValues
|
13413
|
-
* @see rateMin
|
13414
|
-
* @see displayRateDescriptionsAsExtremeItems
|
13415
|
-
*/
|
13416
|
-
get minRateDescription(): string;
|
13417
|
-
set minRateDescription(val: string);
|
13418
|
-
get locMinRateDescription(): LocalizableString;
|
13419
|
-
/**
|
13420
|
-
* Specifies a description for the maximum (last) rate value.
|
13421
|
-
* @see rateValues
|
13422
|
-
* @see rateMax
|
13423
|
-
* @see displayRateDescriptionsAsExtremeItems
|
13424
|
-
*/
|
13425
|
-
get maxRateDescription(): string;
|
13426
|
-
set maxRateDescription(val: string);
|
13427
|
-
get locMaxRateDescription(): LocalizableString;
|
13428
|
-
hasMinRateDescription: boolean;
|
13429
|
-
hasMaxRateDescription: boolean;
|
13430
|
-
get hasMinLabel(): boolean;
|
13431
|
-
get hasMaxLabel(): boolean;
|
13432
|
-
/**
|
13433
|
-
* Specifies whether to display `minRateDescription` and `maxRateDescription` values as captions for buttons that correspond to the extreme (first and last) rate values.
|
13434
|
-
*
|
13435
|
-
* Default value: `false`
|
13436
|
-
*
|
13437
|
-
* If this property is disabled, the `minRateDescription` and `maxRateDescription` values are displayed as plain non-clickable texts.
|
13438
|
-
*
|
13439
|
-
* If any of the `minRateDescription` and `maxRateDescription` properties is empty, the corresponding rate value's `value` or `text` is displayed as a button caption.
|
13440
|
-
* @see minRateDescription
|
13441
|
-
* @see maxRateDescription
|
13442
|
-
* @see rateMin
|
13443
|
-
* @see rateMax
|
13444
|
-
* @see rateValues
|
13445
|
-
*/
|
13446
|
-
displayRateDescriptionsAsExtremeItems: boolean;
|
13447
|
-
/**
|
13448
|
-
* Specifies how a Rating question displays rate values.
|
13449
|
-
*
|
13450
|
-
* Possible values:
|
13451
|
-
*
|
13452
|
-
* - `"buttons"` - Displays rate values as buttons in a row.
|
13453
|
-
* - `"dropdown"` - Displays rate values as items in a drop-down list.
|
13454
|
-
* - `"auto"` (default) - Selects between the `"buttons"` and `"dropdown"` modes based on the available width. When the width is insufficient to display buttons, the question displays a dropdown.
|
13455
|
-
*/
|
13456
|
-
displayMode: "dropdown" | "buttons" | "auto";
|
13457
|
-
rateType: "numbers" | "labels" | "stars" | "smileys";
|
13458
|
-
smileysColorMode: "monochrome" | "colored";
|
13459
|
-
get isStar(): boolean;
|
13460
|
-
get isSmiley(): boolean;
|
13461
|
-
get itemComponentName(): "sv-rating-item-star" | "sv-rating-item-smiley" | "sv-rating-item";
|
13462
|
-
protected valueToData(val: any): any;
|
13463
|
-
setValueFromClick(value: any): void;
|
13464
|
-
onItemMouseIn(item: RenderedRatingItem): void;
|
13465
|
-
onItemMouseOut(item: RenderedRatingItem): void;
|
13466
|
-
get ratingRootCss(): string;
|
13467
|
-
getItemSmiley(item: ItemValue): string;
|
13468
|
-
getItemSmileyIconName(item: ItemValue): string;
|
13469
|
-
getItemClass(item: ItemValue, highlight?: "none" | "highlighted" | "unhighlighted"): string;
|
13470
|
-
getControlClass(): string;
|
13471
|
-
get placeholder(): string;
|
13472
|
-
set placeholder(val: string);
|
13473
|
-
get locPlaceholder(): LocalizableString;
|
13474
|
-
get allowClear(): boolean;
|
13475
|
-
get searchEnabled(): boolean;
|
13476
|
-
get renderedValue(): any;
|
13477
|
-
set renderedValue(val: any);
|
13478
|
-
isItemSelected(item: ItemValue): boolean;
|
13479
|
-
get visibleChoices(): ItemValue[];
|
13480
|
-
get readOnlyText(): any;
|
13481
|
-
needResponsiveWidth(): boolean;
|
13482
|
-
protected supportResponsiveness(): boolean;
|
13483
|
-
protected getCompactRenderAs(): string;
|
13484
|
-
protected getDesktopRenderAs(): string;
|
13485
|
-
private dropdownListModelValue;
|
13486
|
-
set dropdownListModel(val: DropdownListModel);
|
13487
|
-
get dropdownListModel(): DropdownListModel;
|
13488
|
-
protected updateCssClasses(res: any, css: any): void;
|
13489
|
-
protected calcCssClasses(css: any): any;
|
13490
|
-
}
|
13491
|
-
}
|
13492
13533
|
declare module "question_boolean" {
|
13493
13534
|
import { Question } from "question";
|
13494
13535
|
import { LocalizableString } from "localizablestring";
|
@@ -13865,8 +13906,8 @@ declare module "question_custom" {
|
|
13865
13906
|
*
|
13866
13907
|
* Refer to the following articles for more information:
|
13867
13908
|
*
|
13868
|
-
* - [Create Specialized Question Types](https://surveyjs.io/
|
13869
|
-
* - [Create Composite Question Types](https://surveyjs.io/
|
13909
|
+
* - [Create Specialized Question Types](https://surveyjs.io/form-library/documentation/customize-question-types/create-specialized-question-types)
|
13910
|
+
* - [Create Composite Question Types](https://surveyjs.io/form-library/documentation/customize-question-types/create-composite-question-types)
|
13870
13911
|
*/
|
13871
13912
|
export interface ICustomQuestionTypeConfiguration {
|
13872
13913
|
/**
|
@@ -13886,7 +13927,7 @@ declare module "question_custom" {
|
|
13886
13927
|
*/
|
13887
13928
|
icon?: string;
|
13888
13929
|
/**
|
13889
|
-
* A function that is called when the custom question type is initialized. Use it to add, remove, or modify the type's properties (see [Override Base Question Properties](https://surveyjs.io/
|
13930
|
+
* A function that is called when the custom question type is initialized. Use it to add, remove, or modify the type's properties (see [Override Base Question Properties](https://surveyjs.io/form-library/documentation/customize-question-types/create-composite-question-types#override-base-question-properties)).
|
13890
13931
|
*/
|
13891
13932
|
onInit?(): void;
|
13892
13933
|
/**
|
@@ -13898,7 +13939,7 @@ declare module "question_custom" {
|
|
13898
13939
|
*/
|
13899
13940
|
showInToolbox?: boolean;
|
13900
13941
|
/**
|
13901
|
-
* A function that is called when the custom question is created. Use it to access questions nested within a [composite question type](https://surveyjs.io/
|
13942
|
+
* A function that is called when the custom question is created. Use it to access questions nested within a [composite question type](https://surveyjs.io/form-library/documentation/customize-question-types/create-composite-question-types).
|
13902
13943
|
*
|
13903
13944
|
* Parameters:
|
13904
13945
|
*
|
@@ -13927,7 +13968,7 @@ declare module "question_custom" {
|
|
13927
13968
|
*/
|
13928
13969
|
onAfterRender?(question: Question, htmlElement: any): void;
|
13929
13970
|
/**
|
13930
|
-
* A function that is called each time a question nested within a [composite question](https://surveyjs.io/
|
13971
|
+
* A function that is called each time a question nested within a [composite question](https://surveyjs.io/form-library/documentation/customize-question-types/create-composite-question-types) is rendered.
|
13931
13972
|
*
|
13932
13973
|
* Parameters:
|
13933
13974
|
*
|
@@ -13940,7 +13981,7 @@ declare module "question_custom" {
|
|
13940
13981
|
*/
|
13941
13982
|
onAfterRenderContentElement?(question: Question, element: Question, htmlElement: any): void;
|
13942
13983
|
/**
|
13943
|
-
* A function that is called each time a question nested within a [composite question](https://surveyjs.io/
|
13984
|
+
* A function that is called each time a question nested within a [composite question](https://surveyjs.io/form-library/documentation/customize-question-types/create-composite-question-types) requires an update of its CSS classes.
|
13944
13985
|
*
|
13945
13986
|
* Parameters:
|
13946
13987
|
*
|
@@ -14020,7 +14061,7 @@ declare module "question_custom" {
|
|
14020
14061
|
*/
|
14021
14062
|
getDisplayValue?: ((keyAsText: boolean, value: any) => any) | ((question: Question) => any);
|
14022
14063
|
/**
|
14023
|
-
* JSON schemas of nested questions. Specify this property to create a [composite question type](https://surveyjs.io/
|
14064
|
+
* JSON schemas of nested questions. Specify this property to create a [composite question type](https://surveyjs.io/form-library/documentation/customize-question-types/create-composite-question-types).
|
14024
14065
|
*/
|
14025
14066
|
elementsJSON?: any;
|
14026
14067
|
/**
|
@@ -14032,7 +14073,7 @@ declare module "question_custom" {
|
|
14032
14073
|
/**
|
14033
14074
|
* A JSON schema for a built-in question type on which the custom question type is based.
|
14034
14075
|
*
|
14035
|
-
* Refer to the [Create Specialized Question Types](https://surveyjs.io/
|
14076
|
+
* Refer to the [Create Specialized Question Types](https://surveyjs.io/form-library/documentation/customize-question-types/create-specialized-question-types) help topic for more information.
|
14036
14077
|
*/
|
14037
14078
|
questionJSON?: any;
|
14038
14079
|
/**
|