@progress/kendo-spreadsheet-common 1.2.0-develop.1 → 1.2.0-develop.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index-esm.js CHANGED
@@ -1291,13 +1291,6 @@ const scrollbar = function(refresh) {
1291
1291
  return result;
1292
1292
  };
1293
1293
 
1294
- const createFragment = function(content) {
1295
- const template = document.createElement('template');
1296
- template.innerHTML = content;
1297
-
1298
- return template.content;
1299
- };
1300
-
1301
1294
  function toCamelCase(str) {
1302
1295
  return str.replace(/\-(\w)/g, function(strMatch, g1) {
1303
1296
  return g1.toUpperCase();
@@ -18110,12 +18103,6 @@ class View extends Observable {
18110
18103
 
18111
18104
  this._dialogs = [];
18112
18105
 
18113
- // const contents = VIEW_CONTENTS({
18114
- // classNames: classNames,
18115
- // messages: messages.menus
18116
- // });
18117
- // element.appendChild(createFragment(contents));
18118
-
18119
18106
  this._formulaInput();
18120
18107
 
18121
18108
  this.wrapper = element.querySelector(DOT + classNames.view);
@@ -18851,6 +18838,9 @@ class View extends Observable {
18851
18838
 
18852
18839
  View.classNames = viewClassNames;
18853
18840
 
18841
+ const reTable = /<table[^>]+>/gmi;
18842
+ const tables = contentStr => ((contentStr || '').match(reTable) || []);
18843
+
18854
18844
  class Clipboard {
18855
18845
  constructor(workbook) {
18856
18846
  this._content = {};
@@ -19016,13 +19006,10 @@ class Clipboard {
19016
19006
  return true;
19017
19007
  }
19018
19008
 
19019
- let internalHTML = Boolean(createFragment(this._externalContent.html)
19020
- .querySelector("table.kendo-clipboard-" + this._uid));
19021
-
19022
- let internalPlain = Boolean(createFragment(this._externalContent.plain)
19023
- .querySelector("table.kendo-clipboard-" + this._uid));
19009
+ const uid = "kendo-clipboard-" + this._uid;
19010
+ const includeUid = tablesArr => tablesArr.some(table => table.includes(uid));
19024
19011
 
19025
- return (internalHTML || internalPlain);
19012
+ return includeUid(tables(this._externalContent.html)) || includeUid(tables(this._externalContent.plain));
19026
19013
  }
19027
19014
  }
19028
19015
 
package/dist/index.js CHANGED
@@ -1292,13 +1292,6 @@
1292
1292
  return result;
1293
1293
  };
1294
1294
 
1295
- const createFragment = function(content) {
1296
- const template = document.createElement('template');
1297
- template.innerHTML = content;
1298
-
1299
- return template.content;
1300
- };
1301
-
1302
1295
  function toCamelCase(str) {
1303
1296
  return str.replace(/\-(\w)/g, function(strMatch, g1) {
1304
1297
  return g1.toUpperCase();
@@ -18111,12 +18104,6 @@
18111
18104
 
18112
18105
  this._dialogs = [];
18113
18106
 
18114
- // const contents = VIEW_CONTENTS({
18115
- // classNames: classNames,
18116
- // messages: messages.menus
18117
- // });
18118
- // element.appendChild(createFragment(contents));
18119
-
18120
18107
  this._formulaInput();
18121
18108
 
18122
18109
  this.wrapper = element.querySelector(DOT + classNames.view);
@@ -18852,6 +18839,9 @@
18852
18839
 
18853
18840
  View.classNames = viewClassNames;
18854
18841
 
18842
+ const reTable = /<table[^>]+>/gmi;
18843
+ const tables = contentStr => ((contentStr || '').match(reTable) || []);
18844
+
18855
18845
  class Clipboard {
18856
18846
  constructor(workbook) {
18857
18847
  this._content = {};
@@ -19017,13 +19007,10 @@
19017
19007
  return true;
19018
19008
  }
19019
19009
 
19020
- let internalHTML = Boolean(createFragment(this._externalContent.html)
19021
- .querySelector("table.kendo-clipboard-" + this._uid));
19022
-
19023
- let internalPlain = Boolean(createFragment(this._externalContent.plain)
19024
- .querySelector("table.kendo-clipboard-" + this._uid));
19010
+ const uid = "kendo-clipboard-" + this._uid;
19011
+ const includeUid = tablesArr => tablesArr.some(table => table.includes(uid));
19025
19012
 
19026
- return (internalHTML || internalPlain);
19013
+ return includeUid(tables(this._externalContent.html)) || includeUid(tables(this._externalContent.plain));
19027
19014
  }
19028
19015
  }
19029
19016
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-spreadsheet-common",
3
3
  "description": "Kendo UI platform-independent Spreadsheet library",
4
- "version": "1.2.0-develop.1",
4
+ "version": "1.2.0-develop.2",
5
5
  "keywords": [
6
6
  "Kendo UI"
7
7
  ],