gridjs-spreadsheet 25.5.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.5.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,31 +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
286
  ## License
336
287
 
337
288
  MIT
338
289
 
339
290
  ## Support
340
291
 
341
- 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).
342
293
 
343
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
@@ -484,6 +484,14 @@ body {
484
484
  .x-spreadsheet-selector .x-spreadsheet-selector-autofill {
485
485
  border: 1px dashed rgba(0, 0, 0, 0.45);
486
486
  }
487
+ .x-spreadsheet-selector .x-spreadsheet-selector-userlabel {
488
+ position: absolute;
489
+ top: -20px;
490
+ /* 比父级 div 向上偏移 20px */
491
+ left: 0;
492
+ /* 固定在父级 div 的左边 */
493
+ padding: 4px 8px;
494
+ }
487
495
  .x-spreadsheet-selector .x-spreadsheet-selector-corner {
488
496
  pointer-events: auto;
489
497
  position: absolute;
@@ -653,11 +661,43 @@ body {
653
661
  background: #f5f6f7;
654
662
  display: flex;
655
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
+ }
656
695
  .x-spreadsheet-bottombar {
657
696
  position: relative;
658
697
  border-top: 1px solid #e0e2e4;
659
698
  display: flex;
660
699
  justify-content: space-between;
700
+ align-items: center;
661
701
  }
662
702
  .x-spreadsheet-bottombar .x-spreadsheet-menu > li {
663
703
  line-height: 40px;
@@ -665,10 +705,8 @@ body {
665
705
  padding-top: 0;
666
706
  padding-bottom: 0;
667
707
  vertical-align: middle;
668
- border-right: 1px solid #e8eaed;
669
708
  }
670
709
  .x-spreadsheet-bottombar .x-spreadsheet-stats {
671
- border-left: 1px solid #e0e2e4;
672
710
  padding: 0 10px;
673
711
  height: 40px;
674
712
  display: flex;
@@ -685,14 +723,64 @@ body {
685
723
  font-weight: bold;
686
724
  color: #333;
687
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
+ }
688
759
  .x-spreadsheet-menu {
689
760
  list-style: none;
690
761
  margin: 0;
691
762
  padding: 0;
692
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;
693
781
  }
694
782
  .x-spreadsheet-menu > li {
695
- float: left;
783
+ flex-shrink: 0;
696
784
  line-height: 1.25em;
697
785
  padding: 0.785em 1em;
698
786
  margin: 0;
@@ -726,7 +814,6 @@ body {
726
814
  position: absolute;
727
815
  top: 50%;
728
816
  right: 5px;
729
- /* 适当调整右侧间距 */
730
817
  transform: translateY(-50%);
731
818
  width: 0;
732
819
  height: 0;
@@ -1294,7 +1381,7 @@ form fieldset select {
1294
1381
  display: inline-block;
1295
1382
  }
1296
1383
  .x-spreadsheet-icon .x-spreadsheet-icon-img {
1297
- background-image: url(a3b683289420fd8ec937908397907279.svg);
1384
+ background-image: url(ae125bc972519a804601f2ead209255c.svg);
1298
1385
  position: absolute;
1299
1386
  width: 262px;
1300
1387
  height: 444px;
@@ -1687,10 +1774,31 @@ form fieldset select {
1687
1774
  z-index: 1000;
1688
1775
  display: flex;
1689
1776
  flex-direction: column;
1690
- width: 50%;
1691
- height: 50%;
1777
+ min-width: 20%;
1692
1778
  overflow: hidden;
1693
1779
  }
1780
+ .x-spreadsheet-modal-radio-container {
1781
+ display: flex;
1782
+ flex-direction: column;
1783
+ gap: 10px;
1784
+ padding: 10px 0;
1785
+ align-items: flex-start;
1786
+ }
1787
+ .x-spreadsheet-modal-radio-option {
1788
+ display: flex;
1789
+ align-items: center;
1790
+ cursor: pointer;
1791
+ }
1792
+ .x-spreadsheet-modal-radio-option input[type="radio"] {
1793
+ margin-right: 8px;
1794
+ width: 16px;
1795
+ height: 16px;
1796
+ padding: 0;
1797
+ }
1798
+ .x-spreadsheet-modal-radio-option label {
1799
+ font-size: 14px;
1800
+ margin: 0;
1801
+ }
1694
1802
  @media screen and (max-width: 480px) {
1695
1803
  .x-spreadsheet-modal-component {
1696
1804
  width: 90% !important;
@@ -1998,4 +2106,23 @@ dialog p {
1998
2106
  margin-top: 10px;
1999
2107
  width: 60px;
2000
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
+ }
2001
2128