gridjs-spreadsheet 26.5.0 → 26.5.2
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/package.json +1 -1
- package/readme.md +9 -0
- package/xspreadsheet.css +202 -19
- package/xspreadsheet.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gridjs-spreadsheet",
|
|
3
|
-
"version": "26.5.
|
|
3
|
+
"version": "26.5.2",
|
|
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
package/xspreadsheet.css
CHANGED
|
@@ -405,26 +405,102 @@ body {
|
|
|
405
405
|
background-color: #f4f5f8;
|
|
406
406
|
opacity: 0.9;
|
|
407
407
|
z-index: 12;
|
|
408
|
+
display: flex;
|
|
409
|
+
}
|
|
410
|
+
.x-spreadsheet-scrollbar .x-spreadsheet-scrollbar-track {
|
|
411
|
+
flex: 1 1 auto;
|
|
412
|
+
align-self: center;
|
|
413
|
+
min-width: 0;
|
|
414
|
+
min-height: 0;
|
|
415
|
+
}
|
|
416
|
+
.x-spreadsheet-scrollbar .x-spreadsheet-scrollbar-content {
|
|
417
|
+
background: #ddd;
|
|
418
|
+
}
|
|
419
|
+
.x-spreadsheet-scrollbar .x-spreadsheet-scrollbar-button {
|
|
420
|
+
position: relative;
|
|
421
|
+
box-sizing: border-box;
|
|
422
|
+
flex: 0 0 15px;
|
|
423
|
+
width: 15px;
|
|
424
|
+
height: 15px;
|
|
425
|
+
margin: 0;
|
|
426
|
+
padding: 0;
|
|
427
|
+
border: 1px solid #c7ccd6;
|
|
428
|
+
background: #eef1f6;
|
|
429
|
+
cursor: default;
|
|
430
|
+
outline: none;
|
|
431
|
+
}
|
|
432
|
+
.x-spreadsheet-scrollbar .x-spreadsheet-scrollbar-button::before {
|
|
433
|
+
content: '';
|
|
434
|
+
position: absolute;
|
|
435
|
+
left: 50%;
|
|
436
|
+
top: 50%;
|
|
437
|
+
width: 0;
|
|
438
|
+
height: 0;
|
|
439
|
+
transform: translate(-50%, -50%);
|
|
440
|
+
}
|
|
441
|
+
.x-spreadsheet-scrollbar .x-spreadsheet-scrollbar-button:hover {
|
|
442
|
+
background: #e1e6ef;
|
|
443
|
+
}
|
|
444
|
+
.x-spreadsheet-scrollbar .x-spreadsheet-scrollbar-button:active {
|
|
445
|
+
background: #d7dde8;
|
|
408
446
|
}
|
|
409
447
|
.x-spreadsheet-scrollbar.horizontal {
|
|
410
448
|
right: 15px;
|
|
449
|
+
height: 15px;
|
|
450
|
+
flex-direction: row;
|
|
451
|
+
}
|
|
452
|
+
.x-spreadsheet-scrollbar.horizontal .x-spreadsheet-scrollbar-track {
|
|
453
|
+
height: 12px;
|
|
411
454
|
overflow-x: scroll;
|
|
412
455
|
overflow-y: hidden;
|
|
413
|
-
height: 12px;
|
|
414
|
-
/* 固定高度,避免覆盖表格内容 */
|
|
415
456
|
}
|
|
416
|
-
.x-spreadsheet-scrollbar.horizontal
|
|
457
|
+
.x-spreadsheet-scrollbar.horizontal .x-spreadsheet-scrollbar-button {
|
|
458
|
+
width: 15px;
|
|
459
|
+
height: 15px;
|
|
460
|
+
border-top-width: 0;
|
|
461
|
+
border-bottom-width: 0;
|
|
462
|
+
}
|
|
463
|
+
.x-spreadsheet-scrollbar.horizontal .x-spreadsheet-scrollbar-button.decrease::before {
|
|
464
|
+
border-top: 4px solid transparent;
|
|
465
|
+
border-right: 5px solid #4f5b6b;
|
|
466
|
+
border-bottom: 4px solid transparent;
|
|
467
|
+
}
|
|
468
|
+
.x-spreadsheet-scrollbar.horizontal .x-spreadsheet-scrollbar-button.increase::before {
|
|
469
|
+
border-top: 4px solid transparent;
|
|
470
|
+
border-bottom: 4px solid transparent;
|
|
471
|
+
border-left: 5px solid #4f5b6b;
|
|
472
|
+
}
|
|
473
|
+
.x-spreadsheet-scrollbar.horizontal .x-spreadsheet-scrollbar-content {
|
|
417
474
|
height: 1px;
|
|
418
|
-
background: #ddd;
|
|
419
475
|
}
|
|
420
476
|
.x-spreadsheet-scrollbar.vertical {
|
|
421
477
|
bottom: 15px;
|
|
478
|
+
width: 15px;
|
|
479
|
+
flex-direction: column;
|
|
480
|
+
}
|
|
481
|
+
.x-spreadsheet-scrollbar.vertical .x-spreadsheet-scrollbar-track {
|
|
482
|
+
width: 12px;
|
|
422
483
|
overflow-x: hidden;
|
|
423
484
|
overflow-y: scroll;
|
|
424
485
|
}
|
|
425
|
-
.x-spreadsheet-scrollbar.vertical
|
|
486
|
+
.x-spreadsheet-scrollbar.vertical .x-spreadsheet-scrollbar-button {
|
|
487
|
+
width: 15px;
|
|
488
|
+
height: 15px;
|
|
489
|
+
border-left-width: 0;
|
|
490
|
+
border-right-width: 0;
|
|
491
|
+
}
|
|
492
|
+
.x-spreadsheet-scrollbar.vertical .x-spreadsheet-scrollbar-button.decrease::before {
|
|
493
|
+
border-right: 4px solid transparent;
|
|
494
|
+
border-bottom: 5px solid #4f5b6b;
|
|
495
|
+
border-left: 4px solid transparent;
|
|
496
|
+
}
|
|
497
|
+
.x-spreadsheet-scrollbar.vertical .x-spreadsheet-scrollbar-button.increase::before {
|
|
498
|
+
border-top: 5px solid #4f5b6b;
|
|
499
|
+
border-right: 4px solid transparent;
|
|
500
|
+
border-left: 4px solid transparent;
|
|
501
|
+
}
|
|
502
|
+
.x-spreadsheet-scrollbar.vertical .x-spreadsheet-scrollbar-content {
|
|
426
503
|
width: 1px;
|
|
427
|
-
background: #ddd;
|
|
428
504
|
}
|
|
429
505
|
/* @{css-prefix}-overlayer */
|
|
430
506
|
.x-spreadsheet-overlayer {
|
|
@@ -679,7 +755,9 @@ body {
|
|
|
679
755
|
z-index: 100;
|
|
680
756
|
width: 260px;
|
|
681
757
|
pointer-events: auto;
|
|
682
|
-
|
|
758
|
+
max-height: calc(100vh - 20px);
|
|
759
|
+
overflow-y: auto;
|
|
760
|
+
overflow-x: hidden;
|
|
683
761
|
}
|
|
684
762
|
.x-spreadsheet-suggest {
|
|
685
763
|
width: 200px;
|
|
@@ -700,12 +778,21 @@ body {
|
|
|
700
778
|
border-left: 1px solid transparent;
|
|
701
779
|
}
|
|
702
780
|
.x-spreadsheet-filter .x-spreadsheet-body {
|
|
703
|
-
height: 200px;
|
|
781
|
+
max-height: 200px;
|
|
704
782
|
overflow-y: auto;
|
|
783
|
+
overflow-x: auto;
|
|
705
784
|
}
|
|
706
785
|
.x-spreadsheet-filter .x-spreadsheet-body .x-spreadsheet-item {
|
|
707
786
|
height: 20px;
|
|
708
787
|
line-height: 20px;
|
|
788
|
+
width: max-content;
|
|
789
|
+
min-width: 100%;
|
|
790
|
+
white-space: nowrap;
|
|
791
|
+
overflow: visible;
|
|
792
|
+
}
|
|
793
|
+
.x-spreadsheet-filter .x-spreadsheet-body .labelcnt {
|
|
794
|
+
flex-shrink: 0;
|
|
795
|
+
white-space: nowrap;
|
|
709
796
|
}
|
|
710
797
|
.x-spreadsheet-sort-filter .x-spreadsheet-buttons {
|
|
711
798
|
margin: 10px;
|
|
@@ -1048,27 +1135,83 @@ body {
|
|
|
1048
1135
|
user-select: none;
|
|
1049
1136
|
}
|
|
1050
1137
|
.x-spreadsheet-calendar .calendar-header {
|
|
1138
|
+
display: flex;
|
|
1139
|
+
align-items: center;
|
|
1140
|
+
justify-content: space-between;
|
|
1051
1141
|
font-weight: 700;
|
|
1052
1142
|
line-height: 30px;
|
|
1053
1143
|
text-align: center;
|
|
1054
1144
|
width: 100%;
|
|
1055
|
-
float: left;
|
|
1056
1145
|
background: #f9fafb;
|
|
1057
1146
|
}
|
|
1058
1147
|
.x-spreadsheet-calendar .calendar-header .calendar-header-left {
|
|
1059
|
-
|
|
1060
|
-
|
|
1148
|
+
flex: 1;
|
|
1149
|
+
display: inline-flex;
|
|
1150
|
+
align-items: center;
|
|
1151
|
+
justify-content: center;
|
|
1152
|
+
gap: 4px;
|
|
1153
|
+
min-width: 0;
|
|
1061
1154
|
}
|
|
1062
|
-
.x-spreadsheet-calendar .calendar-header .calendar-
|
|
1063
|
-
|
|
1155
|
+
.x-spreadsheet-calendar .calendar-header .calendar-title-button {
|
|
1156
|
+
height: 24px;
|
|
1157
|
+
min-width: 52px;
|
|
1158
|
+
padding: 0 8px;
|
|
1159
|
+
border: 1px solid transparent;
|
|
1160
|
+
border-radius: 4px;
|
|
1161
|
+
background: transparent;
|
|
1162
|
+
color: inherit;
|
|
1163
|
+
font: inherit;
|
|
1164
|
+
line-height: 22px;
|
|
1165
|
+
cursor: pointer;
|
|
1064
1166
|
}
|
|
1065
|
-
.x-spreadsheet-calendar .calendar-header .calendar-
|
|
1066
|
-
|
|
1067
|
-
|
|
1167
|
+
.x-spreadsheet-calendar .calendar-header .calendar-title-button:hover {
|
|
1168
|
+
border-color: #d8e6f7;
|
|
1169
|
+
background: #edf5ff;
|
|
1170
|
+
color: #2185D0;
|
|
1171
|
+
}
|
|
1172
|
+
.x-spreadsheet-calendar .calendar-header .calendar-prev,
|
|
1173
|
+
.x-spreadsheet-calendar .calendar-header .calendar-next {
|
|
1174
|
+
flex: 0 0 28px;
|
|
1175
|
+
height: 30px;
|
|
1176
|
+
display: inline-flex;
|
|
1177
|
+
align-items: center;
|
|
1178
|
+
justify-content: center;
|
|
1179
|
+
border: 1px solid transparent;
|
|
1068
1180
|
border-radius: 2px;
|
|
1181
|
+
color: inherit;
|
|
1182
|
+
cursor: pointer;
|
|
1069
1183
|
}
|
|
1070
|
-
.x-spreadsheet-calendar .calendar-header .calendar-
|
|
1071
|
-
|
|
1184
|
+
.x-spreadsheet-calendar .calendar-header .calendar-prev:hover,
|
|
1185
|
+
.x-spreadsheet-calendar .calendar-header .calendar-next:hover {
|
|
1186
|
+
border-color: #d8e6f7;
|
|
1187
|
+
background: #edf5ff;
|
|
1188
|
+
color: #2185D0;
|
|
1189
|
+
}
|
|
1190
|
+
.x-spreadsheet-calendar .calendar-footer {
|
|
1191
|
+
display: flex;
|
|
1192
|
+
align-items: center;
|
|
1193
|
+
justify-content: flex-end;
|
|
1194
|
+
min-height: 36px;
|
|
1195
|
+
padding: 0 10px;
|
|
1196
|
+
border-top: 1px solid #eef0f3;
|
|
1197
|
+
background: #fff;
|
|
1198
|
+
}
|
|
1199
|
+
.x-spreadsheet-calendar .calendar-footer-button {
|
|
1200
|
+
height: 26px;
|
|
1201
|
+
min-width: 46px;
|
|
1202
|
+
padding: 0 8px;
|
|
1203
|
+
border: 1px solid transparent;
|
|
1204
|
+
border-radius: 4px;
|
|
1205
|
+
background: transparent;
|
|
1206
|
+
color: #2185D0;
|
|
1207
|
+
font-weight: 700;
|
|
1208
|
+
line-height: 24px;
|
|
1209
|
+
cursor: pointer;
|
|
1210
|
+
}
|
|
1211
|
+
.x-spreadsheet-calendar .calendar-footer-button:hover {
|
|
1212
|
+
border-color: #d8e6f7;
|
|
1213
|
+
background: #edf5ff;
|
|
1214
|
+
color: #2185D0;
|
|
1072
1215
|
}
|
|
1073
1216
|
.x-spreadsheet-calendar .calendar-body {
|
|
1074
1217
|
border-collapse: collapse;
|
|
@@ -1083,17 +1226,57 @@ body {
|
|
|
1083
1226
|
line-height: 30px;
|
|
1084
1227
|
padding: 0;
|
|
1085
1228
|
}
|
|
1229
|
+
.x-spreadsheet-calendar .calendar-body td > .cell {
|
|
1230
|
+
border: 1px solid transparent;
|
|
1231
|
+
border-radius: 2px;
|
|
1232
|
+
cursor: pointer;
|
|
1233
|
+
}
|
|
1086
1234
|
.x-spreadsheet-calendar .calendar-body td > .cell:hover {
|
|
1087
|
-
|
|
1235
|
+
border-color: #d8e6f7;
|
|
1236
|
+
background: #edf5ff;
|
|
1237
|
+
color: #2185D0;
|
|
1088
1238
|
}
|
|
1089
1239
|
.x-spreadsheet-calendar .calendar-body td > .cell.active,
|
|
1090
1240
|
.x-spreadsheet-calendar .calendar-body td > .cell.active:hover {
|
|
1091
1241
|
background: #ecf6fd;
|
|
1092
1242
|
color: #2185D0;
|
|
1093
1243
|
}
|
|
1244
|
+
.x-spreadsheet-calendar .calendar-body td > .cell.today {
|
|
1245
|
+
color: #2185D0;
|
|
1246
|
+
}
|
|
1094
1247
|
.x-spreadsheet-calendar .calendar-body td > .cell.disabled {
|
|
1095
1248
|
pointer-events: none;
|
|
1096
1249
|
opacity: 0.5;
|
|
1250
|
+
cursor: default;
|
|
1251
|
+
}
|
|
1252
|
+
.x-spreadsheet-calendar .calendar-body td > .cell.out-range {
|
|
1253
|
+
color: rgba(0, 0, 0, 0.35);
|
|
1254
|
+
}
|
|
1255
|
+
.x-spreadsheet-calendar .calendar-body.month-mode td,
|
|
1256
|
+
.x-spreadsheet-calendar .calendar-body.year-mode td {
|
|
1257
|
+
width: 33.33333333%;
|
|
1258
|
+
min-width: 64px;
|
|
1259
|
+
line-height: 42px;
|
|
1260
|
+
}
|
|
1261
|
+
.x-spreadsheet-calendar .calendar-body.month-mode td > .cell,
|
|
1262
|
+
.x-spreadsheet-calendar .calendar-body.year-mode td > .cell {
|
|
1263
|
+
margin: 4px 8px;
|
|
1264
|
+
border-radius: 6px;
|
|
1265
|
+
border: 1px solid transparent;
|
|
1266
|
+
}
|
|
1267
|
+
.x-spreadsheet-calendar .calendar-body.month-mode td > .cell:hover,
|
|
1268
|
+
.x-spreadsheet-calendar .calendar-body.year-mode td > .cell:hover {
|
|
1269
|
+
border-color: #d8e6f7;
|
|
1270
|
+
background: #edf5ff;
|
|
1271
|
+
color: #2185D0;
|
|
1272
|
+
}
|
|
1273
|
+
.x-spreadsheet-calendar .calendar-body.month-mode td > .cell.active,
|
|
1274
|
+
.x-spreadsheet-calendar .calendar-body.year-mode td > .cell.active,
|
|
1275
|
+
.x-spreadsheet-calendar .calendar-body.month-mode td > .cell.active:hover,
|
|
1276
|
+
.x-spreadsheet-calendar .calendar-body.year-mode td > .cell.active:hover {
|
|
1277
|
+
border-color: #2185D0;
|
|
1278
|
+
background: #2185D0;
|
|
1279
|
+
color: #fff;
|
|
1097
1280
|
}
|
|
1098
1281
|
.x-spreadsheet-datepicker {
|
|
1099
1282
|
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
|