@pdfme/schemas 3.2.3 → 4.0.0-alpha.0

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 +11 -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 +5 -11
  10. package/dist/cjs/src/graphics/image.js.map +1 -1
  11. package/dist/cjs/src/graphics/svg.js +2 -3
  12. package/dist/cjs/src/graphics/svg.js.map +1 -1
  13. package/dist/cjs/src/index.js +6 -1
  14. package/dist/cjs/src/index.js.map +1 -1
  15. package/dist/cjs/src/shapes/line.js +5 -9
  16. package/dist/cjs/src/shapes/line.js.map +1 -1
  17. package/dist/cjs/src/shapes/rectAndEllipse.js +3 -2
  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 +95 -0
  30. package/dist/cjs/src/tables/pdfRender.js.map +1 -0
  31. package/dist/cjs/src/tables/propPanel.js +87 -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 +321 -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 +0 -1
  42. package/dist/cjs/src/text/index.js.map +1 -1
  43. package/dist/cjs/src/text/pdfRender.js +5 -8
  44. package/dist/cjs/src/text/pdfRender.js.map +1 -1
  45. package/dist/cjs/src/text/propPanel.js +6 -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 +9 -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 +11 -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 +4 -10
  60. package/dist/esm/src/graphics/image.js.map +1 -1
  61. package/dist/esm/src/graphics/svg.js +2 -3
  62. package/dist/esm/src/graphics/svg.js.map +1 -1
  63. package/dist/esm/src/index.js +3 -1
  64. package/dist/esm/src/index.js.map +1 -1
  65. package/dist/esm/src/shapes/line.js +5 -9
  66. package/dist/esm/src/shapes/line.js.map +1 -1
  67. package/dist/esm/src/shapes/rectAndEllipse.js +3 -2
  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 +88 -0
  80. package/dist/esm/src/tables/pdfRender.js.map +1 -0
  81. package/dist/esm/src/tables/propPanel.js +84 -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 +314 -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 +0 -1
  92. package/dist/esm/src/text/index.js.map +1 -1
  93. package/dist/esm/src/text/pdfRender.js +6 -9
  94. package/dist/esm/src/text/pdfRender.js.map +1 -1
  95. package/dist/esm/src/text/propPanel.js +6 -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 +6 -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 +13 -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 +2 -0
  115. package/package.json +1 -1
  116. package/src/barcodes/propPanel.ts +12 -12
  117. package/src/barcodes/uiRender.ts +1 -1
  118. package/src/graphics/image.ts +6 -11
  119. package/src/graphics/svg.ts +2 -3
  120. package/src/index.ts +5 -0
  121. package/src/shapes/line.ts +4 -9
  122. package/src/shapes/rectAndEllipse.ts +4 -4
  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 +115 -0
  129. package/src/tables/propPanel.ts +90 -0
  130. package/src/tables/tableHelper.ts +322 -0
  131. package/src/tables/types.ts +88 -0
  132. package/src/tables/uiRender.ts +362 -0
  133. package/src/text/helper.ts +30 -6
  134. package/src/text/index.ts +0 -1
  135. package/src/text/pdfRender.ts +7 -11
  136. package/src/text/propPanel.ts +6 -4
  137. package/src/text/uiRender.ts +18 -18
  138. package/src/utils.ts +8 -0
