@pdfme/schemas 4.0.0-alpha.0 → 4.0.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 (107) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/__tests__/text.test.js +10 -4
  3. package/dist/cjs/__tests__/text.test.js.map +1 -1
  4. package/dist/cjs/src/barcodes/propPanel.js +12 -0
  5. package/dist/cjs/src/barcodes/propPanel.js.map +1 -1
  6. package/dist/cjs/src/graphics/cacheKey.js +6 -0
  7. package/dist/cjs/src/graphics/cacheKey.js.map +1 -0
  8. package/dist/cjs/src/graphics/image.js +26 -15
  9. package/dist/cjs/src/graphics/image.js.map +1 -1
  10. package/dist/{esm/src/graphics/helper.js → cjs/src/graphics/imagehelper.js} +15 -2
  11. package/dist/cjs/src/graphics/imagehelper.js.map +1 -0
  12. package/dist/cjs/src/graphics/pdfHelper.js +49 -0
  13. package/dist/cjs/src/graphics/pdfHelper.js.map +1 -0
  14. package/dist/cjs/src/graphics/svg.js +2 -0
  15. package/dist/cjs/src/graphics/svg.js.map +1 -1
  16. package/dist/cjs/src/index.js +3 -2
  17. package/dist/cjs/src/index.js.map +1 -1
  18. package/dist/cjs/src/shapes/line.js +4 -2
  19. package/dist/cjs/src/shapes/line.js.map +1 -1
  20. package/dist/cjs/src/shapes/rectAndEllipse.js +13 -6
  21. package/dist/cjs/src/shapes/rectAndEllipse.js.map +1 -1
  22. package/dist/cjs/src/tables/pdfRender.js +0 -2
  23. package/dist/cjs/src/tables/pdfRender.js.map +1 -1
  24. package/dist/cjs/src/tables/propPanel.js +1 -0
  25. package/dist/cjs/src/tables/propPanel.js.map +1 -1
  26. package/dist/cjs/src/tables/uiRender.js +44 -23
  27. package/dist/cjs/src/tables/uiRender.js.map +1 -1
  28. package/dist/cjs/src/text/helper.js +27 -7
  29. package/dist/cjs/src/text/helper.js.map +1 -1
  30. package/dist/cjs/src/text/index.js +1 -0
  31. package/dist/cjs/src/text/index.js.map +1 -1
  32. package/dist/cjs/src/text/pdfRender.js +4 -4
  33. package/dist/cjs/src/text/pdfRender.js.map +1 -1
  34. package/dist/cjs/src/text/propPanel.js +1 -0
  35. package/dist/cjs/src/text/propPanel.js.map +1 -1
  36. package/dist/cjs/src/text/uiRender.js +22 -1
  37. package/dist/cjs/src/text/uiRender.js.map +1 -1
  38. package/dist/cjs/src/utils.js +37 -7
  39. package/dist/cjs/src/utils.js.map +1 -1
  40. package/dist/esm/__tests__/text.test.js +10 -4
  41. package/dist/esm/__tests__/text.test.js.map +1 -1
  42. package/dist/esm/src/barcodes/propPanel.js +12 -0
  43. package/dist/esm/src/barcodes/propPanel.js.map +1 -1
  44. package/dist/esm/src/graphics/cacheKey.js +2 -0
  45. package/dist/esm/src/graphics/cacheKey.js.map +1 -0
  46. package/dist/esm/src/graphics/image.js +25 -14
  47. package/dist/esm/src/graphics/image.js.map +1 -1
  48. package/dist/{cjs/src/graphics/helper.js → esm/src/graphics/imagehelper.js} +10 -5
  49. package/dist/esm/src/graphics/imagehelper.js.map +1 -0
  50. package/dist/esm/src/graphics/pdfHelper.js +44 -0
  51. package/dist/esm/src/graphics/pdfHelper.js.map +1 -0
  52. package/dist/esm/src/graphics/svg.js +2 -0
  53. package/dist/esm/src/graphics/svg.js.map +1 -1
  54. package/dist/esm/src/index.js +2 -1
  55. package/dist/esm/src/index.js.map +1 -1
  56. package/dist/esm/src/shapes/line.js +5 -3
  57. package/dist/esm/src/shapes/line.js.map +1 -1
  58. package/dist/esm/src/shapes/rectAndEllipse.js +14 -7
  59. package/dist/esm/src/shapes/rectAndEllipse.js.map +1 -1
  60. package/dist/esm/src/tables/pdfRender.js +0 -2
  61. package/dist/esm/src/tables/pdfRender.js.map +1 -1
  62. package/dist/esm/src/tables/propPanel.js +1 -0
  63. package/dist/esm/src/tables/propPanel.js.map +1 -1
  64. package/dist/esm/src/tables/uiRender.js +39 -18
  65. package/dist/esm/src/tables/uiRender.js.map +1 -1
  66. package/dist/esm/src/text/helper.js +25 -6
  67. package/dist/esm/src/text/helper.js.map +1 -1
  68. package/dist/esm/src/text/index.js +1 -0
  69. package/dist/esm/src/text/index.js.map +1 -1
  70. package/dist/esm/src/text/pdfRender.js +6 -6
  71. package/dist/esm/src/text/pdfRender.js.map +1 -1
  72. package/dist/esm/src/text/propPanel.js +1 -0
  73. package/dist/esm/src/text/propPanel.js.map +1 -1
  74. package/dist/esm/src/text/uiRender.js +23 -2
  75. package/dist/esm/src/text/uiRender.js.map +1 -1
  76. package/dist/esm/src/utils.js +35 -6
  77. package/dist/esm/src/utils.js.map +1 -1
  78. package/dist/types/src/graphics/cacheKey.d.ts +2 -0
  79. package/dist/types/src/graphics/image.d.ts +1 -1
  80. package/dist/types/src/graphics/imagehelper.d.ts +4 -0
  81. package/dist/types/src/graphics/pdfHelper.d.ts +8 -0
  82. package/dist/types/src/index.d.ts +2 -2
  83. package/dist/types/src/shapes/rectAndEllipse.d.ts +6 -0
  84. package/dist/types/src/text/helper.d.ts +1 -0
  85. package/dist/types/src/utils.d.ts +3 -2
  86. package/package.json +1 -1
  87. package/src/barcodes/propPanel.ts +14 -0
  88. package/src/graphics/cacheKey.ts +3 -0
  89. package/src/graphics/image.ts +28 -19
  90. package/src/graphics/{helper.ts → imagehelper.ts} +10 -1
  91. package/src/graphics/pdfHelper.ts +55 -0
  92. package/src/graphics/svg.ts +2 -0
  93. package/src/index.ts +3 -1
  94. package/src/shapes/line.ts +5 -3
  95. package/src/shapes/rectAndEllipse.ts +17 -7
  96. package/src/tables/pdfRender.ts +0 -2
  97. package/src/tables/propPanel.ts +1 -0
  98. package/src/tables/uiRender.ts +50 -19
  99. package/src/text/helper.ts +27 -6
  100. package/src/text/index.ts +1 -0
  101. package/src/text/pdfRender.ts +14 -5
  102. package/src/text/propPanel.ts +1 -0
  103. package/src/text/uiRender.ts +22 -1
  104. package/src/utils.ts +46 -9
  105. package/dist/cjs/src/graphics/helper.js.map +0 -1
  106. package/dist/esm/src/graphics/helper.js.map +0 -1
  107. package/dist/types/src/graphics/helper.d.ts +0 -5
