handsontable 0.0.0-next-c40f8b4-20240131 → 0.0.0-next-ffffb2f-20240131
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.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +1796 -1592
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +5 -5
- package/dist/handsontable.js +1798 -1594
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +4 -4
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/utils/parseTable.js +9 -1
- package/utils/parseTable.mjs +9 -1
package/helpers/mixed.js
CHANGED
@@ -134,7 +134,7 @@ const domMessages = {
|
|
134
134
|
function _injectProductInfo(key, element) {
|
135
135
|
const hasValidType = !isEmpty(key);
|
136
136
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
137
|
-
const hotVersion = "0.0.0-next-
|
137
|
+
const hotVersion = "0.0.0-next-ffffb2f-20240131";
|
138
138
|
let keyValidityDate;
|
139
139
|
let consoleMessageState = 'invalid';
|
140
140
|
let domMessageState = 'invalid';
|
package/helpers/mixed.mjs
CHANGED
@@ -124,7 +124,7 @@ const domMessages = {
|
|
124
124
|
export function _injectProductInfo(key, element) {
|
125
125
|
const hasValidType = !isEmpty(key);
|
126
126
|
const isNonCommercial = typeof key === 'string' && key.toLowerCase() === 'non-commercial-and-evaluation';
|
127
|
-
const hotVersion = "0.0.0-next-
|
127
|
+
const hotVersion = "0.0.0-next-ffffb2f-20240131";
|
128
128
|
let keyValidityDate;
|
129
129
|
let consoleMessageState = 'invalid';
|
130
130
|
let domMessageState = 'invalid';
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"url": "https://github.com/handsontable/handsontable/issues"
|
11
11
|
},
|
12
12
|
"author": "Handsoncode <hello@handsontable.com>",
|
13
|
-
"version": "0.0.0-next-
|
13
|
+
"version": "0.0.0-next-ffffb2f-20240131",
|
14
14
|
"main": "index",
|
15
15
|
"module": "index.mjs",
|
16
16
|
"jsnext:main": "index.mjs",
|
package/utils/parseTable.js
CHANGED
@@ -5,6 +5,7 @@ exports._dataToHTML = _dataToHTML;
|
|
5
5
|
exports.htmlToGridSettings = htmlToGridSettings;
|
6
6
|
exports.instanceToHTML = instanceToHTML;
|
7
7
|
require("core-js/modules/es.array.push.js");
|
8
|
+
require("core-js/modules/es.string.replace-all.js");
|
8
9
|
var _mixed = require("./../helpers/mixed");
|
9
10
|
const ESCAPED_HTML_CHARS = {
|
10
11
|
' ': '\x20',
|
@@ -140,7 +141,14 @@ function htmlToGridSettings(element) {
|
|
140
141
|
if (typeof checkElement === 'string') {
|
141
142
|
const escapedAdjacentHTML = checkElement.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g, cellFragment => {
|
142
143
|
const openingTag = cellFragment.match(/<td\b[^>]*?>/g)[0];
|
143
|
-
const
|
144
|
+
const paragraphRegexp = /<p.*?>/g;
|
145
|
+
const cellValue = cellFragment.substring(openingTag.length, cellFragment.lastIndexOf('<')).trim() // Removing whitespaces from the start and the end of HTML fragment
|
146
|
+
.replaceAll(/\n\s+/g, ' ') // HTML tags may be split using multiple new lines and whitespaces
|
147
|
+
.replaceAll(paragraphRegexp, '\n') // Only paragraphs should split text using new line characters
|
148
|
+
.replace('\n', '') // First paragraph shouldn't start with new line characters
|
149
|
+
.replaceAll(/<\/(.*)>\s+$/mg, '</$1>') // HTML tags may end with whitespace.
|
150
|
+
.replace(/(<(?!br)([^>]+)>)/gi, '') // Removing HTML tags
|
151
|
+
.replaceAll(/^ $/mg, ''); // Removing single characters separating new lines
|
144
152
|
const closingTag = '</td>';
|
145
153
|
return `${openingTag}${cellValue}${closingTag}`;
|
146
154
|
});
|
package/utils/parseTable.mjs
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import "core-js/modules/es.array.push.js";
|
2
|
+
import "core-js/modules/es.string.replace-all.js";
|
2
3
|
import { isEmpty } from "./../helpers/mixed.mjs";
|
3
4
|
const ESCAPED_HTML_CHARS = {
|
4
5
|
' ': '\x20',
|
@@ -134,7 +135,14 @@ export function htmlToGridSettings(element) {
|
|
134
135
|
if (typeof checkElement === 'string') {
|
135
136
|
const escapedAdjacentHTML = checkElement.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g, cellFragment => {
|
136
137
|
const openingTag = cellFragment.match(/<td\b[^>]*?>/g)[0];
|
137
|
-
const
|
138
|
+
const paragraphRegexp = /<p.*?>/g;
|
139
|
+
const cellValue = cellFragment.substring(openingTag.length, cellFragment.lastIndexOf('<')).trim() // Removing whitespaces from the start and the end of HTML fragment
|
140
|
+
.replaceAll(/\n\s+/g, ' ') // HTML tags may be split using multiple new lines and whitespaces
|
141
|
+
.replaceAll(paragraphRegexp, '\n') // Only paragraphs should split text using new line characters
|
142
|
+
.replace('\n', '') // First paragraph shouldn't start with new line characters
|
143
|
+
.replaceAll(/<\/(.*)>\s+$/mg, '</$1>') // HTML tags may end with whitespace.
|
144
|
+
.replace(/(<(?!br)([^>]+)>)/gi, '') // Removing HTML tags
|
145
|
+
.replaceAll(/^ $/mg, ''); // Removing single characters separating new lines
|
138
146
|
const closingTag = '</td>';
|
139
147
|
return `${openingTag}${cellValue}${closingTag}`;
|
140
148
|
});
|