survey-react 1.9.39 → 1.9.40
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 +47 -3
- package/defaultV2.min.css +2 -2
- package/modern.css +33 -3
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +29 -2
- package/survey.min.css +2 -2
- package/survey.react.d.ts +157 -13
- package/survey.react.js +767 -512
- 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.40
|
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
|
*/
|
@@ -189,6 +189,10 @@ export interface IAction {
|
|
189
189
|
visibleIndex?: number;
|
190
190
|
needSpace?: boolean;
|
191
191
|
}
|
192
|
+
export interface IAttachKey2clickOptions {
|
193
|
+
processEsc?: boolean;
|
194
|
+
disableTabStop?: boolean;
|
195
|
+
}
|
192
196
|
export interface IDimensions {
|
193
197
|
scroll: number;
|
194
198
|
offset: number;
|
@@ -531,24 +535,127 @@ export interface IQuestionPanelDynamicData {
|
|
531
535
|
getSurvey(): ISurvey;
|
532
536
|
getRootData(): ISurveyData;
|
533
537
|
}
|
534
|
-
|
538
|
+
/*
|
539
|
+
* An interface used to create custom question types.
|
540
|
+
*
|
541
|
+
* Refer to the following articles for more information:
|
542
|
+
*
|
543
|
+
* - [Create Specialized Question Types](https://surveyjs.io/Documentation/Survey-Creator?id=create-specialized-question-types)
|
544
|
+
* - [Create Composite Question Types](https://surveyjs.io/Documentation/Survey-Creator?id=create-composite-question-types)
|
545
|
+
*/
|
546
|
+
export interface ICustomQuestionTypeConfiguration {
|
547
|
+
/*
|
548
|
+
* A name used to identify a custom question type.
|
549
|
+
*/
|
535
550
|
name: string;
|
551
|
+
/*
|
552
|
+
* A title used for this custom question type in the UI. When `title` is not specified, the `name` property value is used.
|
553
|
+
*/
|
554
|
+
title?: string;
|
555
|
+
/*
|
556
|
+
* An icon for the custom question type.
|
557
|
+
*/
|
558
|
+
icon?: string;
|
559
|
+
/*
|
560
|
+
* 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/Documentation/Survey-Creator?id=create-composite-question-types#override-base-question-properties)).
|
561
|
+
*/
|
536
562
|
onInit(): void;
|
537
563
|
/*
|
538
|
-
*
|
564
|
+
* Specifies whether the custom question type is available in the Toolbox and the Add Question menu.
|
565
|
+
*
|
566
|
+
* Default value: `true`
|
567
|
+
*
|
568
|
+
* Set this property to `false` if your custom question type is used only to customize Property Grid content and is not meant for a survey.
|
539
569
|
*/
|
540
570
|
showInToolbox?: boolean;
|
571
|
+
/*
|
572
|
+
* 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/Documentation/Survey-Creator?id=create-composite-question-types).
|
573
|
+
*
|
574
|
+
* Parameters:
|
575
|
+
*
|
576
|
+
* - `question`: [Question](https://surveyjs.io/Documentation/Library?id=Question) - The custom question.
|
577
|
+
*/
|
541
578
|
onCreated(question: Question): void;
|
579
|
+
/*
|
580
|
+
* A function that is called when JSON definitions are loaded.
|
581
|
+
*
|
582
|
+
* Parameters:
|
583
|
+
*
|
584
|
+
* - `question`: [Question](https://surveyjs.io/Documentation/Library?id=Question) - The custom question.
|
585
|
+
*/
|
542
586
|
onLoaded(question: Question): void;
|
587
|
+
/*
|
588
|
+
* A function that is called after the entire question is rendered.
|
589
|
+
*
|
590
|
+
* Parameters:
|
591
|
+
*
|
592
|
+
* - `question`: [Question](https://surveyjs.io/Documentation/Library?id=Question) - The custom question.
|
593
|
+
* - `htmlElement`: any - An HTML element that represents the custom question.
|
594
|
+
*/
|
543
595
|
onAfterRender(question: Question, htmlElement: any): void;
|
596
|
+
/*
|
597
|
+
* A function that is called each time a question nested within a [composite question](https://surveyjs.io/Documentation/Survey-Creator?id=create-composite-question-types) is rendered.
|
598
|
+
*
|
599
|
+
* Parameters:
|
600
|
+
*
|
601
|
+
* - `question`: [Question](https://surveyjs.io/Documentation/Library?id=Question) - The composite question.
|
602
|
+
* - `element`: [Question](https://surveyjs.io/Documentation/Library?id=Question) - A nested question.
|
603
|
+
* - `htmlElement`: any - An HTML element that represents the nested question.
|
604
|
+
*/
|
544
605
|
onAfterRenderContentElement(question: Question, element: Question, htmlElement: any): void;
|
606
|
+
/*
|
607
|
+
* A function that is called when a custom question type property is changed. Use it to handle property changes.
|
608
|
+
*
|
609
|
+
* Parameters:
|
610
|
+
*
|
611
|
+
* - `question`: [Question](https://surveyjs.io/Documentation/Library?id=Question) - The custom question.
|
612
|
+
* - `propertyName`: string - The name of the changed property.
|
613
|
+
* - `newValue`: any - A new value for the property.
|
614
|
+
*/
|
545
615
|
onPropertyChanged(question: Question, propertyName: string, newValue: any): void;
|
616
|
+
/*
|
617
|
+
* A function that is called when the question value is changed.
|
618
|
+
*
|
619
|
+
* Parameters:
|
620
|
+
*
|
621
|
+
* - `question`: [Question](https://surveyjs.io/Documentation/Library?id=Question) - The custom question.
|
622
|
+
* - `name`: string - The question's [name](https://surveyjs.io/Documentation/Library?id=Question#name).
|
623
|
+
* - `newValue`: any - A new value for the question.
|
624
|
+
*/
|
546
625
|
onValueChanged(question: Question, name: string, newValue: any): void;
|
626
|
+
/*
|
627
|
+
* A function that is called when an [ItemValue](https://surveyjs.io/Documentation/Library?id=itemvalue) property is changed.
|
628
|
+
*
|
629
|
+
* Parameters:
|
630
|
+
*
|
631
|
+
* - `question`: [Question](https://surveyjs.io/Documentation/Library?id=Question) - The custom question.
|
632
|
+
* - `options.obj`: [ItemValue](https://surveyjs.io/Documentation/Library?id=itemvalue) - An `ItemValue` object.
|
633
|
+
* - `options.propertyName`: string - The name of the property to which an array of `ItemValue` objects is assigned (for example, `"choices"` or `"rows"`).
|
634
|
+
* - `options.name`: string - The name of the changed property: `"text"` or `"value"`.
|
635
|
+
* - `options.newValue`: any - A new value for the property.
|
636
|
+
*/
|
547
637
|
onItemValuePropertyChanged(question: Question, options: any): void;
|
638
|
+
/*
|
639
|
+
* A function that allows you to override the default `getDisplayValue()` implementation.
|
640
|
+
*/
|
548
641
|
getDisplayValue?: any;
|
642
|
+
/*
|
643
|
+
* JSON definitions of nested questions. Specify this property to create a [composite question type](https://surveyjs.io/Documentation/Survey-Creator?id=create-composite-question-types).
|
644
|
+
*/
|
549
645
|
elementsJSON?: any;
|
646
|
+
/*
|
647
|
+
* A function that allows you to create nested questions if you do not specify the `elementsJSON` property.
|
648
|
+
*/
|
550
649
|
createElements?: any;
|
650
|
+
/*
|
651
|
+
* A JSON definition for a built-in question type on which the custom question type is based.
|
652
|
+
*
|
653
|
+
* Refer to the [Create Specialized Question Types](https://surveyjs.io/Documentation/Survey-Creator?id=create-specialized-question-types) help topic for more information.
|
654
|
+
*/
|
551
655
|
questionJSON?: any;
|
656
|
+
/*
|
657
|
+
* A function that allows you to create a custom question if you do not specify the `questionJSON` property.
|
658
|
+
*/
|
552
659
|
createQuestion?: any;
|
553
660
|
}
|
554
661
|
export interface IActionBarItemProps {
|
@@ -812,6 +919,11 @@ export declare class Bindings {
|
|
812
919
|
getJson(): any;
|
813
920
|
setJson(value: any): void;
|
814
921
|
}
|
922
|
+
export declare class BrandInfo extends React.Component<any, any> {
|
923
|
+
constructor(props: any);
|
924
|
+
constructor(props: any, context: any);
|
925
|
+
render(): JSX.Element;
|
926
|
+
}
|
815
927
|
export declare class ButtonGroupItemModel {
|
816
928
|
constructor(question: QuestionButtonGroupModel, item: ItemValue, index: number);
|
817
929
|
question: QuestionButtonGroupModel;
|
@@ -838,7 +950,7 @@ export declare class ComponentCollection {
|
|
838
950
|
onCreateComposite: (name: string, questionJSON: ComponentQuestionJSON) => QuestionCompositeModel;
|
839
951
|
onCreateCustom: (name: string, questionJSON: ComponentQuestionJSON) => QuestionCustomModel;
|
840
952
|
onAddingJson: (name: string, isComposite: boolean) => void;
|
841
|
-
add(json:
|
953
|
+
add(json: ICustomQuestionTypeConfiguration): void;
|
842
954
|
get items(): any;
|
843
955
|
getCustomQuestionByName(name: string): ComponentQuestionJSON;
|
844
956
|
clear(): void;
|
@@ -847,9 +959,9 @@ export declare class ComponentCollection {
|
|
847
959
|
protected createCustomModel(name: string, questionJSON: ComponentQuestionJSON): QuestionCustomModel;
|
848
960
|
}
|
849
961
|
export declare class ComponentQuestionJSON {
|
850
|
-
constructor(name: string, json:
|
962
|
+
constructor(name: string, json: ICustomQuestionTypeConfiguration);
|
851
963
|
name: string;
|
852
|
-
json:
|
964
|
+
json: ICustomQuestionTypeConfiguration;
|
853
965
|
onInit(): void;
|
854
966
|
onCreated(question: Question): void;
|
855
967
|
onLoaded(question: Question): void;
|
@@ -1801,6 +1913,16 @@ export declare class DragDropCore<T> extends Base {
|
|
1801
1913
|
protected clear: any;
|
1802
1914
|
protected doClear(): void;
|
1803
1915
|
}
|
1916
|
+
export declare class DropdownListModel extends Base {
|
1917
|
+
constructor(question: Question);
|
1918
|
+
_popupModel: any;
|
1919
|
+
get popupModel(): any;
|
1920
|
+
updateItems(): void;
|
1921
|
+
onClick(event: any): void;
|
1922
|
+
onClear(event: any): void;
|
1923
|
+
onKeyUp(event: any): void;
|
1924
|
+
onBlur(event: any): void;
|
1925
|
+
}
|
1804
1926
|
export declare class EventBase<T> extends Event<any, any> {
|
1805
1927
|
}
|
1806
1928
|
export declare class ExceedSizeError extends SurveyError {
|
@@ -2086,6 +2208,7 @@ export declare class LocalizableString implements ILocalizableString {
|
|
2086
2208
|
localizationName: string;
|
2087
2209
|
onGetTextCallback: (str: string) => string;
|
2088
2210
|
onGetDefaultTextCallback: any;
|
2211
|
+
storeDefaultText: boolean;
|
2089
2212
|
onGetLocalizationTextCallback: (str: string) => string;
|
2090
2213
|
onStrChanged: (oldValue: string, newValue: string) => void;
|
2091
2214
|
onSearchChanged: any;
|
@@ -2180,6 +2303,9 @@ export declare class MatrixDropdownColumn extends Base implements ILocalizableOw
|
|
2180
2303
|
get fullTitle(): string;
|
2181
2304
|
get isRequired(): boolean;
|
2182
2305
|
set isRequired(val: boolean);
|
2306
|
+
get isRenderedRequired(): boolean;
|
2307
|
+
set isRenderedRequired(val: boolean);
|
2308
|
+
updateIsRenderedRequired(val: boolean): void;
|
2183
2309
|
get requiredText(): string;
|
2184
2310
|
get requiredErrorText(): string;
|
2185
2311
|
set requiredErrorText(val: string);
|
@@ -4279,6 +4405,7 @@ export declare class SurveyModel extends SurveyElementCore implements ISurvey, I
|
|
4279
4405
|
get completedStateCss(): string;
|
4280
4406
|
getCompletedStateCss(): string;
|
4281
4407
|
lazyRenderingValue: boolean;
|
4408
|
+
showBrandInfo: boolean;
|
4282
4409
|
/*
|
4283
4410
|
* By default all rows are rendered no matters if they are visible or not.
|
4284
4411
|
* Set it true, and survey markup rows will be rendered only if they are visible in viewport.
|
@@ -5637,6 +5764,13 @@ export declare class SurveyQuestionMatrixDynamicRemoveButton extends ReactSurvey
|
|
5637
5764
|
handleOnRowRemoveClick(event: any): void;
|
5638
5765
|
protected renderElement(): JSX.Element;
|
5639
5766
|
}
|
5767
|
+
export declare class SurveyQuestionMatrixHeaderRequired extends ReactSurveyElement {
|
5768
|
+
constructor(props: any);
|
5769
|
+
get column(): MatrixDropdownColumn;
|
5770
|
+
get question(): any;
|
5771
|
+
protected getStateElement(): Base;
|
5772
|
+
protected renderElement(): JSX.Element;
|
5773
|
+
}
|
5640
5774
|
export declare class SurveyQuestionMatrixRow extends ReactSurveyElement {
|
5641
5775
|
constructor(props: any);
|
5642
5776
|
handleOnChange(event: any): void;
|
@@ -6725,10 +6859,14 @@ export declare class SurveyQuestionCustom extends SurveyQuestionUncontrolledElem
|
|
6725
6859
|
}
|
6726
6860
|
export declare class SurveyQuestionDropdownBase<T> extends SurveyQuestionUncontrolledElement<T> {
|
6727
6861
|
constructor(props: any);
|
6728
|
-
|
6862
|
+
click: (event: any) => void;
|
6863
|
+
clear: (event: any) => void;
|
6864
|
+
keyup: (event: any) => void;
|
6865
|
+
blur: (event: any) => void;
|
6729
6866
|
protected setValueCore(newValue: any): void;
|
6730
6867
|
protected getValueCore(): any;
|
6731
6868
|
protected renderSelect(cssClasses: any): JSX.Element;
|
6869
|
+
createClearButton(): JSX.Element;
|
6732
6870
|
}
|
6733
6871
|
export declare class SurveyQuestionMatrixDropdown extends SurveyQuestionMatrixDropdownBase {
|
6734
6872
|
constructor(props: any);
|
@@ -8426,6 +8564,7 @@ export declare class QuestionCustomModel extends QuestionCustomModelBase {
|
|
8426
8564
|
*/
|
8427
8565
|
export declare class QuestionDropdownModel extends QuestionSelectBase {
|
8428
8566
|
constructor(name: string);
|
8567
|
+
dropdownListModel: DropdownListModel;
|
8429
8568
|
get showOptionsCaption(): boolean;
|
8430
8569
|
set showOptionsCaption(val: boolean);
|
8431
8570
|
get optionsCaption(): string;
|
@@ -8470,13 +8609,12 @@ export declare class QuestionDropdownModel extends QuestionSelectBase {
|
|
8470
8609
|
denySearch: boolean;
|
8471
8610
|
getControlClass(): string;
|
8472
8611
|
get readOnlyText(): any;
|
8473
|
-
onClear(event: any): void;
|
8474
|
-
protected onVisibleChoicesChanged(): void;
|
8475
|
-
_popupModel: any;
|
8476
8612
|
get popupModel(): any;
|
8477
8613
|
onOpened: EventBase<QuestionDropdownModel>;
|
8478
8614
|
onOpenedCallBack(): void;
|
8479
|
-
|
8615
|
+
protected onVisibleChoicesChanged(): void;
|
8616
|
+
onClick(e: any): void;
|
8617
|
+
onKeyUp(event: any): void;
|
8480
8618
|
}
|
8481
8619
|
/*
|
8482
8620
|
* A Model for html question. Unlike other questions it doesn't have value and title.
|
@@ -8563,6 +8701,8 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
|
|
8563
8701
|
onHasDetailPanelCallback: (row: MatrixDropdownRowModelBase) => boolean;
|
8564
8702
|
onCreateDetailPanelCallback: (row: MatrixDropdownRowModelBase, panel: PanelModel) => void;
|
8565
8703
|
onCreateDetailPanelRenderedRowCallback: (renderedRow: QuestionMatrixDropdownRenderedRow) => void;
|
8704
|
+
onAddColumn: (column: MatrixDropdownColumn) => void;
|
8705
|
+
onRemoveColumn: (column: MatrixDropdownColumn) => void;
|
8566
8706
|
protected createColumnValues(): any;
|
8567
8707
|
/*
|
8568
8708
|
* Returns the type of the object as a string as it represents in the json.
|
@@ -8953,7 +9093,6 @@ export declare class QuestionTextModel extends QuestionTextBase {
|
|
8953
9093
|
export declare class SurveyQuestionDropdownSelect extends SurveyQuestionDropdown {
|
8954
9094
|
constructor(props: any);
|
8955
9095
|
protected renderSelect(cssClasses: any): JSX.Element;
|
8956
|
-
createClearButton(): JSX.Element;
|
8957
9096
|
}
|
8958
9097
|
/*
|
8959
9098
|
* A Model for a button group question.
|
@@ -9406,7 +9545,7 @@ export declare function getSize(value: any): any;
|
|
9406
9545
|
export declare function createPopupModalViewModel(componentName: string, data: any, onApply: any, onCancel?: any, onHide?: any, onShow?: any, cssClass?: string, title?: string, displayMode?: "popup" | "overlay"): PopupBaseViewModel;
|
9407
9546
|
export declare function getCurrecyCodes(): Array<any>;
|
9408
9547
|
export declare function showModal(componentName: string, data: any, onApply: any, onCancel?: any, cssClass?: string, title?: string, displayMode?: "popup" | "overlay"): void;
|
9409
|
-
export declare function attachKey2click(element: JSX.Element, viewModel?: any, options?:
|
9548
|
+
export declare function attachKey2click(element: JSX.Element, viewModel?: any, options?: IAttachKey2clickOptions): JSX.Element;
|
9410
9549
|
/*
|
9411
9550
|
* Global survey settings
|
9412
9551
|
*/
|
@@ -9606,6 +9745,10 @@ export declare var settings: {
|
|
9606
9745
|
panel: string,
|
9607
9746
|
question: string,
|
9608
9747
|
},
|
9748
|
+
questions: {
|
9749
|
+
inputTypes: any,
|
9750
|
+
dataList: any,
|
9751
|
+
},
|
9609
9752
|
};
|
9610
9753
|
export declare var surveyLocalization: {
|
9611
9754
|
currentLocaleValue: string,
|
@@ -11041,6 +11184,7 @@ export declare var defaultV2Css: {
|
|
11041
11184
|
maxText: string,
|
11042
11185
|
itemDisabled: string,
|
11043
11186
|
control: string,
|
11187
|
+
controlValue: string,
|
11044
11188
|
controlDisabled: string,
|
11045
11189
|
controlEmpty: string,
|
11046
11190
|
onError: string,
|