survey-pdf 1.9.92 → 1.9.94
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 +2 -2
- package/survey.pdf.d.ts +25 -14
- package/survey.pdf.fonts.js +2 -2
- package/survey.pdf.fonts.min.js +1 -1
- package/survey.pdf.js +323 -196
- package/survey.pdf.min.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "survey-pdf",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.94",
|
|
4
4
|
"description": "survey.pdf.js is a SurveyJS PDF Library. It is a easy way to export SurveyJS surveys to PDF. It uses JSON for survey metadata.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Survey",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"typings": "survey.pdf.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"jspdf": "^2.3.0",
|
|
29
|
-
"survey-core": "1.9.
|
|
29
|
+
"survey-core": "1.9.94"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/survey.pdf.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*Type definitions for SurveyJS PDF library v1.9.
|
|
1
|
+
/*Type definitions for SurveyJS PDF library v1.9.94
|
|
2
2
|
Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
3
3
|
Definitions by: Devsoft Baltic OÜ <https://github.com/surveyjs/>
|
|
4
4
|
*/
|
|
@@ -241,7 +241,7 @@ export declare class SurveyHelper {
|
|
|
241
241
|
static createTitlePanelFlat(point: IPoint, controller: DocController, text: string | LocalizableString, isPage?: boolean): Promise<IPdfBrick>;
|
|
242
242
|
static createDescFlat(point: IPoint, question: IQuestion, controller: DocController, text: string | LocalizableString): Promise<IPdfBrick>;
|
|
243
243
|
static getReadonlyRenderAs(question: Question, controller: DocController): 'auto' | 'text' | 'acroform';
|
|
244
|
-
static createCommentFlat(point: IPoint, question: Question, controller: DocController, rows: number, isQuestion: boolean, index?: number): Promise<IPdfBrick>;
|
|
244
|
+
static createCommentFlat(point: IPoint, question: Question, controller: DocController, rows: number, isQuestion: boolean, index?: number, value?: string): Promise<IPdfBrick>;
|
|
245
245
|
static getQuestionOrCommentValue(question: Question, isQuestion?: boolean): string;
|
|
246
246
|
static getQuestionOrCommentDisplayValue(question: Question, isQuestion?: boolean): string;
|
|
247
247
|
static inBrowser: boolean;
|
|
@@ -259,9 +259,8 @@ export declare class SurveyHelper {
|
|
|
259
259
|
static createLinkFlat(point: IPoint, question: Question, controller: DocController, text: string, link: string): Promise<IPdfBrick>;
|
|
260
260
|
static createAcroformRect(rect: IRect): number[];
|
|
261
261
|
static createTextFieldRect(point: IPoint, controller: DocController, lines?: number): IRect;
|
|
262
|
-
static createReadOnlyTextFieldTextFlat(point: IPoint, controller: DocController, question: Question, value: string
|
|
262
|
+
static createReadOnlyTextFieldTextFlat(point: IPoint, controller: DocController, question: Question, value: string): Promise<IPdfBrick>;
|
|
263
263
|
static renderFlatBorders(controller: DocController, flat: PdfBrick): void;
|
|
264
|
-
static renderReadOnlyTextField(controller: DocController, question: Question, flat: PdfBrick, value: string, onlyFirstLine?: boolean, shouldRenderFlatBorders?: boolean): Promise<void>;
|
|
265
264
|
static getLocString(text: LocalizableString): string;
|
|
266
265
|
static getDropdownQuestionValue(question: Question): string;
|
|
267
266
|
static getContentQuestion(question: Question): Question;
|
|
@@ -281,6 +280,7 @@ export declare class SurveyHelper {
|
|
|
281
280
|
static isCustomFont(controller: DocController, fontName: string): boolean;
|
|
282
281
|
static fixFont(controller: DocController): void;
|
|
283
282
|
static clone(src: any): any;
|
|
283
|
+
static shouldRenderReadOnly(question: IQuestion, controller: DocController): boolean;
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
import './jspdf_plugins/acroform.js';
|
|
@@ -594,6 +594,7 @@ export declare class FlatQuestion implements IFlatQuestion {
|
|
|
594
594
|
generateFlatsComposite(point: IPoint): Promise<IPdfBrick[]>;
|
|
595
595
|
generateFlatsContent(point: IPoint): Promise<IPdfBrick[]>;
|
|
596
596
|
generateFlats(point: IPoint): Promise<IPdfBrick[]>;
|
|
597
|
+
protected get shouldRenderAsComment(): boolean;
|
|
597
598
|
}
|
|
598
599
|
|
|
599
600
|
export declare class FlatQuestionDefault extends FlatQuestion {
|
|
@@ -643,7 +644,6 @@ export declare class FlatDropdown extends FlatQuestion {
|
|
|
643
644
|
protected controller: DocController;
|
|
644
645
|
protected question: QuestionDropdownModel;
|
|
645
646
|
constructor(survey: SurveyPDF, question: IQuestion, controller: DocController);
|
|
646
|
-
protected get shouldRenderAsComment(): boolean;
|
|
647
647
|
generateFlatsContent(point: IPoint): Promise<IPdfBrick[]>;
|
|
648
648
|
}
|
|
649
649
|
|
|
@@ -710,7 +710,10 @@ export declare class FlatRanking extends FlatQuestion {
|
|
|
710
710
|
protected controller: DocController;
|
|
711
711
|
protected question: QuestionRankingModel;
|
|
712
712
|
constructor(survey: SurveyPDF, question: IQuestion, controller: DocController);
|
|
713
|
-
protected generateFlatComposite(point: IPoint, item: ItemValue, index: number): Promise<IPdfBrick>;
|
|
713
|
+
protected generateFlatComposite(point: IPoint, item: ItemValue, index: number, unrankedItem?: boolean): Promise<IPdfBrick>;
|
|
714
|
+
generateChoicesColumn(point: IPoint, choices: ItemValue[], unrankedChoices?: boolean): Promise<IPdfBrick[]>;
|
|
715
|
+
generateSelectToRankItemsVertically(point: IPoint): Promise<IPdfBrick[]>;
|
|
716
|
+
generateSelectToRankItemsHorizontally(point: IPoint): Promise<IPdfBrick[]>;
|
|
714
717
|
generateFlatsContent(point: IPoint): Promise<IPdfBrick[]>;
|
|
715
718
|
}
|
|
716
719
|
|
|
@@ -751,7 +754,6 @@ export declare class FlatTextbox extends FlatQuestion {
|
|
|
751
754
|
static readonly MULTILINE_TEXT_ROWS_COUNT: number;
|
|
752
755
|
protected question: QuestionTextModel;
|
|
753
756
|
constructor(survey: SurveyPDF, question: IQuestion, controller: DocController);
|
|
754
|
-
protected get shouldRenderAsComment(): boolean;
|
|
755
757
|
generateFlatsContent(point: IPoint): Promise<IPdfBrick[]>;
|
|
756
758
|
}
|
|
757
759
|
|
|
@@ -945,9 +947,14 @@ export declare class DrawCanvas {
|
|
|
945
947
|
drawImage(imageOptions: IDrawImageOptions): Promise<void>;
|
|
946
948
|
}
|
|
947
949
|
|
|
950
|
+
export type TranslateXFunction = (xLeft: number, xRight: number) => {
|
|
951
|
+
xLeft: number;
|
|
952
|
+
xRight: number;
|
|
953
|
+
};
|
|
948
954
|
export interface IPdfBrick extends IRect, ISize {
|
|
949
955
|
render(): Promise<void>;
|
|
950
956
|
unfold(): IPdfBrick[];
|
|
957
|
+
translateX(func: TranslateXFunction): void;
|
|
951
958
|
isPageBreak: boolean;
|
|
952
959
|
}
|
|
953
960
|
/**
|
|
@@ -986,6 +993,7 @@ export declare class PdfBrick implements IPdfBrick {
|
|
|
986
993
|
formBorderColor: string;
|
|
987
994
|
isPageBreak: boolean;
|
|
988
995
|
constructor(question: IQuestion, controller: DocController, rect: IRect);
|
|
996
|
+
translateX(func: TranslateXFunction): void;
|
|
989
997
|
/**
|
|
990
998
|
* The brick's width in pixels.
|
|
991
999
|
*/
|
|
@@ -994,6 +1002,7 @@ export declare class PdfBrick implements IPdfBrick {
|
|
|
994
1002
|
* The brick's height in pixels.
|
|
995
1003
|
*/
|
|
996
1004
|
get height(): number;
|
|
1005
|
+
protected getShouldRenderReadOnly(): boolean;
|
|
997
1006
|
render(): Promise<void>;
|
|
998
1007
|
renderInteractive(): Promise<void>;
|
|
999
1008
|
renderReadOnly(): Promise<void>;
|
|
@@ -1026,6 +1035,7 @@ export declare class CheckItemBrick extends PdfBrick {
|
|
|
1026
1035
|
static readonly CHECKMARK_READONLY_FONT_SIZE_SCALE: number;
|
|
1027
1036
|
protected question: QuestionCheckboxModel;
|
|
1028
1037
|
constructor(controller: DocController, rect: IRect, fieldName: string, context: ICheckItemBrickContext);
|
|
1038
|
+
protected getShouldRenderReadOnly(): boolean;
|
|
1029
1039
|
renderInteractive(): Promise<void>;
|
|
1030
1040
|
renderReadOnly(): Promise<void>;
|
|
1031
1041
|
}
|
|
@@ -1053,6 +1063,7 @@ export declare class CompositeBrick implements IPdfBrick {
|
|
|
1053
1063
|
get isEmpty(): boolean;
|
|
1054
1064
|
addBrick(...bricks: IPdfBrick[]): void;
|
|
1055
1065
|
unfold(): IPdfBrick[];
|
|
1066
|
+
translateX(func: TranslateXFunction): void;
|
|
1056
1067
|
}
|
|
1057
1068
|
|
|
1058
1069
|
export declare class CustomBrick extends PdfBrick {
|
|
@@ -1067,7 +1078,6 @@ export declare class DropdownBrick extends PdfBrick {
|
|
|
1067
1078
|
protected isMultiline: boolean;
|
|
1068
1079
|
constructor(question: IQuestion, controller: DocController, rect: IRect);
|
|
1069
1080
|
renderInteractive(): Promise<void>;
|
|
1070
|
-
renderReadOnly(): Promise<void>;
|
|
1071
1081
|
}
|
|
1072
1082
|
|
|
1073
1083
|
export declare class EmptyBrick extends PdfBrick {
|
|
@@ -1117,14 +1127,15 @@ export interface IRadioGroupItemBrickContext {
|
|
|
1117
1127
|
}
|
|
1118
1128
|
export declare class RadioItemBrick extends PdfBrick {
|
|
1119
1129
|
constructor(controller: DocController, rect: IRect, context: IRadioGroupItemBrickContext, radioGroupWrap: RadioGroupWrap);
|
|
1130
|
+
protected getShouldRenderReadOnly(): boolean;
|
|
1120
1131
|
renderInteractive(): Promise<void>;
|
|
1121
1132
|
renderReadOnly(): Promise<void>;
|
|
1122
1133
|
}
|
|
1123
1134
|
|
|
1124
1135
|
export declare class RankingItemBrick extends PdfBrick {
|
|
1125
|
-
protected
|
|
1136
|
+
protected mark: string;
|
|
1126
1137
|
protected question: QuestionRankingModel;
|
|
1127
|
-
constructor(question: IQuestion, controller: DocController, rect: IRect,
|
|
1138
|
+
constructor(question: IQuestion, controller: DocController, rect: IRect, mark: string);
|
|
1128
1139
|
renderInteractive(): Promise<void>;
|
|
1129
1140
|
}
|
|
1130
1141
|
|
|
@@ -1141,6 +1152,7 @@ export declare class RowlineBrick implements IPdfBrick {
|
|
|
1141
1152
|
get height(): number;
|
|
1142
1153
|
render(): Promise<void>;
|
|
1143
1154
|
unfold(): IPdfBrick[];
|
|
1155
|
+
translateX(_: TranslateXFunction): void;
|
|
1144
1156
|
}
|
|
1145
1157
|
|
|
1146
1158
|
export declare class TextFieldBrick extends PdfBrick {
|
|
@@ -1155,7 +1167,9 @@ export declare class TextFieldBrick extends PdfBrick {
|
|
|
1155
1167
|
constructor(question: IQuestion, controller: DocController, rect: IRect, isQuestion: boolean, fieldName: string, value: string, placeholder: string, isReadOnly: boolean, isMultiline: boolean, inputType: string);
|
|
1156
1168
|
renderInteractive(): Promise<void>;
|
|
1157
1169
|
protected shouldRenderFlatBorders(): boolean;
|
|
1170
|
+
textBrick: IPdfBrick;
|
|
1158
1171
|
renderReadOnly(): Promise<void>;
|
|
1172
|
+
translateX(func: TranslateXFunction): void;
|
|
1159
1173
|
}
|
|
1160
1174
|
|
|
1161
1175
|
export declare class TextBoldBrick extends TextBrick {
|
|
@@ -1171,10 +1185,7 @@ export declare class TextBoxBrick extends TextFieldBrick {
|
|
|
1171
1185
|
|
|
1172
1186
|
export declare class TextBrick extends PdfBrick {
|
|
1173
1187
|
protected text: string;
|
|
1174
|
-
protected align:
|
|
1175
|
-
align: string;
|
|
1176
|
-
baseline: string;
|
|
1177
|
-
};
|
|
1188
|
+
protected align: any;
|
|
1178
1189
|
constructor(question: IQuestion, controller: DocController, rect: IRect, text: string);
|
|
1179
1190
|
renderInteractive(): Promise<void>;
|
|
1180
1191
|
protected alignPoint(rect: IRect): IPoint;
|