@pdfme/schemas 3.4.3 → 4.0.0-dev.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.
Files changed (138) hide show
  1. package/dist/cjs/__tests__/text.test.js +5 -4
  2. package/dist/cjs/__tests__/text.test.js.map +1 -1
  3. package/dist/cjs/__tests__/utils.test.js +3 -0
  4. package/dist/cjs/__tests__/utils.test.js.map +1 -1
  5. package/dist/cjs/src/barcodes/propPanel.js +23 -11
  6. package/dist/cjs/src/barcodes/propPanel.js.map +1 -1
  7. package/dist/cjs/src/barcodes/uiRender.js +1 -1
  8. package/dist/cjs/src/barcodes/uiRender.js.map +1 -1
  9. package/dist/cjs/src/graphics/image.js +8 -11
  10. package/dist/cjs/src/graphics/image.js.map +1 -1
  11. package/dist/cjs/src/graphics/svg.js +4 -3
  12. package/dist/cjs/src/graphics/svg.js.map +1 -1
  13. package/dist/cjs/src/index.js +7 -1
  14. package/dist/cjs/src/index.js.map +1 -1
  15. package/dist/cjs/src/shapes/line.js +5 -8
  16. package/dist/cjs/src/shapes/line.js.map +1 -1
  17. package/dist/cjs/src/shapes/rectAndEllipse.js +12 -5
  18. package/dist/cjs/src/shapes/rectAndEllipse.js.map +1 -1
  19. package/dist/cjs/src/tables/cell.js +125 -0
  20. package/dist/cjs/src/tables/cell.js.map +1 -0
  21. package/dist/cjs/src/tables/classes.js +467 -0
  22. package/dist/cjs/src/tables/classes.js.map +1 -0
  23. package/dist/cjs/src/tables/dynamicTemplate.js +71 -0
  24. package/dist/cjs/src/tables/dynamicTemplate.js.map +1 -0
  25. package/dist/cjs/src/tables/helper.js +171 -0
  26. package/dist/cjs/src/tables/helper.js.map +1 -0
  27. package/dist/cjs/src/tables/index.js +12 -0
  28. package/dist/cjs/src/tables/index.js.map +1 -0
  29. package/dist/cjs/src/tables/pdfRender.js +93 -0
  30. package/dist/cjs/src/tables/pdfRender.js.map +1 -0
  31. package/dist/cjs/src/tables/propPanel.js +88 -0
  32. package/dist/cjs/src/tables/propPanel.js.map +1 -0
  33. package/dist/cjs/src/tables/tableHelper.js +231 -0
  34. package/dist/cjs/src/tables/tableHelper.js.map +1 -0
  35. package/dist/cjs/src/tables/types.js +3 -0
  36. package/dist/cjs/src/tables/types.js.map +1 -0
  37. package/dist/cjs/src/tables/uiRender.js +342 -0
  38. package/dist/cjs/src/tables/uiRender.js.map +1 -0
  39. package/dist/cjs/src/text/helper.js +21 -6
  40. package/dist/cjs/src/text/helper.js.map +1 -1
  41. package/dist/cjs/src/text/index.js +1 -1
  42. package/dist/cjs/src/text/index.js.map +1 -1
  43. package/dist/cjs/src/text/pdfRender.js +6 -9
  44. package/dist/cjs/src/text/pdfRender.js.map +1 -1
  45. package/dist/cjs/src/text/propPanel.js +7 -4
  46. package/dist/cjs/src/text/propPanel.js.map +1 -1
  47. package/dist/cjs/src/text/uiRender.js +18 -17
  48. package/dist/cjs/src/text/uiRender.js.map +1 -1
  49. package/dist/cjs/src/utils.js +3 -1
  50. package/dist/cjs/src/utils.js.map +1 -1
  51. package/dist/esm/__tests__/text.test.js +5 -4
  52. package/dist/esm/__tests__/text.test.js.map +1 -1
  53. package/dist/esm/__tests__/utils.test.js +3 -0
  54. package/dist/esm/__tests__/utils.test.js.map +1 -1
  55. package/dist/esm/src/barcodes/propPanel.js +23 -11
  56. package/dist/esm/src/barcodes/propPanel.js.map +1 -1
  57. package/dist/esm/src/barcodes/uiRender.js +1 -1
  58. package/dist/esm/src/barcodes/uiRender.js.map +1 -1
  59. package/dist/esm/src/graphics/image.js +6 -9
  60. package/dist/esm/src/graphics/image.js.map +1 -1
  61. package/dist/esm/src/graphics/svg.js +4 -3
  62. package/dist/esm/src/graphics/svg.js.map +1 -1
  63. package/dist/esm/src/index.js +4 -1
  64. package/dist/esm/src/index.js.map +1 -1
  65. package/dist/esm/src/shapes/line.js +5 -8
  66. package/dist/esm/src/shapes/line.js.map +1 -1
  67. package/dist/esm/src/shapes/rectAndEllipse.js +12 -5
  68. package/dist/esm/src/shapes/rectAndEllipse.js.map +1 -1
  69. package/dist/esm/src/tables/cell.js +120 -0
  70. package/dist/esm/src/tables/cell.js.map +1 -0
  71. package/dist/esm/src/tables/classes.js +460 -0
  72. package/dist/esm/src/tables/classes.js.map +1 -0
  73. package/dist/esm/src/tables/dynamicTemplate.js +66 -0
  74. package/dist/esm/src/tables/dynamicTemplate.js.map +1 -0
  75. package/dist/esm/src/tables/helper.js +163 -0
  76. package/dist/esm/src/tables/helper.js.map +1 -0
  77. package/dist/esm/src/tables/index.js +10 -0
  78. package/dist/esm/src/tables/index.js.map +1 -0
  79. package/dist/esm/src/tables/pdfRender.js +86 -0
  80. package/dist/esm/src/tables/pdfRender.js.map +1 -0
  81. package/dist/esm/src/tables/propPanel.js +85 -0
  82. package/dist/esm/src/tables/propPanel.js.map +1 -0
  83. package/dist/esm/src/tables/tableHelper.js +226 -0
  84. package/dist/esm/src/tables/tableHelper.js.map +1 -0
  85. package/dist/esm/src/tables/types.js +2 -0
  86. package/dist/esm/src/tables/types.js.map +1 -0
  87. package/dist/esm/src/tables/uiRender.js +335 -0
  88. package/dist/esm/src/tables/uiRender.js.map +1 -0
  89. package/dist/esm/src/text/helper.js +19 -5
  90. package/dist/esm/src/text/helper.js.map +1 -1
  91. package/dist/esm/src/text/index.js +1 -1
  92. package/dist/esm/src/text/index.js.map +1 -1
  93. package/dist/esm/src/text/pdfRender.js +7 -10
  94. package/dist/esm/src/text/pdfRender.js.map +1 -1
  95. package/dist/esm/src/text/propPanel.js +7 -4
  96. package/dist/esm/src/text/propPanel.js.map +1 -1
  97. package/dist/esm/src/text/uiRender.js +19 -18
  98. package/dist/esm/src/text/uiRender.js.map +1 -1
  99. package/dist/esm/src/utils.js +1 -0
  100. package/dist/esm/src/utils.js.map +1 -1
  101. package/dist/types/src/index.d.ts +3 -1
  102. package/dist/types/src/shapes/rectAndEllipse.d.ts +19 -27
  103. package/dist/types/src/tables/cell.d.ts +4 -0
  104. package/dist/types/src/tables/classes.d.ts +68 -0
  105. package/dist/types/src/tables/dynamicTemplate.d.ts +13 -0
  106. package/dist/types/src/tables/helper.d.ts +252 -0
  107. package/dist/types/src/tables/index.d.ts +4 -0
  108. package/dist/types/src/tables/pdfRender.d.ts +3 -0
  109. package/dist/types/src/tables/propPanel.d.ts +3 -0
  110. package/dist/types/src/tables/tableHelper.d.ts +11 -0
  111. package/dist/types/src/tables/types.d.ts +91 -0
  112. package/dist/types/src/tables/uiRender.d.ts +3 -0
  113. package/dist/types/src/text/helper.d.ts +8 -1
  114. package/dist/types/src/utils.d.ts +1 -0
  115. package/package.json +1 -1
  116. package/src/barcodes/propPanel.ts +26 -12
  117. package/src/barcodes/uiRender.ts +1 -1
  118. package/src/graphics/image.ts +8 -11
  119. package/src/graphics/svg.ts +4 -3
  120. package/src/index.ts +7 -0
  121. package/src/shapes/line.ts +4 -8
  122. package/src/shapes/rectAndEllipse.ts +16 -7
  123. package/src/tables/cell.ts +157 -0
  124. package/src/tables/classes.ts +398 -0
  125. package/src/tables/dynamicTemplate.ts +81 -0
  126. package/src/tables/helper.ts +198 -0
  127. package/src/tables/index.ts +12 -0
  128. package/src/tables/pdfRender.ts +113 -0
  129. package/src/tables/propPanel.ts +91 -0
  130. package/src/tables/tableHelper.ts +322 -0
  131. package/src/tables/types.ts +88 -0
  132. package/src/tables/uiRender.ts +393 -0
  133. package/src/text/helper.ts +29 -6
  134. package/src/text/index.ts +1 -1
  135. package/src/text/pdfRender.ts +9 -13
  136. package/src/text/propPanel.ts +7 -4
  137. package/src/text/uiRender.ts +18 -18
  138. package/src/utils.ts +1 -0
