survey-pdf 2.2.0 → 2.2.2

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - SurveyJS PDF library v2.2.0
2
+ * surveyjs - SurveyJS PDF library v2.2.2
3
3
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -33,7 +33,6 @@ export { IPdfBrick, PdfBrick } from '../pdf_render/pdf_brick';
33
33
  export { BooleanItemBrick } from '../pdf_render/pdf_booleanitem';
34
34
  export { CheckboxItemBrick } from '../pdf_render/pdf_checkboxitem';
35
35
  export { CheckItemBrick } from '../pdf_render/pdf_checkitem';
36
- export { CommentBrick } from '../pdf_render/pdf_comment';
37
36
  export { CompositeBrick } from '../pdf_render/pdf_composite';
38
37
  export { CustomBrick } from '../pdf_render/pdf_custom';
39
38
  export { DropdownBrick } from '../pdf_render/pdf_dropdown';
@@ -46,6 +45,5 @@ export { RankingItemBrick } from '../pdf_render/pdf_rankingitem';
46
45
  export { RowlineBrick } from '../pdf_render/pdf_rowline';
47
46
  export { TextFieldBrick } from '../pdf_render/pdf_textfield';
48
47
  export { TextBoldBrick } from '../pdf_render/pdf_textbold';
49
- export { TextBoxBrick } from '../pdf_render/pdf_textbox';
50
48
  export { TextBrick } from '../pdf_render/pdf_text';
51
49
  export { TitlePanelBrick } from '../pdf_render/pdf_titlepanel';
@@ -13,6 +13,8 @@ export declare abstract class FlatSelectBase extends FlatQuestion {
13
13
  protected getVisibleChoices(): Array<ItemValue>;
14
14
  protected getColCount(): number;
15
15
  generateFlatsContent(point: IPoint): Promise<IPdfBrick[]>;
16
+ protected generateRows(point: IPoint, rows: Array<Array<ItemValue>>): Promise<IPdfBrick[]>;
16
17
  protected generateVerticallyItems(point: IPoint, itemValues: ItemValue[]): Promise<IPdfBrick[]>;
18
+ protected generateColumns(point: IPoint): Promise<IPdfBrick[]>;
17
19
  protected generateHorisontallyItems(point: IPoint, colCount: number): Promise<IPdfBrick[]>;
18
20
  }
@@ -4,6 +4,7 @@ import { IPoint, IRect, ISize, DocController } from './doc_controller';
4
4
  import { IHTMLRenderType } from './flat_layout/flat_html';
5
5
  import { IPdfBrick, PdfBrick } from './pdf_render/pdf_brick';
6
6
  import { CompositeBrick } from './pdf_render/pdf_composite';
7
+ import { ITextFieldBrickOptions } from './pdf_render/pdf_textfield';
7
8
  export type IBorderDescription = IRect & ISize & Pick<PdfBrick, 'formBorderColor'> & {
8
9
  rounded?: boolean;
9
10
  dashStyle?: {
@@ -86,14 +87,9 @@ export declare class SurveyHelper {
86
87
  static createTitlePanelFlat(point: IPoint, controller: DocController, text: string | LocalizableString, isPage?: boolean): Promise<IPdfBrick>;
87
88
  static createDescFlat(point: IPoint, question: IQuestion, controller: DocController, text: string | LocalizableString): Promise<IPdfBrick>;
88
89
  static getReadonlyRenderAs(question: Question, controller: DocController): 'auto' | 'text' | 'acroform';
89
- static createCommentFlat(point: IPoint, question: Question, controller: DocController, isQuestion: boolean, options?: {
90
+ static createCommentFlat(point: IPoint, question: Question, controller: DocController, options: {
90
91
  rows?: number;
91
- index?: number;
92
- value?: string;
93
- readOnly?: boolean;
94
- }): Promise<IPdfBrick>;
95
- static getQuestionOrCommentValue(question: Question, isQuestion?: boolean): string;
96
- static getQuestionOrCommentDisplayValue(question: Question, isQuestion?: boolean): string;
92
+ } & ITextFieldBrickOptions): Promise<IPdfBrick>;
97
93
  static inBrowser: boolean;
98
94
  static get hasDocument(): boolean;
99
95
  static getImageBase64(imageLink: string): Promise<string>;
@@ -1,16 +1,19 @@
1
- import { IQuestion, QuestionTextModel } from 'survey-core';
1
+ import { IQuestion } from 'survey-core';
2
2
  import { IRect, DocController } from '../doc_controller';
3
3
  import { IPdfBrick, PdfBrick, TranslateXFunction } from './pdf_brick';
4
- export declare class TextFieldBrick extends PdfBrick {
5
- protected isQuestion: boolean;
6
- protected fieldName: string;
7
- protected value: string;
8
- protected placeholder: string;
4
+ export interface ITextFieldBrickOptions {
9
5
  isReadOnly: boolean;
10
- protected isMultiline: boolean;
11
- protected inputType: string;
12
- protected question: QuestionTextModel;
13
- constructor(question: IQuestion, controller: DocController, rect: IRect, isQuestion: boolean, fieldName: string, value: string, placeholder: string, isReadOnly: boolean, isMultiline: boolean, inputType: string);
6
+ fieldName: string;
7
+ shouldRenderBorders: boolean;
8
+ value?: string;
9
+ placeholder?: string;
10
+ inputType?: string;
11
+ isMultiline?: boolean;
12
+ }
13
+ export declare class TextFieldBrick extends PdfBrick {
14
+ protected question: IQuestion;
15
+ protected options: ITextFieldBrickOptions;
16
+ constructor(question: IQuestion, controller: DocController, rect: IRect, options: ITextFieldBrickOptions);
14
17
  private renderColorQuestion;
15
18
  renderInteractive(): Promise<void>;
16
19
  protected shouldRenderFlatBorders(): boolean;
@@ -127,9 +127,6 @@ export declare class SurveyPDF extends SurveyModel {
127
127
  onRenderCheckItemAcroform: EventAsync<SurveyPDF, any>;
128
128
  onRenderRadioGroupWrapAcroform: EventAsync<SurveyPDF, any>;
129
129
  onRenderRadioItemAcroform: EventAsync<SurveyPDF, any>;
130
- private ensureQuestionDisplayValue;
131
- private waitForQuestionIsReady;
132
- private waitForCoreIsReady;
133
130
  getUpdatedCheckItemAcroformOptions(options: any): void;
134
131
  getUpdatedRadioGroupWrapOptions(options: any): void;
135
132
  getUpdatedRadioItemAcroformOptions(options: any): void;
@@ -1,8 +0,0 @@
1
- import { IQuestion } from 'survey-core';
2
- import { IRect, DocController } from '../doc_controller';
3
- import { TextBoxBrick } from './pdf_textbox';
4
- export declare class CommentBrick extends TextBoxBrick {
5
- protected controller: DocController;
6
- constructor(question: IQuestion, controller: DocController, rect: IRect, isQuestion: boolean, index?: number);
7
- protected shouldRenderFlatBorders(): boolean;
8
- }
@@ -1,8 +0,0 @@
1
- import { IQuestion } from 'survey-core';
2
- import { IRect, DocController } from '../doc_controller';
3
- import { TextFieldBrick } from './pdf_textfield';
4
- export declare class TextBoxBrick extends TextFieldBrick {
5
- protected isQuestion: boolean;
6
- protected isMultiline: boolean;
7
- constructor(question: IQuestion, controller: DocController, rect: IRect, isQuestion?: boolean, isMultiline?: boolean, index?: number);
8
- }