@@ -0,0 +1,314 @@
1
+ import { createSingleTable } from './tableHelper.js';
2
+ import { getBody, getBodyWithRange } from './helper.js';
3
+ import cell from './cell.js';
4
+ import { px2mm } from '../utils';
5
+ const cellUiRender = cell.ui;
6
+ const convertToCellStyle = (styles) => ({
7
+ fontName: styles.fontName,
8
+ alignment: styles.alignment,
9
+ verticalAlignment: styles.verticalAlignment,
10
+ fontSize: styles.fontSize,
11
+ lineHeight: styles.lineHeight,
12
+ characterSpacing: styles.characterSpacing,
13
+ backgroundColor: styles.backgroundColor,
14
+ // ---
15
+ fontColor: styles.textColor,
16
+ borderColor: styles.lineColor,
17
+ borderWidth: styles.lineWidth,
18
+ padding: styles.cellPadding,
19
+ });
20
+ const calcResizedHeadWidthPercentages = (arg) => {
21
+ const { currentHeadWidthPercentages, currentHeadWidths, changedHeadWidth, changedHeadIndex } = arg;
22
+ const headWidthPercentages = [...currentHeadWidthPercentages];
23
+ const totalWidth = currentHeadWidths.reduce((a, b) => a + b, 0);
24
+ const changedWidthPercentage = (changedHeadWidth / totalWidth) * 100;
25
+ const originalNextWidthPercentage = headWidthPercentages[changedHeadIndex + 1] ?? 0;
26
+ const adjustment = headWidthPercentages[changedHeadIndex] - changedWidthPercentage;
27
+ headWidthPercentages[changedHeadIndex] = changedWidthPercentage;
28
+ if (changedHeadIndex + 1 < headWidthPercentages.length) {
29
+ headWidthPercentages[changedHeadIndex + 1] = originalNextWidthPercentage + adjustment;
30
+ }
31
+ return headWidthPercentages;
32
+ };
33
+ const renderRowUi = (args) => {
34
+ const { rows, arg, onChangeEditingPosition, offsetY = 0, editingPosition } = args;
35
+ const value = JSON.parse(arg.value || '[]');
36
+ // TODO Need to adjust the inner size when the outer border increases
37
+ // Want to have the same style as border-collapse: collapse; (overlapping borders should merge into one)
38
+ // This should apply to the table itself as well as the cells, which should behave similarly.
39
+ let rowOffsetY = offsetY;
40
+ rows.forEach((row, rowIndex) => {
41
+ const { cells, height, section } = row;
42
+ let colWidth = 0;
43
+ Object.values(cells).forEach((cell, colIndex) => {
44
+ const div = document.createElement('div');
45
+ div.style.position = 'absolute';
46
+ div.style.top = `${rowOffsetY}mm`;
47
+ div.style.left = `${colWidth}mm`;
48
+ div.style.width = `${cell.width}mm`;
49
+ div.style.height = `${cell.height}mm`;
50
+ div.style.cursor =
51
+ arg.mode === 'designer' || (arg.mode === 'form' && section === 'body') ? 'text' : 'default';
52
+ div.addEventListener('click', () => {
53
+ if (arg.mode === 'viewer')
54
+ return;
55
+ onChangeEditingPosition({ rowIndex, colIndex });
56
+ });
57
+ arg.rootElement.appendChild(div);
58
+ const isEditing = editingPosition.rowIndex === rowIndex && editingPosition.colIndex === colIndex;
59
+ let mode = 'viewer';
60
+ if (arg.mode === 'form') {
61
+ mode = section === 'body' && isEditing ? 'designer' : 'viewer';
62
+ }
63
+ else if (arg.mode === 'designer') {
64
+ mode = isEditing ? 'designer' : 'form';
65
+ }
66
+ void cellUiRender({
67
+ ...arg,
68
+ stopEditing: () => {
69
+ if (arg.mode === 'form') {
70
+ resetEditingPosition();
71
+ }
72
+ },
73
+ mode,
74
+ onChange: (v) => {
75
+ if (!arg.onChange)
76
+ return;
77
+ const newValue = (Array.isArray(v) ? v[0].value : v.value);
78
+ if (section === 'body') {
79
+ const startRange = arg.schema.__bodyRange?.start ?? 0;
80
+ value[rowIndex + startRange][colIndex] = newValue;
81
+ // TODO Calling onChange triggers re-rendering, causing the focus to be lost
82
+ arg.onChange({ key: 'content', value: JSON.stringify(value) });
83
+ }
84
+ else {
85
+ const newHead = [...arg.schema.head];
86
+ newHead[colIndex] = newValue;
87
+ arg.onChange({ key: 'head', value: newHead });
88
+ }
89
+ },
90
+ value: cell.raw,
91
+ placeholder: '',
92
+ rootElement: div,
93
+ schema: {
94
+ type: 'cell',
95
+ content: cell.raw,
96
+ position: { x: colWidth, y: rowOffsetY },
97
+ width: cell.width,
98
+ height: cell.height,
99
+ ...convertToCellStyle(cell.styles),
100
+ },
101
+ });
102
+ colWidth += cell.width;
103
+ });
104
+ rowOffsetY += height;
105
+ });
106
+ };
107
+ const headEditingPosition = { rowIndex: -1, colIndex: -1 };
108
+ const bodyEditingPosition = { rowIndex: -1, colIndex: -1 };
109
+ const resetEditingPosition = () => {
110
+ headEditingPosition.rowIndex = -1;
111
+ headEditingPosition.colIndex = -1;
112
+ bodyEditingPosition.rowIndex = -1;
113
+ bodyEditingPosition.colIndex = -1;
114
+ };
115
+ export const uiRender = async (arg) => {
116
+ const { rootElement, onChange, schema, value, mode } = arg;
117
+ const body = getBody(value);
118
+ const bodyWidthRange = getBodyWithRange(value, schema.__bodyRange);
119
+ const table = await createSingleTable(bodyWidthRange, arg);
120
+ rootElement.innerHTML = '';
121
+ rootElement.style.borderColor = schema.tableStyles.borderColor;
122
+ rootElement.style.borderWidth = String(schema.tableStyles.borderWidth) + 'mm';
123
+ rootElement.style.borderStyle = 'solid';
124
+ rootElement.style.boxSizing = 'border-box';
125
+ const handleChangeEditingPosition = (newPosition, editingPosition) => {
126
+ resetEditingPosition();
127
+ editingPosition.rowIndex = newPosition.rowIndex;
128
+ editingPosition.colIndex = newPosition.colIndex;
129
+ void uiRender(arg);
130
+ };
131
+ if (schema.showHead) {
132
+ renderRowUi({
133
+ rows: table.head,
134
+ arg,
135
+ editingPosition: headEditingPosition,
136
+ onChangeEditingPosition: (p) => handleChangeEditingPosition(p, headEditingPosition),
137
+ });
138
+ }
139
+ const offsetY = schema.showHead ? table.getHeadHeight() : 0;
140
+ renderRowUi({
141
+ rows: table.body,
142
+ arg,
143
+ editingPosition: bodyEditingPosition,
144
+ onChangeEditingPosition: (p) => {
145
+ handleChangeEditingPosition(p, bodyEditingPosition);
146
+ },
147
+ offsetY,
148
+ });
149
+ if (mode === 'form' && onChange) {
150
+ if (schema.__bodyRange?.end === undefined ||
151
+ schema.__bodyRange.end >= JSON.parse(value || '[]').length) {
152
+ const addRowButton = document.createElement('button');
153
+ addRowButton.style.width = '30px';
154
+ addRowButton.style.height = '30px';
155
+ addRowButton.style.position = 'absolute';
156
+ addRowButton.style.top = `${table.getHeight()}mm`;
157
+ addRowButton.style.left = 'calc(50% - 15px)';
158
+ addRowButton.innerText = '+';
159
+ addRowButton.onclick = () => {
160
+ const newRow = Array(schema.head.length).fill('');
161
+ onChange({ key: 'content', value: JSON.stringify(body.concat([newRow])) });
162
+ };
163
+ rootElement.appendChild(addRowButton);
164
+ }
165
+ let offsetY = schema.showHead ? table.getHeadHeight() : 0;
166
+ table.body.forEach((row, i) => {
167
+ offsetY = offsetY + row.height;
168
+ const removeRowButton = document.createElement('button');
169
+ removeRowButton.style.width = '30px';
170
+ removeRowButton.style.height = '30px';
171
+ removeRowButton.style.position = 'absolute';
172
+ removeRowButton.style.top = `${offsetY - px2mm(30)}mm`;
173
+ removeRowButton.style.right = '-30px';
174
+ removeRowButton.innerText = '-';
175
+ removeRowButton.onclick = () => {
176
+ const newTableBody = body.filter((_, j) => j !== i + (schema.__bodyRange?.start ?? 0));
177
+ onChange({ key: 'content', value: JSON.stringify(newTableBody) });
178
+ };
179
+ rootElement.appendChild(removeRowButton);
180
+ });
181
+ }
182
+ if (mode === 'designer' && onChange) {
183
+ const addColumnButton = document.createElement('button');
184
+ addColumnButton.style.width = '30px';
185
+ addColumnButton.style.height = '30px';
186
+ addColumnButton.style.position = 'absolute';
187
+ addColumnButton.style.top = `${table.getHeadHeight() - px2mm(30)}mm`;
188
+ addColumnButton.style.right = '-30px';
189
+ addColumnButton.innerText = '+';
190
+ addColumnButton.onclick = (e) => {
191
+ e.preventDefault();
192
+ const newColumnWidthPercentage = 25;
193
+ const totalCurrentWidth = schema.headWidthPercentages.reduce((acc, width) => acc + width, 0);
194
+ const scalingRatio = (100 - newColumnWidthPercentage) / totalCurrentWidth;
195
+ const scaledWidths = schema.headWidthPercentages.map((width) => width * scalingRatio);
196
+ onChange([
197
+ { key: 'head', value: schema.head.concat(`Head ${schema.head.length + 1}`) },
198
+ { key: 'headWidthPercentages', value: scaledWidths.concat(newColumnWidthPercentage) },
199
+ {
200
+ key: 'content',
201
+ value: JSON.stringify(bodyWidthRange.map((row, i) => row.concat(`Row ${i + 1}`))),
202
+ },
203
+ ]);
204
+ };
205
+ rootElement.appendChild(addColumnButton);
206
+ let offsetX = 0;
207
+ table.columns.forEach((column, i) => {
208
+ offsetX = offsetX + column.width;
209
+ const removeColumnButton = document.createElement('button');
210
+ removeColumnButton.style.width = '30px';
211
+ removeColumnButton.style.height = '30px';
212
+ removeColumnButton.style.position = 'absolute';
213
+ removeColumnButton.style.top = '-30px';
214
+ removeColumnButton.style.left = `${offsetX - px2mm(30)}mm`;
215
+ removeColumnButton.innerText = '-';
216
+ removeColumnButton.onclick = (e) => {
217
+ e.preventDefault();
218
+ const totalWidthMinusRemoved = schema.headWidthPercentages.reduce((sum, width, j) => (j !== i ? sum + width : sum), 0);
219
+ // TODO Should also remove the deleted columnStyles when deleting
220
+ onChange([
221
+ { key: 'head', value: schema.head.filter((_, j) => j !== i) },
222
+ {
223
+ key: 'headWidthPercentages',
224
+ value: schema.headWidthPercentages
225
+ .filter((_, j) => j !== i)
226
+ .map((width) => (width / totalWidthMinusRemoved) * 100),
227
+ },
228
+ {
229
+ key: 'content',
230
+ value: JSON.stringify(bodyWidthRange.map((row) => row.filter((_, j) => j !== i))),
231
+ },
232
+ ]);
233
+ };
234
+ rootElement.appendChild(removeColumnButton);
235
+ if (i === table.columns.length - 1)
236
+ return;
237
+ const dragHandle = document.createElement('div');
238
+ const lineWidth = 5;
239
+ dragHandle.style.width = `${lineWidth}px`;
240
+ dragHandle.style.height = '100%';
241
+ dragHandle.style.backgroundColor = '#eee';
242
+ dragHandle.style.opacity = '0.5';
243
+ dragHandle.style.cursor = 'col-resize';
244
+ dragHandle.style.position = 'absolute';
245
+ dragHandle.style.zIndex = '10';
246
+ dragHandle.style.left = `${offsetX - px2mm(lineWidth) / 2}mm`;
247
+ dragHandle.style.top = '0';
248
+ const setColor = (e) => {
249
+ const handle = e.target;
250
+ handle.style.backgroundColor = '#2196f3';
251
+ };
252
+ const resetColor = (e) => {
253
+ const handle = e.target;
254
+ handle.style.backgroundColor = '#eee';
255
+ };
256
+ dragHandle.addEventListener('mouseover', setColor);
257
+ dragHandle.addEventListener('mouseout', resetColor);
258
+ const prevColumnLeft = offsetX - column.width;
259
+ const nextColumnRight = offsetX - px2mm(lineWidth) + table.columns[i + 1].width;
260
+ dragHandle.addEventListener('mousedown', (e) => {
261
+ resetEditingPosition();
262
+ const handle = e.target;
263
+ dragHandle.removeEventListener('mouseover', setColor);
264
+ dragHandle.removeEventListener('mouseout', resetColor);
265
+ let move = 0;
266
+ const mouseMove = (e) => {
267
+ // TODO There is an issue where newLeft gets displaced with drag & drop
268
+ let moveX = e.movementX;
269
+ const currentLeft = Number(handle.style.left.replace('mm', ''));
270
+ let newLeft = currentLeft + moveX;
271
+ if (newLeft < prevColumnLeft) {
272
+ newLeft = prevColumnLeft;
273
+ moveX = newLeft - currentLeft;
274
+ }
275
+ if (newLeft >= nextColumnRight) {
276
+ newLeft = nextColumnRight;
277
+ moveX = newLeft - currentLeft;
278
+ }
279
+ handle.style.left = `${newLeft}mm`;
280
+ move += moveX;
281
+ };
282
+ rootElement.addEventListener('mousemove', mouseMove);
283
+ const commitResize = () => {
284
+ if (move !== 0) {
285
+ const newHeadWidthPercentages = calcResizedHeadWidthPercentages({
286
+ currentHeadWidthPercentages: schema.headWidthPercentages,
287
+ currentHeadWidths: table.columns.map((column) => column.width),
288
+ changedHeadWidth: table.columns[i].width + move,
289
+ changedHeadIndex: i,
290
+ });
291
+ onChange({ key: 'headWidthPercentages', value: newHeadWidthPercentages });
292
+ }
293
+ move = 0;
294
+ dragHandle.addEventListener('mouseover', setColor);
295
+ dragHandle.addEventListener('mouseout', resetColor);
296
+ rootElement.removeEventListener('mousemove', mouseMove);
297
+ rootElement.removeEventListener('mouseup', commitResize);
298
+ };
299
+ rootElement.addEventListener('mouseup', commitResize);
300
+ });
301
+ rootElement.appendChild(dragHandle);
302
+ });
303
+ }
304
+ if (mode === 'viewer') {
305
+ resetEditingPosition();
306
+ }
307
+ if (mode !== 'form') {
308
+ const tableHeight = schema.showHead ? table.getHeight() : table.getBodyHeight();
309
+ if (schema.height !== tableHeight && onChange) {
310
+ onChange({ key: 'height', value: tableHeight });
311
+ }
312
+ }
313
+ };
314
+ //# sourceMappingURL=uiRender.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uiRender.js","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AAQ,EAAE;QACrB,oBAAoB,EAAE,CAAC;KACxB;IAED,IAAI,IAAI,KAAK,MAAM,EAAE;QACnB,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;QAChF,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,IAAI,QAAQ,EAAE;YAC7C,QAAQ,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;SACjD;KACF;AACH,CAAC,CAAC"}
@@ -59,13 +59,13 @@ const getFallbackFont = (font) => {
59
59
  return font[fallbackFontName];
60
60
  };