@@ -1,7 +1,7 @@
1
1
  import { getDefaultFont } from '@pdfme/common';
2
2
  import { DEFAULT_FONT_SIZE, DEFAULT_ALIGNMENT, VERTICAL_ALIGN_TOP, VERTICAL_ALIGN_MIDDLE, VERTICAL_ALIGN_BOTTOM, DEFAULT_VERTICAL_ALIGNMENT, DEFAULT_LINE_HEIGHT, DEFAULT_CHARACTER_SPACING, DEFAULT_FONT_COLOR, PLACEHOLDER_FONT_COLOR, } from './constants.js';
3
3
  import { calculateDynamicFontSize, getFontKitFont, getBrowserVerticalFontAdjustments, isFirefox, } from './helper.js';
4
- import { addAlphaToHex, isEditable } from '../utils.js';
4
+ import { isEditable } from '../utils.js';
5
5
  const mapVerticalAlignToFlex = (verticalAlignmentValue) => {
6
6
  switch (verticalAlignmentValue) {
7
7
  case VERTICAL_ALIGN_TOP:
@@ -13,15 +13,13 @@ const mapVerticalAlignToFlex = (verticalAlignmentValue) => {
13
13
  }
14
14
  return 'flex-start';
15
15
  };
16
- const getBackgroundColor = (value, schema, defaultBackgroundColor) => {
17
- if (!value)
16
+ const getBackgroundColor = (value, schema) => {
17
+ if (!value || !schema.backgroundColor)
18
18
  return 'transparent';
19
- if (schema.backgroundColor)
20
- return schema.backgroundColor;
21
- return defaultBackgroundColor;
19
+ return schema.backgroundColor;
22
20
  };
23
21
  export const uiRender = async (arg) => {
24
- const { value, schema, rootElement, mode, onChange, stopEditing, tabIndex, placeholder, options, theme, _cache, } = arg;
22
+ const { value, schema, rootElement, mode, onChange, stopEditing, tabIndex, placeholder, options, _cache, } = arg;
25
23
  const font = options?.font || getDefaultFont();
26
24
  let dynamicFontSize = undefined;
27
25
  const getCdfArg = (v) => ({
@@ -34,7 +32,7 @@ export const uiRender = async (arg) => {
34
32
  if (schema.dynamicFontSize && value) {
35
33
  dynamicFontSize = await calculateDynamicFontSize(getCdfArg(value));
36
34
  }
37
- const fontKitFont = await getFontKitFont(schema, font, _cache);
35
+ const fontKitFont = await getFontKitFont(schema.fontName, font, _cache);
38
36
  // Depending on vertical alignment, we need to move the top or bottom of the font to keep
39
37
  // it within it's defined box and align it with the generated pdf.
40
38
  const { topAdj, bottomAdj } = getBrowserVerticalFontAdjustments(fontKitFont, dynamicFontSize ?? schema.fontSize ?? DEFAULT_FONT_SIZE, schema.lineHeight ?? DEFAULT_LINE_HEIGHT, schema.verticalAlignment ?? DEFAULT_VERTICAL_ALIGNMENT);
@@ -44,13 +42,14 @@ export const uiRender = async (arg) => {
44
42
  const containerStyle = {
45
43
  padding: 0,
46
44
  resize: 'none',
47
- backgroundColor: getBackgroundColor(value, schema, addAlphaToHex(theme.colorPrimaryBg, 30)),
45
+ backgroundColor: getBackgroundColor(value, schema),
48
46
  border: 'none',
49
47
  display: 'flex',
50
48
  flexDirection: 'column',
51
49
  justifyContent: mapVerticalAlignToFlex(schema.verticalAlignment),
52
50
  width: '100%',
53
51
  height: '100%',
52
+ cursor: isEditable(mode, schema) ? 'text' : 'default',
54
53
  };
55
54
  Object.assign(container.style, containerStyle);
56
55
  rootElement.innerHTML = '';
@@ -101,7 +100,7 @@ export const uiRender = async (arg) => {
101
100
  textBlock.tabIndex = tabIndex || 0;
102
101
  textBlock.innerText = value;
103
102
  textBlock.addEventListener('blur', (e) => {
104
- onChange && onChange(e.target.innerText);
103
+ onChange && onChange({ key: 'content', value: e.target.innerText });
105
104
  stopEditing && stopEditing();
106
105
  });
107
106
  if (schema.dynamicFontSize) {
@@ -135,14 +134,16 @@ export const uiRender = async (arg) => {
135
134
  }
136
135
  container.appendChild(textBlock);
137
136
  if (mode === 'designer') {
138
- textBlock.focus();
139
- // Set the focus to the end of the editable element when you focus, as we would for a textarea
140
- const selection = window.getSelection();
141
- const range = document.createRange();
142
- range.selectNodeContents(textBlock);
143
- range.collapse(false); // Collapse range to the end
144
- selection?.removeAllRanges();
145
- selection?.addRange(range);
137
+ setTimeout(() => {
138
+ textBlock.focus();
139
+ // Set the focus to the end of the editable element when you focus, as we would for a textarea
140
+ const selection = window.getSelection();
141
+ const range = document.createRange();
142
+ range.selectNodeContents(textBlock);
143
+ range.collapse(false); // Collapse range to the end
144
+ selection?.removeAllRanges();
145
+ selection?.addRange(range);
146
+ });
146
147
  }
147
148
  }
148
149
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"uiRender.js","sourceRoot":"","sources":["../../../../src/text/uiRender.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,cAAc,E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AAY,EAAE,CAAC;gBACxC,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACrC,KAAK,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;gBACpC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,4BAA4B;gBACnD,SAAS,EAAE,eAAe,EAAE,CAAC;gBAC7B,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC7B,CAAC,CAAC,CAAC;SACJ;KACF;SAAM;QACL,SAAS,CAAC,SAAS,GAAG,KAAK;aACxB,KAAK,CAAC,EAAE,CAAC;aACT,GAAG,CACF,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CACvB,+BACE,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SACvC,MAAM,CAAC,SAAS,CACnB;aACA,IAAI,CAAC,EAAE,CAAC,CAAC;QAEZ,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;KAClC;AACH,CAAC,CAAC"}
@@ -155,4 +155,5 @@ export const createErrorElm = () => {
155
155
  container.appendChild(span);
156
156
  return container;
157
157
  };
158
+ export const cloneDeep = (value) => JSON.parse(JSON.stringify(value));
158
159
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAU,KAAK,EAAQ,UAAU,EAAa,MAAM,eAAe,CAAC;AAE3E,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,MAAM,EACN,UAAU,EACV,oBAAoB,GAAG,IAAI,GAK5B,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAA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C;IAErC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC;IAC3B,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAE5B,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAI,KAAQ,EAAK,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC"}
@@ -3,9 +3,11 @@ import image, { readOnlyImage } from './graphics/image.js';
3
3
  import svg, { readOnlySvg } from './graphics/svg.js';
4
4
  import barcodes from './barcodes/index.js';
5
5
  import line from './shapes/line.js';
6
+ import { modifyTemplateForTable, getDynamicHeightForTable } from './tables/dynamicTemplate.js';
6
7
  import { rectangle, ellipse } from './shapes/rectAndEllipse.js';
7
8
  import { convertForPdfLayoutProps, rotatePoint } from './utils.js';
9
+ declare const tableBeta: import("@pdfme/common").Plugin<import("./tables/types.js").TableSchema>;
8
10
  declare const builtInPlugins: {
9
11
  Text: import("@pdfme/common").Plugin<import("./text/types.js").TextSchema>;
10
12
  };
11
- export { text, readOnlyText, image, readOnlyImage, svg, readOnlySvg, barcodes, line, rectangle, ellipse, builtInPlugins, convertForPdfLayoutProps, rotatePoint, };
13
+ export { text, readOnlyText, image, readOnlyImage, svg, readOnlySvg, barcodes, line, tableBeta, modifyTemplateForTable, getDynamicHeightForTable, rectangle, ellipse, builtInPlugins, convertForPdfLayoutProps, rotatePoint, };
@@ -1,5 +1,5 @@
1
1
  import { Schema } from '@pdfme/common';
2
- interface Shape extends Schema {
2
+ interface ShapeSchema extends Schema {
3
3
  type: 'ellipse' | 'rectangle';
4
4
  borderWidth: number;
5
5
  borderColor: string;
@@ -9,6 +9,7 @@ export declare const rectangle: {
9
9
  propPanel: {
10
10
  defaultSchema: {
11
11
  type: "ellipse" | "rectangle";
12
+ icon: string;
12
13
  borderWidth: number;
13
14
  borderColor: string;
14
15
  color: string;
@@ -18,10 +19,10 @@ export declare const rectangle: {
18
19
  };
19
20
  width: number;
20
21
  height: number;
21
- readOnly?: boolean | undefined;
22
- readOnlyValue?: string | undefined;
22
+ content?: string | undefined;
23
23
  rotate?: number | undefined;
24
24
  opacity?: number | undefined;
25
+ readOnly?: boolean | undefined;
25
26
  };
26
27
  schema: ((propPanelProps: Omit<{
27
28
  rootElement: HTMLDivElement;
@@ -33,13 +34,13 @@ export declare const rectangle: {
33
34
  x: number;
34
35
  y: number;
35
36
  };
36
- data: string;
37
37
  id: string;
38
38
  key: string;
39
39
  opacity?: number | undefined;
40
40
  rotate?: number | undefined;
41
+ icon?: string | undefined;
42
+ content?: string | undefined;
41
43
  readOnly?: boolean | undefined;
42
- readOnlyValue?: string | undefined;
43
44
  };
44
45
  activeElements: HTMLElement[];
45
46
  changeSchemas: import("@pdfme/common").ChangeSchemas;
@@ -51,32 +52,28 @@ export declare const rectangle: {
51
52
  x: number;
52
53
  y: number;
53
54
  };
54
- data: string;
55
55
  id: string;
56
56
  key: string;
57
57
  opacity?: number | undefined;
58
58
  rotate?: number | undefined;
59
+ icon?: string | undefined;
60
+ content?: string | undefined;
59
61
  readOnly?: boolean | undefined;
60
- readOnlyValue?: string | undefined;
61
62
  }[];
62
- pageSize: {
63
- width: number;
64
- height: number;
65
- };
66
63
  options: import("@pdfme/common").UIOptions;
67
64
  theme: import("antd").GlobalToken;
68
65
  i18n: (key: string) => string;
69
66
  }, "rootElement">) => Record<string, Partial<import("form-render").SchemaBase>>) | Record<string, Partial<import("form-render").SchemaBase>>;
70
67
  widgets?: Record<string, (props: import("@pdfme/common").PropPanelWidgetProps) => void> | undefined;
71
- defaultValue: string;
72
68
  };
73
- pdf: (arg: import("@pdfme/common").PDFRenderProps<Shape>) => void | Promise<void>;
74
- ui: (arg: import("@pdfme/common").UIRenderProps<Shape>) => void | Promise<void>;
69
+ pdf: (arg: import("@pdfme/common").PDFRenderProps<ShapeSchema>) => void | Promise<void>;
70
+ ui: (arg: import("@pdfme/common").UIRenderProps<ShapeSchema>) => void | Promise<void>;
75
71
  };
76
72
  export declare const ellipse: {
77
73
  propPanel: {
78
74
  defaultSchema: {
79
75
  type: "ellipse" | "rectangle";
76
+ icon: string;
80
77
  borderWidth: number;
81
78
  borderColor: string;
82
79
  color: string;
@@ -86,10 +83,10 @@ export declare const ellipse: {
86
83
  };
87
84
  width: number;
88
85
  height: number;
89
- readOnly?: boolean | undefined;
90
- readOnlyValue?: string | undefined;
86
+ content?: string | undefined;
91
87
  rotate?: number | undefined;
92
88
  opacity?: number | undefined;
89
+ readOnly?: boolean | undefined;
93
90
  };
94
91
  schema: ((propPanelProps: Omit<{
95
92
  rootElement: HTMLDivElement;
@@ -101,13 +98,13 @@ export declare const ellipse: {
101
98
  x: number;
102
99
  y: number;
103
100
  };
104
- data: string;
105
101
  id: string;
106
102
  key: string;
107
103
  opacity?: number | undefined;
108
104
  rotate?: number | undefined;
105
+ icon?: string | undefined;
106
+ content?: string | undefined;
109
107
  readOnly?: boolean | undefined;
110
- readOnlyValue?: string | undefined;
111
108
  };
112
109
  activeElements: HTMLElement[];
113
110
  changeSchemas: import("@pdfme/common").ChangeSchemas;
@@ -119,26 +116,21 @@ export declare const ellipse: {
119
116
  x: number;
120
117
  y: number;
121
118
  };
122
- data: string;
123
119
  id: string;
124
120
  key: string;
125
121
  opacity?: number | undefined;
126
122
  rotate?: number | undefined;
123
+ icon?: string | undefined;
124
+ content?: string | undefined;
127
125
  readOnly?: boolean | undefined;
128
- readOnlyValue?: string | undefined;
129
126
  }[];
130
- pageSize: {
131
- width: number;
132
- height: number;
133
- };
134
127
  options: import("@pdfme/common").UIOptions;
135
128
  theme: import("antd").GlobalToken;
136
129
  i18n: (key: string) => string;
137
130
  }, "rootElement">) => Record<string, Partial<import("form-render").SchemaBase>>) | Record<string, Partial<import("form-render").SchemaBase>>;
138
131
  widgets?: Record<string, (props: import("@pdfme/common").PropPanelWidgetProps) => void> | undefined;
139
- defaultValue: string;
140
132
  };
141
- pdf: (arg: import("@pdfme/common").PDFRenderProps<Shape>) => void | Promise<void>;
142
- ui: (arg: import("@pdfme/common").UIRenderProps<Shape>) => void | Promise<void>;
133
+ pdf: (arg: import("@pdfme/common").PDFRenderProps<ShapeSchema>) => void | Promise<void>;
134
+ ui: (arg: import("@pdfme/common").UIRenderProps<ShapeSchema>) => void | Promise<void>;
143
135
  };
144
136
  export {};
@@ -0,0 +1,4 @@
1
+ import { Plugin } from '@pdfme/common';
2
+ import type { CellSchema } from './types';
3
+ declare const cellSchema: Plugin<CellSchema>;
4
+ export default cellSchema;
@@ -0,0 +1,68 @@
1
+ import { Font } from '@pdfme/common';
2
+ import type { Styles, TableInput, Settings, Section, StylesProps } from './types';
3
+ type ContentSettings = {
4
+ body: Row[];
5
+ head: Row[];
6
+ columns: Column[];
7
+ };
8
+ export declare class Cell {
9
+ raw: string;
10
+ text: string[];
11
+ styles: Styles;
12
+ section: Section;
13
+ contentHeight: number;
14
+ contentWidth: number;
15
+ wrappedWidth: number;
16
+ minReadableWidth: number;
17
+ minWidth: number;
18
+ width: number;
19
+ height: number;
20
+ x: number;
21
+ y: number;
22
+ constructor(raw: string, styles: Styles, section: Section);
23
+ getContentHeight(): number;
24
+ padding(name: 'top' | 'bottom' | 'left' | 'right'): number;
25
+ }
26
+ export declare class Column {
27
+ index: number;
28
+ wrappedWidth: number;
29
+ minReadableWidth: number;
30
+ minWidth: number;
31
+ width: number;
32
+ constructor(index: number);
33
+ getMaxCustomCellWidth(table: Table): number;
34
+ }
35
+ export declare class Row {
36
+ readonly raw: string[];
37
+ readonly index: number;
38
+ readonly section: Section;
39
+ readonly cells: {
40
+ [key: string]: Cell;
41
+ };
42
+ height: number;
43
+ constructor(raw: string[], index: number, section: Section, cells: {
44
+ [key: string]: Cell;
45
+ });
46
+ getMaxCellHeight(columns: Column[]): number;
47
+ getMinimumRowHeight(columns: Column[]): number;
48
+ }
49
+ export declare class Table {
50
+ readonly settings: Settings;
51
+ readonly styles: StylesProps;
52
+ readonly columns: Column[];
53
+ readonly head: Row[];
54
+ readonly body: Row[];
55
+ constructor(input: TableInput, content: ContentSettings);
56
+ static create(arg: {
57
+ input: TableInput;
58
+ content: ContentSettings;
59
+ font: Font;
60
+ _cache: Map<any, any>;
61
+ }): Promise<Table>;
62
+ getHeadHeight(): number;
63
+ getBodyHeight(): number;
64
+ allRows(): Row[];
65
+ getWidth(): number;
66
+ getHeight(): number;
67
+ }
68
+ export {};
@@ -0,0 +1,13 @@
1
+ import { Template, Schema, BasePdf, CommonOptions } from '@pdfme/common';
2
+ export declare const modifyTemplateForTable: (arg: {
3
+ template: Template;
4
+ input: Record<string, string>;
5
+ _cache: Map<any, any>;
6
+ options: CommonOptions;
7
+ }) => Promise<Template>;
8
+ export declare const getDynamicHeightForTable: (value: string, args: {
9
+ schema: Schema;
10
+ basePdf: BasePdf;
11
+ options: CommonOptions;
12
+ _cache: Map<any, any>;
13
+ }) => Promise<number>;
@@ -0,0 +1,252 @@
1
+ export declare const getDefaultCellStyles: () => {
2
+ fontName: undefined;
3
+ alignment: import("../text/types").ALIGNMENT;
4
+ verticalAlignment: import("../text/types").VERTICAL_ALIGNMENT;
5
+ fontSize: number;
6
+ lineHeight: number;
7
+ characterSpacing: number;
8
+ fontColor: string;
9
+ backgroundColor: string;
10
+ borderColor: string;
11
+ borderWidth: {
12
+ top: number;
13
+ bottom: number;
14
+ left: number;
15
+ right: number;
16
+ };
17
+ padding: {
18
+ top: number;
19
+ bottom: number;
20
+ left: number;
21
+ right: number;
22
+ };
23
+ };
24
+ export declare const getCellPropPanelSchema: (arg: {
25
+ i18n: (key: string) => string;
26
+ fallbackFontName: string;
27
+ fontNames: string[];
28
+ isBody?: boolean | undefined;
29
+ }) => {
30
+ '-': {
31
+ type: string;
32
+ widget: string;
33
+ };
34
+ borderWidth: {
35
+ title: string;
36
+ type: string;
37
+ widget: string;
38
+ span: number;
39
+ properties: {
40
+ top: {
41
+ type: string;
42
+ widget: string;
43
+ props: {
44
+ min: number;
45
+ step: number;
46
+ };
47
+ span: number;
48
+ title: string;
49
+ };
50
+ right: {
51
+ type: string;
52
+ widget: string;
53
+ props: {
54
+ min: number;
55
+ step: number;
56
+ };
57
+ span: number;
58
+ title: string;
59
+ };
60
+ bottom: {
61
+ type: string;
62
+ widget: string;
63
+ props: {
64
+ min: number;
65
+ step: number;
66
+ };
67
+ span: number;
68
+ title: string;
69
+ };
70
+ left: {
71
+ type: string;
72
+ widget: string;
73
+ props: {
74
+ min: number;
75
+ step: number;
76
+ };
77
+ span: number;
78
+ title: string;
79
+ };
80
+ };
81
+ };
82
+ '--': {
83
+ type: string;
84
+ widget: string;
85
+ };
86
+ padding: {
87
+ title: string;
88
+ type: string;
89
+ widget: string;
90
+ span: number;
91
+ properties: {
92
+ top: {
93
+ type: string;
94
+ widget: string;
95
+ props: {
96
+ min: number;
97
+ step: number;
98
+ };
99
+ span: number;
100
+ title: string;
101
+ };
102
+ right: {
103
+ type: string;
104
+ widget: string;
105
+ props: {
106
+ min: number;
107
+ step: number;
108
+ };
109
+ span: number;
110
+ title: string;
111
+ };
112
+ bottom: {
113
+ type: string;
114
+ widget: string;
115
+ props: {
116
+ min: number;
117
+ step: number;
118
+ };
119
+ span: number;
120
+ title: string;
121
+ };
122
+ left: {
123
+ type: string;
124
+ widget: string;
125
+ props: {
126
+ min: number;
127
+ step: number;
128
+ };
129
+ span: number;
130
+ title: string;
131
+ };
132
+ };
133
+ };
134
+ alternateBackgroundColor?: {
135
+ title: string;
136
+ type: string;
137
+ widget: string;
138
+ rules: {
139
+ pattern: string;
140
+ message: string;
141
+ }[];
142
+ } | undefined;
143
+ fontName: {
144
+ title: string;
145
+ type: string;
146
+ widget: string;
147
+ default: string;
148
+ props: {
149
+ options: {
150
+ label: string;
151
+ value: string;
152
+ }[];
153
+ };
154
+ span: number;
155
+ };
156
+ fontSize: {
157
+ title: string;
158
+ type: string;
159
+ widget: string;
160
+ props: {
161
+ min: number;
162
+ };
163
+ span: number;
164
+ };
165
+ characterSpacing: {
166
+ title: string;
167
+ type: string;
168
+ widget: string;
169
+ props: {
170
+ min: number;
171
+ };
172
+ span: number;
173
+ };
174
+ alignment: {
175
+ title: string;
176
+ type: string;
177
+ widget: string;
178
+ props: {
179
+ options: {
180
+ label: string;
181
+ value: import("../text/types").ALIGNMENT;
182
+ }[];
183
+ };
184
+ span: number;
185
+ };
186
+ verticalAlignment: {
187
+ title: string;
188
+ type: string;
189
+ widget: string;
190
+ props: {
191
+ options: {
192
+ label: string;
193
+ value: import("../text/types").VERTICAL_ALIGNMENT;
194
+ }[];
195
+ };
196
+ span: number;
197
+ };
198
+ lineHeight: {
199
+ title: string;
200
+ type: string;
201
+ widget: string;
202
+ props: {
203
+ step: number;
204
+ min: number;
205
+ };
206
+ span: number;
207
+ };
208
+ fontColor: {
209
+ title: string;
210
+ type: string;
211
+ widget: string;
212
+ rules: {
213
+ pattern: string;
214
+ message: string;
215
+ }[];
216
+ };
217
+ borderColor: {
218
+ title: string;
219
+ type: string;
220
+ widget: string;
221
+ rules: {
222
+ pattern: string;
223
+ message: string;
224
+ }[];
225
+ };
226
+ backgroundColor: {
227
+ title: string;
228
+ type: string;
229
+ widget: string;
230
+ rules: {
231
+ pattern: string;
232
+ message: string;
233
+ }[];
234
+ };
235
+ };
236
+ export declare const getColumnStylesPropPanelSchema: ({ head, i18n, }: {
237
+ head: string[];
238
+ i18n: (key: string) => string;
239
+ }) => {
240
+ alignment: {
241
+ type: string;
242
+ widget: string;
243
+ title: string;
244
+ column: number;
245
+ properties: {};
246
+ };
247
+ };
248
+ export declare const getBody: (value: string) => string[][];
249
+ export declare const getBodyWithRange: (value: string, range?: {
250
+ start: number;
251
+ end?: number | undefined;
252
+ }) => string[][];
@@ -0,0 +1,4 @@
1
+ import type { Plugin } from '@pdfme/common';
2
+ import type { TableSchema } from './types.js';
3
+ declare const tableSchema: Plugin<TableSchema>;
4
+ export default tableSchema;
@@ -0,0 +1,3 @@
1
+ import type { TableSchema } from './types';
2
+ import type { PDFRenderProps } from '@pdfme/common';
3
+ export declare const pdfRender: (arg: PDFRenderProps<TableSchema>) => Promise<void>;
@@ -0,0 +1,3 @@
1
+ import type { PropPanel } from '@pdfme/common';
2
+ import type { TableSchema } from './types';
3
+ export declare const propPanel: PropPanel<TableSchema>;