survey-react-ui 1.8.79 → 1.9.3
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/package.json +3 -3
- package/survey-react-ui.d.ts +46 -14
- package/survey-react-ui.js +163 -108
- package/survey-react-ui.min.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-react-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"typings": "survey-react-ui.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"survey-core": "*",
|
|
29
|
-
"react": "^17.0.1",
|
|
30
|
-
"react-dom": "^17.0.1"
|
|
29
|
+
"react": "^16.5.0 || ^17.0.1",
|
|
30
|
+
"react-dom": "^16.5.0 || ^17.0.1"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/survey-react-ui.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*Type definitions for Survey JavaScript library v1.
|
|
1
|
+
/*Type definitions for Survey JavaScript library v1.9.3
|
|
2
2
|
Copyright (c) 2015-2021 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
3
3
|
Definitions by: Devsoft Baltic OÜ <https://github.com/surveyjs/>
|
|
4
4
|
*/
|
|
@@ -168,6 +168,7 @@ export declare class SurveyPanel extends SurveyPanelBase {
|
|
|
168
168
|
constructor(props: any);
|
|
169
169
|
get panel(): PanelModel;
|
|
170
170
|
protected renderElement(): JSX.Element;
|
|
171
|
+
protected renderHeader(): JSX.Element;
|
|
171
172
|
protected wrapElement(element: JSX.Element): JSX.Element;
|
|
172
173
|
protected renderContent(style: any, rows: JSX.Element[], className: string): JSX.Element;
|
|
173
174
|
protected renderTitle(): JSX.Element;
|
|
@@ -388,6 +389,9 @@ export declare class SurveyQuestionMatrixRow extends ReactSurveyElement {
|
|
|
388
389
|
export declare class SurveyQuestionHtml extends SurveyQuestionElementBase {
|
|
389
390
|
constructor(props: any);
|
|
390
391
|
protected get question(): QuestionHtmlModel;
|
|
392
|
+
componentDidMount(): void;
|
|
393
|
+
componentWillUnmount(): void;
|
|
394
|
+
componentDidUpdate(prevProps: any, prevState: any): void;
|
|
391
395
|
protected canRender(): boolean;
|
|
392
396
|
protected renderElement(): JSX.Element;
|
|
393
397
|
}
|
|
@@ -398,6 +402,7 @@ export declare class SurveyQuestionFile extends SurveyQuestionElementBase {
|
|
|
398
402
|
protected renderElement(): JSX.Element;
|
|
399
403
|
protected renderFileDecorator(): JSX.Element;
|
|
400
404
|
protected renderClearButton(className: string): JSX.Element;
|
|
405
|
+
protected renderFileSign(className: string, val: any): JSX.Element;
|
|
401
406
|
protected renderPreview(): JSX.Element;
|
|
402
407
|
}
|
|
403
408
|
|
|
@@ -514,11 +519,12 @@ export declare class SurveyQuestionPanelDynamic extends SurveyQuestionElementBas
|
|
|
514
519
|
handleOnRangeChange(event: any): void;
|
|
515
520
|
protected renderElement(): JSX.Element;
|
|
516
521
|
protected renderNavigator(): JSX.Element;
|
|
517
|
-
protected rendrerPrevButton(
|
|
518
|
-
protected rendrerNextButton(
|
|
522
|
+
protected rendrerPrevButton(): JSX.Element;
|
|
523
|
+
protected rendrerNextButton(): JSX.Element;
|
|
519
524
|
protected renderRange(): JSX.Element;
|
|
520
525
|
protected renderAddRowButton(): JSX.Element;
|
|
521
526
|
protected renderNavigatorV2(): JSX.Element;
|
|
527
|
+
protected renderPlaceholder(): JSX.Element;
|
|
522
528
|
}
|
|
523
529
|
export declare class SurveyQuestionPanelDynamicItem extends SurveyPanel {
|
|
524
530
|
constructor(props: any);
|
|
@@ -838,7 +844,7 @@ declare function isElementVisible(element: HTMLElement, threshold?: number): boo
|
|
|
838
844
|
declare function findScrollableParent(element: HTMLElement): HTMLElement;
|
|
839
845
|
declare function scrollElementByChildId(id: string): void;
|
|
840
846
|
declare function getIconNameFromProxy(iconName: string): string;
|
|
841
|
-
declare function createSvg(size: number, width: number, height: number, iconName: string, svgElem: any): void;
|
|
847
|
+
declare function createSvg(size: number | string, width: number, height: number, iconName: string, svgElem: any): void;
|
|
842
848
|
export declare function unwrap<T>(value: T | (() => T)): T;
|
|
843
849
|
export declare function getSize(value: any): any;
|
|
844
850
|
declare function doKey2ClickUp(evt: KeyboardEvent, options?: {
|
|
@@ -931,6 +937,8 @@ export declare class QuestionCheckboxModel extends QuestionCheckboxBase {
|
|
|
931
937
|
protected onAfterRunItemsEnableCondition(): void;
|
|
932
938
|
protected getItemClassCore(item: any, options: any): string;
|
|
933
939
|
updateValueFromSurvey(newValue: any): void;
|
|
940
|
+
protected setDefaultValue(): void;
|
|
941
|
+
protected hasValueToClearIncorrectValues(): boolean;
|
|
934
942
|
protected setNewValue(newValue: any): void;
|
|
935
943
|
protected getIsMultipleValue(): boolean;
|
|
936
944
|
protected getCommentFromValue(newValue: any): string;
|
|
@@ -1108,7 +1116,7 @@ export declare class Base {
|
|
|
1108
1116
|
* @param val new property value
|
|
1109
1117
|
*/
|
|
1110
1118
|
setPropertyValue(name: string, val: any): void;
|
|
1111
|
-
protected setArrayPropertyDirectly(name: string, val: any): void;
|
|
1119
|
+
protected setArrayPropertyDirectly(name: string, val: any, sendNotification?: boolean): void;
|
|
1112
1120
|
protected setPropertyValueDirectly(name: string, val: any): void;
|
|
1113
1121
|
protected clearPropertyValue(name: string): void;
|
|
1114
1122
|
onPropertyValueChangedCallback(name: string, oldValue: any, newValue: any, sender: Base, arrayChanges: ArrayChanges): void;
|
|
@@ -1143,7 +1151,7 @@ export declare class Base {
|
|
|
1143
1151
|
*/
|
|
1144
1152
|
unRegisterFunctionOnPropertiesValueChanged(names: Array<string>, key?: string): void;
|
|
1145
1153
|
createCustomLocalizableObj(name: string): void;
|
|
1146
|
-
protected createLocalizableString(name: string, owner: ILocalizableOwner, useMarkDown?: boolean,
|
|
1154
|
+
protected createLocalizableString(name: string, owner: ILocalizableOwner, useMarkDown?: boolean, defaultStr?: boolean | string): LocalizableString;
|
|
1147
1155
|
getLocalizableString(name: string): LocalizableString;
|
|
1148
1156
|
getLocalizableStringText(name: string, defaultStr?: string): string;
|
|
1149
1157
|
setLocalizableStringText(name: string, value: string): void;
|
|
@@ -1407,9 +1415,7 @@ export declare class QuestionSelectBase extends Question {
|
|
|
1407
1415
|
/**
|
|
1408
1416
|
* Use this property to set the place holder text for other or comment field .
|
|
1409
1417
|
*/
|
|
1410
|
-
|
|
1411
|
-
set otherPlaceHolder(val: string);
|
|
1412
|
-
get locOtherPlaceHolder(): LocalizableString;
|
|
1418
|
+
otherPlaceHolder: string;
|
|
1413
1419
|
/**
|
|
1414
1420
|
* The text that shows when the other item is choosed by the other input is empty.
|
|
1415
1421
|
*/
|
|
@@ -1477,6 +1483,7 @@ export declare class QuestionSelectBase extends Question {
|
|
|
1477
1483
|
onSurveyValueChanged(newValue: any): void;
|
|
1478
1484
|
protected onVisibleChoicesChanged(): void;
|
|
1479
1485
|
clearIncorrectValues(): void;
|
|
1486
|
+
protected hasValueToClearIncorrectValues(): boolean;
|
|
1480
1487
|
clearValueIfInvisible(): void;
|
|
1481
1488
|
/**
|
|
1482
1489
|
* Returns true if item is selected
|
|
@@ -1608,15 +1615,16 @@ export declare class LocalizableStrings implements ILocalizableString {
|
|
|
1608
1615
|
setJson(value: any): void;
|
|
1609
1616
|
}
|
|
1610
1617
|
|
|
1611
|
-
export interface IPropertyDecoratorOptions {
|
|
1612
|
-
defaultValue?:
|
|
1618
|
+
export interface IPropertyDecoratorOptions<T = any> {
|
|
1619
|
+
defaultValue?: T;
|
|
1613
1620
|
defaultSource?: string;
|
|
1621
|
+
getDefaultValue?: (objectInstance?: any) => T;
|
|
1614
1622
|
localizable?: {
|
|
1615
1623
|
name?: string;
|
|
1616
1624
|
onGetTextCallback?: (str: string) => string;
|
|
1617
1625
|
defaultStr?: string;
|
|
1618
1626
|
} | boolean;
|
|
1619
|
-
onSet?: (val:
|
|
1627
|
+
onSet?: (val: T, objectInstance: any) => void;
|
|
1620
1628
|
}
|
|
1621
1629
|
export declare function property(options?: IPropertyDecoratorOptions): (target: any, key: string) => void;
|
|
1622
1630
|
export interface IArrayPropertyDecoratorOptions {
|
|
@@ -1869,6 +1877,7 @@ export interface ISurvey extends ITextProcessor, ISurveyErrorOwner {
|
|
|
1869
1877
|
requiredText: string;
|
|
1870
1878
|
beforeSettingQuestionErrors(question: IQuestion, errors: Array<SurveyError>): void;
|
|
1871
1879
|
beforeSettingPanelErrors(question: IPanel, errors: Array<SurveyError>): void;
|
|
1880
|
+
getSurveyErrorCustomText(obj: Base, text: string, error: SurveyError): string;
|
|
1872
1881
|
getElementTitleTagName(element: Base, tagName: string): string;
|
|
1873
1882
|
questionTitlePattern: string;
|
|
1874
1883
|
getUpdatedQuestionTitle(question: IQuestion, title: string): string;
|
|
@@ -2202,6 +2211,7 @@ export interface IAction {
|
|
|
2202
2211
|
* Set this property to true to activate the toolbar item (page)
|
|
2203
2212
|
*/
|
|
2204
2213
|
active?: boolean;
|
|
2214
|
+
pressed?: boolean;
|
|
2205
2215
|
/**
|
|
2206
2216
|
* Toolbar item template name
|
|
2207
2217
|
*/
|
|
@@ -2265,6 +2275,7 @@ export declare class Action extends Base implements IAction {
|
|
|
2265
2275
|
popupModel: any;
|
|
2266
2276
|
needSeparator: boolean;
|
|
2267
2277
|
active: boolean;
|
|
2278
|
+
pressed: boolean;
|
|
2268
2279
|
template: string;
|
|
2269
2280
|
component: string;
|
|
2270
2281
|
items: any;
|
|
@@ -2345,8 +2356,6 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
|
|
|
2345
2356
|
*/
|
|
2346
2357
|
onReadyChanged: EventBase<Question>;
|
|
2347
2358
|
isReadOnlyRenderDiv(): boolean;
|
|
2348
|
-
get isErrorsModeTooltip(): boolean;
|
|
2349
|
-
get hasParent(): boolean;
|
|
2350
2359
|
constructor(name: string);
|
|
2351
2360
|
protected createLocTitleProperty(): LocalizableString;
|
|
2352
2361
|
getSurvey(live?: boolean): ISurvey;
|
|
@@ -2519,6 +2528,11 @@ export declare class Question extends SurveyElement implements IQuestion, ICondi
|
|
|
2519
2528
|
get commentText(): string;
|
|
2520
2529
|
set commentText(val: string);
|
|
2521
2530
|
get locCommentText(): LocalizableString;
|
|
2531
|
+
/**
|
|
2532
|
+
* Use this property to set the place holder text for comment field .
|
|
2533
|
+
*/
|
|
2534
|
+
commentPlaceHolder: string;
|
|
2535
|
+
get commentOrOtherPlaceHolder(): string;
|
|
2522
2536
|
/**
|
|
2523
2537
|
* Returns a copy of question errors survey. For some questions like matrix and panel dynamic it includes the errors of nested questions.
|
|
2524
2538
|
*/
|
|
@@ -3028,6 +3042,7 @@ export interface IMatrixDropdownData {
|
|
|
3028
3042
|
getRenderer(name: string): string;
|
|
3029
3043
|
getRendererContext(locStr: LocalizableString): any;
|
|
3030
3044
|
getProcessedText(text: string): string;
|
|
3045
|
+
getParentTextProcessor(): ITextProcessor;
|
|
3031
3046
|
getSharedQuestionByName(columnName: string, row: MatrixDropdownRowModelBase): Question;
|
|
3032
3047
|
onTotalValueChanged(): any;
|
|
3033
3048
|
getSurvey(): ISurvey;
|
|
@@ -3341,9 +3356,11 @@ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseM
|
|
|
3341
3356
|
setIsDetailPanelShowing(row: MatrixDropdownRowModelBase, val: boolean): void;
|
|
3342
3357
|
getDetailPanelButtonCss(row: MatrixDropdownRowModelBase): string;
|
|
3343
3358
|
getDetailPanelIconCss(row: MatrixDropdownRowModelBase): string;
|
|
3359
|
+
getDetailPanelIconId(row: MatrixDropdownRowModelBase): string;
|
|
3344
3360
|
createRowDetailPanel(row: MatrixDropdownRowModelBase): PanelModel;
|
|
3345
3361
|
getSharedQuestionByName(columnName: string, row: MatrixDropdownRowModelBase): Question;
|
|
3346
3362
|
onTotalValueChanged(): any;
|
|
3363
|
+
getParentTextProcessor(): ITextProcessor;
|
|
3347
3364
|
getQuestionFromArray(name: string, index: number): IQuestion;
|
|
3348
3365
|
getCellTemplateData(cell: QuestionMatrixDropdownRenderedCell): any;
|
|
3349
3366
|
getCellWrapperComponentName(cell: MatrixDropdownCell): string;
|
|
@@ -3374,6 +3391,10 @@ export declare class PopupUtils {
|
|
|
3374
3391
|
height: number;
|
|
3375
3392
|
top: number;
|
|
3376
3393
|
};
|
|
3394
|
+
static updateHorizontalDimensions(left: number, width: number, windowWidth: number, horizontalPosition: HorizontalPosition): {
|
|
3395
|
+
width: number;
|
|
3396
|
+
left: number;
|
|
3397
|
+
};
|
|
3377
3398
|
static updateVerticalPosition(targetRect: ClientRect, height: number, verticalPosition: VerticalPosition, showPointer: boolean, windowHeight: number): VerticalPosition;
|
|
3378
3399
|
static calculatePopupDirection(verticalPosition: VerticalPosition, horizontalPosition: HorizontalPosition): string;
|
|
3379
3400
|
static calculatePointerTarget(targetRect: ClientRect, top: number, left: number, verticalPosition: VerticalPosition, horizontalPosition: HorizontalPosition): INumberPosition;
|
|
@@ -3531,6 +3552,7 @@ export declare class SurveyElement extends SurveyElementCore implements ISurveyE
|
|
|
3531
3552
|
protected updateElementCssCore(cssClasses: any): void;
|
|
3532
3553
|
get cssError(): string;
|
|
3533
3554
|
updateElementCss(reNew?: boolean): void;
|
|
3555
|
+
protected clearCssClasses(): void;
|
|
3534
3556
|
protected getIsLoadingFromJson(): boolean;
|
|
3535
3557
|
/**
|
|
3536
3558
|
* This is the identifier of a survey element - question or panel.
|
|
@@ -3597,6 +3619,10 @@ export declare class SurveyElement extends SurveyElementCore implements ISurveyE
|
|
|
3597
3619
|
protected moveToBase(parent: IPanel, container: IPanel, insertBefore?: any): boolean;
|
|
3598
3620
|
protected setPage(parent: IPanel, newPage: IPage): void;
|
|
3599
3621
|
protected getSearchableLocKeys(keys: Array<string>): void;
|
|
3622
|
+
protected get isDefaultV2Theme(): boolean;
|
|
3623
|
+
get isErrorsModeTooltip(): boolean;
|
|
3624
|
+
get hasParent(): boolean;
|
|
3625
|
+
protected get hasFrameV2(): boolean;
|
|
3600
3626
|
}
|
|
3601
3627
|
|
|
3602
3628
|
export declare class ValidatorResult {
|
|
@@ -3767,6 +3793,7 @@ export declare class QuestionTextProcessor implements ITextProcessor {
|
|
|
3767
3793
|
protected get panel(): PanelModel;
|
|
3768
3794
|
protected getValues(): any;
|
|
3769
3795
|
protected getQuestionByName(name: string): Question;
|
|
3796
|
+
protected getParentTextProcessor(): ITextProcessor;
|
|
3770
3797
|
protected onCustomProcessText(textValue: TextPreProcessorValue): boolean;
|
|
3771
3798
|
processText(text: string, returnDisplayValue: boolean): string;
|
|
3772
3799
|
processTextEx(text: string, returnDisplayValue: boolean): any;
|
|
@@ -3827,6 +3854,8 @@ export declare class QuestionMatrixBaseModel<TRow, TColumn> extends Question {
|
|
|
3827
3854
|
constructor(name: string);
|
|
3828
3855
|
getType(): string;
|
|
3829
3856
|
get isCompositeQuestion(): boolean;
|
|
3857
|
+
get showColumnHeader(): boolean;
|
|
3858
|
+
set showColumnHeader(val: boolean);
|
|
3830
3859
|
/**
|
|
3831
3860
|
* Set this property to false, to hide table header. The default value is true.
|
|
3832
3861
|
*/
|
|
@@ -3920,6 +3949,7 @@ export declare class PanelModelBase extends SurveyElement implements IPanel, ICo
|
|
|
3920
3949
|
setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void;
|
|
3921
3950
|
endLoadingFromJson(): void;
|
|
3922
3951
|
get hasTitle(): boolean;
|
|
3952
|
+
get hasDescription(): boolean;
|
|
3923
3953
|
protected canShowTitle(): boolean;
|
|
3924
3954
|
get _showDescription(): boolean;
|
|
3925
3955
|
localeChanged(): void;
|
|
@@ -4329,6 +4359,7 @@ export declare class PanelModel extends PanelModelBase implements IElement {
|
|
|
4329
4359
|
protected onVisibleChanged(): void;
|
|
4330
4360
|
needResponsiveWidth(): boolean;
|
|
4331
4361
|
focusIn: () => void;
|
|
4362
|
+
getContainerCss(): string;
|
|
4332
4363
|
}
|
|
4333
4364
|
|
|
4334
4365
|
export interface IMatrixColumnOwner extends ILocalizableOwner {
|
|
@@ -4500,6 +4531,7 @@ export declare class QuestionMatrixDropdownRenderedCell {
|
|
|
4500
4531
|
set className(val: string);
|
|
4501
4532
|
get className(): string;
|
|
4502
4533
|
get headers(): string;
|
|
4534
|
+
getTitle(): string;
|
|
4503
4535
|
calculateFinalClassName(matrixCssClasses: any): string;
|
|
4504
4536
|
}
|
|
4505
4537
|
export declare class QuestionMatrixDropdownRenderedRow extends Base {
|