survey-core 1.9.118 → 1.9.120
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 +223 -100
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +223 -100
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +3 -2
- package/i18n/english.js.map +1 -1
- package/i18n/english.min.js +2 -2
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +2 -2
- package/i18n/hungarian.js.map +1 -1
- package/i18n/hungarian.min.js +2 -2
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +2 -2
- package/i18n/index.js.map +1 -1
- package/i18n/index.min.js +2 -2
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/modern.css +9 -6
- package/modern.css.map +1 -1
- package/modern.fontless.css +9 -6
- package/modern.fontless.css.map +1 -1
- package/modern.fontless.min.css +2 -2
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/plugins/bootstrap-integration.js +1 -1
- package/plugins/bootstrap-integration.min.js +1 -1
- package/plugins/bootstrap-material-integration.js +1 -1
- package/plugins/bootstrap-material-integration.min.js +1 -1
- package/survey.core.js +585 -250
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.css.map +1 -1
- package/survey.i18n.js +2 -2
- package/survey.i18n.js.map +1 -1
- package/survey.i18n.min.js +2 -2
- package/survey.min.css +1 -1
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/ts3.4/typings/base-interfaces.d.ts +4 -3
- package/ts3.4/typings/conditionProcessValue.d.ts +1 -0
- package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +9 -3
- package/ts3.4/typings/localization/english.d.ts +1 -0
- package/ts3.4/typings/page.d.ts +1 -0
- package/ts3.4/typings/panel.d.ts +4 -1
- package/ts3.4/typings/question.d.ts +3 -1
- package/ts3.4/typings/question_baseselect.d.ts +1 -1
- package/ts3.4/typings/question_checkbox.d.ts +1 -1
- package/ts3.4/typings/question_expression.d.ts +1 -1
- package/ts3.4/typings/question_file.d.ts +32 -27
- package/ts3.4/typings/question_ranking.d.ts +6 -0
- package/ts3.4/typings/question_rating.d.ts +1 -0
- package/ts3.4/typings/question_signaturepad.d.ts +13 -2
- package/ts3.4/typings/survey-events-api.d.ts +5 -4
- package/ts3.4/typings/survey.d.ts +46 -18
- package/ts3.4/typings/surveyStrings.d.ts +1 -0
- package/ts3.4/typings/surveyTaskManager.d.ts +16 -0
- package/ts3.4/typings/themes.d.ts +2 -2
- package/typings/base-interfaces.d.ts +4 -3
- package/typings/conditionProcessValue.d.ts +1 -0
- package/typings/defaultCss/defaultV2Css.d.ts +9 -3
- package/typings/localization/english.d.ts +1 -0
- package/typings/page.d.ts +1 -0
- package/typings/panel.d.ts +4 -1
- package/typings/question.d.ts +3 -1
- package/typings/question_baseselect.d.ts +1 -1
- package/typings/question_checkbox.d.ts +1 -1
- package/typings/question_expression.d.ts +1 -1
- package/typings/question_file.d.ts +34 -29
- package/typings/question_ranking.d.ts +6 -0
- package/typings/question_rating.d.ts +1 -0
- package/typings/question_signaturepad.d.ts +13 -2
- package/typings/survey-events-api.d.ts +5 -4
- package/typings/survey.d.ts +47 -17
- package/typings/surveyStrings.d.ts +1 -0
- package/typings/surveyTaskManager.d.ts +16 -0
- package/typings/themes.d.ts +2 -2
|
@@ -98,7 +98,7 @@ export interface ISurvey extends ITextProcessor, ISurveyErrorOwner {
|
|
|
98
98
|
maxTextLength: number;
|
|
99
99
|
maxOthersLength: number;
|
|
100
100
|
clearValueOnDisableItems: boolean;
|
|
101
|
-
uploadFiles(question: IQuestion, name: string, files: File[], uploadingCallback: (
|
|
101
|
+
uploadFiles(question: IQuestion, name: string, files: File[], uploadingCallback: (data: any | Array<any>, errors?: any | Array<any>) => any): any;
|
|
102
102
|
downloadFile(question: IQuestion, name: string, content: string, callback: (status: string, data: any) => any): any;
|
|
103
103
|
clearFiles(question: IQuestion, name: string, value: any, fileName: string, clearCallback: (status: string, data: any) => any): any;
|
|
104
104
|
updateChoicesFromServer(question: IQuestion, choices: Array<any>, serverResult: any): Array<any>;
|
|
@@ -219,7 +219,7 @@ export interface IQuestion extends IElement, ISurveyErrorOwner {
|
|
|
219
219
|
hasTitle: boolean;
|
|
220
220
|
isEmpty(): boolean;
|
|
221
221
|
onSurveyValueChanged(newValue: any): any;
|
|
222
|
-
updateValueFromSurvey(newValue: any):
|
|
222
|
+
updateValueFromSurvey(newValue: any, clearData: boolean): void;
|
|
223
223
|
updateCommentFromSurvey(newValue: any): any;
|
|
224
224
|
supportGoNextPageAutomatic(): boolean;
|
|
225
225
|
clearUnusedValues(): any;
|
|
@@ -283,7 +283,7 @@ export declare type ISurveyEnvironment = {
|
|
|
283
283
|
svgMountContainer: HTMLElement | string;
|
|
284
284
|
stylesSheetsMountContainer: HTMLElement;
|
|
285
285
|
};
|
|
286
|
-
export declare type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom";
|
|
286
|
+
export declare type LayoutElementContainer = "header" | "footer" | "left" | "right" | "contentTop" | "contentBottom" | "center";
|
|
287
287
|
export declare type HorizontalAlignment = "left" | "center" | "right";
|
|
288
288
|
export declare type VerticalAlignment = "top" | "middle" | "bottom";
|
|
289
289
|
export interface ISurveyLayoutElement {
|
|
@@ -292,6 +292,7 @@ export interface ISurveyLayoutElement {
|
|
|
292
292
|
component?: string;
|
|
293
293
|
template?: string;
|
|
294
294
|
data?: any;
|
|
295
|
+
index?: number;
|
|
295
296
|
processResponsiveness?: (width: number) => void;
|
|
296
297
|
}
|
|
297
298
|
export interface IPlainDataOptions {
|
|
@@ -70,6 +70,7 @@ export declare var defaultV2Css: {
|
|
|
70
70
|
invisible: string;
|
|
71
71
|
navigationButton: string;
|
|
72
72
|
compact: string;
|
|
73
|
+
errorsContainer: string;
|
|
73
74
|
};
|
|
74
75
|
paneldynamic: {
|
|
75
76
|
mainRoot: string;
|
|
@@ -136,6 +137,7 @@ export declare var defaultV2Css: {
|
|
|
136
137
|
emptyHeaderRoot: string;
|
|
137
138
|
title: string;
|
|
138
139
|
description: string;
|
|
140
|
+
errorsContainer: string;
|
|
139
141
|
};
|
|
140
142
|
pageTitle: string;
|
|
141
143
|
pageDescription: string;
|
|
@@ -190,6 +192,9 @@ export declare var defaultV2Css: {
|
|
|
190
192
|
invisible: string;
|
|
191
193
|
composite: string;
|
|
192
194
|
disabled: string;
|
|
195
|
+
errorsContainer: string;
|
|
196
|
+
errorsContainerTop: string;
|
|
197
|
+
errorsContainerBottom: string;
|
|
193
198
|
};
|
|
194
199
|
image: {
|
|
195
200
|
mainRoot: string;
|
|
@@ -209,9 +214,6 @@ export declare var defaultV2Css: {
|
|
|
209
214
|
root: string;
|
|
210
215
|
icon: string;
|
|
211
216
|
item: string;
|
|
212
|
-
outsideQuestion: string;
|
|
213
|
-
aboveQuestion: string;
|
|
214
|
-
belowQuestion: string;
|
|
215
217
|
locationTop: string;
|
|
216
218
|
locationBottom: string;
|
|
217
219
|
};
|
|
@@ -429,6 +431,8 @@ export declare var defaultV2Css: {
|
|
|
429
431
|
rowHasEndActions: string;
|
|
430
432
|
headerCell: string;
|
|
431
433
|
rowTextCell: string;
|
|
434
|
+
footerCell: string;
|
|
435
|
+
footerTotalCell: string;
|
|
432
436
|
columnTitleCell: string;
|
|
433
437
|
cellRequiredText: string;
|
|
434
438
|
detailButton: string;
|
|
@@ -464,6 +468,7 @@ export declare var defaultV2Css: {
|
|
|
464
468
|
itemCell: string;
|
|
465
469
|
headerCell: string;
|
|
466
470
|
rowTextCell: string;
|
|
471
|
+
footerCell: string;
|
|
467
472
|
columnTitleCell: string;
|
|
468
473
|
cellRequiredText: string;
|
|
469
474
|
button: string;
|
|
@@ -609,6 +614,7 @@ export declare var defaultV2Css: {
|
|
|
609
614
|
backgroundImage: string;
|
|
610
615
|
clearButton: string;
|
|
611
616
|
clearButtonIconId: string;
|
|
617
|
+
loadingIndicator: string;
|
|
612
618
|
};
|
|
613
619
|
saveData: {
|
|
614
620
|
root: string;
|
package/ts3.4/typings/page.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export declare class PageModel extends PanelModelBase implements IPage {
|
|
|
49
49
|
protected calcCssClasses(css: any): any;
|
|
50
50
|
readonly cssTitle: string;
|
|
51
51
|
readonly cssRoot: string;
|
|
52
|
+
protected getCssError(cssClasses: any): string;
|
|
52
53
|
num: number;
|
|
53
54
|
/*
|
|
54
55
|
* Set this property to "hide" to make "Prev", "Next" and "Complete" buttons are invisible for this page. Set this property to "show" to make these buttons visible, even if survey showNavigationButtons property is false.
|
package/ts3.4/typings/panel.d.ts
CHANGED
|
@@ -399,6 +399,8 @@ export declare class PanelModelBase extends SurveyElement<Question> implements I
|
|
|
399
399
|
questionErrorLocation: string;
|
|
400
400
|
getQuestionErrorLocation(): string;
|
|
401
401
|
readonly no: string;
|
|
402
|
+
readonly cssError: string;
|
|
403
|
+
protected getCssError(cssClasses: any): string;
|
|
402
404
|
dispose(): void;
|
|
403
405
|
}
|
|
404
406
|
/**
|
|
@@ -475,6 +477,7 @@ export declare class PanelModel extends PanelModelBase implements IElement {
|
|
|
475
477
|
*/
|
|
476
478
|
readonly no: string;
|
|
477
479
|
protected setNo(visibleIndex: number): void;
|
|
480
|
+
protected notifyStateChanged(): void;
|
|
478
481
|
protected createLocTitleProperty(): LocalizableString;
|
|
479
482
|
protected beforeSetVisibleIndex(index: number): number;
|
|
480
483
|
protected getPanelStartIndex(index: number): number;
|
|
@@ -503,7 +506,6 @@ export declare class PanelModel extends PanelModelBase implements IElement {
|
|
|
503
506
|
readonly hasEditButton: boolean;
|
|
504
507
|
cancelPreview(): void;
|
|
505
508
|
readonly cssTitle: string;
|
|
506
|
-
readonly cssError: string;
|
|
507
509
|
readonly showErrorsAbovePanel: boolean;
|
|
508
510
|
protected getCssError(cssClasses: any): string;
|
|
509
511
|
protected onVisibleChanged(): void;
|
|
@@ -511,6 +513,7 @@ export declare class PanelModel extends PanelModelBase implements IElement {
|
|
|
511
513
|
focusIn(): void;
|
|
512
514
|
protected getHasFrameV2(): boolean;
|
|
513
515
|
protected getIsNested(): boolean;
|
|
516
|
+
private readonly showPanelAsPage: any;
|
|
514
517
|
protected getCssRoot(cssClasses: {
|
|
515
518
|
[index: string]: string;
|
|
516
519
|
}): string;
|
|
@@ -603,6 +603,8 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
|
|
|
603
603
|
* - `{row.other_question_name}` (to access questions inside the same dynamic matrix or multi-column dropdown)
|
|
604
604
|
*
|
|
605
605
|
* An expression can also include built-in and custom functions for advanced calculations. For example, if the `defaultValue` should be today's date, set the `defaultValueExpression` to `"today()"`, and the corresponding built-in function will be executed each time the survey is loaded. Refer to the following help topic for more information: [Built-In Functions](https://surveyjs.io/form-library/documentation/design-survey-conditional-logic#built-in-functions).
|
|
606
|
+
*
|
|
607
|
+
* [View Demo](https://surveyjs.io/form-library/examples/specify-default-question-value-dynamically (linkStyle))
|
|
606
608
|
* @see defaultValue
|
|
607
609
|
* @see setValueExpression
|
|
608
610
|
*/
|
|
@@ -775,7 +777,7 @@ export declare class Question extends SurveyElement<Question> implements IQuesti
|
|
|
775
777
|
onMouseDown(): void;
|
|
776
778
|
protected setNewComment(newValue: string): void;
|
|
777
779
|
protected getValidName(name: string): string;
|
|
778
|
-
updateValueFromSurvey(newValue: any): void;
|
|
780
|
+
updateValueFromSurvey(newValue: any, clearData?: boolean): void;
|
|
779
781
|
private updateValueFromSurveyCore;
|
|
780
782
|
updateCommentFromSurvey(newValue: any): any;
|
|
781
783
|
protected onChangeQuestionValue(newValue: any): void;
|
|
@@ -340,7 +340,7 @@ export declare class QuestionSelectBase extends Question {
|
|
|
340
340
|
getStoreOthersAsComment(): boolean;
|
|
341
341
|
onSurveyLoad(): void;
|
|
342
342
|
onAnyValueChanged(name: string, questionName: string): void;
|
|
343
|
-
updateValueFromSurvey(newValue: any): void;
|
|
343
|
+
updateValueFromSurvey(newValue: any, clearData: boolean): void;
|
|
344
344
|
protected getCommentFromValue(newValue: any): string;
|
|
345
345
|
protected setOtherValueIntoValue(newValue: any): any;
|
|
346
346
|
onOtherValueInput(event: any): void;
|
|
@@ -95,7 +95,7 @@ export declare class QuestionCheckboxModel extends QuestionCheckboxBase {
|
|
|
95
95
|
private shouldCheckMaxSelectedChoices;
|
|
96
96
|
private checkMinSelectedChoicesUnreached;
|
|
97
97
|
protected getItemClassCore(item: any, options: any): string;
|
|
98
|
-
updateValueFromSurvey(newValue: any): void;
|
|
98
|
+
updateValueFromSurvey(newValue: any, clearData: boolean): void;
|
|
99
99
|
protected setDefaultValue(): void;
|
|
100
100
|
private addIntoInvisibleOldValues;
|
|
101
101
|
protected hasValueToClearIncorrectValues(): boolean;
|
|
@@ -52,7 +52,7 @@ export declare class QuestionExpressionModel extends Question {
|
|
|
52
52
|
readonly formatedValue: string;
|
|
53
53
|
protected updateFormatedValue(): void;
|
|
54
54
|
protected onValueChanged(): void;
|
|
55
|
-
updateValueFromSurvey(newValue: any): void;
|
|
55
|
+
updateValueFromSurvey(newValue: any, clearData: boolean): void;
|
|
56
56
|
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
|
|
57
57
|
/*
|
|
58
58
|
* Specifies a display style for the question value.
|
|
@@ -6,14 +6,10 @@ import { ActionContainer } from "./actions/container";
|
|
|
6
6
|
import { Action } from "./actions/action";
|
|
7
7
|
import { Camera } from "./utils/camera";
|
|
8
8
|
import { LocalizableString } from "./localizablestring";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
* [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
|
|
13
|
-
*/
|
|
14
|
-
export declare class QuestionFileModel extends Question {
|
|
9
|
+
export declare function dataUrl2File(dataUrl: string, fileName: string, type: string): File;
|
|
10
|
+
export declare class QuestionFileModelBase extends Question {
|
|
15
11
|
isUploading: boolean;
|
|
16
|
-
|
|
12
|
+
currentState: string;
|
|
17
13
|
/**
|
|
18
14
|
* An event that is raised after the upload state has changed.
|
|
19
15
|
*
|
|
@@ -24,10 +20,35 @@ export declare class QuestionFileModel extends Question {
|
|
|
24
20
|
* - `options.state`: `string`\
|
|
25
21
|
* The current upload state: `"empty"`, `"loading"`, `"loaded"`, or `"error"`.
|
|
26
22
|
*/
|
|
27
|
-
onUploadStateChanged: EventBase<
|
|
28
|
-
onStateChanged: EventBase<
|
|
23
|
+
onUploadStateChanged: EventBase<QuestionFileModelBase>;
|
|
24
|
+
onStateChanged: EventBase<QuestionFileModelBase>;
|
|
25
|
+
protected stateChanged(state: string): void;
|
|
26
|
+
readonly showLoadingIndicator: boolean;
|
|
27
|
+
/*
|
|
28
|
+
* Specifies whether to store file or signature content as text in `SurveyModel`'s [`data`](https://surveyjs.io/form-library/documentation/surveymodel#data) property.
|
|
29
|
+
*
|
|
30
|
+
* If you disable this property, implement `SurveyModel`'s [`onUploadFiles`](https://surveyjs.io/form-library/documentation/surveymodel#onUploadFiles) event handler to specify how to store file content.
|
|
31
|
+
*/
|
|
32
|
+
storeDataAsText: boolean;
|
|
33
|
+
/*
|
|
34
|
+
* Enable this property if you want to wait until files are uploaded to complete the survey.
|
|
35
|
+
*
|
|
36
|
+
* Default value: `false`
|
|
37
|
+
*/
|
|
38
|
+
waitForUpload: boolean;
|
|
39
|
+
clearValue(): void;
|
|
40
|
+
clearOnDeletingContainer(): void;
|
|
41
|
+
protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
|
|
42
|
+
protected uploadFiles(files: File[]): void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A class that describes the File Upload question type.
|
|
46
|
+
*
|
|
47
|
+
* [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
|
|
48
|
+
*/
|
|
49
|
+
export declare class QuestionFileModel extends QuestionFileModelBase {
|
|
50
|
+
isDragging: boolean;
|
|
29
51
|
previewValue: any[];
|
|
30
|
-
currentState: string;
|
|
31
52
|
indexToShow: number;
|
|
32
53
|
pageSize: number;
|
|
33
54
|
containsMultiplyFiles: boolean;
|
|
@@ -80,8 +101,6 @@ export declare class QuestionFileModel extends Question {
|
|
|
80
101
|
private previewValueChanged;
|
|
81
102
|
isPreviewVisible(index: number): boolean;
|
|
82
103
|
getType(): string;
|
|
83
|
-
clearValue(): void;
|
|
84
|
-
clearOnDeletingContainer(): void;
|
|
85
104
|
/*
|
|
86
105
|
* Disable this property only to implement a custom preview.
|
|
87
106
|
*
|
|
@@ -108,18 +127,6 @@ export declare class QuestionFileModel extends Question {
|
|
|
108
127
|
*/
|
|
109
128
|
acceptedTypes: string;
|
|
110
129
|
/*
|
|
111
|
-
* Specifies whether to store file content as text in `SurveyModel`'s [`data`](https://surveyjs.io/form-library/documentation/surveymodel#data) property.
|
|
112
|
-
*
|
|
113
|
-
* If you disable this property, implement `SurveyModel`'s [`onUploadFiles`](https://surveyjs.io/form-library/documentation/surveymodel#onUploadFiles) event handler to specify how to store file content.
|
|
114
|
-
*/
|
|
115
|
-
storeDataAsText: boolean;
|
|
116
|
-
/*
|
|
117
|
-
* Enable this property if you want to wait until files are uploaded to complete the survey.
|
|
118
|
-
*
|
|
119
|
-
* Default value: `false`
|
|
120
|
-
*/
|
|
121
|
-
waitForUpload: boolean;
|
|
122
|
-
/*
|
|
123
130
|
* Specifies whether to show a preview of image files.
|
|
124
131
|
*/
|
|
125
132
|
allowImagesPreview: boolean;
|
|
@@ -179,7 +186,6 @@ export declare class QuestionFileModel extends Question {
|
|
|
179
186
|
readonly multipleRendered: string;
|
|
180
187
|
readonly showChooseButton: boolean;
|
|
181
188
|
readonly showFileDecorator: boolean;
|
|
182
|
-
readonly showLoadingIndicator: boolean;
|
|
183
189
|
readonly allowShowPreview: boolean;
|
|
184
190
|
readonly showPreviewContainer: boolean;
|
|
185
191
|
readonly showRemoveButtonCore: boolean;
|
|
@@ -191,6 +197,7 @@ export declare class QuestionFileModel extends Question {
|
|
|
191
197
|
*/
|
|
192
198
|
removeFile(name: string): void;
|
|
193
199
|
protected removeFileByContent(content: any): void;
|
|
200
|
+
protected setValueFromResult(arg: any): void;
|
|
194
201
|
/**
|
|
195
202
|
* Loads multiple files into the question.
|
|
196
203
|
* @param files An array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects.
|
|
@@ -203,8 +210,6 @@ export declare class QuestionFileModel extends Question {
|
|
|
203
210
|
private isFileLoadingValue;
|
|
204
211
|
protected isFileLoading: boolean;
|
|
205
212
|
protected getIsQuestionReady(): boolean;
|
|
206
|
-
protected onCheckForErrors(errors: Array<SurveyError>, isOnValueChanged: boolean): void;
|
|
207
|
-
protected stateChanged(state: string): void;
|
|
208
213
|
private allFilesOk;
|
|
209
214
|
private isFileImage;
|
|
210
215
|
getPlainData(options?: IPlainDataOptions): IQuestionPlainData;
|
|
@@ -86,7 +86,13 @@ export declare class QuestionRankingModel extends QuestionCheckboxModel {
|
|
|
86
86
|
selectToRankAreasLayout: string;
|
|
87
87
|
readonly renderedSelectToRankAreasLayout: string;
|
|
88
88
|
isMobileMode(): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* A placeholder displayed in the area for ranked choices. Applies when [`selectToRankEnabled`](https://surveyjs.io/form-library/documentation/api-reference/ranking-question-model#selectToRankEnabled) is `true`.
|
|
91
|
+
*/
|
|
89
92
|
selectToRankEmptyRankedAreaText: string;
|
|
93
|
+
/**
|
|
94
|
+
* A placeholder displayed in the area for unranked choices. Applies when [`selectToRankEnabled`](https://surveyjs.io/form-library/documentation/api-reference/ranking-question-model#selectToRankEnabled) is `true`.
|
|
95
|
+
*/
|
|
90
96
|
selectToRankEmptyUnrankedAreaText: string;
|
|
91
97
|
useFullItemSizeForShortcut: boolean;
|
|
92
98
|
readonly dragDropSvgIcon: string;
|
|
@@ -114,6 +114,7 @@ export declare class QuestionRatingModel extends Question {
|
|
|
114
114
|
itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
|
|
115
115
|
private createRenderedRateItems;
|
|
116
116
|
renderedRateItems: Array<RenderedRatingItem>;
|
|
117
|
+
private createRateValues;
|
|
117
118
|
private correctValue;
|
|
118
119
|
getType(): string;
|
|
119
120
|
protected getFirstInputElementId(): string;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { Question } from "./question";
|
|
2
1
|
import { ITheme } from "./themes";
|
|
2
|
+
import { QuestionFileModelBase } from "./question_file";
|
|
3
3
|
/**
|
|
4
4
|
* A class that describes the Signature question type.
|
|
5
5
|
*
|
|
6
6
|
* [View Demo](https://surveyjs.io/form-library/examples/signature-pad-widget-javascript/ (linkStyle))
|
|
7
7
|
*/
|
|
8
|
-
export declare class QuestionSignaturePadModel extends
|
|
8
|
+
export declare class QuestionSignaturePadModel extends QuestionFileModelBase {
|
|
9
9
|
isDrawingValue: boolean;
|
|
10
|
+
isReadyForUpload: boolean;
|
|
10
11
|
private getPenColorFromTheme;
|
|
11
12
|
private updateColors;
|
|
12
13
|
protected getCssRoot(cssClasses: any): string;
|
|
14
|
+
protected getFormat(): "" | "image/svg+xml" | "image/jpeg";
|
|
13
15
|
protected updateValue(): void;
|
|
14
16
|
constructor(name: string);
|
|
15
17
|
getType(): string;
|
|
@@ -17,10 +19,14 @@ export declare class QuestionSignaturePadModel extends Question {
|
|
|
17
19
|
beforeDestroyQuestionElement(el: HTMLElement): void;
|
|
18
20
|
themeChanged(theme: ITheme): void;
|
|
19
21
|
private canvas;
|
|
22
|
+
private element;
|
|
20
23
|
private scale;
|
|
21
24
|
private valueIsUpdatingInternally;
|
|
25
|
+
valueWasChangedFromLastUpload: boolean;
|
|
22
26
|
private resizeCanvas;
|
|
23
27
|
private scaleCanvas;
|
|
28
|
+
private fromDataUrl;
|
|
29
|
+
private fromUrl;
|
|
24
30
|
private refreshCanvas;
|
|
25
31
|
private updateValueHandler;
|
|
26
32
|
initSignaturePad(el: HTMLElement): void;
|
|
@@ -110,10 +116,15 @@ export declare class QuestionSignaturePadModel extends Question {
|
|
|
110
116
|
* Default value: `true`
|
|
111
117
|
*/
|
|
112
118
|
showPlaceholder: boolean;
|
|
119
|
+
nothingIsDrawn(): boolean;
|
|
113
120
|
needShowPlaceholder(): boolean;
|
|
114
121
|
/**
|
|
115
122
|
* A placeholder for the signature area. Applies when the [`showPlaceholder`](#showPlaceholder) property is `true`.
|
|
116
123
|
*/
|
|
117
124
|
placeholder: string;
|
|
125
|
+
onBlur: (event: any) => void;
|
|
126
|
+
protected uploadResultItemToValue(r: any): any;
|
|
127
|
+
protected setValueFromResult(arg: any): void;
|
|
128
|
+
clearValue(): void;
|
|
118
129
|
endLoadingFromJson(): void;
|
|
119
130
|
}
|
|
@@ -11,6 +11,7 @@ import { MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownM
|
|
|
11
11
|
import { MatrixDropdownColumn } from "./question_matrixdropdowncolumn";
|
|
12
12
|
import { QuestionMatrixDynamicModel } from "./question_matrixdynamic";
|
|
13
13
|
import { QuestionPanelDynamicModel } from "./question_paneldynamic";
|
|
14
|
+
import { QuestionSignaturePadModel } from "./question_signaturepad";
|
|
14
15
|
import { SurveyModel } from "./survey";
|
|
15
16
|
import { SurveyError } from "./survey-error";
|
|
16
17
|
import { Trigger } from "./trigger";
|
|
@@ -22,9 +23,9 @@ export interface QuestionEventMixin {
|
|
|
22
23
|
}
|
|
23
24
|
export interface FileQuestionEventMixin {
|
|
24
25
|
/**
|
|
25
|
-
* A File Upload question instance for which the event is raised.
|
|
26
|
+
* A File Upload or Signature Pad question instance for which the event is raised.
|
|
26
27
|
*/
|
|
27
|
-
question: QuestionFileModel;
|
|
28
|
+
question: QuestionFileModel | QuestionSignaturePadModel;
|
|
28
29
|
}
|
|
29
30
|
export interface PanelDynamicQuestionEventMixin {
|
|
30
31
|
/**
|
|
@@ -499,9 +500,9 @@ export interface LoadFilesEvent extends FileQuestionEventMixin {
|
|
|
499
500
|
}
|
|
500
501
|
export interface UploadFilesEvent extends LoadFilesEvent {
|
|
501
502
|
/**
|
|
502
|
-
* A callback function that you should call when a file is uploaded successfully or when file upload fails. Pass
|
|
503
|
+
* A callback function that you should call when a file is uploaded successfully or when file upload fails. Pass an array of successfully uploaded files as the first argument. As the second argument, you can pass an array of error messages if file upload failed.
|
|
503
504
|
*/
|
|
504
|
-
callback: (
|
|
505
|
+
callback: (data: any | Array<any>, errors?: any | Array<any>) => any;
|
|
505
506
|
/**
|
|
506
507
|
* An array of JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects that represent files to upload.
|
|
507
508
|
*/
|