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.
- package/LICENSE +21 -0
- package/README.md +292 -0
- package/dist/index.d.ts +2382 -0
- package/dist/index.js +11286 -0
- package/dist/index.js.map +1 -0
- package/dist/jspreadsheet.css +723 -0
- package/dist/jspreadsheet.themes.css +104 -0
- package/package.json +57 -0
- package/src/index.js +95 -0
- package/src/test.js +50 -0
- package/src/utils/cells.js +36 -0
- package/src/utils/columns.js +742 -0
- package/src/utils/comments.js +87 -0
- package/src/utils/config.js +46 -0
- package/src/utils/copyPaste.js +438 -0
- package/src/utils/data.js +419 -0
- package/src/utils/dispatch.js +115 -0
- package/src/utils/download.js +38 -0
- package/src/utils/editor.js +430 -0
- package/src/utils/events.js +1639 -0
- package/src/utils/factory.js +216 -0
- package/src/utils/filter.js +128 -0
- package/src/utils/footer.js +51 -0
- package/src/utils/freeze.js +19 -0
- package/src/utils/headers.js +74 -0
- package/src/utils/helpers.js +409 -0
- package/src/utils/history.js +336 -0
- package/src/utils/internal.js +1299 -0
- package/src/utils/internalHelpers.js +96 -0
- package/src/utils/keys.js +406 -0
- package/src/utils/lazyLoading.js +143 -0
- package/src/utils/libraryBase.js +5 -0
- package/src/utils/merges.js +275 -0
- package/src/utils/meta.js +81 -0
- package/src/utils/orderBy.js +185 -0
- package/src/utils/pagination.js +181 -0
- package/src/utils/rows.js +624 -0
- package/src/utils/search.js +83 -0
- package/src/utils/selection.js +744 -0
- package/src/utils/style.js +147 -0
- package/src/utils/toolbar.js +566 -0
- package/src/utils/version.js +9 -0
- package/src/utils/worksheets.js +731 -0
- 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);
|