@@ -21,9 +21,10 @@ const shape = {
21
21
  rootElement.appendChild(div);
22
22
  },
23
23
  pdf: (arg) => {
24
- const { schema, page } = arg;
24
+ const { schema, page, options } = arg;
25
25
  if (!schema.color && !schema.borderColor)
26
26
  return;
27
+ const { colorType } = options;
27
28
  const pageHeight = page.getHeight();
28
29
  const cArg = { schema, pageHeight };
29
30
  const { position, width, height, rotate, opacity } = (0, utils_js_1.convertForPdfLayoutProps)(cArg);
@@ -32,8 +33,8 @@ const shape = {
32
33
  const drawOptions = {
33
34
  rotate,
34
35
  borderWidth,
35
- borderColor: (0, utils_js_1.hex2RgbColor)(schema.borderColor),
36
- color: (0, utils_js_1.hex2RgbColor)(schema.color),
36
+ borderColor: (0, utils_js_1.hex2PrintingColor)(schema.borderColor, colorType),
37
+ color: (0, utils_js_1.hex2PrintingColor)(schema.color, colorType),
37
38
  opacity,
38
39
  borderOpacity: opacity,
39
40
  };
@@ -85,16 +86,22 @@ const shape = {
85
86
  height: 37.5,
86
87
  rotate: 0,
87
88
  opacity: 1,
88
- borderWidth: 5,
89
+ borderWidth: 1,
89
90
  borderColor: '#000000',
90
- color: '#ffffff',
91
+ color: '',
91
92
  readOnly: true,
92
93
  },
93
94
  },
94
95
  };
96
+ const rectangleIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square"><rect width="18" height="18" x="3" y="3" rx="2"/></svg>';
97
+ const ellipseIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle"><circle cx="12" cy="12" r="10"/></svg>';
95
98
  const getPropPanelSchema = (type) => ({
96
99
  ...shape.propPanel,
97
- defaultSchema: { ...shape.propPanel.defaultSchema, type },
100
+ defaultSchema: {
101
+ ...shape.propPanel.defaultSchema,
102
+ type,
103
+ icon: type === 'rectangle' ? rectangleIcon : ellipseIcon,
104
+ },
98
105
  });
