gridjs-spreadsheet 25.6.0 → 25.7.0

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.
@@ -5,23 +5,24 @@
5
5
  <meta name="viewport" content="width=device-width" />
6
6
  <title>gridjs-web-demo</title>
7
7
 
8
- <style>
9
- ::-webkit-scrollbar, ::-webkit-scrollbar-button {
10
- width: 8px;
11
- height: 8px;
12
- }
8
+ <style>
9
+ ::-webkit-scrollbar, ::-webkit-scrollbar-button {
10
+ width: 8px;
11
+ height: 8px;
12
+ }
13
13
 
14
- ::-webkit-scrollbar-track {
15
- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
16
- border-radius: 10px;
17
- background-color: #FFF;
18
- }
14
+ ::-webkit-scrollbar-track {
15
+ -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
16
+ border-radius: 10px;
17
+ background-color: #FFF;
18
+ }
19
+
20
+ ::-webkit-scrollbar-thumb {
21
+ border-radius: 10px;
22
+ -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
23
+ background-color: #AAA;
24
+ }
19
25
 
20
- ::-webkit-scrollbar-thumb {
21
- border-radius: 10px;
22
- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
23
- background-color: #AAA;
24
- }
25
26
  html, body {
26
27
  margin: 0;
27
28
  padding: 0;
@@ -42,8 +43,8 @@ html, body {
42
43
  height: 100%;
43
44
  object-fit: contain; /* 对于图像或视频很有用 */
44
45
  }
45
- </style>
46
- <!--<link rel="stylesheet" href="./quantumui.min.22.5.5.2.css?v=20220312" />-->
46
+ </style>
47
+ <!--<link rel="stylesheet" href="./quantumui.min.22.5.5.2.css?v=20220312" />-->
47
48
  <link rel="stylesheet" href="/xspread/bootstrap.min.22.5.5.2.css?v=20220315" />
48
49
  <script src="/xspread/jquery-2.1.1.js"></script>
49
50
  <link rel="stylesheet" href="/xspread/jquery-ui.min.css" />
@@ -52,7 +52,7 @@ html, body {
52
52
  <!-- <script src="vconsole.min.js"></script> -->
53
53
  <!--for local reference-->
54
54
  <!--
55
- <link rel="stylesheet" href="/xspread/xspreadsheet.css?v=20230525" />
55
+ <link rel="stylesheet" href="/xspread/xspreadsheet.css?v=20230525" />
56
56
  <script src="/xspread/xspreadsheet.js?v=20230525"></script>
57
57
  -->
58
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gridjs-spreadsheet",
3
- "version": "25.6.0",
3
+ "version": "25.7.0",
4
4
  "description": "this is the client side script for GridJs which is a lightweight, scalable, and customizable toolkit that provides cross-platform web applications, enables convenient development for editing or viewing Excel/Spreadsheet files, offers simple deployment, and provides easy-to-use APIs based on JSON format.",
5
5
  "types": "index.d.ts",
6
6
  "main": "xspreadsheet.js",
package/readme.md CHANGED
@@ -163,42 +163,14 @@ const s = new Spreadsheet("#gridjs-demo")
163
163
 
164
164
  ## Bind events
165
165
  ```javascript
166
- // single selection
166
+ //single selection
167
167
  xs.on('cell-selected', (cell, ri, ci) => {});
168
- // range selection
168
+ //range selection
169
169
  xs.on('cells-selected', (cell, { sri, sci, eri, eci }) => {});
170
- // shape/image selection
170
+ //shape/image selection
171
171
  xs.on('object-selected', (obj) => { console.log('obj id:', obj.id, ', type: ', obj.type); })
172
172
  // edited on cell
173
173
  xs.on('cell-edited', (text, ri, ci) => {});
174
- // cells updated
175
- xs.on('cells-updated', (name, cells) => {
176
- console.log('cells updated for sheet name:', name);
177
- cells.forEach((acell, index, array) => {
178
- console.log('acell got updated:', acell);
179
- })
180
- })
181
- // cells deleted
182
- xs.on('cells-deleted', (range) => {
183
- console.log('cells deleted :', range);
184
- })
185
- // rows deleted
186
- xs.on('rows-deleted', (ri, n) => {
187
- console.log('rows-deleted :', ri, ",size", n);
188
- })
189
- // columns deleted
190
- xs.on('columns-deleted', (ci, n) => {
191
- console.log('columns-deleted :', ci, ",size", n);
192
- })
193
- // rows inserted
194
- xs.on('rows-inserted', (ri, n) => {
195
- console.log('rows-inserted :', ri, ",size", n);
196
- })
197
- // columns inserted
198
- xs.on('columns-inserted', (ci, n) => {
199
- console.log('columns-inserted :', ci, ",size", n);
200
- })
201
-
202
174
  ```
203
175
 
204
176
  ## update cell-text
@@ -224,7 +196,6 @@ xs.cellStyle(ri, ci);
224
196
  - Paint format
225
197
  - Clear format
226
198
  - Format
227
- - Number Format
228
199
  - Font/Font size/ bold/italic/Underline/Strike
229
200
  - Highlight
230
201
  - Shape/Image resize/rotate/position ajustment
@@ -255,7 +226,6 @@ xs.cellStyle(ri, ci);
255
226
  - Insert/Delete form controls
256
227
  - Insert/Delete common shapes for autoshape
257
228
  - Support display two colors gradient in fill effects
258
- - Mobile compatibility
259
229
 
260
230
 
261
231
  ## Github-Demos
@@ -313,36 +283,12 @@ v25.1:
313
283
 
314
284
  - support copy/paste from MS-Excel
315
285
 
316
- v25.2:
317
-
318
- - support copy/paste from MS-Excel
319
- - enhancement for automatic operations for user’s convenience, such as extending blank row/column, page scrolling, …
320
-
321
- v25.3:
322
-
323
- - support more shotcut keys
324
- - support pasting the content copied from excel to multiple target areas
325
-
326
- v25.4:
327
-
328
- - support show statistics information in the lower right corner when cells are selected
329
-
330
- v25.5:
331
-
332
- - add support for Polish menus.
333
- - support APIs for insert/delete rows/columns
334
-
335
- v25.6:
336
-
337
- - support APIs for resize rows/columns
338
- - support APIs for hide/unhide rows/columns
339
-
340
286
  ## License
341
287
 
342
288
  MIT
343
289
 
344
290
  ## Support
345
291
 
346
- You can ask any question or request features or report bugs using the [Forum](https://forum.aspose.com/c/cells).
292
+ You can ask any question or request features using the [Forum](https://forum.aspose.com/c/cells).
347
293
 
348
294
  [Product Page](https://products.aspose.com/cells) | [Product Documentation](https://docs.aspose.com/cells/net/aspose-cells-gridjs/) | [Blog](https://blog.aspose.com/category/cells/) |[API Reference](https://reference.aspose.com/cells/net/aspose.cells.gridjs/) | [Source Code Samples](https://github.com/aspose-cells/Aspose.Cells-for-.NET/tree/master/Examples_GridJs) | [Free Support](https://forum.aspose.com/c/cells)
package/xspreadsheet.css CHANGED
@@ -661,11 +661,43 @@ body {
661
661
  background: #f5f6f7;
662
662
  display: flex;
663
663
  }
664
+ .x-spreadsheet-scroll-button-container {
665
+ display: flex;
666
+ align-items: center;
667
+ flex-shrink: 0;
668
+ border-left: 1px solid #e0e2e4;
669
+ padding: 0 5px;
670
+ }
671
+ .x-spreadsheet-scroll-button {
672
+ width: 20px;
673
+ height: 20px;
674
+ line-height: 18px;
675
+ text-align: center;
676
+ cursor: pointer;
677
+ border: 1px solid #ccc;
678
+ border-radius: 50%;
679
+ margin: 0 2px;
680
+ user-select: none;
681
+ font-weight: bold;
682
+ color: #666;
683
+ background-color: #fff;
684
+ transition: background-color 0.2s, opacity 0.2s;
685
+ }
686
+ .x-spreadsheet-scroll-button:hover {
687
+ background-color: #f0f0f0;
688
+ }
689
+ .x-spreadsheet-scroll-button[disabled] {
690
+ opacity: 0.4;
691
+ cursor: not-allowed;
692
+ background-color: #f5f5f5;
693
+ pointer-events: none;
694
+ }
664
695
  .x-spreadsheet-bottombar {
665
696
  position: relative;
666
697
  border-top: 1px solid #e0e2e4;
667
698
  display: flex;
668
699
  justify-content: space-between;
700
+ align-items: center;
669
701
  }
670
702
  .x-spreadsheet-bottombar .x-spreadsheet-menu > li {
671
703
  line-height: 40px;
@@ -673,10 +705,8 @@ body {
673
705
  padding-top: 0;
674
706
  padding-bottom: 0;
675
707
  vertical-align: middle;
676
- border-right: 1px solid #e8eaed;
677
708
  }
678
709
  .x-spreadsheet-bottombar .x-spreadsheet-stats {
679
- border-left: 1px solid #e0e2e4;
680
710
  padding: 0 10px;
681
711
  height: 40px;
682
712
  display: flex;
@@ -693,14 +723,64 @@ body {
693
723
  font-weight: bold;
694
724
  color: #333;
695
725
  }
726
+ .x-spreadsheet-menu-wrapper {
727
+ position: relative;
728
+ flex-grow: 1;
729
+ min-width: 0;
730
+ display: flex;
731
+ align-items: center;
732
+ }
733
+ .x-spreadsheet-menu-wrapper::before,
734
+ .x-spreadsheet-menu-wrapper::after {
735
+ content: '';
736
+ position: absolute;
737
+ top: 0;
738
+ bottom: 0;
739
+ width: 20px;
740
+ pointer-events: none;
741
+ z-index: 2;
742
+ transition: opacity 0.3s;
743
+ opacity: 0;
744
+ }
745
+ .x-spreadsheet-menu-wrapper::before {
746
+ left: 0;
747
+ background: linear-gradient(to right, rgba(0, 0, 0, 0.12), transparent);
748
+ }
749
+ .x-spreadsheet-menu-wrapper::after {
750
+ right: 0;
751
+ background: linear-gradient(to left, rgba(0, 0, 0, 0.12), transparent);
752
+ }
753
+ .x-spreadsheet-menu-wrapper.scrollable-left::before {
754
+ opacity: 1;
755
+ }
756
+ .x-spreadsheet-menu-wrapper.scrollable-right::after {
757
+ opacity: 1;
758
+ }
696
759
  .x-spreadsheet-menu {
697
760
  list-style: none;
698
761
  margin: 0;
699
762
  padding: 0;
700
763
  user-select: none;
764
+ display: flex;
765
+ overflow-x: auto;
766
+ scrollbar-width: none;
767
+ }
768
+ .x-spreadsheet-menu::-webkit-scrollbar {
769
+ display: none;
770
+ }
771
+ .x-spreadsheet-bottombar-actions {
772
+ display: flex;
773
+ align-items: center;
774
+ flex-shrink: 0;
775
+ padding: 0 5px;
776
+ height: 100%;
777
+ }
778
+ .x-spreadsheet-bottombar-actions .x-spreadsheet-icon,
779
+ .x-spreadsheet-bottombar-actions .x-spreadsheet-dropdown {
780
+ margin: 0 6px;
701
781
  }
702
782
  .x-spreadsheet-menu > li {
703
- float: left;
783
+ flex-shrink: 0;
704
784
  line-height: 1.25em;
705
785
  padding: 0.785em 1em;
706
786
  margin: 0;
@@ -734,7 +814,6 @@ body {
734
814
  position: absolute;
735
815
  top: 50%;
736
816
  right: 5px;
737
- /* 适当调整右侧间距 */
738
817
  transform: translateY(-50%);
739
818
  width: 0;
740
819
  height: 0;
@@ -1302,7 +1381,7 @@ form fieldset select {
1302
1381
  display: inline-block;
1303
1382
  }
1304
1383
  .x-spreadsheet-icon .x-spreadsheet-icon-img {
1305
- background-image: url(a3b683289420fd8ec937908397907279.svg);
1384
+ background-image: url(ae125bc972519a804601f2ead209255c.svg);
1306
1385
  position: absolute;
1307
1386
  width: 262px;
1308
1387
  height: 444px;
@@ -2027,4 +2106,23 @@ dialog p {
2027
2106
  margin-top: 10px;
2028
2107
  width: 60px;
2029
2108
  }
2109
+ .x-spreadsheet-item.parent {
2110
+ position: relative;
2111
+ }
2112
+ .x-spreadsheet-contextmenu-submenu {
2113
+ position: absolute;
2114
+ display: none;
2115
+ padding: 5px 0;
2116
+ background: #fff;
2117
+ border: 1px solid #e0e2e4;
2118
+ box-shadow: 1px 2px 5px 2px rgba(51, 51, 51, 0.15);
2119
+ z-index: 101;
2120
+ width: 260px;
2121
+ }
2122
+ .x-spreadsheet-item.parent .label {
2123
+ float: right;
2124
+ font-size: 0.8em;
2125
+ color: #999;
2126
+ line-height: inherit;
2127
+ }
2030
2128