61
61
  const getCacheKey = (fontName) => `getFontKitFont-${fontName}`;
62
- export const getFontKitFont = async (textSchema, font, _cache) => {
63
- const fontName = textSchema.fontName || getFallbackFontName(font);
64
- const cacheKey = getCacheKey(fontName);
62
+ export const getFontKitFont = async (fontName, font, _cache) => {
63
+ const fntNm = fontName || getFallbackFontName(font);
64
+ const cacheKey = getCacheKey(fntNm);
65
65
  if (_cache.has(cacheKey)) {
66
66
  return _cache.get(cacheKey);
67
67
  }
68
- const currentFont = font[fontName] || getFallbackFont(font) || getDefaultFont()[DEFAULT_FONT_NAME];
68
+ const currentFont = font[fntNm] || getFallbackFont(font) || getDefaultFont()[DEFAULT_FONT_NAME];
69
69
  let fontData = currentFont.data;
70
70
  if (typeof fontData === 'string') {
71
71
  fontData = fontData.startsWith('http')
@@ -142,7 +142,7 @@ export const calculateDynamicFontSize = async ({ textSchema, font, value, starti
142
142
  if (dynamicFontSizeSetting.max < dynamicFontSizeSetting.min)
143
143
  return fontSize;
144
144
  const characterSpacing = schemaCharacterSpacing ?? DEFAULT_CHARACTER_SPACING;
145
- const fontKitFont = await getFontKitFont(textSchema, font, _cache);
145
+ const fontKitFont = await getFontKitFont(textSchema.fontName, font, _cache);
146
146
  const paragraphs = value.split('\n');
147
147
  let dynamicFontSize = fontSize;
148
148
  if (dynamicFontSize < dynamicFontSizeSetting.min) {
@@ -225,4 +225,18 @@ export const calculateDynamicFontSize = async ({ textSchema, font, value, starti
225
225
  }
226
226
  return dynamicFontSize;
227
227
  };
228
+ export const splitTextToSize = (arg) => {
229
+ const { value, characterSpacing, fontSize, fontKitFont, boxWidthInPt } = arg;
230
+ const fontWidthCalcValues = {
231
+ font: fontKitFont,
232
+ fontSize,
233
+ characterSpacing,
234
+ boxWidthInPt,
235
+ };
236
+ let lines = [];
237
+ value.split(/\r\n|\r|\n|\f|\u000B/g).forEach((line) => {
238
+ lines = lines.concat(getSplittedLines(line, fontWidthCalcValues));
239
+ });
240
+ return lines;
241
+ };
228
242
  //# sourceMappingURL=helper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../src/text/helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,EACL,eAAe,EACf,KAAK,EACL,KAAK,EACL,KAAK,EAEL,mBAAmB,EACnB,cAAc,EACd,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,WAAwB,EACxB,QAAgB,EAChB,UAAkB,EAClB,iBAAyB,EACzB,EAAE;IACF,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC;IAEpD,8FAA8F;IAC9F,MAAM,kBAAkB,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,UAAU,CAAC;IAE3D,6BAA6B;IAC7B,6FAA6F;IAC7F,wDAA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AAc,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,GAC5D,oBAAoB,CAAC,eAAe,CAAC,CAAC;QAExC,IAAI,SAAS,GAAG,SAAS,EAAE;YACzB,cAAc,GAAG,QAAQ,CAAC;YAC1B,eAAe,GAAG,SAAS,CAAC;SAC7B;aAAM;YACL,eAAe,IAAI,oBAAoB,CAAC;YACxC,MAAM;SACP;KACF;IAED,wDAAwD;IACxD,OAAO,qBAAqB,CAAC,cAAc,EAAE,eAAe,CAAC,EAAE;QAC7D,eAAe,IAAI,oBAAoB,CAAC;QACxC,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,oBAAoB,CAAC,eAAe,CAAC,CAAC,CAAC;KAC/E;IAED,OAAO,eAAe,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAM/B,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,GAAG,CAAC;IAC7E,MAAM,mBAAmB,GAAwB;QAC/C,IAAI,EAAE,WAAW;QACjB,QAAQ;QACR,gBAAgB;QAChB,YAAY;KACb,CAAC;IACF,IAAI,KAAK,GAAa,EAAE,CAAC;IACzB,KAAK,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC,CAAC,IAAY,EAAE,EAAE;QAC5D,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
@@ -12,7 +12,6 @@ export const readOnlyText = {
12
12
  ...textSchema.propPanel.defaultSchema,
13
13
  type: 'readOnlyText',
14
14
  readOnly: true,
15
- readOnlyValue: textSchema.propPanel.defaultValue,
16
15
  },
17
16
  },
18
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/text/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,MAAM,UAAU,GAAuB,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAEnF,eAAe,UAAU,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAuB;IAC9C,GAAG,EAAE,UAAU,CAAC,GAAG;IACnB,EAAE,EAAE,UAAU,CAAC,EAAE;IACjB,SAAS,EAAE;QACT,GAAG,UAAU,CAAC,SAAS;QACvB,aAAa,EAAE;YACb,GAAG,UAAU,CAAC,SAAS,CAAC,aAAa;YACrC,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE,IAAI;YACd,aAAa,EAAE,UAAU,CAAC,SAAS,CAAC,YAAY;SACjD;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/text/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,MAAM,UAAU,GAAuB,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAEnF,eAAe,UAAU,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAuB;IAC9C,GAAG,EAAE,UAAU,CAAC,GAAG;IACnB,EAAE,EAAE,UAAU,CAAC,EAAE;IACjB,SAAS,EAAE;QACT,GAAG,UAAU,CAAC,SAAS;QACvB,aAAa,EAAE;YACb,GAAG,UAAU,CAAC,SAAS,CAAC,aAAa;YACrC,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { getDefaultFont, getFallbackFontName, mm2pt } from '@pdfme/common';
2
2
  import { VERTICAL_ALIGN_TOP, VERTICAL_ALIGN_MIDDLE, VERTICAL_ALIGN_BOTTOM, DEFAULT_FONT_SIZE, DEFAULT_ALIGNMENT, DEFAULT_VERTICAL_ALIGNMENT, DEFAULT_LINE_HEIGHT, DEFAULT_CHARACTER_SPACING, DEFAULT_FONT_COLOR, } from './constants.js';
3
- import { calculateDynamicFontSize, heightOfFontAtSize, getFontDescentInPt, getFontKitFont, getSplittedLines, widthOfTextAtSize, } from './helper.js';
3
+ import { calculateDynamicFontSize, heightOfFontAtSize, getFontDescentInPt, getFontKitFont, widthOfTextAtSize, splitTextToSize, } from './helper.js';
4
4
  import { convertForPdfLayoutProps, rotatePoint, hex2RgbColor } from '../utils.js';
5
5
  const embedAndGetFontObj = async (arg) => {
6
6
  const { pdfDoc, font, _cache } = arg;
@@ -41,7 +41,7 @@ export const pdfRender = async (arg) => {
41
41
  const { font = getDefaultFont() } = options;
42
42
  const [pdfFontObj, fontKitFont, fontProp] = await Promise.all([
43
43
  embedAndGetFontObj({ pdfDoc, font, _cache }),
44
- getFontKitFont(schema, font, _cache),
44
+ getFontKitFont(schema.fontName, font, _cache),
45
45
  getFontProp({ value, font, schema, _cache }),
46
46
  ]);
47
47
  const { fontSize, color, alignment, verticalAlignment, lineHeight, characterSpacing } = fontProp;
@@ -57,15 +57,12 @@ export const pdfRender = async (arg) => {
57
57
  const firstLineTextHeight = heightOfFontAtSize(fontKitFont, fontSize);
58
58
  const descent = getFontDescentInPt(fontKitFont, fontSize);
59
59
  const halfLineHeightAdjustment = lineHeight === 0 ? 0 : ((lineHeight - 1) * fontSize) / 2;
60
- const fontWidthCalcValues = {
61
- font: fontKitFont,
62
- fontSize,
60
+ const lines = splitTextToSize({
61
+ value,
63
62
  characterSpacing,
63
+ fontSize,
64
+ fontKitFont,
64
65
  boxWidthInPt: width,
65
- };
66
- let lines = [];
67
- value.split(/\r\n|\r|\n|\f|\u000B/g).forEach((line) => {
68
- lines = lines.concat(getSplittedLines(line, fontWidthCalcValues));
69
66
  });
70
67
  // Text lines are rendered from the bottom upwards, we need to adjust the position down
71
68
  let yOffset = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"pdfRender.js","sourceRoot":"","sources":["../../../../src/text/pdfRender.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwB,cAAc,EAAE,mBAAmB,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAElF,MAAM,kBAAkB,GAAG,KAAK,EAAE,GAIjC,EAAE,EAAE;IACH,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;IACrC,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;QACtB,OAAO,MAAM,CAAC,GAAG,CAAC,MAAM,CAA+B,CAAC;KACzD;IAED,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,GAAG,CAClC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QAClC,IAAI,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC;QACtB,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,UAAU,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,CAAC,CAAC,GAAG,OAAO,GAAG,UAAU,CAAC;QAEzE,IAAI,MAAM,CAAC,KAAK,KAAK,CAAC,EAAE;YACtB,iGAAiG;YACjG,qGAAqG;YACrG,MAAM,YAAY,GAAG,WAAW,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;YACnF,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC;YACvB,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC;SACxB;QAED,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;YAClB,CAAC,EAAE,KAAK;YACR,CAAC,EAAE,KAAK;YACR,MAAM;YACN,IAAI,EAAE,QAAQ;YACd,KAAK;YACL,UAAU,EAAE,UAAU,GAAG,QAAQ;YACjC,IAAI,EAAE,YAAY;YAClB,OAAO;SACR,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -43,12 +43,14 @@ export const propPanel = {
43
43
  widget: 'inputNumber',
44
44
  span: 6,
45
45
  disabled: enableDynamicFont,
46
+ props: { min: 0 },
46
47
  },
47
48
  characterSpacing: {
48
49
  title: i18n('schemas.text.spacing'),
49
50
  type: 'number',
50
51
  widget: 'inputNumber',
51
52
  span: 6,
53
+ props: { min: 0 },
52
54
  },
53
55
  alignment: {
54
56
  title: i18n('schemas.text.textAlign'),
@@ -80,9 +82,7 @@ export const propPanel = {
80
82
  title: i18n('schemas.text.lineHeight'),
81
83
  type: 'number',
82
84
  widget: 'inputNumber',
83
- props: {
84
- step: 0.1,
85
- },
85
+ props: { step: 0.1, min: 0 },
86
86
  span: 8,
87
87
  },
88
88
  useDynamicFontSize: { type: 'boolean', widget: 'UseDynamicFontSize', bind: false, span: 16 },
@@ -96,12 +96,14 @@ export const propPanel = {
96
96
  type: 'number',
97
97
  widget: 'inputNumber',
98
98
  hidden: !enableDynamicFont,
99
+ props: { min: 0 },
99
100
  },
100
101
  max: {
101
102
  title: i18n('schemas.text.max'),
102
103
  type: 'number',
103
104
  widget: 'inputNumber',
104
105
  hidden: !enableDynamicFont,
106
+ props: { min: 0 },
105
107
  },
106
108
  fit: {
107
109
  title: i18n('schemas.text.fit'),
@@ -143,9 +145,9 @@ export const propPanel = {
143
145
  return textSchema;
144
146
  },
145
147
  widgets: { UseDynamicFontSize },
146
- defaultValue: 'Type Something...',
147
148
  defaultSchema: {
148
149
  type: 'text',
150
+ content: 'Type Something...',
149
151
  position: { x: 0, y: 0 },
150
152
  width: 45,
151
153
  height: 10,
@@ -1 +1 @@
1
- {"version":3,"file":"propPanel.js","sourceRoot":"","sources":["../../../../src/text/propPanel.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAIjB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,yBAAyB,EACzB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,6BAA6B,EAC7B,6BAA6B,EAC7B,WAAW,EACX,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,kBAAkB,GAAG,CAAC,KAA2B,EAAE,EAAE;IACzD,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjE,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACjD,QAAQ,CAAC,IAAI,GAAG,UAAU,CAAC;IAC3B,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAE,YAAoB,EAAE,eAAe,CAAC,CAAC;IACnE,QAAQ,CAAC,QAAQ,GAAG,CAAC,CAAM,EAAE,EAAE;QAC7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