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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Jspreadsheet Ltd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,292 @@
1
+ # Jspreadsheet CE v5: The JavaScript spreadsheet
2
+
3
+ <b>Jexcel CE</b> has been renamed to <b>Jspreadsheet CE</b><br><br>
4
+
5
+ ## Jspreadsheet CE Use Cases
6
+
7
+ Jspreadsheet CE is an extensible framework for building sophisticated data-oriented interfaces with Excel-like controls. By bringing familiar spreadsheet features to your application, you can drastically reduce development time while delivering an interface that users already know how to use, leading to faster adoption and increased productivity. You can use Jspreadsheet in many different applications, such as:
8
+
9
+ - An editable data grid-based interface to simplify inventory management and production planning in a manufacturing company's ERP system.
10
+ - At an educational institution, Jspreadsheet powers grade management systems where teachers can efficiently import and modify student data.
11
+ - A logistics company uses Jspreadsheet to create dynamic delivery route planning tables with real-time updates.
12
+ - In a research laboratory, scientists use Jspreadsheet to collect and analyze experimental data with custom validation rules.
13
+ - At a retail chain, managers use Spreadsheet-based tools to coordinate staff schedules across multiple locations.
14
+
15
+ ### Jspreadsheet Pro - Enterprise Solution
16
+
17
+ - [Jspreadsheet Pro](https://jspreadsheet.com/)
18
+ - [Real-time React Spreadsheets](https://github.com/jspreadsheet/spreadsheet-react-server)
19
+
20
+ ## Overview
21
+
22
+ ### Why Choose Jspreadsheet CE?
23
+
24
+ - Create rich, interactive data grid interfaces
25
+ - Handle complex data inputs with Excel-like functionality
26
+ - Direct Excel compatibility: Copy and paste using standard shortcuts
27
+ - Proven success across thousands of implementations
28
+ - Lightweight, fast, and intuitive
29
+ - Easy integration with third-party plugins
30
+ - Built for collaboration and sharing
31
+
32
+ ## Screenshot
33
+
34
+ ![The JavaScript spreadsheet](https://bossanova.uk/templates/default/img/jexcel.gif)
35
+
36
+ ## Installation
37
+
38
+ ### NPM
39
+
40
+ `npm install jspreadsheet-ce`
41
+
42
+ ### CDN
43
+
44
+ ```html
45
+ <script src="https://cdn.jsdelivr.net/npm/jspreadsheet-ce/dist/index.min.js"></script>
46
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jspreadsheet-ce/dist/jspreadsheet.min.css" type="text/css" />
47
+ <script src="https://cdn.jsdelivr.net/npm/jsuites/dist/jsuites.min.js"></script>
48
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jsuites/dist/jsuites.min.css" type="text/css" />
49
+ ```
50
+
51
+ ### Basic Demo
52
+
53
+ A basic example to integrate the Jspreadsheet in your website to create your first data grid with spreadsheet controls. <https://codepen.io/hchiam/pen/qBRzXKK>
54
+
55
+ #### Usage
56
+
57
+ Add jexcel/jspreadsheet and Jsuites to your html file
58
+
59
+ ```html
60
+ <script src="https://bossanova.uk/jspreadsheet/v5/jspreadsheet.js"></script>
61
+ <script src="https://jsuites.net/v5/jsuites.js"></script>
62
+ <link rel="stylesheet" href="https://bossanova.uk/jspreadsheet/v5/jspreadsheet.css" type="text/css" />
63
+ <link rel="stylesheet" href="https://jsuites.net/v5/jsuites.css" type="text/css" />
64
+ ```
65
+
66
+ You should initialize your data grid on a div container, such as:
67
+
68
+ ```html
69
+ <div id="spreadsheet"></div>
70
+ ```
71
+
72
+ To initialize a Jspreadsheet CE table you should run JavaScript, such as:
73
+
74
+ ```javascript
75
+ jspreadsheet(document.getElementById('spreadsheet'), {
76
+ worksheets: [
77
+ {
78
+ data: [
79
+ ['Jazz', 'Honda', '2019-02-12', '', true, '$ 2.000,00', '#777700'],
80
+ ['Civic', 'Honda', '2018-07-11', '', true, '$ 4.000,01', '#007777'],
81
+ ],
82
+ columns: [
83
+ { type: 'text', title: 'Car', width: 120 },
84
+ {
85
+ type: 'dropdown',
86
+ title: 'Make',
87
+ width: 200,
88
+ source: ['Alfa Romeo', 'Audi', 'Bmw', 'Honda'],
89
+ },
90
+ { type: 'calendar', title: 'Available', width: 200 },
91
+ { type: 'image', title: 'Photo', width: 120 },
92
+ { type: 'checkbox', title: 'Stock', width: 80 },
93
+ {
94
+ type: 'numeric',
95
+ title: 'Price',
96
+ width: 100,
97
+ mask: '$ #.##,00',
98
+ decimal: ',',
99
+ },
100
+ { type: 'color', width: 100, render: 'square' },
101
+ ],
102
+ },
103
+ ],
104
+ });
105
+ ```
106
+
107
+ Serve your html file and then you will get the rendered table in your browser
108
+
109
+ ![sampleTable](./docs/sampleTable.png)
110
+
111
+ <br>
112
+
113
+ ## Development
114
+
115
+ ### Build your package
116
+
117
+ % npm run build
118
+
119
+ ### Start a web service
120
+
121
+ % npm run start
122
+
123
+ ## Data Grid Examples
124
+
125
+ - https://bossanova.uk/jspreadsheet/docs/examples/create-from-table
126
+ - https://bossanova.uk/jspreadsheet/docs/examples/translations
127
+ - https://bossanova.uk/jspreadsheet/docs/examples/table-overflow
128
+ - https://bossanova.uk/jspreadsheet/docs/examples/richtext-html-editor
129
+ - https://bossanova.uk/jspreadsheet/docs/examples/column-dragging
130
+ - https://bossanova.uk/jspreadsheet/docs/examples/web-component
131
+ - https://bossanova.uk/jspreadsheet/docs/examples/jquery
132
+
133
+ ## Jspreadsheet Changelog
134
+
135
+ ### Custom
136
+
137
+ - Add onupdateresult event after search/filter;
138
+
139
+ ### Jspreadsheet 5.0.0
140
+
141
+ - Separation of spreadsheet and worksheets;
142
+ - New worksheet methods and events;
143
+ - Dedicated wrappers for React and Vue for better framework integration;
144
+ - Modern development environment powered by Webpack;
145
+ - Updated architecture aligned with other distributions;
146
+
147
+ [More information](https://bossanova.uk/jspreadsheet/docs/upgrade-from-v4-to-v5)
148
+
149
+ ### Jspreadsheet 4.6.0
150
+
151
+ - Jexcel renamed to Jspreadsheet.
152
+ - Integration with Jsuites v4.
153
+
154
+ ### Jspreadsheet 4.2.3
155
+
156
+ - The spreadsheet plugin is now compatible with Jsuites v3.
157
+ - New flags and security implementations.
158
+ - New DOM element references in the toolbar.
159
+ - Worksheet events are now tabbed.
160
+
161
+ ### Jspreadsheet 4.0.0
162
+
163
+ Special thanks to [FDL - Fonds de Dotation du Libre](https://www.fdl-lef.org/) for their support and sponsorship, which made the new version possible with many exciting features.
164
+
165
+ - Workbook/tab support for spreadsheets.
166
+ - Create dynamic spreadsheets from static HTML elements.
167
+ - Highlight selected cells in the spreadsheet after CTRL+C.
168
+ - Footer with formula support.
169
+ - Multiple column resizing.
170
+ - JSON update support (helpers to update a remote server).
171
+ - Centralized event dispatch method for all spreadsheet events.
172
+ - Custom helpers: `=PROGRESS` (progress bar), `=RATING` (5-star rating).
173
+ - Custom formula helpers: `=COLUMN`, `=ROW`, `=CELL`, `=TABLE`, `=VALUE`.
174
+ - Dynamic nested header updates.
175
+ - New HTML editing column type.
176
+ - New flags: `includeHeadersOnCopy`, `persistence`, `filters`, `autoCasting`, `freezeColumns`.
177
+ - New events: `onevent`, `onchangepage`, `onbeforesave`, `onsave`.
178
+ - More examples and documentation.
179
+
180
+ ### Jspreadsheet 3.9.0
181
+
182
+ - New methods.
183
+ - General fixes.
184
+
185
+ ### Jspreadsheet 3.6.0
186
+
187
+ - Improved spreadsheet formula parsing.
188
+ - New spreadsheet events.
189
+ - New initialization options.
190
+ - General fixes.
191
+
192
+ ### Jspreadsheet 3.2.3
193
+
194
+ - `getMeta`, `setMeta` methods.
195
+ - NPM package with jSuites.
196
+ - General fixes.
197
+
198
+ ### Jspreadsheet 3.0.1
199
+
200
+ Jspreadsheet v3 is a complete rebuild of the JavaScript spreadsheet (previously a jQuery plugin). Due to the changes, full compatibility could not be ensured. If upgrading, your code may require some updates. For more information, refer to the article on upgrading from Jspreadsheet v2 or Handsontable.
201
+
202
+ **New features in Jspreadsheet v3:**
203
+
204
+ - Drag and drop columns.
205
+ - Resizable rows.
206
+ - Merge columns.
207
+ - Search functionality.
208
+ - Pagination.
209
+ - Lazy loading.
210
+ - Full-screen mode.
211
+ - Image upload.
212
+ - Native color picker.
213
+ - Better mobile compatibility.
214
+ - Enhanced nested headers support.
215
+ - Advanced keyboard navigation.
216
+ - Better hidden column management.
217
+ - Data picker enhancements: dropdown, autocomplete, multiple selection, group options, and icons.
218
+ - Import from XLSX (experimental).
219
+
220
+ **Major improvements:**
221
+
222
+ - A new formula engine with faster results and no external dependencies.
223
+ - No use of selectors, leading to faster performance.
224
+ - New native column types.
225
+ - No jQuery required.
226
+ - Examples for React, Vue, and Angular.
227
+ - XLSX support via a custom SheetJS integration (experimental).
228
+
229
+ ### Jspreadsheet 2.1.0
230
+
231
+ - Mobile touch improvements.
232
+ - Paste fixes and a new CSV parser.
233
+
234
+ ### Jspreadsheet 2.0.0
235
+
236
+ - New radio column type.
237
+ - New dropdown with autocomplete and multiple selection options.
238
+ - Header/body separation for better scroll and column resize behavior.
239
+ - Text-wrap improvements, including Excel-compatible `alt+enter`.
240
+ - New `set/get` meta information.
241
+ - New `set/get` configuration parameters.
242
+ - Programmatic `set/get` cell styles.
243
+ - `set/get` cell comments.
244
+ - Custom toolbar for tables.
245
+ - Responsive calendar picker.
246
+
247
+ ### Jspreadsheet 1.5.7
248
+
249
+ - Improvements to checkbox column type.
250
+ - Updates to table destruction in jQuery.
251
+
252
+ ### Jspreadsheet 1.5.1
253
+
254
+ - Spreadsheet data overflow and fixed headers. See an [example](https://jspreadsheet.com/examples/table-with-fixed-headers).
255
+ - Navigation improvements.
256
+
257
+ ### Jspreadsheet 1.5.0
258
+
259
+ - Relative `insertRow`, `deleteRow`, `insertColumn`, `deleteColumn`. See an [example](https://jspreadsheet.com/examples/working-with-the-data).
260
+ - Redo and undo support for `insertRow`, `deleteRow`, `insertColumn`, `deleteColumn`, `moveRow`.
261
+ - New formula column recursive chain.
262
+ - New alternative design option (Bootstrap-like). See an [example](https://jspreadsheet.com/examples/a-custom-table-design).
263
+ - `updateSettings` improvements.
264
+
265
+ ## Official websites
266
+
267
+ - [Jspreadsheet CE v4 - Javascript Spreadsheet](https://bossanova.uk/jspreadsheet/v4)
268
+ - [Jspreadsheet CE v3 - Vanilla JavaScript](https://bossanova.uk/jspreadsheet/v3)
269
+ - [Jspreadsheet CE v2 - jQuery Plugin](https://bossanova.uk/jspreadsheet/v2)
270
+ - [Jspreadsheet Pro v11 - Javascript Spreadsheet](https://jspreadsheet.com/docs)
271
+ - [Jspreadsheet Pro v10 - Javascript Spreadsheet](https://jspreadsheet.com/docs/v10)
272
+ - [Jspreadsheet Pro v9 - Javascript Spreadsheet](https://jspreadsheet.com/docs/v9)
273
+ - [Jspreadsheet Pro v8 - Javascript Spreadsheet](https://jspreadsheet.com/docs/v8)
274
+ - [Jspreadsheet Pro v7 - Javascript Spreadsheet](https://jspreadsheet.com/docs/v7)
275
+
276
+ ## Community
277
+
278
+ - [GitHub](https://github.com/jspreadsheet/ce/issues)
279
+
280
+ ## Contributing
281
+
282
+ See [contributing](contributing.md)
283
+
284
+ ## Copyright and license
285
+
286
+ Jspreadsheet CE is released under the [MIT license]. Contact contact@jspreadsheet.com
287
+
288
+ ## Other tools
289
+
290
+ - [LemonadeJS Reactive Library](https://lemonadejs.com)
291
+ - [jSuites Components](https://jsuites.net)
292
+ - [CalendarJS](https://calendarjs.com)