px-jspreadsheet-ce 0.0.1

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 (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +292 -0
  3. package/dist/index.d.ts +2382 -0
  4. package/dist/index.js +11286 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/jspreadsheet.css +723 -0
  7. package/dist/jspreadsheet.themes.css +104 -0
  8. package/package.json +57 -0
  9. package/src/index.js +95 -0
  10. package/src/test.js +50 -0
  11. package/src/utils/cells.js +36 -0
  12. package/src/utils/columns.js +742 -0
  13. package/src/utils/comments.js +87 -0
  14. package/src/utils/config.js +46 -0
  15. package/src/utils/copyPaste.js +438 -0
  16. package/src/utils/data.js +419 -0
  17. package/src/utils/dispatch.js +115 -0
  18. package/src/utils/download.js +38 -0
  19. package/src/utils/editor.js +430 -0
  20. package/src/utils/events.js +1639 -0
  21. package/src/utils/factory.js +216 -0
  22. package/src/utils/filter.js +128 -0
  23. package/src/utils/footer.js +51 -0
  24. package/src/utils/freeze.js +19 -0
  25. package/src/utils/headers.js +74 -0
  26. package/src/utils/helpers.js +409 -0
  27. package/src/utils/history.js +336 -0
  28. package/src/utils/internal.js +1299 -0
  29. package/src/utils/internalHelpers.js +96 -0
  30. package/src/utils/keys.js +406 -0
  31. package/src/utils/lazyLoading.js +143 -0
  32. package/src/utils/libraryBase.js +5 -0
  33. package/src/utils/merges.js +275 -0
  34. package/src/utils/meta.js +81 -0
  35. package/src/utils/orderBy.js +185 -0
  36. package/src/utils/pagination.js +181 -0
  37. package/src/utils/rows.js +624 -0
  38. package/src/utils/search.js +83 -0
  39. package/src/utils/selection.js +744 -0
  40. package/src/utils/style.js +147 -0
  41. package/src/utils/toolbar.js +566 -0
  42. package/src/utils/version.js +9 -0
  43. package/src/utils/worksheets.js +731 -0
  44. package/src/webcomponent.js +59 -0
@@ -0,0 +1,59 @@
1
+ class Jspreadsheet extends HTMLElement {
2
+ constructor() {
3
+ super();
4
+ }
5
+
6
+ init() {
7
+ // Shadow root
8
+ const shadowRoot = this.attachShadow({ mode: 'open' });
9
+
10
+ // Style
11
+ const css = document.createElement('link');
12
+ css.rel = 'stylesheet';
13
+ css.type = 'text/css';
14
+ css.href = 'https://cdn.jsdelivr.net/npm/jspreadsheet-ce/dist/jspreadsheet.min.css';
15
+ shadowRoot.appendChild(css);
16
+
17
+ const cssJsuites = document.createElement('link');
18
+ cssJsuites.rel = 'stylesheet';
19
+ cssJsuites.type = 'text/css';
20
+ cssJsuites.href = 'https://cdn.jsdelivr.net/npm/jsuites/dist/jsuites.min.css';
21
+ shadowRoot.appendChild(cssJsuites);
22
+
23
+ const cssMaterial = document.createElement('link');
24
+ cssMaterial.rel = 'stylesheet';
25
+ cssMaterial.type = 'text/css';
26
+ cssMaterial.href = 'https://fonts.googleapis.com/css?family=Material+Icons';
27
+ shadowRoot.appendChild(cssMaterial);
28
+
29
+ // JSS container
30
+ const container = document.createElement('div');
31
+ shadowRoot.appendChild(container);
32
+
33
+ // Properties
34
+ const toolbar = this.getAttribute('toolbar') == 'true' ? true : false;
35
+
36
+ // Create jexcel element
37
+ this.el = jspreadsheet(container, {
38
+ tabs: true,
39
+ toolbar: toolbar,
40
+ root: shadowRoot,
41
+ worksheets: [
42
+ {
43
+ filters: true,
44
+ minDimensions: [6, 6],
45
+ },
46
+ ],
47
+ });
48
+ }
49
+
50
+ connectedCallback() {
51
+ this.init(this);
52
+ }
53
+
54
+ disconnectedCallback() {}
55
+
56
+ attributeChangedCallback() {}
57
+ }
58
+
59
+ window.customElements.define('j-spreadsheet-ce', Jspreadsheet);