99
106
  exports.rectangle = { ...shape, propPanel: getPropPanelSchema('rectangle') };
100
107
  exports.ellipse = { ...shape, propPanel: getPropPanelSchema('ellipse') };
@@ -1 +1 @@
1
- {"version":3,"file":"rectAndEllipse.js","sourceRoot":"","sources":["../../../../src/shapes/rectAndEllipse.ts"],"names":[],"mappings":";;;AAAA,0CAAsD;AACtD,kDAAoD;AACpD,0CAAqE;AASrE,MAAM,KAAK,GAAwB;IACjC,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE;QACV,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,GAAG,CAAC;QACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1C,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;QACzB,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QAC1B,GAAG,CAAC,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC;QACnC,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE;YAC7B,GAAG,CAAC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC;SAChC;QACD,GAAG,CAAC,KAAK,CAAC,WAAW,GAAG,GAAG,MAAM,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC;QACvD,GAAG,CAAC,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;QACpF,GAAG,CAAC,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,aAAa,CAAC;QAC5D,GAAG,CAAC,KAAK,CAAC,eAAe,GAAG,MAAM,CAAC,KAAK,IAAI,aAAa,CAAC;QAE1D,WAAW,CAAC,WAAW,CAAC,GAAG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AAE,GAAG,KAAK,EAAE,SAAS,EAAE,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAAC"}
@@ -11,8 +11,6 @@ const tableHelper_1 = require("./tableHelper");
11
11
  const rectanglePdfRender = rectAndEllipse_1.rectangle.pdf;
12
12
  const cellPdfRender = cell_1.default.pdf;
13
13
  async function drawCell(arg, cell) {
14
- // TODO Not considering the table border
15
- // The cell's position and size should indeed be shifted to accommodate the table border
16
14
  await cellPdfRender({
17
15
  ...arg,
18
16
  value: cell.raw,
@@ -1 +1 @@
1
- {"version":3,"file":"pdfRender.js","sourceRoot":"","sources":["../../../../src/tables/pdfRender.ts"],"names":[],"mappings":";;;;;;AAGA,6DAAqD;AACrD,kDAA0B;AAC1B,qCAA4C;AAC5C,+CAAkD;AAIlD,MAAM,kBAAkB,GAAG,0BAAS,CAAC,GAAG,CAAC;AACzC,MAAM,aAAa,GAAG,cAAI,CAAC,GAAG,CAAC;AAE/B,KAAK,UAAU,QAAQ,CAAC,GAAgC,EAAE,IAAU;IAClE,wCAAwC;IACxC,wFAAwF;IACxF,MAAM,aAAa,CAAC;QAClB,GAAG,GAAG;QACN,KAAK,EAAE,IAAI,CAAC,GAAG;QACf,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE;YAClC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ;YAC9B,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS;YAChC,iBAAiB,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB;YAChD,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ;YAC9B,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU;YAClC,gBAAgB,EAAE,IAAI,CAAC,MA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EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC;AAEM,MAAM,SAAS,GAAG,KAAK,EAAE,GAAgC,EAAE,EAAE;IAClE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;IAC9B,MAAM,IAAI,GAAG,IAAA,yBAAgB,EAAC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;IACzD,MAAM,KAAK,GAAG,MAAM,IAAA,+BAAiB,EAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACjD,MAAM,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAC;AALW,QAAA,SAAS,aAKpB"}
@@ -58,6 +58,7 @@ exports.propPanel = {
58
58
  },
59
59
  defaultSchema: {
60
60
  type: 'table',
61
+ icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table"><path d="M12 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M3 9h18"/><path d="M3 15h18"/></svg>',
61
62
  position: { x: 0, y: 0 },
62
63
  width: 150,
63
64
  height: 20,
@@ -1 +1 @@
1
- {"version":3,"file":"propPanel.js","sourceRoot":"","sources":["../../../../src/tables/propPanel.ts"],"names":[],"mappings":";;;AAEA,0CAAuE;AACvE,2CAIqB;AACrB,kDAAoD;AAEvC,QAAA,SAAS,GAA2B;IAC/C,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;QAC1C,aAAa;QACb,MAAM,IAAI,GAAG,CAAC,YAAY,CAAC,IAAI,IAAI,EAAE,CAAa,CAAC;QACnD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,0BAAiB,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CA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G;SACjB;QACD,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,IAAA,gCAAoB,GAAE,EAAE;YAChD,SAAS,EAAE,SAAS;YACpB,eAAe,EAAE,SAAS;YAC1B,WAAW,EAAE,EAAE;YACf,WAAW,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;SACtD,CAAC;QACF,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,IAAA,gCAAoB,GAAE,EAAE;YAChD,wBAAwB,EAAE,SAAS;SACpC,CAAC;QACF,YAAY,EAAE,EAAE;KACjB;CACF,CAAC"}
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.uiRender = void 0;
7
+ const common_1 = require("@pdfme/common");
7
8
  const tableHelper_js_1 = require("./tableHelper.js");
8
9
  const helper_js_1 = require("./helper.js");
9
10
  const cell_js_1 = __importDefault(require("./cell.js"));
10
- const utils_1 = require("../utils");
11
11
  const cellUiRender = cell_js_1.default.ui;
12
12
  const convertToCellStyle = (styles) => ({
13
13
  fontName: styles.fontName,
@@ -36,23 +36,51 @@ const calcResizedHeadWidthPercentages = (arg) => {
36
36
  }
37
37
  return headWidthPercentages;
38
38
  };
39
+ const setBorder = (div, borderPosition, arg) => {
40
+ div.style[`border${borderPosition}`] = `${String(arg.schema.tableStyles.borderWidth)}mm solid ${arg.schema.tableStyles.borderColor}`;
41
+ };
42
+ const drawBorder = (div, row, colIndex, rowIndex, rowsLength, arg) => {
43
+ const isFirstColumn = colIndex === 0;
44
+ const isLastColumn = colIndex === Object.values(row.cells).length - 1;
45
+ const isLastRow = rowIndex === rowsLength - 1;
46
+ if (row.section === 'head') {
47
+ setBorder(div, 'Top', arg);
48
+ if (isFirstColumn)
49
+ setBorder(div, 'Left', arg);
50
+ if (isLastColumn)
51
+ setBorder(div, 'Right', arg);
52
+ if (JSON.parse(arg.value || '[]').length === 0) {
53
+ setBorder(div, 'Bottom', arg);
54
+ }
55
+ }
56
+ else if (row.section === 'body') {
57
+ if (!arg.schema.showHead && rowIndex === 0) {
58
+ setBorder(div, 'Top', arg);
59
+ }
60
+ if (isFirstColumn)
61
+ setBorder(div, 'Left', arg);
62
+ if (isLastColumn)
63
+ setBorder(div, 'Right', arg);
64
+ if (isLastRow)
65
+ setBorder(div, 'Bottom', arg);
66
+ }
67
+ };
39
68
  const renderRowUi = (args) => {
40
69
  const { rows, arg, onChangeEditingPosition, offsetY = 0, editingPosition } = args;
41
70
  const value = JSON.parse(arg.value || '[]');
42
- // TODO Need to adjust the inner size when the outer border increases
43
- // Want to have the same style as border-collapse: collapse; (overlapping borders should merge into one)
44
- // This should apply to the table itself as well as the cells, which should behave similarly.
45
71
  let rowOffsetY = offsetY;
46
72
  rows.forEach((row, rowIndex) => {
47
73
  const { cells, height, section } = row;
48
- let colWidth = 0;
74
+ let colOffsetX = 0;
49
75
  Object.values(cells).forEach((cell, colIndex) => {
50
76
  const div = document.createElement('div');
51
77
  div.style.position = 'absolute';
52
78
  div.style.top = `${rowOffsetY}mm`;
53
- div.style.left = `${colWidth}mm`;
79
+ div.style.left = `${colOffsetX}mm`;
54
80
  div.style.width = `${cell.width}mm`;
55
81
  div.style.height = `${cell.height}mm`;
82
+ div.style.boxSizing = 'border-box';
83
+ drawBorder(div, row, colIndex, rowIndex, rows.length, arg);
56
84
  div.style.cursor =
57
85
  arg.mode === 'designer' || (arg.mode === 'form' && section === 'body') ? 'text' : 'default';
58
86
  div.addEventListener('click', () => {
@@ -84,7 +112,6 @@ const renderRowUi = (args) => {
84
112
  if (section === 'body') {
85
113
  const startRange = arg.schema.__bodyRange?.start ?? 0;
86
114
  value[rowIndex + startRange][colIndex] = newValue;
87
- // TODO Calling onChange triggers re-rendering, causing the focus to be lost
88
115
  arg.onChange({ key: 'content', value: JSON.stringify(value) });
89
116
  }
90
117
  else {
@@ -99,13 +126,13 @@ const renderRowUi = (args) => {
99
126
  schema: {
100
127
  type: 'cell',
101
128
  content: cell.raw,
102
- position: { x: colWidth, y: rowOffsetY },
129
+ position: { x: colOffsetX, y: rowOffsetY },
103
130
  width: cell.width,
104
131
  height: cell.height,
105
132
  ...convertToCellStyle(cell.styles),
106
133
  },
107
134
  });
108
- colWidth += cell.width;
135
+ colOffsetX += cell.width;
109
136
  });
110
137
  rowOffsetY += height;
111
138
  });
@@ -124,10 +151,6 @@ const uiRender = async (arg) => {
124
151
  const bodyWidthRange = (0, helper_js_1.getBodyWithRange)(value, schema.__bodyRange);
125
152
  const table = await (0, tableHelper_js_1.createSingleTable)(bodyWidthRange, arg);
126
153
  rootElement.innerHTML = '';
127
- rootElement.style.borderColor = schema.tableStyles.borderColor;
128
- rootElement.style.borderWidth = String(schema.tableStyles.borderWidth) + 'mm';
129
- rootElement.style.borderStyle = 'solid';
130
- rootElement.style.boxSizing = 'border-box';
131
154
  const handleChangeEditingPosition = (newPosition, editingPosition) => {
132
155
  resetEditingPosition();
133
156
  editingPosition.rowIndex = newPosition.rowIndex;
@@ -175,7 +198,7 @@ const uiRender = async (arg) => {
175
198
  removeRowButton.style.width = '30px';
176
199
  removeRowButton.style.height = '30px';
177
200
  removeRowButton.style.position = 'absolute';
178
- removeRowButton.style.top = `${offsetY - (0, utils_1.px2mm)(30)}mm`;
201
+ removeRowButton.style.top = `${offsetY - (0, common_1.px2mm)(30)}mm`;
179
202
  removeRowButton.style.right = '-30px';
180
203
  removeRowButton.innerText = '-';
181
204
  removeRowButton.onclick = () => {
@@ -190,7 +213,7 @@ const uiRender = async (arg) => {
190
213
  addColumnButton.style.width = '30px';
191
214
  addColumnButton.style.height = '30px';
192
215
  addColumnButton.style.position = 'absolute';
193
- addColumnButton.style.top = `${table.getHeadHeight() - (0, utils_1.px2mm)(30)}mm`;
216
+ addColumnButton.style.top = `${table.getHeadHeight() - (0, common_1.px2mm)(30)}mm`;
194
217
  addColumnButton.style.right = '-30px';
195
218
  addColumnButton.innerText = '+';
196
219
  addColumnButton.onclick = (e) => {
@@ -217,7 +240,7 @@ const uiRender = async (arg) => {
217
240
  removeColumnButton.style.height = '30px';
218
241
  removeColumnButton.style.position = 'absolute';
219
242
  removeColumnButton.style.top = '-30px';
220
- removeColumnButton.style.left = `${offsetX - (0, utils_1.px2mm)(30)}mm`;
243
+ removeColumnButton.style.left = `${offsetX - (0, common_1.px2mm)(30)}mm`;
221
244
  removeColumnButton.innerText = '-';
222
245
  removeColumnButton.onclick = (e) => {
223
246
  e.preventDefault();
@@ -249,7 +272,7 @@ const uiRender = async (arg) => {
249
272
  dragHandle.style.cursor = 'col-resize';
250
273
  dragHandle.style.position = 'absolute';
251
274
  dragHandle.style.zIndex = '10';
252
- dragHandle.style.left = `${offsetX - (0, utils_1.px2mm)(lineWidth) / 2}mm`;
275
+ dragHandle.style.left = `${offsetX - (0, common_1.px2mm)(lineWidth) / 2}mm`;
253
276
  dragHandle.style.top = '0';
254
277
  const setColor = (e) => {
255
278
  const handle = e.target;
@@ -262,7 +285,7 @@ const uiRender = async (arg) => {
262
285
  dragHandle.addEventListener('mouseover', setColor);
263
286
  dragHandle.addEventListener('mouseout', resetColor);
264
287
  const prevColumnLeft = offsetX - column.width;
265
- const nextColumnRight = offsetX - (0, utils_1.px2mm)(lineWidth) + table.columns[i + 1].width;
288
+ const nextColumnRight = offsetX - (0, common_1.px2mm)(lineWidth) + table.columns[i + 1].width;
266
289
  dragHandle.addEventListener('mousedown', (e) => {
267
290
  resetEditingPosition();
268
291
  const handle = e.target;
@@ -310,11 +333,9 @@ const uiRender = async (arg) => {
310
333
  if (mode === 'viewer') {
311
334
  resetEditingPosition();
312
335
  }
313
- if (mode !== 'form') {
314
- const tableHeight = schema.showHead ? table.getHeight() : table.getBodyHeight();
315
- if (schema.height !== tableHeight && onChange) {
316
- onChange({ key: 'height', value: tableHeight });
317
- }
336
+ const tableHeight = schema.showHead ? table.getHeight() : table.getBodyHeight();
337
+ if (schema.height !== tableHeight && onChange) {
338
+ onChange({ key: 'height', value: tableHeight });
318
339
  }
319
340
  };
320
341
  exports.uiRender = uiRender;
@@ -1 +1 @@
1
- {"version":3,"file":"uiRender.js","sourceRoot":"","sources":["../../../../src/tables/uiRender.ts"],"names":[],"mappings":";;;;;;AAEA,qDAAqD;AACrD,2CAAwD;AACxD,wDAA6B;AAC7B,oCAAiC;AAKjC,MAAM,YAAY,GAAG,iBAAI,CAAC,EAAE,CAAC;AAE7B,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAa,EAAE,CAAC,CAAC;IACzD,QAAQ,EAAE,MAAM,CAAC,QAAQ;IACzB,SAAS,EAAE,MAAM,CAAC,SAAS;IAC3B,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;IAC3C,QAAQ,EAAE,MAAM,CAAC,QAAQ;IACzB,UAAU,EAAE,MAAM,CAAC,UAAU;IAC7B,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;IACzC,eAAe,EAAE,MAAM,CAAC,eAAe;IACvC,MAAM;IACN,SAAS,EAAE,MAAM,CAAC,SAAS;IAC3B,WAAW,EAAE,MAAM,CAAC,SAAS;IAC7B,WAAW,EAAE,MAAM,CAAC,SAAS;IAC7B,OAAO,EAAE,MAAM,CAAC,WAAW;CAC5B,CAAC,CAAC;AAEH,MAAM,+BAA+B,GAAG,CAAC,GAKxC,EAAE,EAAE;IACH,MAAM,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAC1F,GAAG,CAAC;IACN,MAAM,oBAAoB,GAAG,CAAC,GAAG,2BAA2B,CAAC,CAAC;IAC9D,MAAM,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IAChE,MAAM,sBAAsB,GAAG,CAAC,gBAAgB,GAAG,UAAU,CAAC,GAAG,GAAG,CAAC;IAC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C3E;oBACD,IAAI,GAAG,CAAC,CAAC;oBACT,UAAU,CAAC,gBAAgB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;oBACnD,UAAU,CAAC,gBAAgB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;oBACpD,WAAW,CAAC,mBAAmB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;oBACxD,WAAW,CAAC,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;gBAC3D,CAAC,CAAC;gBACF,WAAW,CAAC,gBAAgB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;YACH,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;KACJ;IAED,IAAI,IAAI,KAAK,QAAQ,EAAE;QACrB,oBAAoB,EAAE,CAAC;KACxB;IAED,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;IAChF,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,IAAI,QAAQ,EAAE;QAC7C,QAAQ,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;KACjD;AACH,CAAC,CAAC;AAxNW,QAAA,QAAQ,YAwNnB"}
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.splitTextToSize = exports.calculateDynamicFontSize = exports.getSplittedLines = exports.getFontKitFont = exports.widthOfTextAtSize = exports.heightOfFontAtSize = exports.getFontDescentInPt = exports.getBrowserVerticalFontAdjustments = void 0;
26
+ exports.isFirefox = exports.splitTextToSize = exports.calculateDynamicFontSize = exports.getSplittedLines = exports.getFontKitFont = exports.widthOfTextAtSize = exports.heightOfFontAtSize = exports.getFontDescentInPt = exports.getBrowserVerticalFontAdjustments = void 0;
27
27
  const fontkit = __importStar(require("fontkit"));
28
28
  const common_1 = require("@pdfme/common");
29
29
  const buffer_1 = require("buffer");
@@ -125,20 +125,38 @@ const getOverPosition = (textLine, calcValues) => {
125
125
  }
126
126
  return null;
127
127
  };
128
+ /**
129
+ * Line breakable chars depend on the language and writing system.
130
+ * Western writing systems typically use spaces and hyphens as line breakable chars.
131
+ * Other writing systems often break on word boundaries so the following
132
+ * does not negatively impact them.
133
+ * However, this might need to be revisited for broader language support.
134
+ */
135
+ const isLineBreakableChar = (char) => {
136
+ const lineBreakableChars = [' ', '-', "\u2014", "\u2013"];
137
+ return lineBreakableChars.includes(char);
138
+ };
128
139
  /**
129
140
  * Gets the position of the split. Splits the exceeding line at
130
- * the last whitespace prior to it exceeding the bounding box width.
141
+ * the last breakable char prior to it exceeding the bounding box width.
131
142
  */
132
143
  const getSplitPosition = (textLine, calcValues) => {
133
144
  const overPos = getOverPosition(textLine, calcValues);
134
145
  if (overPos === null)
135
146
  return textLine.length; // input line is shorter than the available space
136
- let overPosTmp = overPos;
137
- while (textLine[overPosTmp] !== ' ' && overPosTmp >= 0) {
147
+ if (textLine[overPos] === ' ') {
148
+ // if the character immediately beyond the boundary is a space, split
149
+ return overPos;
150
+ }
151
+ let overPosTmp = overPos - 1;
152
+ while (overPosTmp >= 0) {
153
+ if (isLineBreakableChar(textLine[overPosTmp])) {
154
+ return overPosTmp + 1;
155
+ }
138
156
  overPosTmp--;
139
157
  }
140
- // For very long lines with no whitespace use the original overPos
141
- return overPosTmp > 0 ? overPosTmp : overPos;
158
+ // For very long lines with no breakable chars use the original overPos
159
+ return overPos;
142
160
  };
143
161
  /**
144
162
  * Recursively splits the line at getSplitPosition.
@@ -146,7 +164,7 @@ const getSplitPosition = (textLine, calcValues) => {
146
164
  */
147
165
  const getSplittedLines = (textLine, calcValues) => {
148
166
  const splitPos = getSplitPosition(textLine, calcValues);
149
- const splittedLine = textLine.substring(0, splitPos);
167
+ const splittedLine = textLine.substring(0, splitPos).trimEnd();
150
168
  const rest = textLine.substring(splitPos).trimStart();
151
169
  if (rest === textLine) {
152
170
  // if we went so small that we want to split on the first char
@@ -273,4 +291,6 @@ const splitTextToSize = (arg) => {
273
291
  return lines;
274
292
  };
275
293
  exports.splitTextToSize = splitTextToSize;
294
+ const isFirefox = () => navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
295
+ exports.isFirefox = isFirefox;
276
296
  //# sourceMappingURL=helper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../src/text/helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AAEnC,0CASuB;AACvB,mCAAgC;AAEhC,iDASwB;AAEjB,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,wDAAwD;IACxD,+FAA+F;IAC/F,qFAAqF;IACrF,MAAM,aAAa,GAAG,CAAC,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAErE,IAAI,iBAAiB,KAAK,iCAAkB,EAAE;QAC5C,OAAO,EAAE,MAAM,EAAE,IAAA,cAAK,EAAC,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;KACvD;IAED,2CAA2C;IAC3C,6FAA6F;IAC7F,wFAAwF;IACxF,oCAAoC;IACpC,8FAA8F;IAC9F,gFAAgF;IAChF,2FAA2F;IAC3F,4FAA4F;IAC5F,+DAA+D;IAC/D,2FAA2F;IAC3F,IAAI,gBAAgB,GAAG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E,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,IAAA,wBAAgB,EAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAnBW,QAAA,eAAe,mBAmB1B;AACK,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAA5E,QAAA,SAAS,aAAmE"}
@@ -14,6 +14,7 @@ exports.readOnlyText = {
14
14
  defaultSchema: {
15
15
  ...textSchema.propPanel.defaultSchema,
16
16
  type: 'readOnlyText',
17
+ icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-type"><polyline points="4 7 4 4 20 4 20 7"/><line x1="9" x2="15" y1="20" y2="20"/><line x1="12" x2="12" y1="4" y2="20"/></svg>',
17
18
  readOnly: true,
18
19
  },
19
20
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/text/index.ts"],"names":[],"mappings":";;;AACA,iDAA2C;AAC3C,iDAA2C;AAC3C,+CAAyC;AAGzC,MAAM,UAAU,GAAuB,EAAE,GAAG,EAAE,wBAAS,EAAE,EAAE,EAAE,sBAAQ,EAAE,SAAS,EAAT,wBAAS,EAAE,CAAC;AAEnF,kBAAe,UAAU,CAAC;AAEb,QAAA,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
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/text/index.ts"],"names":[],"mappings":";;;AACA,iDAA2C;AAC3C,iDAA2C;AAC3C,+CAAyC;AAGzC,MAAM,UAAU,GAAuB,EAAE,GAAG,EAAE,wBAAS,EAAE,EAAE,EAAE,sBAAQ,EAAE,SAAS,EAAT,wBAAS,EAAE,CAAC;AAEnF,kBAAe,UAAU,CAAC;AAEb,QAAA,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,IAAI,EAAE,0UAA0U;YAChV,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAC"}
@@ -23,11 +23,11 @@ const embedAndGetFontObj = async (arg) => {
23
23
  _cache.set(pdfDoc, fontObj);
24
24
  return fontObj;
25
25
  };
26
- const getFontProp = async ({ value, font, schema, _cache, }) => {
26
+ const getFontProp = async ({ value, font, schema, colorType, _cache, }) => {
27
27
  const fontSize = schema.dynamicFontSize
28
28
  ? await (0, helper_js_1.calculateDynamicFontSize)({ textSchema: schema, font, value, _cache })
29
29
  : schema.fontSize ?? constants_js_1.DEFAULT_FONT_SIZE;
30
- const color = (0, utils_js_1.hex2RgbColor)(schema.fontColor || constants_js_1.DEFAULT_FONT_COLOR);
30
+ const color = (0, utils_js_1.hex2PrintingColor)(schema.fontColor || constants_js_1.DEFAULT_FONT_COLOR, colorType);
31
31
  return {
32
32
  alignment: schema.alignment ?? constants_js_1.DEFAULT_ALIGNMENT,
33
33
  verticalAlignment: schema.verticalAlignment ?? constants_js_1.DEFAULT_VERTICAL_ALIGNMENT,
@@ -41,7 +41,7 @@ const pdfRender = async (arg) => {
41
41
  const { value, pdfDoc, pdfLib, page, options, schema, _cache } = arg;
42
42
  if (!value)
43
43
  return;
44
- const { font = (0, common_1.getDefaultFont)() } = options;
44
+ const { font = (0, common_1.getDefaultFont)(), colorType } = options;
45
45
  const [pdfFontObj, fontKitFont, fontProp] = await Promise.all([
46
46
  embedAndGetFontObj({ pdfDoc, font, _cache }),
47
47
  (0, helper_js_1.getFontKitFont)(schema.fontName, font, _cache),
@@ -53,7 +53,7 @@ const pdfRender = async (arg) => {
53
53
  const pageHeight = page.getHeight();
54
54
  const { width, height, rotate, position: { x, y }, opacity, } = (0, utils_js_1.convertForPdfLayoutProps)({ schema, pageHeight, applyRotateTranslate: false });
55
55
  if (schema.backgroundColor) {
56
- const color = (0, utils_js_1.hex2RgbColor)(schema.backgroundColor);
56
+ const color = (0, utils_js_1.hex2PrintingColor)(schema.backgroundColor, colorType);
57
57
  page.drawRectangle({ x, y, width, height, rotate, color });
58
58
  }
59
59
  page.pushOperators(pdfLib.setCharacterSpacing(characterSpacing ?? constants_js_1.DEFAULT_CHARACTER_SPACING));
@@ -1 +1 @@
1
- {"version":3,"file":"pdfRender.js","sourceRoot":"","sources":["../../../../src/text/pdfRender.ts"],"names":[],"mappings":";;;AAEA,0CAAiG;AACjG,iDAUwB;AACxB,2CAOqB;AACrB,0CAAkF;AAElF,MAAM,kBAAkB,GAAG,KAAK,EAAE,GAIjC,EAAE,EAAE;IACH,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,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AAC,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,UAAU,CAAC;QAEzE,IAAI,MAAM,CAAC,KAAK,KAAK,CAAC,EAAE;YACtB,iGAAiG;YACjG,qGAAqG;YACrG,MAAM,YAAY,GAAG,IAAA,sBAAW,EAAC,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;AAhGW,QAAA,SAAS,aAgGpB"}
@@ -150,6 +150,7 @@ exports.propPanel = {
150
150
  widgets: { UseDynamicFontSize },
151
151
  defaultSchema: {
152
152
  type: 'text',
153
+ icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-text-cursor-input"><path d="M5 4h1a3 3 0 0 1 3 3 3 3 0 0 1 3-3h1"/><path d="M13 20h-1a3 3 0 0 1-3-3 3 3 0 0 1-3 3H5"/><path d="M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1"/><path d="M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7"/><path d="M9 7v10"/></svg>',
153
154
  content: 'Type Something...',
154
155
  position: { x: 0, y: 0 },
155
156
  width: 45,
@@ -1 +1 @@
1
- {"version":3,"file":"propPanel.js","sourceRoot":"","sources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S;QAC1B,SAAS,EAAE,iCAAkB;QAC7B,QAAQ,EAAE,SAAS;QACnB,eAAe,EAAE,EAAE;QACnB,OAAO,EAAE,8BAAe;KACzB;CACF,CAAC"}
@@ -78,7 +78,28 @@ const uiRender = async (arg) => {
78
78
  const textBlock = document.createElement('div');
79
79
  Object.assign(textBlock.style, textBlockStyle);
80
80
  if ((0, utils_js_1.isEditable)(mode, schema)) {
81
- textBlock.contentEditable = 'plaintext-only';
81
+ if (!(0, helper_js_1.isFirefox)()) {
82
+ textBlock.contentEditable = 'plaintext-only';
83
+ }
84
+ else {
85
+ textBlock.contentEditable = 'true';
86
+ textBlock.addEventListener('keydown', (e) => {
87
+ if (e.key === 'Enter' && !e.shiftKey) {
88
+ e.preventDefault();
89
+ document.execCommand('insertLineBreak', false, undefined);
90
+ }
91
+ });
92
+ textBlock.addEventListener('paste', (e) => {
93
+ e.preventDefault();
94
+ const paste = e.clipboardData?.getData('text');
95
+ const selection = window.getSelection();
96
+ if (!selection?.rangeCount)
97
+ return;
98
+ selection.deleteFromDocument();
99
+ selection.getRangeAt(0).insertNode(document.createTextNode(paste || ''));
100
+ selection.collapseToEnd();
101
+ });
102
+ }
82
103
  textBlock.tabIndex = tabIndex || 0;
83
104
  textBlock.innerText = value;
84
105
  textBlock.addEventListener('blur', (e) => {